nginx安装配置

cd /export/app

tar –zxvf  pcre-8.12.tar.gz

cd pcre-8.12

./configure –prefix=/usr/local/pcre

make && make install

cd /export/a

tar –zxvf  zlib-1.2.8.tar.gz

cd zlib-1.2.8

./configure –prefix=/usr/local/zlib

make && make install

cd /export/app

tar –zxvf openssl-1.0.1j.tar.gz

cd  openssl-1.0.1j

./configure –prefix=/usr/local/openssl

make && make install

cd /export/servers

tar –zxvf  nginx-1.6.0.tar.gz

cd /export/servers/nginx-1.6.0

./configure --prefix=/usr/local/nginx

make && make install

维护:

pkill -9 nginx

/usr/nginx/sbin/nginx -s reload

# 启动

/usr/nginx/sbin/nginx

##检查配置是否正确

/usr/nginx/sbin/nginx -t

nginx -t -c /usr/nginx/conf/nginx.conf

相关推荐