[root@web1 ~]# yum -y remove firewalld
[root@web1 ~]# setenforce 0
[root@web1 ~]# yum -y install wget
[root@web1 ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
[root@es_001 ~]# yum repolist
已加载插件:fastestmirror
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Determining fastest mirrors
源标识 源名称 状态
!dvd centos7.5 9,911
repolist: 9,911
[root@es_001 ~]# yum makecache
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
dvd | 3.6 kB 00:00
(1/2): dvd/other_db | 2.5 MB 00:00
(2/2): dvd/filelists_db | 6.9 MB 00:00
元数据缓存已建立
root@es_001 ~]# yum clean all
[root@es_001 ~]# yum makecache
[root@es_001 ~]# yum repolist all
[root@es_001 ~]# yum -y install epel-release.noarch
[root@es_001 ~]# ls /etc/yum.repos.d/
CentOS-Base.repo epel.repo nginx.repo
dvd.repo epel-testing.repo
[root@es_001 ~]# yum -y install --downloadonly --downloaddir=./soft/ nginx
[root@es_001 ~]# tree ./soft/
./soft/
├── nginx-1.20.1-10.el7.x86_64.rpm
├── nginx-filesystem-1.20.1-10.el7.noarch.rpm
├── openssl11-libs-1.1.1k-7.el7.x86_64.rpm
[root@es_001 ~]# yum -y install createrepo
[root@es_001 ~]# createrepo ./