设置防火墙
iptables -F iptables -P FORWARD DROP iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -i lo -j ACCEPT iptables -A INPUT -i lo -j ACCEPT iptables -A INPUT -p tcp --dport 80 -j ACCEPT iptables -A INPUT -p tcp --dport 22 -j ACCEPT iptables -A INPUT -j REJECT service iptables save setenforce 0 vi /etc/sysconfig/selinux
安装组件
yum install epel-release-6-8.noarch.rpm yum install nginx php php-mysql php-xml php-json php-pecl-memcached php-mbstring php-fpm php-devel php-gd yum install php-pecl-memcache yum install memcached yum install mysql mysql-server
修改配置
setfacl -R -m u:nobody:rwx /var/lib/php/session/ setfacl -R -m d:u:nobody:rwx /var/lib/php/session/ /usr/bin/mysqladmin -u root password 'password'