# cd /var/cache/yum/x86_64/6/base/packages/ libpcap-1.4.0-4.20130826git2dbcaa1.el6.x86_64.rpm tcpdump-4.0.0-9.20090921gitdf3cb4.2.el6.x86_64.rpm 三、使用CentOS的iso搭建本地yum源
#ls /etc/yum.repos.d/ #CentOS-Base.repo CentOS-Media.repo #cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak #vim /etc/yum.repos.d/CentOS-Base.repo 1 [dvd] 2 name=install dvd 3 baseurl=file:///media/CentOS_6.5_Final#iso的挂载路径 4 enable=1 5 gpgcheck=1#是否对下载的rpm包进行安全检查 6 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #yum makecache Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile dvd | 1.1 kB 00:00 dvd/filelists | 2.9 MB 00:00 dvd/other | 9.1 MB 00:00 dvd/group | 920 kB 00:00 dvd/primary | 920 kB 00:00 dvd 2599/2599 dvd 2599/2599 dvd 2599/2599 Metadata Cache Created
cat rhel-debuginfo.repo
[Cluster] name=Red Hat Enterprise Linux $releasever - $basearch - Cluster baseurl=file:///mnt/cdrom/Cluster enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release [ClusterStorage] name=Red Hat Enterprise Linux $releasever - $basearch - ClusterStorage baseurl=file:///mnt/cdrom/ClusterStorage enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release [Server] name=Red Hat Enterprise Linux $releasever - $basearch - Server baseurl=file:///mnt/cdrom/Server enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release [VT] name=Red Hat Enterprise Linux $releasever - $basearch - VT baseurl=file:///mnt/cdrom/VT enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
cat CentOS-Base-aliyun.repo # CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # # [base] name=CentOS-6 - Base - mirrors.aliyun.com failovermethod=priority baseurl= #mirrorlist= gpgcheck=1 gpgkey= #released updates [updates] name=CentOS-6 - Updates - mirrors.aliyun.com failovermethod=priority baseurl= #mirrorlist= gpgcheck=1 gpgkey= #additional packages that may be useful [extras] name=CentOS-6 - Extras - mirrors.aliyun.com failovermethod=priority baseurl= #mirrorlist= gpgcheck=1 gpgkey= #additional packages that extend functionality of existing packages [centosplus] name=CentOS-6 - Plus - mirrors.aliyun.com failovermethod=priority baseurl= #mirrorlist= gpgcheck=1 enabled=0 gpgkey= #contrib - packages by Centos Users [contrib] name=CentOS-6 - Contrib - mirrors.aliyun.com failovermethod=priority baseurl= #mirrorlist= gpgcheck=1 enabled=0 gpgkey=
163的yum
cat CentOS-Base-163.repo
# CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # #
[base] name=CentOS-6 - Base - 163.com baseurl= #mirrorlist= gpgcheck=1 gpgkey=