码迷,mamicode.com
首页 > 其他好文 > 详细

nginx的安装

时间:2016-01-15 18:01:40      阅读:209      评论:0      收藏:0      [点我收藏+]

标签:linux web服务器

  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的安装

标签:linux web服务器

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!