CentOS 设置 更新源为本地目录
mount /dev/cdrom /media
mkdir /dvd
cp /media/* /dvd -R
1:备份以前的配置文件,每一个源创建一个以repo后缀结尾就可以了。
mkdir /etc/yum.repos.d/repos_bak
mv /etc/yum.repos.d/*.* /etc/yum.repos.d/repos_bak
vi /etc/yum.repos.d/Linux-DVD.repo
CentOS 6.x:
######################
[DVD]
name=DVD
baseurl=file:///dvd/
enabled=1
gpgcheck=0
#########################
CentOS 5.x:
[base]
name=Server Local Sources
baseurl=file:///dvd/Server
enable=1
gpcheck=1
gpgkey=file:///dvd/RPM-GPG-KEY-redhat-release
[VT]
name=VT Local Sources
baseurl=file:///dvd/VT
enable=1
gpcheck=1
gpgkey=file:///dvd/RPM-GPG-KEY-redhat-release
[Cluster]
name=Cluster Local Sources
baseurl=file:///dvd/Cluster
enable=1
gpcheck=1
gpgkey=file:///dvd/RPM-GPG-KEY-redhat-release
[CS]
name=ClusterStorage Local Sources
baseurl=file:///dvd/ClusterStorage
enable=1
gpcheck=1
gpgkey=file:///dvd/RPM-GPG-KEY-redhat-release