1.安装支持工具
yum -y install pcre* wget gcc openssl-devel
PCRE 作用是让 Ngnix 支持 Rewrite 功能
2.安装nginx
- 切换到安装目录
- 下载:wget http://nginx.org/download/nginx-1.9.8.tar.gz
- 解压缩 tar -zxvf nginx-1.9.8.tar.gz
- cd nginx-1.9.8
- ./configure --prefix=安装位置路径 --with-http_ssl_module --with-http_v2_module --with-http_stub_status_module --with-pcre
- make && make install
3.启动nginx
./sbin/nginx -c conf/nginx.conf