在红帽Linux中使用YUM包管理器(2)

可以使用yum install命令安装软件包,如下所示:

# yum install httpd Loaded plugins: amazon-id, rhui-lb, security Setting up Install Process Resolving Dependencies -> Running transaction check --> Package httpd.x86_64 0:2.2.15-29.el6_4 will be installed -> Processing Dependency: httpd-tools = 2.2.15-29.el6_4 for package: httpd-2.2.15-29.el6_4.x86_64 -> Processing Dependency: apr-util-ldap for package: httpd-2.2.15-29.el6_4.x86_64 -> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.2.15-29.el6_4.x86_64 -> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.2.15-29.el6_4.x86_64 -> Running transaction check --> Package apr.x86_64 0:1.3.9-5.el6_2 will be installed --> Package apr-util.x86_64 0:1.3.9-3.el6_0.1 will be installed --> Package apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1 will be installed --> Package httpd-tools.x86_64 0:2.2.15-29.el6_4 will be installed -> Finished Dependency Resolution Dependencies Resolved ====================================================== Package Arch Version Repository Size ====================================================== Installing: httpd x86_64 2.2.15-29.el6_4 rhui-REGION-rhel-server-releases 821 k Installing for dependencies: apr x86_64 1.3.9-5.el6_2 rhui-REGION-rhel-server-releases 123 k apr-util x86_64 1.3.9-3.el6_0.1 rhui-REGION-rhel-server-releases 87 k apr-util-ldap x86_64 1.3.9-3.el6_0.1 rhui-REGION-rhel-server-releases 15 k httpd-tools x86_64 2.2.15-29.el6_4 rhui-REGION-rhel-server-releases 73 k Transaction Summary ====================================================== Install 5 Package(s) Total download size: 1.1 M Installed size: 3.6 M Is this ok [y/N]: y

如你所见,在安装httpd时yum安装了额外的软件包。这称为yum完成的依赖包解析。

假如你不想让yum弹出[y/N]选项,可以使用yum install -y httpd

使用yum update 命令更新一个已存在的软件包 # yum update httpd Loaded plugins: amazon-id, rhui-lb, security Setting up Update Process No Packages marked for Update

这意味着你系统中安装的httpd软件包已经是yum软件仓库里的最新版本的了。

更多详情见请继续阅读下一页的精彩内容

推荐阅读:

配置EPEL YUM源

RedHat 本地yum源配置

RedHat Linux 本地yum源的配置

RedHat 6.2 Linux修改yum源免费使用CentOS

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/18998.html