1、更新源

sudo yum install -y epel-release
sudo yum -y update

2、安装nginx

sudo yum install -y nginx

3、操作nginx

# 启动
systemctl start nginx
# 停止
systemctl stop nginx
# 重启
systemctl restart nginx
# 查看状态
systemctl status nginx
# 开机启动
systemctl enable nginx
# 禁止开机启动
systemctl disable nginx
01-20 07:53