柔中带刚,刚中带柔,淫荡中富含柔和,刚猛中荡漾风骚,无坚不摧,无孔不入!
全部博文(1669)
分类: LINUX
2013-03-28 10:18:24
2013-03-22 10:39:25| 分类: RHEL难点 | 标签: |字号大中小
前面介绍过[]及 [] ,现在RHEL6已经出来一段时间了,原来RHEL5上配置本地YUM源的方法在RHEL6已经不适用了,新的配置方法如下:
创建源文件存放的目录
#mkdir /yum/
加载光盘
#mount /dev/cdrom /media
将光盘文件复制到服务器上的源目录
#cp -a /media/* /yum/
新建一个yum源的响应文件
# vi /etc/yum.repos.d/local.repo
内容如下:
[base]
name=linux 6
baseurl=file:///yum
gpgcheck=0
enable=1
修改yum源的地址
# vi /usr/lib/python2.6/site-packages/yum/yumRepo.py
在上面的文件中找到下面这行
remote = url + '/' + relative
将其改为
remote + '/yum' + relative
配置到这里就完成了,安装个软件做下测试
[root@rhel6-a yum]# yum install samba
Loaded plugins: rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
base | 3.7 kB 00:00 ...
base/primary_db | 2.3 MB 00:00 ...
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package samba.i686 0:3.5.4-68.el6 set to be updated
--> Finished Dependency ResolutionDependencies Resolved
=================================================================================
Package Arch Version Repository Size
=================================================================================
Installing:
samba i686 3.5.4-68.el6 base 5.0 MTransaction Summary
=================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)Total download size: 5.0 M
Installed size: 17 M
Is this ok [y/N]:
大功告成。
当然还可以通过上述方法配置ftp和http的yum源。