Our Customers

新闻资讯

centos7.x源码安装Nginx

发布时间 : 2021/04/30
浏览次数 : 679
文章来源 : 合众启航

1:下载Nginx

image.png

2:添加用户组和用户

groupadd www
useradd -g www www -M -s /sbin/nologin

3:编译参数

./configure
--user=www
--group=www
--prefix=/usr/local/nginx
--with-http_stub_status_module
--with-http_ssl_module
--with-http_gzip_static_module
--with-http_sub_module
--with-pcre

4:安装

make && make install

5:启动

进入安装目录 sbin目录中

./nginx 启动
./nginx -v 版本
./nginx -V 查看nginx编译参数
./nginx -s stop 停止
./nginx -s reload  平滑重启


18049412926