三、搭建YUM Client
10.1.123.61
先确认是否已经安装yum包
[root@localhost ~]# rpm -qa | grep yum
yum-3.2.22-20.el5
yum-security-1.1.16-13.el5
yum-metadata-parser-1.1.2-3.el5
yum-updatesd-0.9-2.el5
yum-rhn-plugin-0.5.4-13.el5
将yum客户端定义库文件(/etc/yum.repos.d/rhel-debuginfo.repo)复制备份一份(名称任意,但必须以.repo结尾)修改其bashurl及名称即可。
[root@localhost yum.repos.d]# ls
rhel-debuginfo.repo rhel-debuginfo.repo.bak
配置客户端参数文件:
[root@localhost yum.repos.d]# vi rhel-debuginfo.repo
[rhel-debuginfo]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=ftp://ftp.RedHat.com/pub/redhat/linux/enterprise/$releasever/en/os/$basearch/Debuginfo/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[Server]
name=Server
#baseurl=file:///mnt/yumrepofile/Server/Packages
baseurl=file:///mnt/yumrepofile/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
~
重新加载客户端yum配置参数:
[root@localhost yum.repos.d]# yumclean all
Loaded plugins: rhnplugin, security
Cleaning up Everything
测试安装:
[root@localhost yum.repos.d]# yum install mysql
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Server| 1.1 kB00:00
Server/primary| 1.0 MB00:00
Server3040/3040
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mysql.i386 0:5.0.77-3.el5 set to be updated
--> Processing Dependency: perl(DBI) for package: mysql
---> Package mysql.x86_64 0:5.0.77-3.el5 set to be updated
--> Running transaction check
---> Package perl-DBI.x86_64 0:1.52-2.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
===============================================================================================
PackageArchVersionRepositorySize
===============================================================================================
Installing:
mysqli3865.0.77-3.el5Server4.8 M
mysqlx86_645.0.77-3.el5Server4.8 M
Installing for dependencies:
perl-DBIx86_641.52-2.el5Server605 k
Transaction Summary
===============================================================================================
Install3 Package(s)
Update0 Package(s)
Remove0 Package(s)
Total download size: 10 M
Is this ok [y/N]: N这里是测试,所以不安装,选择N,实际安装中应该选择Y
Exiting on user Command
Complete!
