1 安装依赖包
yum install gcc-c++
yum install pcre pcre-devel
yum install zlib zlib-devel
yum install openssl openssl--devel
2 下载安装包
wget http://nginx.org/download/nginx-1.7.4.tar.gz
3 解压后并移动至 /usr/local/目录下
tar -zxvf nginx-1.7.4.tar.gz
mv nginx-1.7.4 /usr/local/
4 进入目录进行make make install
cd /usr/local/nginx-1.7.4/
./configure
make
make install
5 验证
whereis nginx
查看一下命令帮助
/usr/local/nginx/sbin/nginx -h
默认是80端口
浏览器打开 http://10.238.162.33:80