使用dnf安装nginx
dnf -y install nginx
查看当前安装版本
nginx -v
设置开机自启动
service nginx enable
or
systemctl enable nginx
启动服务
service nginx start
or
systemctl start nginx
修改配置文件
vi /etc/nginx/nginx.conf
重新加载配置文件
service nginx reload
or
systemctl reload nginx
or
nginx -s reload
测试配置
nginx -t
查看Nginx服务状态
service nginx status
or
systemctl status nginx
查看Nginx进程运行状态
ps aux | grep nginx
停止服务
service nginx stop
or
systemctl stop nginx
重启Nginx服务
service nginx restart
or
systemctl restart nginx
卸载
dnf -y remove nginx
评论区