您的位置:首页 > 其它

RHEL5.5_yum的安装和使用

2016-07-14 15:17 344 查看
安装yum工具

cd


/media/RHEL_5.5 x86_64 DVD/Server

rpm -ivh yum-*

warning: yum-3.2.22-26.el5.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

error: Failed dependencies:

 createrepo is needed by yum-tmprepo-1.1.16-13.el5.noarch

[root@localhost Server]# rpm -ivh --nodeps --force  yum-*

warning: yum-3.2.22-26.el5.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

Preparing...                ########################################### [100%]

   1:yum-metadata-parser    ########################################### [  5%]

   2:yum                    ########################################### [ 10%]

   3:yum-aliases            ########################################### [ 14%]

   4:yum-changelog          ########################################### [ 19%]

   5:yum-downloadonly       ########################################### [ 24%]

   6:yum-fastestmirror      ########################################### [ 29%]

   7:yum-filter-data        ########################################### [ 33%]

   8:yum-keys               ########################################### [ 38%]

   9:yum-kmod               ########################################### [ 43%]

  10:yum-list-data          ########################################### [ 48%]

  11:yum-NetworkManager-disp########################################### [ 52%]

  12:yum-protectbase        ########################################### [ 57%]

  13:yum-protect-packages   ########################################### [ 62%]

  14:yum-rhn-plugin         ########################################### [ 67%]

  15:yum-security           ########################################### [ 71%]

  16:yum-tmprepo            ########################################### [ 76%]

  17:yum-updateonboot       ########################################### [ 81%]

  18:yum-updatesd           ########################################### [ 86%]

  19:yum-utils              ########################################### [ 90%]

  20:yum-verify             ########################################### [ 95%]

  21:yum-versionlock        ########################################### [100%]

配置yum源

[root@localhost Server]# vi /etc/yum.repos.d/rhel-debuginfo.repo

添加以下内容

[rhel-server]

name=server

baseurl=file:///u01/app/Server   # rpm包的路径

enabled=1

gpgcheck=0

验证:刷新yum源

[root@localhost ~]# yum clean all

查找gcc包

[root@localhost ~]# yum list|grep gcc

安装gcc关联的包

[root@localhost ~]# yum install gcc --最好写全名

如:

[root@localhost ~]# yum install gcc-c++

Loaded plugins: aliases, changelog, downloadonly, fastestmirror, filter-data, keys, kmod, list-data, protect-packages, protectbase, rhnplugin, security,

              : tmprepo, verify, versionlock

This system is not registered with RHN.

RHN support will be disabled.

Loading mirror speeds from cached hostfile

Skipping filters plugin, no data

0 packages excluded due to repository protections

Reading version lock configuration

Setting up Install Process

Resolving Dependencies

Skipping filters plugin, no data

--> Running transaction check

---> Package gcc-c++.x86_64 0:4.1.2-48.el5 set to be updated

--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================

 Package                            Arch                              Version                                    Repository                              Size

==============================================================================================================================================================

Installing:

 gcc-c++                            x86_64                            4.1.2-48.el5                               rhel-server                            3.8 M

Transaction Summary

==============================================================================================================================================================

Install       1 Package(s)

Upgrade       0 Package(s)

Total download size: 3.8 M

Is this ok [y/N]: y

Downloading Packages:

Running rpm_check_debug

Running Transaction Test

Finished Transaction Test

Transaction Test Succeeded

Running Transaction

  Installing     : gcc-c++                                                                                                                                1/1

Installed:

  gcc-c++.x86_64 0:4.1.2-48.el5                                                                                                                              

Complete!



内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: