首页 > 其他 > 详细

nginx的安装

时间:2016-01-15 18:00:45      阅读:262      评论:0      收藏:0      [点我收藏+]
  1. 下载openssl-0.9.8zh.tar.gz、zlib-1.2.8.tar.gz、pcre-8.31.tar.gz、nginx-1.9.9.tar.gz。

  2. 解压缩:

    tar -xvzf openssl-0.9.8zh.tar.gz

    tar -xvzf zlib-1.2.8.tar.gz

    tar -xvzf pcre-8.31.tar.gz

    tar -xvzf nginx-1.9.9.tar.gz

  3. 安装

    #cd pcre-8.31

    #./configure

    #make

    #make install

    #cd ..

    #cd openssl-0.9.8zh

    #./config

    #make

    #make install

    #cd ..

    #cd zlib-1.2.8

    #./configure

    #make

    #make install

    #cd ..

    #cd nginx-1.9.9

    #./configure --sbin-path=/usr/local/nginx/nginx --conf-path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid --with-http_ssl_module   --with-pcre=../pcre-8.31  --with-zlib=../zlib-1.2.8 --with-openssl=../openssl-0.9.8zh

    #make

    #make install

    #cd /usr/local/nginx/sbin

    #./nginx

    nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

    nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

    nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

    nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

    nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

    nginx: [emerg] still could not bind()

    #fuser -i 80/tcp

    80/tcp:               3207 17857 17858

    #./nginx

    #

    #adduser --system --no-create-home --disabled-password --group nginx

    Adding system user `nginx‘ (UID 122) ...

    Adding new group `nginx‘ (GID 130) ...

    Adding new user `nginx‘ (UID 122) with group `nginx‘ ...

    Not creating home directory `/home/nginx‘.


nginx的安装

原文:http://yuzwei.blog.51cto.com/10126623/1735270

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!