1:安装
1.1 pcre安装
1.1.1 将tar包传到linux
1.1.2 解压 tar -xvf tar包
1.1.3 进入到pcre目录,执行 ./configure
1.1.4 安装:在pcre目录执行 make && make install
1.2 openssl 、zlib 、 gcc 安装
yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel
1.3 nginx安装
1.3.1 tar包上传
1.3.2 tar -xvf tar包
1.3.3 进入到nginx目录,执行 ./configure
1.3.4 make &&make install
2:启动nignx
2.1 进入目录 /usr/local/nginx/sbin 端口配置在conf下
2.2 ./nginx 启动 (默认端口:80)
3:添加防火墙开放端口
firewall-cmd --add-service=http –permanent
firewall-cmd --add-port=80/tcp --permanent
4:校验
192.168.*.**:80 ip+端口访问
原文:https://www.cnblogs.com/draymond/p/11826331.html