首页 > 代码库 > yum安装技巧和实践篇
yum安装技巧和实践篇
说明:
1)使用-y参数,自动使用yes进行应答
2)使用search搜索相关的rpm包
例如安装livecd-creator工具,需要安装livecd-tools软件,如果
使用yum install livecd-tools 无解!
操作步骤1:yum search live
[root@localhost livecd]# yum -y install livecd-tools anaconda-runtime
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
Setting up Install Process
No package livecd-tools available.
Package anaconda-13.21.215-1.el6.centos.x86_64 already installed and latest version
Nothing to do
[root@localhost livecd]# yum search livecd
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* epel: mirrors.ustc.edu.cn
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
epel/pkgtags | 910 kB 00:09
============================= N/S Matched: livecd ==============================
livecd-tools.x86_64 : Tools for building live CDs
Name and summary matches only, use "search all" for everything.
[root@localhost livecd]# yum -y install livecd-tools.x86_64
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* epel: mirrors.ustc.edu.cn
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package livecd-tools.x86_64 1:13.4.5-1.el6 will be installed
--> Processing Dependency: /sbin/extlinux for package: 1:livecd-tools-13.4.5-1.el6.x86_64
--> Running transaction check
---> Package syslinux-extlinux.x86_64 0:4.02-16.el6_5 will be installed
--> Processing Dependency: syslinux-extlinux-nonlinux for package: syslinux-extlinux-4.02-16.el6_5.x86_64
--> Running transaction check
---> Package syslinux-extlinux-nonlinux.i686 0:4.02-16.el6_5 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
livecd-tools x86_64 1:13.4.5-1.el6 epel 54 k
Installing for dependencies:
syslinux-extlinux x86_64 4.02-16.el6_5 updates 47 k
syslinux-extlinux-nonlinux i686 4.02-16.el6_5 updates 303 k
Transaction Summary
================================================================================
Install 3 Package(s)
Total download size: 405 k
Installed size: 1.3 M
Downloading Packages:
(1/3): livecd-tools-13.4.5-1.el6.x86_64.rpm | 54 kB 00:00
(2/3): syslinux-extlinux-4.02-16.el6_5.x86_64.rpm | 47 kB 00:00
(3/3): syslinux-extlinux-nonlinux-4.02-16.el6_5.i686.rpm | 303 kB 00:03
--------------------------------------------------------------------------------
Total 28 kB/s | 405 kB 00:14
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
Userid : CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>
Package: centos-release-6-5.el6.centos.11.1.x86_64 (@base/$releasever)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : syslinux-extlinux-nonlinux-4.02-16.el6_5.i686 1/3
Installing : syslinux-extlinux-4.02-16.el6_5.x86_64 2/3
Installing : 1:livecd-tools-13.4.5-1.el6.x86_64 3/3
Verifying : syslinux-extlinux-nonlinux-4.02-16.el6_5.i686 1/3
Verifying : syslinux-extlinux-4.02-16.el6_5.x86_64 2/3
Verifying : 1:livecd-tools-13.4.5-1.el6.x86_64 3/3
Installed:
livecd-tools.x86_64 1:13.4.5-1.el6
Dependency Installed:
syslinux-extlinux.x86_64 0:4.02-16.el6_5
syslinux-extlinux-nonlinux.i686 0:4.02-16.el6_5
Complete!