- 论坛徽章:
- 0
|
1.mkdir /media/rhel
2.加载光驱复制到rhel
3. vi /etc/yum.repos.d/rhel-local.repo
4.[Cluster]
name=Red Hat Enterprise Linux $releasever - $basearch - Cluster
baseurl=file:///media/rhel/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=file:///media/rhel/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
baseurl=file:///media/rhel/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
baseurl=file:///media/rhel/VT
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
5.mkdir -p /var/rhel/{Cluster,ClusterStorage,Server,VT}
6.rpm -vih /media/rhel/Server/createrepo-0.4.4-2.fc6.noarch.rpm
7.createrepo -o /var/rhel/Cluster -g /media/rhel/Cluster/repodata/comps-rhel5-cluster.xml /media/rhel/Cluster
8.createrepo -o /var/rhel/ClusterStorage -g /media/rhel/ClusterStorage/repodata/comps-rhel5-cluster-st.xml /media/rhel/ClusterStorage
9.createrepo -o /var/rhel/Server -g /media/rhel/Server/repodata/comps-rhel5-server-core.xml /media/rhel/Server
10.createrepo -o /var/rhel/VT -g /media/rhel/VT/repodata/comps-rhel5-vt.xml /media/rhel/VT
11.mount --bind /var/rhel/Cluster/repodata /media/rhel/Cluster/repodata
12.mount --bind /var/rhel/ClusterStorage/repodata /media/rhel/ClusterStorage/repodata
13.mount --bind /var/rhel/Server/repodata /media/rhel/Server/repodata
14.mount --bind /var/rhel/VT/repodata /media/rhel/VT/repodata
15.[root@rhel5 rhel5]# yum clean all
Loading "rhnplugin" plugin
Loading "installonlyn" plugin
This system is not registered with RHN.
RHN support will be disabled.
Cleaning up Everything
16.[root@rhel5 rhel5]# system-config-packages(或者)
注意。。16或者15二选一。。
一定可以。。还有问题可以去我博客留言。。
yayi.biz |
|