CentOS uses ISO to set local Yum Source:
1. Centos-base.repo renamed to Centos-base.repo.bak to prevent Yum from accessing the network
2. Open Centos-media.repo; edit as follows:
[C5-media]
name=centos-$releasever-media
baseurl=file:///media/centos_5.4_final/
# file:///media/cdrom/
# file:///media/cdrecorder/
Gpgcheck=0
Enabled=1
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-5
3. After saving exit, execute the command:
Yum--disablerepo=*--enablerepo=c5-media Install MySQL
Close all warehouses, open a warehouse named C5-media to install MySQL
Yum can only support one routine, so if a routine is already running, the other must wait for the process to exit and release lock. When this occurs, you can use the following command to recover:
1, Rm-f/var/run/yum.pid
2,/sbin/service yum-updatesd restart
This article is from the "Runaway Mustang" blog, please be sure to keep this source http://10846992.blog.51cto.com/10836992/1719252
CentOS uses ISO to set local Yum source