首先,准备好ftp服务器,详情参见本人上一篇博客http://iceblock.blog.51cto.com/6758400/1166892。
准备libmcrypt-2.5.7-5.e15.i386.rpm
php-mcrypt-5.1.6-5.e15.i386.rpm
建立yum服务器
cd /var/ftp/cdrom(进入ftp服务器上的光盘目录)
service vsftpd start(启动vsftpd)
ll /var/ftp/cdrom/server/repodata/(server仓库中几个文件)
ll /var/ftp/cdrom/VT/repodata/(VT仓库中几个文件)
虚拟机中打开另一台linux做为yum服务器的客户端
构建server仓库
vim /etc/yum.repos/d/rhel-debuginfo.repo(编辑yum的文件)
[rhel-server]
name=Red Hat Enterprise Linux server
baseurl=ftp://192.168.126.30 /cdrom/server(修改baseurl)
gpgkey=ftp://192.168.126.30 /cdrom/RPM-GPG-KEY-redha-release(修改gpgkey)
构建VT(虚拟化)仓库
[rhel-vt]
name=Red Hat Enterprise Linux vt
baseurl=ftp://192.168.126.30 /cdrom/VT(修改baseurl)
gpgkey=ftp://192.168.126.30 /cdrom/RPM-GPG-KEY-redha-release(修改gpgkey)
构建cluster(群集)仓库
[rhel-cluster]
name=Red Hat Enterprise Linux cluster
baseurl=ftp://192.168.126.30 /cdrom/Cluster(修改baseurl)
gpgkey=ftp://192.168.126.30 /cdrom/RPM-GPG-KEY-redha-release(修改gpgkey)
构建ClusterStorage(存储)仓库
[rhel-clusterstorage]
name=Red Hat Enterprise Linux clusterstorage
baseurl=ftp://192.168.126.30 /cdrom/ClusterStorage(修改baseurl)
gpgkey=ftp://192.168.126.30 /cdrom/RPM-GPG-KEY-redha-release(修改gpgkey)