分类: LINUX
2011-08-27 15:42:46
Red Hat Enterprise Linux Server release 6.0 --YUM 创库配置
MSN:jieshiyeskey@hotmail.com
1.光盘作为YUM源:
[root@dbserver04 ~]# cat /etc/yum.repos.d/rhel-release.repo
[rhel-release]
name=rhel_6_release_markgeng
baseurl=file:///mnt/Server
enabled=1
gpgcheck=0
[root@dbserver04 ~]# mount /dev/cdrom /mnt
[root@dbserver04 ~]# df -h
文件系统 容量 已用 可用 已用%% 挂载点
/dev/sda1 38G 5.9G 30G 17% /
tmpfs 289M 0 289M 0% /dev/shm
/dev/sr0 3.2G 3.2G 0 100% /mnt
2.FTP服务器作为YUM源:(192.168.1.103)
[root@dbserver03 ~]# yum -y install vsftp*
[root@dbserver03 ~]# /etc/init.d/vsftpd start
Starting vsftpd for vsftpd: [ OK ]
[root@dbserver03 ~]# chkconfig vsftpd on
[root@dbserver03 ~]# chkconfig --list vsftpd
vsftpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@dbserver03 ~]# yum -y install createrepo*
[root@dbserver03 ~]# rpm -qa |grep createrepo
createrepo-0.9.8-4.el6.noarch
[root@dbserver03 pub]# pwd
/var/ftp/pub
[root@dbserver03 pub]# mkdir Server
[root@dbserver03 Server]# pwd
/var/ftp/pub/Server
[root@dbserver03 Server]# cp -rv /mnt/Server/Packages/ .
[root@dbserver03 Server]# cp -rv /mnt/Server/repodata/ .
[root@dbserver03 Server]# cp -rv /mnt/Server/TRANS.TBL .
[root@dbserver03 Server]# createrepo -g
/var/ftp/pub/Server/repodata/1a7fc54d30d0d44222742c63069ab0126afef9f160931cc15e564dbe6414f268-comps-rhel6-Server.xml /var/ftp/pub/Server/
在YUM客户端上的应用:
[root@db-01 ~]# cat /etc/yum.repos.d/rhel-release.repo
[rhel-release]
name=rhel-6-release-markgeng
baseurl=ftp://192.168.0.106/var/ftp/pub/Server
enabled=1
gpgcheck=0
3.第三方的源:
[root@dbserver03 ~]# cat /etc/yum.repos.d/mongodb.repo
[10gen]
name=10gen Repository
baseurl=
gpgcheck=0