下载安装文件
#mkdir -p nginx/install
#cd nginx/install
#wget nginx-1.6.2.tar.gz
#wget pcre-8.36.tar.gz
#wget zlib-1.2.8.tar.gz
环境配置
#tar -zxf nginx-1.6.2.tar.gz -C ..
#cd ../nginx-1.6.2
#./configure --prefix=/usr/local/nginx
#make
#make install
#/usr/local/nginx/sbin/nginx
#/usr/local/nginx/sbin/nginx -s stop
防火墙配置
#vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
#service iptables restart
安装问题
1. ./configure: error: C compiler cc is not found
#yum install gcc gcc-c++ ncurses-devel perl
2. ./configure: error: the HTTP rewrite module requires the PCRE library.
#yum -y install pcre-devel
3. ./configure: error: the HTTP gzip module requires the zlib library.
#yum -y install zlib-devel
4. OpenSSL library is not used
#yum -y install openssl openssl-devel
最新评论