制作本地YUM源
mkdir /mnt/cdrom
mount /dev/hdc /media
cd /media/CentOS
rpm –ivh createrepo-0.4.4-2.noarch.rpm
cd /media/CentOS
createrepo .
创建客户端yum文件
cd /etc/yum.repos.d
mkdir backup
mv *.repo ./backup
vi cdrom.repo
mkdir /mnt/cdrom
mount /dev/hdc /media
cd /media/CentOS
rpm –ivh createrepo-0.4.4-2.noarch.rpm
cd /media/CentOS
createrepo .
创建客户端yum文件
cd /etc/yum.repos.d
mkdir backup
mv *.repo ./backup
vi cdrom.repo
[Mycentos]
name=Mycentos
baseurl=file:///media/CentOS
enabled=1
gpgcheck=0
name=Mycentos
baseurl=file:///media/CentOS
enabled=1
gpgcheck=0
转载于:https://blog.51cto.com/crazyming/313098