ARTICLE DETAIL

资讯详情

深耕网站视觉设计与运营推广的一线实战洞察。

phpipam实用工具安装部署

phpipam实用工具安装部署 phpipam安装部署一、IPAM管理系统简介二、IPAM安装部署教程2.1 环境准备2.2 安装phpIPAM2.3 phpIPAM web配置一、IPAM管理系统简介phpipam是一个开源Web IP地址管理应用程序IPAM。其目标是提供轻便现代且有用的IP地址管理。它是基于PHP的应用程序具有MySQL数据库后端使用jQuery库ajax和HTML5 / CSS3功能。二、IPAM安装部署教程2.1 环境准备#安装依赖模块 Web server、Database 组件[rootlocalhost~]# yum install httpd mariadb-server php php-cli php-gd php-common php-ldap php-pdo php-pear php-snmp php-xml php-mysql php-mbstring git-y#设置时区[rootlocalhost~]# vim/etc/php.ini[Date];Defines thedefaulttimezone used by the date functions;http://php.net/date.timezone # 修改下面语句 date.timezoneAsia/Shanghai#启动 Apache Web Server 并设置开机启动[rootlocalhost~]# systemctl start httpd[rootlocalhost~]# systemctl enable httpd Created symlink from/etc/systemd/system/multi-user.target.wants/httpd.service to/usr/lib/systemd/system/httpd.service.#启动 MySQL (MariaDB) database server[rootlocalhost~]# systemctl start mariadb[rootlocalhost~]# systemctl enable mariadb Created symlink from/etc/systemd/system/multi-user.target.wants/mariadb.service to/usr/lib/systemd/system/mariadb.service.#配置 Apache Web Server[rootlocalhost~]# vim/etc/httpd/conf/httpd.confDirectory/var/www/html# # Possible valuesforthe Options directive areNone,All,…………省略………… # It can beAll,None,or any combinationofthe keywords:# Options FileInfo AuthConfig Limit ######## 修改此处 ######## # AllowOverride none AllowOverride all Order allow,deny Allow from all # …………省略…………/Directory#初始化数据库设置[rootlocalhost~]# mysql_secure_installationNOTE:RUNNINGALLPARTSOFTHISSCRIPTISRECOMMENDEDFORALLMariaDBSERVERSINPRODUCTIONUSE!PLEASEREADEACHSTEPCAREFULLY!In order to log into MariaDB to secure it,well need the current passwordforthe root user.If youve just installed MariaDB,and you haventsetthe root password yet,the password will be blank,so you should just press enter here.Enter current passwordforroot(enterfornone):OK,successfully used password,moving on...Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation.Set root password?[Y/n]y New password:Re-enternewpassword:Password updated successfully!Reloading privilege tables.....Success!Bydefault,a MariaDB installation has an anonymous user,allowing anyone to log into MariaDB without having to have a user account createdforthem.This is intended onlyfortesting,and to make the installation go a bit smoother.You should remove them before moving into a production environment.Remove anonymous users?[Y/n]y...Success!Normally,root should only be allowed to connectfromlocalhost.This ensures that someone cannot guess at the root password from the network.Disallow root login remotely?[Y/n]n...skipping.Bydefault,MariaDB comeswitha database namedtestthat anyone can access.This is also intended onlyfortesting,and should be removed before moving into a production environment.Remove test database and access to it?[Y/n]y-Dropping test database......Success!-Removing privileges on test database......Success!Reloading the privilege tables will ensure that all changes made so far will take effect immediately.Reload privilege tables now?[Y/n]y...Success!Cleaning up...All done!If youve completed allofthe above steps,your MariaDB installation should now be secure.Thanksforusing MariaDB!2.2 安装phpIPAM#从 git 下载 phpIPAM 文件[rootlocalhost~]# cd/var/www/html/[rootlocalhost html]# git clone https://github.com/phpipam/phpipam.git phpipam 正克隆到phpipam...remote:Enumerating objects:30147,done.remote:Counting objects:100%(310/310),done.remote:Compressing objects:100%(164/164),done.remote:Total30147(delta153),reused289(delta145),pack-reused29837接收对象中:100%(30147/30147),21.75MiB|11.88MiB/s,done.处理 delta 中:100%(22244/22244),done.#先cd 到phpipam确认下git checkout1.4[rootlocalhost phpipam]# git checkout1.4分支1.4设置为跟踪来自 origin 的远程分支1.4。 切换到一个新分支1.4#让 apache 用户有权限访问 phpipam[rootlocalhost phpipam]# chown apache:apache-R/var/www/html/[rootlocalhost phpipam]# cd/var/www/html/[rootlocalhost html]# find.-type f-exec chmod0644{}\;[rootlocalhost html]# find.-type d-exec chmod0755{}\;#配置数据库链接[rootlocalhost html]# cp/var/www/html/phpipam/config.dist.php/var/www/html/phpipam/config.dist.php.bak[rootlocalhost html]# mv/var/www/html/phpipam/config.dist.php/var/www/html/phpipam/config.php[rootlocalhost html]# vim/var/www//html/phpipam/config.php/** * database connection details ******************************/$db[host]localhost;$db[user]phpipam_user;$db[pass]phpipam_Pass;$db[name]phpipam_db;$db[port]3306;# 还有一处需要替换if(!defined(BASE))define(BASE,/phpipam/);#重启 http 服务[rootlocalhost html]# systemctl restart httpd2.3 phpIPAM web配置http://x.x.x.x/phpipam/index.php?pageinstall x.x.x.x地址为服务器的地址未完待续……原文地址https://www.cnblogs.com/zhaoqian0129/p/17232882.html感谢大佬
返回列表