rhel6.4 配置本地yum的源
2013-09-16 19:41
381 查看
1 创建rhel-debuginfo.repo,如果有则先备份再删除
cd /etc/yum.repos.d
rm rhel-debuginfo.repo
vi rhel-debuginfo.repo
插入以下内容
[Server]
name=Red Hat Enterprise Linux Server
baseurl=file:///mnt #本地iso的挂载路径
enabled=1 #可以使用yum
gpgcheck=0 #设置不检查gpgkey
gpgkey=file:///mnt/RPM-GPG-KEY-redhat-release # 配置gpgkey的路径
2 修改yumRepo.py配置文件
cd /usr/lib/python2.6/site-packages/yum/
vi yumRepo.py
找到 remote = url + ‘/’ + relative #802行
改为 remote = "/mnt" + '/' + relative
3 挂载iso文件
mount /dev/cdrom /mnt
4 测试 安装ftp 默认没有安装
yum list | grep vsftpd
vsftpd.i686 2.2.2-11.el6 @Server
安装:yum install vsftpd.i686
[root@redhat6 yum]# rpm -e vsftpd.i686
[root@redhat6 yum]# yum install vsftpd.i686
Loaded plugins: fastestmirror, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package vsftpd.i686 0:2.2.2-11.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================================================
Package Arch Version Repository Size
======================================================================================================================================
Installing:
vsftpd i686 2.2.2-11.el6 Server 157 k
Transaction Summary
======================================================================================================================================
Install 1 Package(s)
Total download size: 157 k
Installed size: 344 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
** Found 3 pre-existing rpmdb problem(s), 'yum check' output follows:
PackageKit-0.5.8-21.el6.i686 has missing requires of PackageKit-yum = ('0', '0.5.8', '21.el6')
PackageKit-0.5.8-21.el6.i686 has missing requires of PackageKit-yum-plugin = ('0', '0.5.8', '21.el6')
rhn-check-1.0.0.1-4.el6.noarch has missing requires of yum-rhn-plugin >= ('0', '0.9.1', '35')
Installing : vsftpd-2.2.2-11.el6.i686 1/1
Verifying : vsftpd-2.2.2-11.el6.i686 1/1
Installed:
vsftpd.i686 0:2.2.2-11.el6
Complete!
验证成功
cd /etc/yum.repos.d
rm rhel-debuginfo.repo
vi rhel-debuginfo.repo
插入以下内容
[Server]
name=Red Hat Enterprise Linux Server
baseurl=file:///mnt #本地iso的挂载路径
enabled=1 #可以使用yum
gpgcheck=0 #设置不检查gpgkey
gpgkey=file:///mnt/RPM-GPG-KEY-redhat-release # 配置gpgkey的路径
2 修改yumRepo.py配置文件
cd /usr/lib/python2.6/site-packages/yum/
vi yumRepo.py
找到 remote = url + ‘/’ + relative #802行
改为 remote = "/mnt" + '/' + relative
3 挂载iso文件
mount /dev/cdrom /mnt
4 测试 安装ftp 默认没有安装
yum list | grep vsftpd
vsftpd.i686 2.2.2-11.el6 @Server
安装:yum install vsftpd.i686
[root@redhat6 yum]# rpm -e vsftpd.i686
[root@redhat6 yum]# yum install vsftpd.i686
Loaded plugins: fastestmirror, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package vsftpd.i686 0:2.2.2-11.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================================================
Package Arch Version Repository Size
======================================================================================================================================
Installing:
vsftpd i686 2.2.2-11.el6 Server 157 k
Transaction Summary
======================================================================================================================================
Install 1 Package(s)
Total download size: 157 k
Installed size: 344 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
** Found 3 pre-existing rpmdb problem(s), 'yum check' output follows:
PackageKit-0.5.8-21.el6.i686 has missing requires of PackageKit-yum = ('0', '0.5.8', '21.el6')
PackageKit-0.5.8-21.el6.i686 has missing requires of PackageKit-yum-plugin = ('0', '0.5.8', '21.el6')
rhn-check-1.0.0.1-4.el6.noarch has missing requires of yum-rhn-plugin >= ('0', '0.9.1', '35')
Installing : vsftpd-2.2.2-11.el6.i686 1/1
Verifying : vsftpd-2.2.2-11.el6.i686 1/1
Installed:
vsftpd.i686 0:2.2.2-11.el6
Complete!
验证成功
相关文章推荐
- rhel6.4 配置本地yum的源
- RHEL6.4 配置本地yum的源
- RHEL5通过光盘配置本地yum仓库及命令详解
- RHEL5实现YUM本地挂载光盘源的配置
- 配置Rhel5.8的本地yum源
- RHEL 5.4 ,配置 yum为本地源
- [基础]RHEL本地yum配置
- RHEL下本地yum仓库的配置方法
- RHEL配置本地yum源
- RHEL6.4-YUM配置
- VMware中RHEL7配置本地Yum仓库
- rhel7.x配置本地yum
- 如何在RHEL6.5中配置光盘中的数据位本地YUM源
- RHEL6.4配置光盘为本地yum源
- RHEL6.1配置光盘为本地yum源
- RHEL5.3中配置本地yum详解(from RHEL5 DVD)
- rhel6.3 yum配置本地安装源
- RHEL5.3中配置本地yum详解包括RHEL5.1(from RHEL5 DVD)
- rhel yum 本地配置
- rhel 6.0 配置 yum 本地源