建立本地yum倉庫 #
生一個CentOS7 的環境 #
local repository #
環境 #
CentOS 7
100GB 存放空間
安裝工具 #
yum install yum-utils createrepo -y
啟用 EPEL #
|
|
檢查 #
|
|
yum-config-manager
–add-repo
https://download.docker.com/linux/centos/docker-ce.repo
下載 #
|
|
- –gpgcheck
檢查GPG,失敗澤刪除檔案
gpgcheck是gpg簽名是否開啟的選項名稱,1是開啟,0是不開啟,一般內部部署軟體包下載可以關掉。
- –newest-only
只抓最新的檔案
建立本地yum倉庫 #
|
|
建立repo檔案 #
/etc/yum.repos.d/local.repo
|
|
|
|
安裝 createrepo #
yum install createrepo
同步 #
rsync -avh –exclude=logs /mnt/Intranet/centos7/docker-ce-stable [email protected]:/home/yum/local/ rsync -avh –exclude=logs /mnt/Intranet/centos7/7/extras/Packages/*.rpm [email protected]:/home/yum/local/extras
建立索引 #
|
|