ITeye博客

Linux下安装nginx时注意事项

xiaojiit · 2011-09-21 19:55 · Linux · nginx · 开源软件 · Markdown

1、下载最新的稳定版

 

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

  

 

2、执行如下命令

 

tar zxf nginx-1.0.6.tar.gz
cd nginx-1.0.6
./configure --prefix=/usr/local/nginx1.0.6
make
make 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.12
make
make install

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。