设置 NginxYum

  • 本站下载

# wget -O /etc/yum.repos.d/nginx.repo https://file.cnxiaobai.com/Linux/Nginx/nginx.repo

安装

  • 安装依赖

# yum install -y gcc pcre pcre-devel openssl openssl-devel gd gd-devel zlib zlib-devel perl perl-devel yum-utils
  • 安装 Nginx

# yum-config-manager --enable nginx-mainline
# yum install -y nginx

启停 Nginx

  • 启动

# systemctl start nginx
  • 停止

# systemctl stop nginx
  • 重启

# systemctl restart nginx
  • 开机自启

# systemctl enable nginx

文件路径

  • 配置文件路径

# cd /etc/nginx


人生如戏,全靠演技!