补装单个软件包
完成本地源配置过后,接下来就可以用 yum 进行 RPM 包的补装了。首先,查看刚刚配置好的 yum 源。
# yum list
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
dvd | 1.3 kB 00:00
dvd/primary | 732 kB 00:00
dvd: [##############################################################] 2292/2292/
Installed Packages
Deployment_Guide-en-US.noarch 5.2-11 installed
GConf2.i386 2.14.0-9.el5 installed
ImageMagick.i386 6.2.8.0-4.el5_1.1 installed
......
Available Packages
Deployment_Guide-as-IN.noarch 5.2-11 dvd
Deployment_Guide-bn-IN.noarch 5.2-11 dvd
Deployment_Guide-de-DE.noarch 5.2-11 dvd
......
zlib-devel.i386 1.2.3-3 dvd
zsh.i386 4.2.6-3.el5 dvd
zsh-html.i386 4.2.6-3.el5 dvd
然后,通过熟知的 yum install 来补装软件包。从输出信息可以看到,yum 会帮我们处理好 RPM 包的依赖关系。同时由于包都在本地,下载的时间几乎可以忽略。很快 gcc 将安装到系统中。
# yum install gcc
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gcc.i386 0:4.1.2-46.el5 set to be updated
--> Processing Dependency: libgomp >= 4.1.2-46.el5 for package: gcc
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc
...
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
gcc i386 4.1.2-46.el5 dvd 5.2 M
Installing for dependencies:
glibc-devel i386 2.5-42 dvd 2.0 M
...
Transaction Summary
================================================================================
Install 5 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 8.8 M
Is this ok [y/N]: y
Downloading Packages:
--------------------------------------------------------------------------------
Total 1.2 GB/s | 8.8 MB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : kernel-headers 1/5
...
Installing : gcc 5/5
Installed:
gcc.i386 0:4.1.2-46.el5
Dependency Installed:
glibc-devel.i386 0:2.5-42 glibc-headers.i386 0:2.5-42
kernel-headers.i386 0:2.6.18-164.el5 libgomp.i386 0:4.4.0-6.el5
Complete!