首先配置本地yum源,需要在本机拥有操作系统的iso安装文件,以下以Oracle linux为例
# cd /etc/yum.repos.d
--将其他repo文件重命名
# ls
public-yum-el5.repo.1 public-yum-el5.repo.2 public-yum-el5.repo.bk
--创建新repo文件,Server文件夹为rpm软件包的路径
# vi local_yum_el5.repo
[oelr5u8]
name=oelr5u8
baseurl=file:///mnt/Server
gpgcheck=0
enabled=1
# yum clean all
# yum list
# yum install oracle-validated
[root@rh56 dev]# yum install samba
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
oelr5u8 | 1.1 kB 00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package samba.x86_64 0:3.0.33-3.37.el5 set to be updated
--> Processing Dependency: samba-common = 3.0.33-3.37.el5 for package: samba
--> Processing Dependency: perl(Convert::ASN1) for package: samba
--> Running transaction check
---> Package perl-Convert-ASN1.noarch 0:0.20-1.1 set to be updated
---> Package samba-common.x86_64 0:3.0.33-3.37.el5 set to be updated
--> Processing Dependency: libsmbclient = 3.0.33-3.37.el5 for package: samba-common
--> Running transaction check
---> Package libsmbclient.i386 0:3.0.33-3.37.el5 set to be updated
---> Package libsmbclient.x86_64 0:3.0.33-3.37.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
==========================================================================================================================
Package Arch Version Repository Size
==========================================================================================================================
Installing:
samba x86_64 3.0.33-3.37.el5 oelr5u8 16 M
Installing for dependencies:
perl-Convert-ASN1 noarch 0.20-1.1 oelr5u8 42 k
samba-common x86_64 3.0.33-3.37.el5 oelr5u8 6.8 M
Updating for dependencies:
libsmbclient i386 3.0.33-3.37.el5 oelr5u8 908 k
libsmbclient x86_64 3.0.33-3.37.el5 oelr5u8 917 k
Transaction Summary
==========================================================================================================================
Install 3 Package(s)
Upgrade 2 Package(s)
Total download size: 25 M
Is this ok [y/N]: y
Downloading Packages:
--------------------------------------------------------------------------------------------------------------------------
Total 643 MB/s | 25 MB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : libsmbclient 1/7
Installing : samba-common 2/7
Updating : libsmbclient 3/7
Installing : perl-Convert-ASN1 4/7
Installing : samba 5/7
Cleanup : libsmbclient 6/7
Cleanup : libsmbclient 7/7