对于使用Linux系统的人来说,安装一个yum源对日后的软件安装帮助非常大,下面是自己安装yum的方法,做下记录以便以后随时使用。
创建yum仓库
find / -name "*.iso"[root@stu93 etc]# vim yum.repos.d/rhel-debuginfo.repo
[rhel-debuginfo]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=file:///var/ftp/pub/Server
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[root@stu93 home]# yum install createrepo
[root@stu93 etc]# vim yum.repos.d/rhel-debuginfo.repo
[postfix]
name=my yum server
baseurl=file:///var/ftp/yum
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[root@ postfix]# mount -o loop /root/postfix/EMOS_1.5_i386.iso /mnt1
[root@stu93 Server]# cd /mnt1
[root@stu93 mnt1]# cd EMOS/
[root@stu93 EMOS]# mkdir /var/ftp/yum
[root@stu93 EMOS]# cp *.rpm /var/ftp/yum/
[root@stu93 yum]# ls |wc -l
356
[root@stu93 yum]# pwd
/var/ftp/yum
[root@stu93 yum]# createrepo .
[root@stu93 yum]# cd repodata
[root@stu93 repodata]# yum clean all
[root@stu93 repodata]# yum list
[root@stu93 repodata]# yum list |head