一、安装环境程序:
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
二、修改apache 服务参数
vi /etc/httpd/conf/httpd.conf
三、添加web服务地址和端口
1. ServerName locahost:80
2. 找到
Options FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
四、修改PHP时区参数
vi /etc/php.ini
找到data.timezone,添加为
date.timezone = Asia/Shanghai
五、启动http服务
sudo service httpd start
sudo chkconfig httpd on
六、启动MariaDB服务
sudo service mariadb start
sudo chkconfig mariadb on
七、配置MariaDB
sudo mysql_secure_installation
八、配置防火墙
sudo firewall-cmd --permanent --add-port=80/tcp
sudo firewall-cmd --permanent --add-port=443/tcp
sudo firewall-cmd –reload
九、关闭增强型Linux
setenforce 0
=============================================
下载phpipam
cd /var/www/html/
git clone https://github.com/phpipam/phpipam.git . //最后的 . 不能漏掉,否则程序定位异常
git checkout 1.4
确保上传文件夹可用于xls / csv impor
sudo chown apache:apache -R /var/www/html/
sudo chcon -t httpd_sys_content_t /var/www/html –R
cd /var/www/html/
find . -type f -exec chmod 0644 {} \;
find . -type d -exec chmod 0755 {} \;
sudo chcon -t httpd_sys_rw_content_t app/admin/import-export/upload/ -R
sudo chcon -t httpd_sys_rw_content_t app/subnets/import-subnet/upload/ -R
sudo chcon -t httpd_sys_rw_content_t css/1.3/images/logo/ -R //这条未能生效
把phpipam使用的示例配置文件复制并覆盖掉config.php
cp config.dist.php config.php
增加定时任务
*/5 * * * * /usr/bin/php /var/www/phpipam/functions/scripts/pingCheck.php >> /dev/null 2>&1
*/5 * * * * /usr/bin/php /var/www/phpipam/functions/scripts/discoveryCheck.php >> /dev/null 2>&1
参考文章: https://www.linkedin.com/pulse/phpipam-installation-centos-7-claudio-pellegrino?trk=seokp-post-cta
手机扫一扫
移动阅读更方便
你可能感兴趣的文章