分类:
2009-12-19 04:22:05
1。创建存放pachage的目录 /var/ftp/pub
2. 安装ftp/http server (也可不必用ftp)
3.安装createrepo包
4。复制光盘中所有文件到/var/ftp/pub目录中
(1.repomd.xml:存放该目录中所有文件的依赖关系)
(2.comps-rhel-vt.xml:存放该目录中所有文件的分组关系)
(ex:yum groupinstall "GNOME" / yum install httpd)
createrepo -V /var/ftp/pub/VT/
cresterepo –g /var/ftp/pub/VT/repodata/comps-xxx.cml /var/ftp/pub/VT
5.编辑/etc/yum.repos.d/server.repo 文件
[Server]
name=Red Hat Enterprise Linux $releasever - $basearch - Server
baseurl=file:///var/yumdb/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:///var/yumdb/VT
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[Cluster]
name=Red Hat Enterprise Linux $releasever - $basearch - Cluster
baseurl=file:///var/yumdb/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:///var/yumdb/ClusterStorage/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
~