快捷搜索:   nginx

CentOS 5下使用yum管理软件

在CentOS和Fedora Core的发行版中,采用了一种叫做yum得软件包综合管理工具,它的全称是Yellowdog Updater,Modified,这个工具并不是CentOS开发的,而是由Yellow Dog Linux开发的软件包综合管理工具。作为软件包综合管理工具除了yum外,还有DebianGNU/Linux所采用的APT和Red Hat Enterprise Linux等所采用的up2date(在RHEL5开始采用了YUM的软件包管理)。它们的共同特点是:通过网络安装和升级软件包;

自动解决软件包间的依存关系;这里请注意:Yum的软件包升级的软件包并非是最新 的软件,它是基于RPM软件包形式的软件,是CentOS(RHEL)确 认的安全稳定包。要安装最新的软件,最好采用编译安装的方式。定义yum的非官方库,在服务器构建的过程中,我们将要用到的一些工具不存在于CentOS 中yum的官方库中,所以需要定义yum的非官方库文件,让一些必需的工 具通过yum也能够安装。
[root@centos5 ~]# cat /etc/yum.repos.d/dag.repo (此文件默认不存在,需要手工创建。建立dag.repo,定义非官方库)
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
[root@centos5 ~]# rpm --import (导入非官方库的GPG)

[root@centos5 ~]# yum --help
usage: yum [options] < grouplist, localinstall, groupinfo, localupdate, resolvedep, erase, deplist, groupremove, makecache,

upgrade, provides, shell, install, whatprovides, groupinstall, update, repolist, groupupdate, info, search, check-update,

list, remove, clean, grouperase >

options:
-h, --help            show this help message and exit
-t, --tolerant        be tolerant of errors
-C                    run entirely from cache, don't update cache
-c [config file]     config file location
-R [minutes]         maximum command wait time
-d [debug level]     debugging output level
-e [error level]     error output level
-q, --quiet           quiet operation
-v, --verbose         verbose operation
-y                    answer yes for all questions
--version             show Yum version and exit
--installroot=[path] set install root
--enablerepo=[repo]   enable one or more repositories (wildcards allowed)
--disablerepo=[repo] disable one or more repositories (wildcards allowed)
-x [package], --exclude=[package]
                        exclude package(s) by name or glob
--disableexcludes=[repo]
                        disable exclude from main, for a repo or for
                        everything
--obsoletes           enable obsoletes processing during updates
--noplugins           disable Yum plugins
--nogpgcheck          disable gpg signature checking
--disableplugin=[plugin]
                        disable plugins by name

[root@centos5 ~]# yum check-update (检查可用的更新包)

Deployment_Guide-en-US.noarch            5.2-11.el5.centos      updates
Deployment_Guide-zh-CN.noarch            5.2-11.el5.centos      updates
Deployment_Guide-zh-TW.noarch            5.2-11.el5.centos      updates
avahi.i386                               0.6.16-1.el5_2.1       updates
avahi-glib.i386                          0.6.16-1.el5_2.1       updates
bind-libs.i386                           30:9.3.4-6.0.3.P1.el5_ updates
bind-utils.i386                          30:9.3.4-6.0.3.P1.el5_ updates
bluez-libs.i386                          3.7-1.1                updates
bluez-utils.i386                         3.7-2.2.el5.centos     updates
bzip2.i386                               1.0.3-4.el5_2          updates
bzip2-libs.i386                          1.0.3-4.el5_2          updates
cadaver.i386                             0.22.5-1.el5.rf        dag
cups.i386                                1:1.2.4-11.18.el5_2.3 updates
cups-libs.i386                           1:1.2.4-11.18.el5_2.3 updates
dbus.i386                                1.0.0-7.el5_2.1        updates
dhcpv6-client.i386                       1.0.10-4.el5_2.3       updates
dmraid.i386                              1.0.0.rc13-15.el5_2.1 updates
ed.i386                                  0.2-39.el5_2           updates
freetype.i386                            2.2.1-20.el5_2         updates
glibc.i686                               2.5-24.el5_2.2         updates
glibc-common.i386                        2.5-24.el5_2.2         updates
gnutls.i386                              1.4.1-3.el5_2.1        updates
initscripts.i386                         8.45.19.1.EL-1.el5.cen updates
ipsec-tools.i386                         0.6.5-9.el5_2.3        updates
kernel.i686                              2.6.18-92.1.22.el5     updates
krb5-libs.i386                           1.6.1-25.el5_2.2       updates
krb5-workstation.i386                    1.6.1-25.el5_2.2       updates
lftp.i386                                3.7.8-1.el5.rf         dag
libtiff.i386                             3.8.2-7.el5_2.2        updates
libxml2.i386                             2.6.26-2.1.2.7         updates
libxml2-python.i386                      2.6.26-2.1.2.7         updates
libxslt.i386                             1.1.17-2.el5_2.2       updates
lvm2.i386                                2.02.32-4.el5_2.1      updates
mtr.i386                                 2:0.75-1.el5.rf        dag
nfs-utils.i386                           1:1.0.9-35z.el5_2      updates
nscd.i386                                2.5-24.el5_2.2         updates
nspr.i386                                4.7.3-2.el5            updates
nss.i386                                 3.12.2.0-4.el5.centos updates
nss-tools.i386                           3.12.2.0-4.el5.centos updates
nss_ldap.i386                            253-13.el5_2.1         updates
openldap.i386                            2.3.27-8.el5_2.4       updates
openssh.i386                             4.3p2-26.el5_2.1       updates
openssh-clients.i386                     4.3p2-26.el5_2.1       updates
openssh-server.i386                      4.3p2-26.el5_2.1       updates
openssl.i686                             0.9.8b-10.el5_2.1      updates
pam_krb5.i386                            2.2.14-1.el5_2.1       updates
paps.i386                                0.6.6-18.el5           updates
perl.i386                                4:5.8.8-15.el5_2.1     updates

顶(0)
踩(0)

您可能还会对下面的文章感兴趣:

最新评论