六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 30|回复: 0

Centos 下安装nginx

[复制链接]

升级  36%

4

主题

4

主题

4

主题

童生

Rank: 1

积分
18
 楼主| 发表于 2013-2-4 13:35:03 | 显示全部楼层 |阅读模式
刚安装完Centos并下载好nginx,在使用configure编译时提示缺少相关组件,以下为安装步骤:

      1.安装依赖库

       yum install gcc openssl-devel pcre-devel zlib-devel
      2.运行configure


 ./configure \  --prefix=/usr \  --sbin-path=/usr/sbin/nginx \  --conf-path=/etc/nginx/nginx.conf \  --error-log-path=/var/log/nginx/error.log \  --pid-path=/var/run/nginx/nginx.pid  \  --lock-path=/var/lock/nginx.lock \  --user=nginx \  --group=nginx \  --with-http_ssl_module \  --with-http_flv_module \  --with-http_gzip_static_module \  --http-log-path=/var/log/nginx/access.log \  --http-client-body-temp-path=/var/run/nginx/client/ \  --http-proxy-temp-path=/var/run/nginx/proxy/ \  --http-fastcgi-temp-path=/var/run/nginx/fcgi/ \  --http-uwsgi-temp-path=/var/run/nginx/uwsgi/ \  --http-scgi-temp-path=/var/run/nginx/scgi/


      3.安装


make && make install
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表