Yum Server Configuration


I have seen most of the people who try to install Oracle RDBMS/Oracle Grid Infrastructure on Linux OS very first time or so get stuck at the stage of RPM package validation and while installing them one by one at OS level due to dependencies among them. So to overcome from such situation and to do all RPMs/packages installations in an easy way you should configure yum server on a machine and let it do all the downloading/installation of all packages itself for you.

To configure yum server, first of all we need to identify the installed Linux OS version and it’s corresponding public yum repository.

[root@localhost ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)

[root@localhost ~]# cd /etc/yum.repos.d/

Now we will be creating public-yum-el5.repo named file with following details to cofig the yum server pointing public yum repository.

[root@localhost ~]# vi public-yum-el5.repo

[el5_u4_base]
name=Enterprise Linux $releasever Update 4 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/4/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=0
enabled=1

Note : Make sure you have changed the value of enabled to 1 from 0, Save and Exit;

List repository packages in Oracle Linux as shown below now.

[root@localhost ~]# yum list

Now we are ready to install any packages required with following yum install command:

[root@localhost ~]# yum install [package_name]

For example, I wanted to install elfutils-devel packages but it has dependent packages to be installed first. As we have already configured the yum server then we just need to provide some start string of the package to be installed ending with asterisk(*) then it will automatically download/install all its dependent packages along as follows:

[root@localhost yum.repos.d]# yum install elfutils*
Loaded plugins: rhnplugin, security
This system is not registered with ULN.
ULN support will be disabled.
Setting up Install Process
Package elfutils-libelf-0.137-3.el5.x86_64 already installed and latest version
Resolving Dependencies
–> Running transaction check
—> Package elfutils.x86_64 0:0.137-3.el5 set to be updated
—> Package elfutils-devel.i386 0:0.137-3.el5 set to be updated
—> Package elfutils-devel.x86_64 0:0.137-3.el5 set to be updated
—> Package elfutils-devel-static.i386 0:0.137-3.el5 set to be updated
—> Package elfutils-devel-static.x86_64 0:0.137-3.el5 set to be updated
—> Package elfutils-libelf.i386 0:0.137-3.el5 set to be updated
—> Package elfutils-libelf-devel.i386 0:0.137-3.el5 set to be updated
—> Package elfutils-libelf-devel.x86_64 0:0.137-3.el5 set to be updated
—> Package elfutils-libelf-devel-static.i386 0:0.137-3.el5 set to be updated
—> Package elfutils-libelf-devel-static.x86_64 0:0.137-3.el5 set to be updated
—> Package elfutils-libs.i386 0:0.137-3.el5 set to be updated
—> Package elfutils-libs.x86_64 0:0.137-3.el5 set to be updated
–> Finished Dependency Resolution

Dependencies Resolved

=================================================================================================
Package                             Arch          Version              Repository          Size
=================================================================================================
Installing:
elfutils                            x86_64        0.137-3.el5          el5_u5_base        215 k
elfutils-devel                      i386          0.137-3.el5          el5_u5_base         61 k
elfutils-devel                      x86_64        0.137-3.el5          el5_u5_base         62 k
elfutils-devel-static               i386          0.137-3.el5          el5_u5_base        122 k
elfutils-devel-static               x86_64        0.137-3.el5          el5_u5_base        119 k
elfutils-libelf                     i386          0.137-3.el5          el5_u5_base         58 k
elfutils-libelf-devel               i386          0.137-3.el5          el5_u5_base         24 k
elfutils-libelf-devel               x86_64        0.137-3.el5          el5_u5_base         24 k
elfutils-libelf-devel-static        i386          0.137-3.el5          el5_u5_base         66 k
elfutils-libelf-devel-static        x86_64        0.137-3.el5          el5_u5_base         64 k
elfutils-libs                       i386          0.137-3.el5          el5_u5_base        193 k
elfutils-libs                       x86_64        0.137-3.el5          el5_u5_base        183 k

Transaction Summary
=================================================================================================
Install      12 Package(s)
Upgrade       0 Package(s)

Total download size: 1.2 M
Is this ok [y/N]: y

Note : Here you can see it asks for all dependent packages to be downloaded or not so we will press (y) to download all dependent packages.

Downloading Packages:
(1/12): elfutils-libelf-devel-0.137-3.el5.x86_64.rpm                      |  24 kB     00:00
(2/12): elfutils-libelf-devel-0.137-3.el5.i386.rpm                        |  24 kB     00:00
(3/12): elfutils-libelf-0.137-3.el5.i386.rpm                              |  58 kB     00:00
(4/12): elfutils-devel-0.137-3.el5.i386.rpm                               |  61 kB     00:00
(5/12): elfutils-devel-0.137-3.el5.x86_64.rpm                             |  62 kB     00:00
(6/12): elfutils-libelf-devel-static-0.137-3.el5.x86_64.rpm               |  64 kB     00:00
(7/12): elfutils-libelf-devel-static-0.137-3.el5.i386.rpm                 |  66 kB     00:00
(8/12): elfutils-devel-static-0.137-3.el5.x86_64.rpm                      | 119 kB     00:00
(9/12): elfutils-devel-static-0.137-3.el5.i386.rpm                        | 122 kB     00:00
(10/12): elfutils-libs-0.137-3.el5.x86_64.rpm                             | 183 kB     00:00
(11/12): elfutils-libs-0.137-3.el5.i386.rpm                               | 193 kB     00:00
(12/12): elfutils-0.137-3.el5.x86_64.rpm                                  | 215 kB     00:00
————————————————————————————————-
Total                                                             54 kB/s | 1.2 MB     00:21
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 1e5e0159
el5_u5_base/gpgkey                                                        | 1.4 kB     00:00
Importing GPG key 0x1E5E0159 “Oracle OSS group (Open Source Software group) <build@oss.oracle.com>” from /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
Is this ok [y/N]: y

Note : Here it asks whether you want to install all downloaded packages so we will hit (y)

Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing     : elfutils-libs                                                            1/12
Installing     : elfutils-libelf                                                          2/12
Installing     : elfutils                                                                 3/12
Installing     : elfutils-libs                                                            4/12
Installing     : elfutils-libelf-devel                                                    5/12
Installing     : elfutils-libelf-devel                                                    6/12
Installing     : elfutils-libelf-devel-static                                             7/12
Installing     : elfutils-libelf-devel-static                                             8/12
Installing     : elfutils-devel-static                                                    9/12
Installing     : elfutils-devel                                                          10/12
Installing     : elfutils-devel                                                          11/12
Installing     : elfutils-devel-static                                                   12/12

Installed:
elfutils.x86_64 0:0.137-3.el5
elfutils-devel.i386 0:0.137-3.el5
elfutils-devel.x86_64 0:0.137-3.el5
elfutils-devel-static.i386 0:0.137-3.el5
elfutils-devel-static.x86_64 0:0.137-3.el5
elfutils-libelf.i386 0:0.137-3.el5
elfutils-libelf-devel.i386 0:0.137-3.el5
elfutils-libelf-devel.x86_64 0:0.137-3.el5
elfutils-libelf-devel-static.i386 0:0.137-3.el5
elfutils-libelf-devel-static.x86_64 0:0.137-3.el5
elfutils-libs.i386 0:0.137-3.el5
elfutils-libs.x86_64 0:0.137-3.el5

Complete!

Finally, you saw all dependent packages got installed in such an ease way by configuring yum server.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s