Hot Ice

记录精彩的程序人生

Anything is possible!
  menu
41 文章
0 浏览
0 当前访客
ღゝ◡╹)ノ❤️

centos软件安装-nginx

1.在线安装
yum -y install nginx

2.离线安装
cd /home/soft/nginx
wget http://nginx.org/download/nginx-1.18.0.tar.gz
tar -zxvf nginx-1.18.0.tar.gz
cd nginx-1.18.0
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
make && make install
vim /lib/systemd/system/nginx.service

[Unit]Description=nginx serviceAfter=network.target
[Service]Type=forkingExecStart=/usr/local/nginx/sbin/nginx ExecReload=/usr/local/nginx/sbin/nginx -s reloadExecStop=/usr/local/nginx/sbin/nginx -s quitPrivateTmp=true
[Install]WantedBy=multi-user.target

#设置开机自启动
systemctl enable nginx

#启动
systemctl start nginx


标题:centos软件安装-nginx
作者:炎无道
地址:https://justxy.xyz/articles/2020/11/05/1604563739750.html