CentOS 7 安装 Nginx

设置 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


标题:CentOS 7 安装 Nginx
作者:Mune
地址:https://cnxiaobai.com/articles/2021/04/21/1618992536237.html

    评论
    0 评论
avatar

取消