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