六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 60|回复: 0

Linux下安装nginx时注意事项

[复制链接]

升级  79.33%

45

主题

45

主题

45

主题

秀才

Rank: 2

积分
169
 楼主| 发表于 2013-2-4 13:31:22 | 显示全部楼层 |阅读模式
1、下载最新的稳定版
 
wget http://nginx.org/download/nginx-1.0.6.tar.gz
   
2、执行如下命令
 
tar zxf nginx-1.0.6.tar.gzcd nginx-1.0.6./configure --prefix=/usr/local/nginx1.0.6makemake install 
3、如果在./configure时出现:
the HTTP rewrite module requires the PCRE library
则检查系统是否安装了pcre-devel包,
       可以使用:
       yum  install pcre-devel
4、如果提示:
    error: the HTTP cache module requires md5 functions from OpenSSL library.
 
    可以使用:
   yum  install openssl openssl-devel
 
5、如果没有yum,方法如下:
 
 
    去   http://www.pcre.org/ 下载最新版文件
 
   解压到服务器指定目录,并
   ./configure --prefix=/usr/local/pcre8.12,让pcre生成Makefiles文件
 
之后,进入nginx安装目录,执行:
 
 
./configure --prefix=/usr/local/nginx1.0.6 -with-pcre=/usr/local/pcre8.12makemake install  
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

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