标签:
配置防火墙
vi /etc/sysconfig/iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT -A INPUT -p icmp -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 8081 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 8082 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT -A INPUT -j REJECT --reject-with icmp-host-prohibited -A FORWARD -j REJECT --reject-with icmp-host-prohibited /etc/init.d/iptables restart
二、编译安装Nginx
yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel
wget http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz
./configure
make && make install
yum install -y gcc gcc-c++
wget http://nginx.org/download/nginx-1.6.2.tar.gz
./configure --prefix=/usr/local/nginx --without-http_rewrite_module
--without-http_gzip_module
make && make install
/usr/local/webserver/nginx/sbin/nginx -v
/usr/local/webserver/nginx/sbin/nginx
ps -ef|grep nginx
wget http://cn2.php.net/distributions/php-5.6.0.tar.xz
#添加组
groupadd www
#添加php-fpm用户
useradd -c php-fpm-user -g www -M php-fpm
标签:
原文地址:http://www.cnblogs.com/wangwanchao/p/5628118.html