创建本地yum源

如何创建本地yum源

yum install-y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo 
yum list docker-ce.x86_64 --showduplicates | sort-r 
mkdir docker
yum install --downloadonly --downloaddir=/root/docker -y docker-ce-19.03.9-3.el7 docker-ce-cli-19.03.9-3.e17 containerd

yum install -y createrepo mkisofs
createrepo docker
cd ..
mkisofs -r -o docker.iso docker/

# yum源
cd /etc/yum.repos.d
makedir bak
mv *.repo ./bak
vim local.repo
[local]
name=local
baseurl=file:///mnt
enable=1
gpgcheck=0

mount /root/centos7_8_yum.iso /mnt
yum clean all
yum makecache

centos7.6.1810 k8s安装包 yum源制作

yum install --downloadonly --downloaddir=/root/kubernetes -y docker-ce-19.03.5 docker-ce-cli-19.03.5 containerd.io kubelet-1.17.1 kubeadm-1.17.1 kubectl-1.17.1 createrepo mkisofs bash-completion wget net-tools lsof unzip zip tree dos2unix lrsz nc lsof wget tcpdump htop iftop iotop sysstat nethogs vim-enhanced bash-completion-extras psmisc ansible  zlib zlib-devel ruby pcre pcre-devel openssl openssl-devel patch gcc-c++ lrzsz nfs-utils rpcbind  mlocate yum-utils 
posted @ 2021-09-22 17:22  KbMan  阅读(108)  评论(0编辑  收藏  举报