[转载]rhel5 添加删除程序
因为现在的rhel5在安装过程中提示输入INstall Number来定制安装的软件包?默认选择一部分,成功进入系统后!想通过添加删除程序来做,结果和Enterprise 4有改变!
应用程序---添加/删除软件 (当鼠标移到上面的时候提示:改变系统上已安装的软件包),所以进入后,看到可以删除已经安装的软件包,但
是无法添加未安装的软件包!
所以打算挂载本地自己制作的rhel-5-server-dvd.iso来解决本地自由添加删除程序问题!
说明不需要更改/etc/yum.conf文件内容,建立/media/rhel目录
1. mount -o loop rhel-5-server-dvd.iso /media/rhel
2. vi /etc/yum.repos.d/rhel-local.repo
[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
3
[root@rhel5 ~]# mkdir -p /var/rhel/{Cluster,ClusterStorage,Server,VT}
[root@rhel5 ~]# cd /var/rhel/
[root@rhel5 rhel]# ls
Cluster ClusterStorage Server VT
[root@rhel5 rhel5]# rpm -vih /media/rhel/Server/createrepo-0.4.4-2.fc6.noarch.rpm
4. createrepo -o /var/rhel/Cluster -g /media/rhel/Cluster/repodata/comps-rhel5-cluster.xml /media/rhel/Cluster
createrepo -o /var/rhel/ClusterStorage -g /media/rhel/ClusterStorage/repodata/comps-rhel5-cluster-st.xml
/media/rhel/ClusterStorage
createrepo -o /var/rhel/Server -g /media/rhel/Server/repodata/comps-rhel5-server-core.xml /media/rhel/Server
createrepo -o /var/rhel/VT -g /media/rhel/VT/repodata/comps-rhel5-vt.xml /media/rhel/VT
5. mount --bind /var/rhel/Cluster/repodata /media/rhel/Cluster/repodata
mount --bind /var/rhel/ClusterStorage/repodata /media/rhel/ClusterStorage/repodata
mount --bind /var/rhel/Server/repodata /media/rhel/Server/repodata
mount --bind /var/rhel/VT/repodata /media/rhel/VT/repodata
[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
然后再次 应用程序---添加/删除软件 时就可以正常的从本地添加删除rpm 包了
或者
[root@rhel5 rhel5]# system-config-packages
帖子地址
http://linux.