1 安装包下载
下载地址:http://nginx.org/download/
2 安装
2.1 解压
tar zxvf nginx-1.1.5.tar.gz
2.2 编译安装
cd nginx-1.1.5
./configure --prefix=/usr/local/nginx
此过程会报错:
(1) ./configure: error: C compiler gcc is not found
yum -y install gcc gcc-c++
(2) ./configure: error: the HTTP rewrite module requires the PCRE library.
yum -y install pcre-devel
(3) ./configure: error: the HTTP gzip module requires the zlib library.
yum -y install zlib-devel
make
make install