Get the App
SLTechnology News&Howtos  ›  Servers  › 

Centos7 yum installs the latest and stable version of nginx

Shulou Source: shulou.com Published: 2022-06-02 21:47:15 09月22日 Update

1. First create the nginx official source

Vim / etc/yum.repos.d/nginx.repo

[nginx]

Name=nginx repo

Baseurl= http://nginx.org/packages/centos/7/$basearch/

Gpgcheck=0

Enabled=1

2. Download nginx from yum

Yum install nginx-y

3. Check the nginx version after the download is completed

[root@jiankong local] # nginx-v

Nginx version: nginx/1.16.1

The default html root directory is: / usr/share/nginx/html

The default configuration files are: / etc/nginx/conf.d/default.conf and / etc/nginx/nginx.conf

Tags: Version official file root configuration Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Shulou Tech Info MariaDB Linux NVidia