YUM的环境设置
(1)mount /dec/cdrom /mnt/cdrom
cp -rv /mnt/cdrom/Server /yum
(1)mount /dec/cdrom /mnt/cdrom
cp -rv /mnt/cdrom/Server /yum
(2)cd /etc/yum.repo.d
cp rhel-debuginfo.repo local.repo
vim local.repo
[Server]
name=Red Hat Enterprise Linux
baseurl=file:///yum/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
cp rhel-debuginfo.repo local.repo
vim local.repo
[Server]
name=Red Hat Enterprise Linux
baseurl=file:///yum/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
(3)cd /mnt/cdrom/Server
rpm -ivh createrepo--------
cp repodate/comps-rhel5-server----/root
rm -rf repodata
createrepo -g /root/comps------------/yum/Server
rpm -ivh createrepo--------
cp repodate/comps-rhel5-server----/root
rm -rf repodata
createrepo -g /root/comps------------/yum/Server
(4)yum clean all
(5)yum list
(5)yum list
转载于:https://blog.51cto.com/4774199/925337