wenfengsun

nginx安装

Posted on: March 10, 2012

1. 安装PCRE(Perl Compatible Regular Expressions)
地址:http://sourceforge.net/projects/pcre/files/pcre/8.30/pcre-8.30.tar.gz/download
执行:./configure make&make install
此模块用于正则表达式,nginx rewrite
2. 安装zlib(用于gzip模块)
地址:http://www.linuxidc.com/upload/2008_09/08091520581351.tar
执行:./configure make&make install
3. 安装nginx(1.0.13)
地址:http://nginx.org/download/nginx-1.0.13.tar.gz
./configure make&make install
4. 启动nginx,可能会报错:
[root@sever sbin]# ./nginx
./nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
切换到/usr目录,执行:ln -s /usr/local/lib/libpcre.so.1 /lib
在/lib中添加一个软链接。
再次启动,OK。

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: