设置PHP 和Apache
打开默认文件,输入如下命令设置PHP的设置,会显示如下参数。
[root@open-audit ~]# vim /etc/php.ini
# sed -i -e 's/memory_limit/;memory_limit/g' /etc/php.ini
# echo "memory_limit = 512M" >> /etc/php.ini
# sed -i -e 's/max_execution_time/;max_execution_time/g' /etc/php.ini
# echo "max_execution_time = 300" >> /etc/php.ini
# sed -i -e 's/max_input_time/;max_input_time/g' /etc/php.ini
# echo "max_input_time = 600" >> /etc/php.ini
# sed -i -e 's/error_reporting/;error_reporting/g' /etc/php.ini
# echo "error_reporting = E_ALL" >> /etc/php.ini
# sed -i -e 's/display_errors/;display_errors/g' /etc/php.ini
# echo "display_errors = On" >> /etc/php.ini
# sed -i -e 's/upload_max_filesize/;upload_max_filesize/g' /etc/php.ini
# echo "upload_max_filesize = 10M" >> /etc/php.ini
# sed -i -e 's/date.timezone/;date.timezone/g' /etc/php.ini
# echo "date.timezone = Europe/London" >> /etc/php.ini
用如下命令设置apache web中的主机名
# echo "ServerName open-audit" >> /etc/httpd/conf/httpd.conf
然后请改变shell for Apache,同时重启服务器,以查看更改效果。
[root@open-audit ~]# chsh -s /bin/bash apache
Changing shell for apache.
Shell changed.
[root@open-audit ~]# systemctl restart httpd.service
为nmap设置SUID( Set User ID)
[root@open-audit ~]# chmod u+s /usr/bin/nmap
最后我们需要确认一下自己的IP地址,然后就可以开始现在安装最新版的Open-Audit了
[root@open-audit ~]# ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'
172.25.10.173