如何在ubunto系统部署Nginx

1、 wget http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz

下载pcre-8.35.tar.gz

解压 tar zxvf pcre-8.35.tar.gz

cd  pcre-8.35

./configure

make && make install

2、 wget http://zlib.net/zlib-1.2.11.tar.gz tar -zxvf zlib-1.2.11

tar.gz cd zlib-1.2.11

./configure

make

make install

3、wget https://www.openssl.org/source/openssl-1.0.1t.tar.gz

tar -zxvf openssl-1.0.1t.tar.gz

./configure

make

make install

4、wget http://nginx.org/download/nginx-1.6.2.tar.gz

./configure

如果出现了 not fund openssl

可以输入下面的内容

./configure --prefix=/usr/local/nginx  --with-openssl=/usr/local/openssl-1.0.1t --with-http_ssl_module 

make

make install

5、cd /usr/local/nginx/sbin

./nginx

启动失败,尝试关闭80 端口

netstat -anp | grep :80

kill -9 id

6、查看 ps -ef|grep nginx

fuser -n tcp 80

猜你喜欢

转载自www.cnblogs.com/goodboy321/p/9928476.html