下载地址:http://www.nginx.org/download/nginx-1.2.3.tar.gz
使用wget命令下载 # wget http://www.nginx.org/download/nginx-1.2.3.tar.gz
解压缩: # tar -zxvf nginx-1.2.3.tar.gz
设置安装目录: #./configure --prefix=/usr/local/nginx
然后系统会检查参数
我这里报了一个错:
./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.
看这个意思貌似缺少了PCRE library 库,那得先安装下这玩意,要是没报错可以跳过下面的步骤:
PCRE 包 下载地址:ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.20.tar.gz
同样的,下载后解压 #tar -zxvfpcre-8.20,配置 #./configure
编译#make 安装#make install
----------------------------------------------------------------------------------------------------------
OK!接着再进行nginx的安装目录: #./configure --prefix=/usr/local/nginx
又报了一个错。
./configure: error: the HTTP gzip module requires the zlib library.
You can either disable the module by using --without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library
statically from the source with nginx by using --with-zlib=<path> option.
缺少 zlib library 。。缺少zlib包。。这装系统的时候省事什么也不装,装个软件真没玩没了的了。。咱继续解决这问题:
下载地址:http://zlib.net/zlib-1.2.7.tar.gz 安装完这个我的就没问题了。你们的还有没有问题我就不知道了
---------------------------------------------------------------------------------------------------------------