1.基础环境设置
1.1语言
# more /etc/environment
LC_ALL=en_US.utf-8
LANG=en_US.utf-8
1.2软件包
# yum install epel-release
# yum install PHP-mcrypt
# 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
1.3配置 Apache
# cat /etc/httpd/conf/httpd.conf<Directory "/var/www/HTML"> Options FollowSymlinks AllowOverrIDe all Order allow,deny Allow from all</Directory>
1.4配置PHP
# grep timezone /etc/PHP.inidate.timezone = Asia/Shanghai
1.5启动apache
# systemctl start httpd# systemctl enable httpd# firewall-cmd --permanent --add-port=80/tcp# firewall-cmd --permanent --add-port=443/tcp# firewall-cmd --reload
1.6MysqL配置
# systemctl start mariadb# systemctl enable mariadb# MysqL_secure_installation
1.7下载PHPipam及授权
# cd /var/www/HTML/# git clone https://github.com/PHPipam/PHPipam.git# git checkout 1.4# chown apache:apache -R /var/www/HTML/# cd /var/www/HTML/# find . -type f -exec chmod 0644 {} \;# find . -type d -exec chmod 0755 {} \;
通常建议禁用selinux,若开启需要进行如下设置:
chcon -t httpd_sys_content_t /var/www/HTML/ –Rchcon -t httpd_sys_rw_content_t app/admin/import-export/upload/ -Rchcon -t httpd_sys_rw_content_t app/subnets/import-subnet/upload/ -Rchcon -t httpd_sys_rw_content_t CSS/1.4.2/images/logo/ -R
1.8修改配置文件
# cp config.dist.PHP config.PHP# cat config.PHP 3 /** 4 * database connection details 5 ******************************/ 6 $db['host'] = 'localhost'; <<<<<<<<<< 7 $db['user'] = 'PHPipam'; <<<<<<<<<< 8 $db['pass'] = 'ip#admin'; <<<<<<<<<< 9 $db['name'] = 'PHPipam'; <<<<<<<<<< 10 $db['port'] = 3316; <<<<<<<<<< ... 127 define('BASE', "/PHPipam/"); <<<<<<<<<<
1.9安装与使用
打开设置为中文:administration-->users-->PHPIPAM admin--->Account details标签页中将Language English修改为中文。
2.自动扫描
# yum install fPing# setcap 'CAP_NET_RAW+ep' /usr/sbin/fPing# crontab -l*/5 * * * * /usr/bin/PHP /var/www/HTML/PHPipam/functions/scripts/PingCheck.PHP >> /dev/null 2>&1*/5 * * * * /usr/bin/PHP /var/www/HTML/PHPipam/functions/scripts/discoveryCheck.PHP >> /dev/null 2>&1
3.数据备份
# Backup IP address table, remove backups older than 10 days0 2 * * * /usr/bin/MysqLdump -uroot -P***** PHPipam > /opt/backup/PHPipam_bkp_$(date +"\%y\%m\%d").db0 2 * * * /usr/bin/find /opt/backup/ -ctime +10 -exec rm {} \;
4.邮件配置
发送测试邮件时提示:Mailer Error: PHPMailer submodule is missing.# git submodule update --init --recursive
参考:
https://www.PHPipam.net/PHPipam-installation-on-centos-7/https://github.com/PHPipam-docker/PHPipam-dockerhttps://www.PHPipam.net/demo/
总结
以上是内存溢出为你收集整理的phpipam安装全部内容,希望文章能够帮你解决phpipam安装所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)