安装Nginx前准备工作:
1:安装prce
yum install pcre pcre-devel -y
2:安装openssl
yum install openssl openssl-devel
3:若在“./configure”后方加入了“--with-http_gzip_static_module”
则需要安装“zlib-devel”即可。SSH执行以下命令:yum install zlib-devel -y
开始安装Nginx
1:添加用户 useradd Nginx -s /sbin/nologin -M
2:配置./configure --user=Nginx --group=Nginx --prefix=/application/Nginx1.6.2
--with-http_stub_status_module --with--http_ssl_modulemake
3:编译 make
4:安装 make install
5:检查语法 /application/sbin/Nginx -t
6:启动Nginx: /application/sbin/Nginx
7;访问本机ip
原文链接:https://www.f2er.com/centos/376230.html