1、首先需要安装gcc
yum install gcc-c++
2、PCRE pcre-devel 安装
yum install -y pcre pcre-devel
3、zlib 安装
yum install -y zlib zlib-devel
4、OpenSSL 安装
yum install -y openssl openssl-devel
5、从官网下载Nginx
使用tar命令解压
tar -zxvf Nginx-1.10.1.tar.gz
6、解压以后执行
./configure && make && make install
启动、停止Nginxcd /usr/local/Nginx/sbin/./Nginx ./Nginx -s stop./Nginx -s quit./Nginx -s reload