CentOS7經過YUM安裝NGINX穩定版本

  1. 建立 nginx.repo 文件nginx

    $ cd /etc/repos.d/
    $ vim nginx.repo
    #寫入如下內容
    [nginx-stable]
    name=nginx stable repo
    baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
    gpgcheck=1
    enabled=1
    gpgkey=https://nginx.org/keys/nginx_signing.key
  2. 安裝vim

    $ yum -y install nginx
  3. 啓動centos

    $ systemctl start nginx.service
    $ systemctl enable nginx.service
相關文章
相關標籤/搜索