首先配置好本地yum仓库
参考
1.安装远程访问软件(Nginx)
[root@localhost ~]# curl -o /etc/yum.repos.d/CentOS-Base.repo https://repo.huaweicloud.com/repository/conf/CentOS-7-reg.repo
[root@localhost ~]# yum-config-manager --add-repo=https://repo.huaweicloud.com/epel/7/x86_64/
[root@localhost ~]# yum install nginx --nogpgcheck
2.修改nginx配置文件
https://nginx.org/en/docs/ht