...
Code Block |
---|
|
yum -y install httpd
chkconfig --levels 235 httpd on
service httpd start |
Install PHP, SNMP, zip and Nmapthe other required packages
Code Block |
---|
|
yum -y install nano php php-cli php-mysql php-ldap php-mbstring php-mcrypt php-snmp php-xml nmap zip curl wget sshpass screen samba-client |
...
Code Block |
---|
|
sed -i 's/\*filter$/*filter\n-A INPUT -m state --state NEW -p tcp --dport 443 -j ACCEPT/' /etc/sysconfig/iptables
sed -i 's/\*filter$/*filter\n-A INPUT -m state --state NEW -p tcp --dport 80 -j ACCEPT/' /etc/sysconfig/iptables
/etc/init.d/iptables restart |
Configure PHP (substituting $TIMEZONE from above).
...
Set the SUID for the nmap binary (so we can use the apache front end to run scripts which call nmap).
NOTE - This command will likely need to be re-run if Nmap is upgraded.
Code Block |
---|
|
chmod u+s /usr/bin/nmap |