系统平台:Red Hat Enterprise Linux Server release 5
1、 将DVD光盘挂载到/media/cdrom中 (mount -t iso9660 /dev/cdrom /media);
2、 拷贝/media/cdrom中的所有文件到/media/yum1;
(或者不用拷贝,后面所有的拷贝路径换成自己media/isos的路径)
3、 /etc/yum.repos.d/rhel-debuginfo.repo :
(可以直接拷贝下面的东东到该文件,修改你的文件路径。退出wq)
[Cluster]
name=Red Hat Enterprise Linux $releasever - $basearch - Cluster
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[ClusterStorage]
name=Red Hat Enterprise Linux $releasever - $basearch - ClusterStorage
baseurl= 你的文件路径 /ClusterStorage
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[Server]
name=Red Hat Enterprise Linux $releasever - $basearch - Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[VT]
name=Red Hat Enterprise Linux $releasever - $basearch - VT
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
4、/usr/lib/python2.4/site-packages/yum/yumRepo.py第411行:
remote = url + '/' + relative
改为:
remote = “你的文件路径 /Server” + '/' + relative
5、yum clean all
6、yum install iptraf 测试!成功!!!
7.yum install 你的包或者 yum groupinstall Clustering
本地安装源:
------------------------------------------------------------------
baseurl =file:///mnt/Server
enable =1
gpgcheck =0
------------------------------------------------------------------
或
baseurl =file:///mnt/Server
enabled =1
gpgcheck =1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release