标签:下载 base seve down dia usr strong pki repo
yum搭建本地仓库[root@apenglinux-001 ~]# mount /dev/cdrom /mnt/
[root@apenglinux-001 yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.bak
[root@apenglinux-001 yum.repos.d]# cp CentOS-Media.repo CentOS-Base.repo
[root@apenglinux-001 yum.repos.d]# vim CentOS-Base.repo
[c7-media]
name=CentOS-$releasever - Media
baseurl=file:///mnt/
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[root@apenglinux-001 yum.repos.d]# yum clean all
[root@apenglinux-001 yum.repos.d]# yum list
[root@apenglinux-001 yum.repos.d]# yum repolist all
yum下载rpm包(只下载不安装,仅适用于centos7以上版本)
只下载:# yum install zsh --downloadonly
下载到指定目录:# yum install zsh --downloadonly --downloaddir=/usr/local/src/
标签:下载 base seve down dia usr strong pki repo
原文地址:http://blog.51cto.com/liuzhengwei521/2072101