一.获取nginx软件包
wget -P /app/tools http://nginx.org/download/nginx-1.16.1.tar.gz
二.安装devel development软件相关开发库和C编译器
yum install -y openssl-devel pcre-devel yum -y install gcc gcc-c++ autoconf automake make
三.生成配置文件
./configure --prefix=/app/nginx-1.16.1 --user=www --group=www --with-http_ssl_module --with-http_stub_status_module --with-stream --with-stream_ssl_module
四.编译,转换成二进制文件
make
五.进行安装
①make install
②查看是否安装
/app/nginx-1.16.1/sbin/nginx -V
六.nginx启动等命令
/app/nginx-1.16.1/sbin/nginx nginx #启动 nginx -t #检查 nginx -s reload #重启 nginx -s stop #关闭
赞赏
微信赞赏
支付宝赞赏