• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to use ‘yum’ to connect ULN on CentOS/RHEL/OEL 6

by admin

The yum(Yellowdog Updater Modified) service is an automatic update tool to update the system each day. You can use both up2date/yum on Oracle Enterprise Linux/ Oracle Linux. Yum uses a configuration file at /etc/yum.conf. Additional configuration files are also read from the directory set by the reposdir option (default is ‘/etc/yum.repos.d’). Yum is an automatic updater and package installer/remover for rpm systems. It automatically computes dependencies and figures out what things should occur to install packages. It makes it easier to maintain groups of machines without having to manually update each one using rpm. The yum RPM package provides the /usr/bin/yum daemon and its configuration files.

This post focuses on yum usage to connect ULN on RHEL/CentOS/OEL 6.

Installation

Downloading the packages required to register your system to ULN:

Red Hat Enterprise Linux 6 – 386 and x86_64

uln_register.tgz
uln_register-gnome.tgz

Installing Registration Packages on RHEL/CentOS/OEL 6

Ensure you have downloaded the required packages listed above. To upgrade the existing packages already on your server, use the following command (assuming both the tar files are in the current directory):

# tar -xzf uln_register.tgz 
# tar -xzf uln_register-gnome.tgz (only if rhn-setup-gnome is already installed)
# cd uln_migrate 
# rpm -Uvh *.rpm

Register your system with ULN

To register your system, run the following command as the root user in a terminal window or on the command line:

# uln_register

Configuration

Yum uses a configuration file at /etc/yum.conf.

[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=enterprise-release
tolerant=1
exactarch=1
retries=20
obsoletes=1
gpgcheck=1

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
# cat /etc/sysconfig/rhn/up2date
...
serverURL[comment]=Remote server URL (use FQDN)
serverURL=https://linux-update.oracle.com/XMLRPC
...
# cat /etc/sysconfig/rhn/systemid
<?xml version="1.0"?>
<params>
<param>
<value><struct>
<member>
<name>username</name>
<value><string>xxx@xxx.com</string></value>
</member>
<member>
<name>operating_system</name>
<value><string>Oracle Linux</string></value>
</member>
<member>
<name>description</name>
<value><string>6 running on x86_64</string></value>
</member>
<member>
<name>checksum</name>
<value><string>5a1100572b6b53c8fe15ecadf50445cb56e9a4cd</string></value>
</member>
<member>
<name>profile_name</name>
<value><string>ol6new</string></value>
</member>
<member>
<name>system_id</name>
<value><string>4C4C4544-0031-5810-8056-B5C04F373358</string></value>
</member>
<member>
<name>architecture</name>
<value><string>x86_64</string></value>
</member>
<member>
<name>os_release</name>
<value><string>6</string></value>
</member>
<member>
<name>fields</name>
<value><array><data>
<value><string>username</string></value>
<value><string>operating_system</string></value>
<value><string>description</string></value>
<value><string>checksum</string></value>
<value><string>profile_name</string></value>
<value><string>system_id</string></value>
<value><string>architecture</string></value>
...

Usage

1. Produces a list of configured repositories:

# yum repolist
Loaded plugins: refresh-packagekit, rhnplugin, security
repo id                                                                        repo name                                                                                                                 status
ol6_x86_64_MySQL                                                               MySQL for Oracle Linux 6 (x86_64)                                                                                              9
ol6_x86_64_UEK_latest                                                          Latest Unbreakable Enterprise Kernel for Oracle Linux 6 (x86_64)                                                             141
ol6_x86_64_addons                                                              Oracle Linux 6 Add ons (x86_64)                                                                                               79
ol6_x86_64_latest                                                              Oracle Linux 6 Latest (x86_64)                                                                                            20,868
repolist: 21,097

2. Install a package from ULN by command yum:

# yum install vnc
Loaded plugins: refresh-packagekit, rhnplugin, security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package tigervnc.x86_64 0:1.1.0-5.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==========================================================================
 Package      Arch      Version        Repository                Size
==========================================================================
Installing:
 tigervnc  x86_64 1.1.0-5.el6  ol6_x86_64_latest         257 k

Transaction Summary
==========================================================================
Install       1 Package(s)

Total download size: 257 k
Installed size: 644 k
Is this ok [y/N]: y
Downloading Packages:
tigervnc-1.1.0-5.el6.x86_64.rpm                                               | 257 kB     00:01     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : tigervnc-1.1.0-5.el6.x86_64                                                   1/1
  Verifying  : tigervnc-1.1.0-5.el6.x86_64                                                   1/1

Installed:
  tigervnc.x86_64 0:1.1.0-5.el6                                                                                                                                                                                

Complete!

Filed Under: CentOS/RHEL 6, Linux, OEL 6

Some more articles you might also be interested in …

  1. CentOS / RHEL 5 : How to password-protect single user mode
  2. How to encrypt traffic between CUPS servers
  3. How To Limit/Restrict FTP Commands On Vsftpd Services (CentOS/RHEL 6,7)
  4. How to Debug systemd boot process in CentOS/RHEL 7 and 8
  5. How to Configure YUM to connect to Oracle Public Repository in Oracle Enterprise Linux
  6. Difference Between Qemu and KVM
  7. How To Open A Port In CentOS / RHEL 7
  8. CentOS / RHEL : Beginners guide to cron
  9. 10 Sed (Stream Editor) Command Examples
  10. lvcreate Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • JavaFX ComboBox: Set a value to the combo box
  • Nginx load balancing
  • nginx 504 gateway time-out
  • Images preview with ngx_http_image_filter_module

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright