10:在服务器端必须重建分组及依赖关系,即:在仓库Server、Cluster、VT、ClusterStorage的repodata中重新生成primary.xml.gz文件,该文件是由comps-rhel5-xxx-st.xml生成的。 这样在客户端才能检测出结果:
[root@lyt repodata]# cd /mnt/cdrom/Server/
[root@lyt Server]# rpm -ivh createrepo-0.4.11-3.el5.noarch.rpm #安装createrepo包,安装此包后可以执createrepo命令。
[root@lyt Server]# createrepo –g /var/ftp/pub/Server/repodata/comps-rhel5-server-core.xml /var/ftp/pub/Server/ #在Server仓库中,用createrepo命令来重新生成RPM 依赖关系及分组信息,可以在/var/ftp/pub/Server/repodata/中重新生成primary.xml.gz文件(-g表示分组信息。)
[root@lyt VT]# createrepo -g /var/ftp/pub/VT/repodata/comps-rhel5-vt.xml /var/ftp/pub/VT #在VT仓库中,用createrepo命令来重新生成RPM依赖关系及分组信息,可以重新生成可以在/var/ftp/pub/VT/repodata/中重新生成primary.xml.gz文件 (-g表示分组信息)
[root@lyt Cluster]# createrepo -g /var/ftp/pub/Cluster/repodata/comps-rhel5-cluster.xml /var/ftp/pub/Cluster #在Cluster仓库中,用createrepo命令来重新生成RPM依赖关系及分组信息,可以重新生成可以在/var/ftp/pub/Cluster/repodata/中重新生成primary.xml.gz文件 (-g表示分组信息)
[root@lyt ClusterStorage]# createrepo -g /var/ftp/pub/ClusterStorage/repodata/comps-rhel5-cluster-st.xml /var/ftp/pub/ClusterStorage/ #在ClusterStorage仓库中,用createrepo命令来重新生成RPM依赖关系及分组信息,可以重新生成可以在/var/ftp/pub/ClusterStorage/repodata/中重新生成primary.xml.gz文件 (-g表示分组信息)
11:[root@localhost ~]# yum clean all #清除客户端缓存
[root@localhost ~]# yum list all |grep rrdtool #使用yum查看rrdtool软件包。如图:
测试:在客户端上安装http服务器:
案例二:使用http服务器
切换到服务器端
1:[root@lyt Server]# rpm -ivh httpd-2.2.3-31.el5.i386.rpm #安装http服务器
[root@lyt html]# cp –r /mnt/cdrom/. /var/www/html/ #将光盘文件拷贝到/var/www/html中
[root@lyt ~]# service httpd restart #重启http服务器
注:其他步骤与案例一 8~11步一样
案例三:本地yum服务器
1:[root@localhost yum.repos.d]# cp rhel-debuginfo.repo local.repo #拷贝文件,名为local.repo
[root@localhost yum.repos.d]# vim local.repo #编辑该文件如图所示: