- 论坛徽章:
- 381
|
给你个我在centos6.4上做本地源的例子:
将光盘挂载到/media目录下
将/etc/yum.repos.d目录下的文件,除了CentOS-Media.repo之外,全部mv到别的目录下.
修改CentOS-Media.repo,内容如下:
[root@localhost ~]# cat /etc/yum.repos.d/CentOS-Media.repo
# CentOS-Media.repo
#
# This repo can be used with mounted DVD media, verify the mount point for
# CentOS-6. You can use this repo and yum to install items directly off the
# DVD ISO that we release.
#
# To use this repo, put in your DVD and use it with the other repos too:
# yum --enablerepo=c6-media [command]
#
# or for ONLY the media repo, do this:
#
# yum --disablerepo=\* --enablerepo=c6-media [command]
[c6-media]
name=CentOS-$releasever - Media
baseurl=file:///media/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
[MariaDb]
name=MariaDB yum
baseurl=http://mirror.yongbok.net/mariadb/mariadb-5.5.30/yum/rhel6-amd64/
enabled=1
gpgcheck=0
然后yum clean all
yum makecache
就可以了 |
|