私有yum倉庫配備

2022-09-12 19:03:15 字數 1017 閱讀 3656

服務機配置阿里雲的yum源

cd /etc/yum.repo.d/

mkdir backup

mv ./*.repo/ ./backup

touch aliyun.repo

vim aliyun.repo

儲存退出!

yum repolist 檢視yum源列表

啟用工具

建立相應檔案目錄

mkdir /var/www/html/centos/

yum reposync --repoid=baseos --download-metadata -p /var/www/html/centos

yum reposync --repoid=extras --download-metadata -p /var/www/html/centos

ls /var/www/html/centos/對應源目錄/

顯示:packages repodata

配置需求機yum源

cd /etc/yum.repo.d/

mkdir backup

mv ./*.repo/ ./backup

mkdir test.repo

vim test.repo

[baseos]

name=baseos

baseurl=

gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centosofficial

gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centosofficial

[extras]

name=extras

baseurl=

gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centosofficial

儲存退出!

yum repolist 檢視yum源列表

Docker registry 私有倉庫

registry node mkdir p home registry 宿主機建立registry目錄 docker tag registry latest registry 1.0 為本地映象新增新標籤 docker run d p 5000 5000 privileged true v home...

docker 私有倉庫

netstat ntlp 檢視埠 docker run d p 5001 500 registry 啟動registry docker tag elasticsearch 192.168.199.220 5001 test es v1 給elasticsearch打上tag vim etc sysc...

Docker私有倉庫

1 拉取私有倉庫映象 sudo docker pull registry2 啟動私有倉庫容器 sudo docker run id name registry p 5000 5000 registry3 開啟瀏覽器輸入位址看到表示私有倉庫搭建成功並內容為空。注 192.168.31.106為宿主機i...