sudo yum update -y
sudo yum install nginx -y
# 启动 Nginxsudo systemctl start nginx# 设置开机自启sudo systemctl enable nginx# 查看运行状态sudo systemctl status nginx
# 启动 Nginx
sudo systemctl start nginx
# 设置开机自启
sudo systemctl enable nginx
# 查看运行状态
sudo systemctl status nginx
nginx -v