| |
再此之前写了一篇,关于CentOS5和RHEL5用DVD光盘直接构建yum库的问题。发现自己对于这个认识不是很深,今天又尝试重新的做了一下,发现不是那个样子。其实RHEL5和CentOS5的光盘,一样简单。用自动挂载后,做个软链接,都可以搞定。做软链接的部分如下:

[root@rhce local]# mkdir  RHEL5
[root@rhce local]# cd RHEL5/
[root@rhce RHEL5]# ln -s /misc/iso/* ./


RHEL5的DVD,yum库本地创建,配置文件/etc/yum.repos.d/RHEL5-Test.repo

[root@rhce yum.repos.d]# cat RHEL5-Test.repo
[rhel5-Server]
name=RHEL5-Server
baseurl=file:///var/local/RHEL5/Server
gpgcheck=1
enabled=1
gpgkey=file:///var/local/RHEL5/RPM-GPG-KEY-redhat-release

[rhel5-VT]
name=RHEL5-VT
baseurl=file:///var/local/RHEL5/VT
gpgcheck=1
enabled=1
gpgkey=file:///var/local/RHEL5/RPM-GPG-KEY-redhat-release

[rhel5-Cluster]
name=RHEL5-Cluster
baseurl=file:///var/local/RHEL5/Cluster
gpgcheck=1
enabled=1
gpgkey=file:///var/local/RHEL5/RPM-GPG-KEY-redhat-release

[rhel5-ClusterStorage]
name=RHEL5-Server
baseurl=file:///var/local/RHEL5/ClusterStorage
gpgcheck=1
enabled=1
gpgkey=file:///var/local/RHEL5/RPM-GPG-KEY-redhat-release


2007/10/15添加一个ftp的写法

[root@server yum.repos.d]# cat rhel5-dvd.repo
[rhel5-Server]
name=RHEL5-Server
baseurl=ftp://redhat:redhat@192.168.101.250/rhel5/Server
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[rhel5-VT]
name=RHEL5-VT
baseurl=ftp://redhat:redhat@192.168.101.250/rhel5/VT
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[rhel5-Cluster]
name=RHEL5-Cluster
baseurl=ftp://redhat:redhat@192.168.101.250/rhel5/Cluster
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[rhel5-ClusterStorage]
name=RHEL5-Server
baseurl=ftp://redhat:redhat@192.168.101.250/rhel5/ClusterStorage
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release



更新一下库,查看一下,用命令yum check-update

[root@rhce yum.repos.d]# yum check-update
Loading "installonlyn" plugin
Setting up repositories
rhel5-Server              100% |=========================| 1.3 kB    00:00
rhel5-Cluster             100% |=========================| 1.3 kB    00:00
rhel5-ClusterStorage      100% |=========================| 1.3 kB    00:00
rhel5-VT                  100% |=========================| 1.3 kB    00:00
Reading repository metadata in from local files
primary.xml.gz            100% |=========================| 663 kB    00:00
rhel5-Serv: ################################################## 2113/2113
Added 2113 new packages, deleted 0 old in 13.69 seconds
primary.xml.gz            100% |=========================| 6.4 kB    00:00
rhel5-Clus: ################################################## 32/32
Added 32 new packages, deleted 0 old in 0.18 seconds
primary.xml.gz            100% |=========================| 4.2 kB    00:00
rhel5-Clus: ################################################## 32/32
Added 32 new packages, deleted 0 old in 0.15 seconds
primary.xml.gz            100% |=========================| 6.0 kB    00:00
rhel5-VT  : ################################################## 31/31
Added 31 new packages, deleted 0 old in 0.23 seconds

gnome-desktop.i386                       2.16.0-1.fc6           rhel5-Server
redhat-artwork.i386                      5.0.9-1.el5            rhel5-Server
redhat-logos.noarch                      4.9.16-1               rhel5-Server
rhgb.i386                                0.16.4-8.el5           rhel5-Server
[root@rhce yum.repos.d]# yum grouplist
Loading "installonlyn" plugin
Setting up Group Process
Setting up repositories
comps-rhel5-server-core.x 100% |=========================| 907 kB    00:00
comps-rhel5-cluster.xml   100% |=========================|  92 kB    00:00
comps-rhel5-cluster-st.xm 100% |=========================|  99 kB    00:00
comps-rhel5-vt.xml        100% |=========================|  94 kB    00:00
Installed Groups:
  Office/Productivity
  MySQL Database
  Editors
  System Tools
  Text-based Internet
  Legacy Network Server
  DNS Name Server
  GNOME Desktop Environment
  FTP Server
  Network Servers
  Games and Entertainment
  Windows File Server
  X Window System
  Graphics
  Web Server
  Printing Support
  Mail Server
  Server Configuration Tools
  Sound and Video
  Administration Tools
  News Server
  Graphical Internet
Available Groups:
  Cluster Storage
  Engineering and Scientific
  Development Libraries
  GNOME Software Development
  X Software Development
  Virtualization
  Authoring and Publishing
  Legacy Software Development
  Clustering
  Java Development
  KDE Software Development
  KDE (K Desktop Environment)
  PostgreSQL Database
  Development Tools
Done


挂载镜像的部分略.CentOS5的DVD,yum库本地创建,配置文件/etc/yum.repos.d/CentOS5-DVD.repo,先处理掉刚才的库记录。用yum clean all.

[root@rhce local]# mkdir CentOS5
[root@rhce local]# ls
CentOS5  RHEL5
[root@rhce local]# yum clean all
Loading "installonlyn" plugin
Cleaning up Everything

产看配置文件,并更新库。

[root@rhce local]# mkdir CentOS5
[root@rhce local]# cd CentOS5/
[root@rhce CentOS5]# ln -s /misc/iso/* ./
[root@rhce CentOS5]# cat /etc/yum.repos.d/CentOS-DVD.repo
[CentOS5-DVD]
name=CentOS5-DVD
baseurl=file:///var/local/CentOS5
gpgcheck=1
enabled=1
gpgkey=file:///var/local/CentOS5/RPM-GPG-KEY-CentOS-5
[root@rhce CentOS5]# yum check-update
Loading "installonlyn" plugin
Setting up repositories
CentOS5-DVD               100% |=========================| 1.1 kB    00:00
Reading repository metadata in from local files
primary.xml.gz            100% |=========================| 798 kB    00:00
CentOS5-DV: ################################################## 2334/2334
Added 2334 new packages, deleted 0 old in 14.07 seconds
[root@rhce CentOS5]# yum grouplist
Loading "installonlyn" plugin
Setting up Group Process
Setting up repositories
comps.xml                 100% |=========================| 912 kB    00:00
Installed Groups:
  Office/Productivity
  MySQL Database
  Editors
  System Tools
  Text-based Internet
  Legacy Network Server
  DNS Name Server
  GNOME Desktop Environment
  Dialup Networking Support
  FTP Server
  Network Servers
  Games and Entertainment
  Java
  X Window System
  Graphics
  Web Server
  Windows File Server
  Printing Support
  Mail Server
  Server Configuration Tools
  Sound and Video
  Administration Tools
  News Server
  Graphical Internet
Available Groups:
  Engineering and Scientific
  Development Libraries
  GNOME Software Development
  X Software Development
  Virtualization
  Authoring and Publishing
  Legacy Software Development
  Java Development
  Emacs
  Legacy Software Support
  Ruby
  KDE Software Development
  KDE (K Desktop Environment)
  PostgreSQL Database
  Development Tools
Done



本文链接:http://www.52zhe.cn/read.php/111.htm
本文作者:kook(若就博客内所涉及的技术问题交流,请用下面的MSN或Gmail联系我)
联系方式:(MSN:kook#live.com) (Google talk:kookliu)
没有版权:GNU,转载时请注明“转载人”欠本人一顿饭,来日见面之时兑现!谢谢合作!
by kook | 分类: RHCE | 评论(0) | 引用(0) | 阅读(1283)
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]