centos 5.4 版本32位 安装 nginx

来源:互联网 发布:七微的小说南风知我意2 编辑:程序博客网 时间:2024/06/05 19:38

1) 安装 zlib库:

wget    http://prdownloads.sourceforge.net/libpng/zlib-1.2.8.tar.gz?download

tar  zxvf   zlib-1.2.8.tar.gz

./configure
make
make install

2) 安装 pcre库:

wget   http://sourceforge.net/projects/pcre/files/pcre/8.36/pcre-8.36.tar.gz/download

tar  zxvf   pcre-8.36.tar.gz

./configure
make
make install

3) 安装 openssl库:

wget   http://www.openssl.org/source/openssl-1.0.2a.tar.gz

tar  zxvf   openssl-1.0.2.tar.gz

./config
make
make install

4)安装 nginx服务:

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

tar  zxvf   nginx-1.6.2.tar.gz

./configure --with-pcre=../pcre-8.36 --with-zlib=../zlib-1.2.8 --with-http_ssl_module --with-openssl=../openssl-1.0.2
make

make install


5) 启动nginx服务:

  /usr/local/nginx/sbin/nginx
  重启nginx服务:
/usr/local/nginx/sbin/nginx –s reload


6)修改配置文件

cd /usr/local/nginx/conf

vi nginx.conf


7) 浏览器访问:http://localhost 看到 nginx 欢迎界面。

1 0
原创粉丝点击