ubuntu下nginx的安装

ubuntu下nginx的安装

安装build-essential

apt-get install build-essential libssl-dev

nginx的安装

1)下载:(http://nginx.org/en/download.html

# wget http://nginx.org/download/nginx-1.2.8.tar.gz (稳定版本)

2)解压:

# tar zxvf nginx-1.2.8.tar.gz

# cd nginx-1.2.8

3)配置

# ./configure --prefix=/usr/local/nginx --with-pcre=/usr/local/pcre --with-http_stub_status_module --with-http_gzip_static_module

4)编译、安装

# make

# make install

./configure --prefix=/usr/local/nginx  --with-pcre=/usr/local/pcre/

注意:此处而不是安装的路径,应该是pcre源文件的路径

正确的命令是:

./configure --prefix=/usr/local/nginx  --with-pcre=/usr/local/src/pcre-8.32

其中参数 –with-http_stub_status_module 是为了启用 nginx 的 NginxStatus 功能,用来监控 Nginx 的当前状态。

 

====================================== 

来自: http://www.cnblogs.com/xiaogangqq123/archive/2011/03/02/1969006.html 

猜你喜欢

转载自lzyfn123.iteye.com/blog/1681579