Sunteți pe pagina 1din 37

Mokum is the only full-time Oracle virtualization

integrator with the expertise to help you virtualize your


Production, Test and DR Oracle workloads.

sales@mokumsolutions.com
Copyright 2015 Mokum Solutions, Inc. All rights reserved.
Distribution of the Oracle Cloud Cookbook or derivative of the work in any form
is prohibited unless prior permission is obtained from the Copyright holder.
About Mokum Solutions, Inc.
Founded in March 2011, Mokum Solutions, Inc. specializes in the implementation,
delivery and support of Oracle technologies in private and public clouds. Mokum
corporate headquarters are located in San Francisco, CA http://mokumsolutions.com
or call 1 415 252 9164
About the Author
The author of the Oracle Cloud Cookbook is none other than the owner of
Mokum Solutions, Inc., Roddy Rodstein. Roddy is one of the most respected
Oracle Cloud Computing experts, having designed and managed many of the
worlds largest and most complex Oracle private clouds. Before establishing
Mokum in March 2011, Roddy spent three years at Oracle on the Oracle VM
and Oracle Linux team designing and supporting Oracle's largest and most
complex customer environments. Before Oracle, Roddy spent six years at Citrix,
designing and supporting Citrix's largest and most complex customer environments,
Including Oracle's. With Mr. Rodsteins rich background and knowledge, there
can be no better resource for revealing the Oracle Cloud recipe.
Audience
The Oracle Cloud Cookbook is a comprehensive, field tested reference design that
guides you through each step to move to your Oracle software portfolio to an elastic
Oracle cloud using the Oracle VM product line, Oracle Linux, Oracle Engineered
Systems managed by Oracle Enterprise Manager 12c, with total control over Oracle
processor licensing.

http://mokumsolutions.com

Last update: 12/01/14


This chapter of the Oracle Cloud Cookbook reviews how to download, install, setup, patch and prepair Oracle Linux 6
for Oracle technology installations.

Table of Contents
Oracle Linux Introduction
Oracle Linux Installation Options
How to Download the Oracle Linux Installation Media from the Software Delivery Cloud
Oracle Linux 6 Installation using the Graphical (GUI) Mode
Oracle Linux Networking Setup
802.1Q Setup
Disable IPv6
iptables
SELinux
OS Watcher Black Box Setup
Linux Patch Management using the Oracle Unbreakable Linux Network
Linux Patch Management with Free Updates and Errata from Oracle
Install the oracle-rdbms-server preinstall RPM
Install the oracle-ebs-server-R12-preinstall RPM

Install the oracle-em-agent preinstall RPM


SSH and X11 Forwarding
Install VNC Server
Yum Command Examples Repository Listing, Install, Uninstall, & Update RPM Packages
Yum Repository Listing and Maintenance
Listing RPM Packages & RPM Groups
Installing, Removing, Updating and Searching RPM Packages & RPM Groups
How to Uninstall or Remove Oracle Linux
Change Log
Revision

Change Description

Updated By

Date

Document Creation

Roddy Rodstein

06/07/13

1.1

Content Refresh

Roddy Rodstein

01/20/14

1.2

Content Refresh

Roddy Rodstein

05/23/14

1.3

Oracle Linux 6U5 Updates

Roddy Rodstein

07/18/14

1.4

Content Refresh

Roddy Rodstein

12/01/14

Oracle Linux Introduction


In November 2006, Oracle released the rst version of its Red Hat Enterprise Linux tracking distribution named
Oracle Enterprise Linux (OEL). Oracle Linux (OL), formerly known as Oracle Enterprise Linux (OEL), is maintained
and freely distributed by Oracle under the GNU General Public License (GPL). The Oracle Linux installation media is
freely available from the Oracle Software Delivery Cloud - Oracle Linux and Oracle VM portal, as well as from various
mirror sites, and can be deployed, patched and distributed without cost or with commercial support.
Table 1 shows the mirror sites with direct downloads of the Oracle Linux ISO les.
Country Mirror
AU

AARnet

http

ftp

http://mirror.aarnet.edu.au
/pub/oraclelinux/

ftp://mirror.aarnet.edu.au
/pub/oraclelinux/

Mokum Solutions, Inc. +1 415 252-9164

rsync

4 of 39

http://mokumsolutions.com

DE

GWDG

http://ftp5.gwdg.de
/pub/linux/oracle/

ftp://ftp5.gwdg.de
/pub/linux/oracle/

DE

NetCologne

http://mirror.netcologne.de
/oracle-linux/

ftp://mirror.netcologne.de rsync://mirror.netcologne.de
/oracle-linux/
/oracle-linux/

DK

dotsrc.org

http://mirrors.dotsrc.org
/oracle-linux/

ftp://mirrors.dotsrc.org
/oracle-linux/

FR

Institut de
recherche et
http://mirrors.ircam.fr
coordination
/pub/oraclelinux/
acoustique/musique

IE

HEAnet

http://ftp.heanet.ie/mirrors
/oracle-linux/

ftp://ftp.heanet.ie/mirrors rsync://ftp.heanet.ie/mirrors
/oracle-linux/
/oracle-linux/

PL

University of
Warsaw - ICM

http://ftp.icm.edu.pl
/pub/Linux/dist/oracle-linux/

ftp://ftp.icm.edu.pl
/pub/Linux/dist/oraclelinux/

rsync://ftp.icm.edu.pl
/pub/Linux/dist/oracle-linux/

UK

linux.org.uk

http://ftp.linux.org.uk
/pub/distributions
/enterprise/

ftp://ftp.linux.org.uk
/pub/distributions
/enterprise/

rsync://zeniv.linux.org.uk
/distributions/enterprise/

US

Wimmekes.net

http://mirrors.wimmekes.net
/pub/OracleLinux/

ftp://mirrors.ircam.fr
/pub/oraclelinux/

rsync://ftp5.gwdg.de
/pub/linux/oracle/

rsync://mirrors.ircam.fr
/pub/oraclelinux/

Up to Oracle Linux 5 Update 4, Oracle Linux shipped with the following two kernels:
The default Red Hat compatible kernel
An optional Red Hat kernel including Oracle bug xes
Up to Oracle Linux 5 Update 4, the Red Hat kernel was the default kernel. The optional Oracle kernel could be
enabled by manually editing the grub.conf le. Both kernels are part of the Oracle Linux distribution and are
supported by Oracle support.
At Oracle Open World 2010, Oracle announced the new name for their Linux distribution, Oracle Linux, as well as
their new Linux kernel, the Unbreakable Enterprise Kernel (UEK). The Unbreakable Enterprise Kernel was based on
the 2.6.32 kernel and could be used with both Oracle Linux 5 and 6. Oracle developed the Unbreakable Enterprise
Kernel for the Oracle Exadata and Oracle Exalogic platforms. Oracle recomends using the Unbreakable Enterprise
Kernel for all Oracle and non-Oracle applications.
Up to Oracle Linux 5 Update 5, the Red Hat compatible kernel was the default kernel, and the Oracle kernel could be
enabled by manually editing the grub.conf le. Starting from Oracle Linux 5 Update 6, the Unbreakable Enterprise
Kernel became the default kernel, and the Red Hat compatible kernel became the optional kernel that could be
enabled by manually editing the grub.conf le.
Oracle Linux 5 Update 6 and above ship with the following two kernels:
The default Unbreakable Enterprise Kernel
An optional Red Hat compatible kernel
Both kernels are part of the Oracle Linux distribution and are supported by Oracle support.
Table 2 shows the Oracle Linux Release history.
Oracle Linux
Release

Architectures

RHEL
base

Release
date

4.5

i386, x86-64

4.5

4.6

i386, x86-64

4.6

2007-12-10

2.6.9-67.0.0.0.1.EL

4.7

i386, x86-64

4.7

2008-08-05

2.6.18-78.0.0.0.1.EL

2.6.18-78

4.8

i386, x86-64

4.8

2009-05-26

2.6.9-89.0.0.0.1.EL

2.6.9-89

4.9

i386, x86-64

4.9

2.6.9-100.0.0.0.1.EL

2.6.9-100.EL

Default Kernel

Optional Kernel

2.6.9-55.0.0.0.2.EL

Mokum Solutions, Inc. +1 415 252-9164

5 of 39

http://mokumsolutions.com

5.0

i386, x86-64

2007-06-26

2.6.18-8.el5

2.6.18-8.0.0.4.1.el5

5.1

i386, x86-64

5.1

2007-11-26

2.6.18-53.el5

2.6.18-53.0.0.0.1.el5

5.2

i386, x86-64

5.2

2008-06-02

2.6.18-92.el5

2.6.18-92.0.0.0.1.el5

5.3

i386, x86-64

5.3

2009-01-28

2.6.18-128.el5

2.6.18-128.0.0.0.1.el5

5.4

i386, x86-64

5.4

2009-09-09

2.6.18-164.el5

2.6.18-164.0.0.0.1.el5

5.5

i386, x86-64

5.5

2010-04-07

2.6.18-194.el5

2.6.18-194.0.0.0.3.el5

5.6

i386, x86-64

5.6

2011-01-22

2.6.32-100.26.2.el5

2.6.18-238.el5
2.6.18-238.0.0.0.1.el5

5.7

i386, x86-64

5.7

2011-08-16

2.6.32-200.13.1.el5uek

2.6.18-274.el5
2.6.18-274.0.0.0.1.el5

5.8

i386, x86-64

5.8

2012-03-02

2.6.32-300.10.1.el5uek

2.6.18-308.el5
2.6.18-308.0.0.0.1.el5

5.9

i386, x86-64

5.9

2013-01-16

2.6.39-300.26.1.el5uek

2.6.18-348.el5
2.6.18-348.0.0.0.1.el5

6.0

i386, x86-64

2011-02-11

2.6.32-100.34.1.el6

2.6.32-71.el6

6.1

i386, x86-64

6.1

2011-06-01

2.6.32-100.34.1.el6

2.6.32-131.0.15.el6

6.2

i386, x86-64

6.2

2011-12-15

2.6.32-300.3.1.el6uek

2.6.32-220.el6

6.3

i386, x86-64

6.3

2012-06-28

2.6.39-200.24.1.el6uek 2.6.32-279.el6

6.4

i386, x86-64

6.4

2013-02-28

2.6.39-400.17.1.el6uek 2.6.32-358.el6

Commercial support for Oracle Linux, Red Hat Enterprise Linux and CentOS is available as an add-on component of
Oracles enterprise support package as well as with Sun x86 hardware as an add-on Premier Support for
Systems package. Oracle Linux, Red Hat Enterprise Linux and CentOS running on third-party hardware (not on Sun
Hardware) is always sold as an add-on support component of Oracles enterprise support package. Premier Support
for Systems costs 12% of the net Sun system purchase price and includes comprehensive support for the system
hardware and rmware, as well as operating system support for Oracle Linux, Solaris x86 and Oracle VM for x86.
Along with hardware and rmware support, Premier Support for Systems includes operating system support for one
or more virtual instances Oracle Linux, Solaris x86 running on Oracle VM for x86.
Support for Oracle Linux installed on third-party hardware is sold in three packages: Oracle Linux Network, Oracle
Linux Basic, and Oracle Linux Premier.
List 1 highlights the dierence between the three dierent Oracle Linux support packages.
Oracle Linux Network Support includes access to the Unbreakable Linux Network for patches, xes and
security alerts. Oracle Linux Network support does not include operating system support, Oracle Linux Network
support only includes access to the Unbreakable Linux Network for patches, xes and security alerts.
Oracle Linux Basic Support includes 24x7 global operating system support, access to the Unbreakable Linux
Network for patches, xes and security alerts, the right to use Oracle Enterprise Manager's Linux Host Patching
feature, Spacewalk, OpenStack, and Oracle's OCFS2 cluster software for servers with up to two sockets.
Oracle Linux Premier Support includes 24x7 global operating system support, access to the Unbreakable
Linux Network for patches, xes and security alerts, Ksplice, the right to use Oracle Enterprise Manager's Linux
Host Patching feature, Spacewalk, OpenStack, Oracle's OCFS2 cluster software, Premier backports, and Oracle
Lifetime Support for servers with four or more sockets.
The Unbreakable Linux Network is a cloud resource for Oracle Linux Support customers used to access Oracle Linux
and Oracle VM RPM repositories, including software patches, updates and xes. The Unbreakable Linux
Network portal is located at http://linux.oracle.com. The Unbreakable Linux Network portal provides a simple
dashboard and management interface for registered Linux systems and RPM channels. The Unbreakable Linux
Network RPM repositories are used to patch and install RPMs for Oracle Linux, Red Hat Enterprise Linux, CentoOS,
and Oracle VM systems. Oracle Linux support customers have the option to access patchs and RPMs for Linux and
Oracle VM systems from the Oracle Unbreakable Linux Network using the yum program, or from a local yum
repository.
The Unbreakable Linux Network is password protected. Before you can access the Unbreakable Linux Network you
must have a valid Oracle Linux support contract, CSI number and an Oracle Single Sign-on account. Your existing My

Mokum Solutions, Inc. +1 415 252-9164

6 of 39

http://mokumsolutions.com
Oracle Support (MOS) Oracle Single Sign-on account will not work with the Oracle Unbreakable Linux Network until
the account has been registered with the Unbreakable Linux Network. Click the Register link at the Unbreakable
Linux Network to a) create a new Oracle Single Sign-on account or to b) associate your existing Oracle Single Sign-on
account with the Unbreakable Linux Network. Once you have a valid support contract, and CSI number, you can
register Linux 6 and above systems at the Unbreakable Linux Network by typing uln_register as root.
In March 2012, Oracle announced that Oracle Linux 4, 5 and 6 latest RPM patches, updates and erratas are available
at no cost from the Oracle public yum server located at http://public-yum.oracle.com. The free Oracle Linux 4, 5 and 6
RPM patches, updates and erratas do not include Oracle Linux support or any of the benets of the Oracle Linux
Support program.
Oracle's public yum server allows us to keep Oracle Linux, Red Hat Enterprise Linux, CentOS, and Oracle VM system
up to date to the latest update version, using the "_latest" RPM repository. The Oracle public yum repository RPMs,
patches, updates and erratas do not include Oracle support or any of the benets of the Oracle Linux Support
program.
The Oracle Linux Support program oers the following benets over and above the free RPM patches, updates and
erratas from the Oracle public yum server:
Full indemnication against intellectual property claims. Remember the SCO lawsuits?
Ksplice for the ability to apply kernel updates without a reboot.
Use of the Oracle Enterprise Manager 12c Linux Host Patching feature for patch management. Oracle Enterprise
Manager 12c Linux Host Patching feature has feature parity with Red Hat Satellite Server.
Access to additional Oracle software channels on the Unbreakable Linux Network (ULN).
Patch channels for each Linux update level.
The ability to create Support Requests with Oracle' World Class support organization.
The Oracle Unbreakable Linux Network and the Oracle public yum server are Oracle' cloud repositories for Oracle
Linux and Oracle VM RPMs, software patches, updates and xes. Access to Unbreakable Linux Network requires an
Oracle Single Sign-on account, a valid customer service identier (CSI) and registration. Access to the Oracle public
yum server is open to the public without registration.
The Oracle public yum server latest RPM channel include the base OS version installation RPM packages along with
the latest software patches, updates and xes. Patch jobs using the latest RPM channel update hosts to their
respected latest version update with the latest software patches, updates and xes. A patch job executed on a Oracle
Linux 6 host would update the host from 6 to 6U3 with the latest latest software patches, updates and xes. To keep a
host at its respected update level, a valid CSI and the Unbreakable Linux Network is required. With the Unbreakable
Linux Network, it is possible to register a host the el*/ol*_base channel along with the el*/ol*_patch RPM channel.
When hosts are patched using the el*/ol*_base and el*/ol*_patch RPM channels, the hosts are patched with the latest
software patches, updates and xes from their respected update channel, i.e. 6, 6U1, 6U2 and 6U3.

Oracle Linux Installation Options


Oracle Linux can be installed either from a CD-ROM drive or ISO le using the graphical (GUI) installation mode or
the text installation mode, as well as over the network using a pre-boot execution environment (PXE). The graphical
(GUI) and text installation modes for all of the Oracle Linux 6 releases are similar. Text installation mode has limited
capabilities when compared to the GUI installation mode. For example, there is no support for conguring partition
layout, storage methods or package selection. To install Oracle Linux using the CD-ROM, ISO le or PXE boot
method, visit the Oracle Software Delivery Cloud - Oracle Linux and Oracle VM portal to download the Oracle Linux
media. The Oracle Linux media is delivered as a zip le that contains an ISO le. For CD-ROM installations, the ISO
le can be burned as a bootable disk and used to install Oracle Linux from a CD-ROM drive.
An Oracle Linux PXE boot installation requires several additional steps; for example, a boot server and a kickstart le
to automate the Oracle VM server installation must be created. The boot server allows a bare-metal system to
automatically receive an IP address via DHCP, load a kernel via TFTP, and then boot without an operating system.
Once the bare-metal server boots, Oracle Linux can be installed using the installation media or a kickstart le to
automate the Oracle Linux installation.
Oracle recommends installing Oracle Linux using the default software package selection without any customization.
Using the default software packages without customizations includes most of the prerequisite packages for Oracle
technology products and helps limit the number of manual prerequisite checks.
oracle-rdbms-server-11gR2-preinstall RPM
The oracle-rdbms-server-11gR2-preinstall RPM, formally know as oracle-validated, simplies meeting the software

Mokum Solutions, Inc. +1 415 252-9164

7 of 39

http://mokumsolutions.com
and system conguration prerequisites for installing the Oracle Database, Oracle Enterprise Manager, and many
other Oracle technology products on Oracle Linux 6. Installing the oracle-rdbms-server-11gR2-preinstall RPM
automatically installs all of the software RPM prerequisites for Oracle Database, Oracle Enterprise Manager, etc..., as
well as meeting the system conguration prerequisites, such as creating an oracle user and the oinstall and dba
groups, conguring the sysctl.conf settings, system startup parameters, user limits, and driver parameters. After the
installation of the oracle-rdbms-server-11gR2-preinstall RPM, you can condently start the Oracle product installer.
Tip: The oracle-rdbms-server-11gR2-preinstall RPM is available at the Oracle Unbreakable Linux Network, on the
Oracle Linux media, and from the Oracle public yum repository.
oracle-ebs-server-R12-preinstall RPM
The oracle-ebs-server-R12-preinstall RPM simplies meeting the software and system conguration prerequisites for
installing Oracle E-Business Suite on Oracle Linux 5 and 6. Installing the oracle-ebs-server-R12-preinstall RPM
automatically installs all of the software RPM prerequisites for Oracle E-Business Suite, as well as meeting the system
conguration prerequisites, such as creating an oracle user and the oinstall and dba groups, conguring the
sysctl.conf settings, system startup parameters, user limits, and driver parameters. After the installation of the oracleebs-server-R12-preinstall RPM, you can condently start the Oracle product installer.
Tip: The oracle-ebs-server-R12-preinstall RPM is available in the Oracle Unbreakable Linux Network addons channel
and from the Oracle public yum repository addons channel.
oracle-em-agent preinstall RPM
The oracle-em-agent-12cR1-preinstall, and oracle-em-agent-12cR4-preinstall RPMs simplies meeting the software
and system conguration prerequisites for installing the Enterprise Manager agent (Oracle Management Agent
(OMA)) on Oracle Linux 5, 6, and 7. Installing the oracle-em-agent preinstall RPM automatically installs all of the
software RPM prerequisites for the Oracle Management Agent, as well as meeting the system conguration
prerequisites, such as creating an oracle user and the oinstall and dba groups, conguring the sysctl.conf settings,
system startup parameters, user limits, and driver parameters.
Tip: The Oracle Management Agent RPM is available in the Oracle Unbreakable Linux Network addons channel and
from the Oracle public yum repository addons channel.

How to Download the Oracle Linux Installation Media from the


Software Delivery Cloud
The Oracle Linux Installation media is freely available at the Software Delivery Cloud - Oracle Linux and Oracle VM
portal. Access to the Software Delivery Cloud - Oracle Linux and Oracle VM portal requires an Oracle.com user
account and password to authenticate into the Oracle Linux and Oracle VM Cloud Portal. If you do not already have
an Oracle.com user account, visit the Oracle Linux and Oracle VM Cloud Portal, click the Sign In / Register link
or button to create an Oracle.com account.
Figure 1 shows the Software Delivery Cloud - Oracle Linux and Oracle VM portal.

From the Sign In page, enter your Oracle.com user name and password, then click the Sign In button.
Figure 2 shows the Oracle.com Sign In page.

Mokum Solutions, Inc. +1 415 252-9164

8 of 39

http://mokumsolutions.com

Once authenticated, accept the registration/export regulations to access to the Oracle VM and Oracle Linux
Media.
Figure 3 shows the registration/export regulations form.

After completing the registration/export regulation form, you will be redirected to the Media Pack Search page.
From the Media Pack Search page, select Oracle Linux from the Select a Product Pack dropdown menu. Next,
select x86 64-bit or x86 32-bit from the Platform dropdown menu, then click the Go button to be taken to the
Oracle Linux Media Pack download page.
Tip: If you do not see Oracle Linux or Oracle VM from the Select a Product Pack dropdown menu, you are not in
the Oracle Linux and Oracle VM section of the Software Delivery Cloud. Click the Software Delivery Cloud link in
the page header, then click the Oracle Linux/VM drop down menu to be redirected to the Oracle Linux and Oracle
VM section of the Software Delivery Cloud .
Figure 4 shows the Media Pack Search page.

Mokum Solutions, Inc. +1 415 252-9164

9 of 39

http://mokumsolutions.com

From the Oracle Linux Media Pack page, click the desired Oracle Linux Media Pack hyperlink, or select the radio
button and click the Continue button to go to the download page.
Tip: Do not download the source DVD for an operating system installation. Oracle Linux is distributed as Open
Source software, therefore the source DVD is also available along with the DVD ISO images. The source DVDs are
required by the GNU GPL license.
Figure 5 shows the Oracle Linux x86 64 bit Media Pack page highlighting the Oracle Linux Release 6 Update 3
for x86_64 (64 Bit) ISO le download.

From the Oracle Linux Media Pack download page, click the Download button for the ISO le or DVD.
Figure 6 shows the Oracle Linux Release 6 Update 3 Media Pack for x86_64 (64 bit) download page.

Mokum Solutions, Inc. +1 415 252-9164

10 of 39

http://mokumsolutions.com

The Oracle Linux media is delivered as ISO les for OL6 and as DVD images for OL5 and 4.

Oracle Linux 6 Installation using the Graphical (GUI) Mode


This section reviews how to install Oracle Linux from the DVD/CD-ROM, using the graphical (GUI) mode. Text
installation mode is also supported, but it has limited capabilities when compared to the GUI installation mode. For
example, there is no support for conguring partition layout, storage methods or package selection. The Oracle Linux
installer needs at least 406 MB of RAM to work. Text mode will automatically be used if the system has less than 632
MB of RAM. Text installation mode is not ideal to setup an Oracle Linux server.
1- Boot the server using the DVD ISO image. At the boot prompt, press the Enter key to start the Oracle Linux
installation in graphical mode.
Figure 7

Mokum Solutions, Inc. +1 415 252-9164

11 of 39

http://mokumsolutions.com

2- On the CD Found window, you can perform a media test to validate the integrity of the installation media. The
media test is optional and time consuming. In this example, we will not perform a media test.
Press the tab key to select the Skip key. Once the Skip key is selected, press the Enter key to proceed.
Figure 8

3- On the Welcome screen, click the Next button or Alt+N to proceed.


Figure 9

Mokum Solutions, Inc. +1 415 252-9164

12 of 39

http://mokumsolutions.com

4- On the Language Selection screen, select the preferred language that will be used during the installation
process. In this example, select the default language, English (English).
Select the desired language, then click the Next button or press Alt+N to proceed.
Figure 10

Mokum Solutions, Inc. +1 415 252-9164

13 of 39

http://mokumsolutions.com
5- On the Keyboard Selection screen, select the desired keyboard setting for the system. In this example, select the
default keyboard selection, US English.
Accept the default US English keyboard selection, then click the Next button or press Alt+N to proceed.
Figure 11

6- On the Storage Device screen, you can select the Basic Storage Devices or the Specialized Storage
Devices options.
In this example, we accepted the default Basic Storage Devices option, click the Next button or press Alt+N to
proceed.
Figure 12

Mokum Solutions, Inc. +1 415 252-9164

14 of 39

http://mokumsolutions.com

Note: If a disk initialization Warning dialogue box appears after you make your Storage Device selection. Before
you select the Re-initialize button or press Alt+R to proceed, be sure there is no data on the disk, selecting
the Re-initialize button or press Alt+R WILL DELETE ALL DATA ON THE DISK.
8- On the Networking screen, enter the Hostname in the text box. Next, you can accept the default DHCP setting or configure the networking manually by
clicking the Configure Network button. To use DHCP, accept the defaults, and click the Next button or press Alt+N to proceed.
Click the Configure Network button to review the network configurations.
Figure 13

Mokum Solutions, Inc. +1 415 252-9164

15 of 39

http://mokumsolutions.com

9- If you intend to configure the networking manually, from the Network Connections screen, select the desired connection, i.e. eth0 and click the Edit button
to display the Edit System screen. On the Editing System screen select the Connect automatically checkbox to enable the interface automatically start
when the system is starts. To configure the networking manually, click the desired tab, i.e. IPv4 Settings, to configure the selected interface. Click
the Apply button to save the networking setting and to return to the Network Connections screen. Next, on the Networking Connections screen, click
the Close button or press Alt+C, next click the Next button or Alt+N to proceed.
Figure 14

Mokum Solutions, Inc. +1 415 252-9164

16 of 39

http://mokumsolutions.com

12- On the Time Zone screen, select the time zone for your area by clicking your region on the map. Accept the default System clock uses UTC setting, and
click the Next button or press Alt+N to proceed.

Figure 15

13- On the Root Password screen enter a root password for the server, then click the Next button or press Alt+N to proceed.
Figure 16

Mokum Solutions, Inc. +1 415 252-9164

17 of 39

http://mokumsolutions.com

14- On the Installation Type screen, you can select the desired partitioning layout or create your own partitioning layout. In this example, we accepted the default
Replace Existing Linux System(s), click the Next button or press Alt+N to proceed.
Note: To edit the default partitioning layout, select Review and modify partitioning layout option and click Next or Alt+N.
Figure 17

15- A partition table Warning dialogue box will appear after clicking the previous Next button. Click the Write changes to disk or press Alt+W to proceed.
Figure 18

Mokum Solutions, Inc. +1 415 252-9164

18 of 39

http://mokumsolutions.com

16- On the Software Selection screen, you can accept the default selections or select one or more roles for the server and/or customize the entire software
selection by selecting the Customize now. We accepted the defaults Basic Server without any customization, then click the Next button or press Alt+N to
proceed.
Note: Oracle recommends installing Linux using the default software package selection without any customization. The default selections will not install a
desktop environment.
Figure 19

Mokum Solutions, Inc. +1 415 252-9164

19 of 39

http://mokumsolutions.com

17- On the Installation Progress screen, you will see an installation progress bar. The installation will take a few minutes.
Figure 20

18- The Congratulations screen informs you that the installation is complete, and to remove your DVD media from the system and to reboot the system.
Remove the CD/DVD media from the system, and click the Reboot button or press Alt+t to reboot the system.

Mokum Solutions, Inc. +1 415 252-9164

20 of 39

http://mokumsolutions.com
Figure 21

19- After the system reboots, access the server' console via iLom or ssh, enter the root user name, and the password selected during the installation. The next
example shows accessing the server via ssh.
Note: Substitute the ip address with the ip address of your server.
$ ssh root@192.168.20.151
The authenticity of host '192.168.20.151 (192.168.20.151)' can't be established.
RSA key fingerprint is 0f:eb:26:3e:f9:ba:3f:e5:fa:4e:23:27:71:5e:0a:dc.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.20.151' (RSA) to the list of known hosts.
root@192.168.20.151's password:
Last login: Fri Jul 18 15:09:21 2014
Next, configure the network interfaces, the hostname and DNS.

Oracle Linux Networking Setup


The network interface configuration files are located in the /etc/sysconfig/network-scripts/ directory. Each network interface has a corresponding interface
configuration script. Each files, i.e. /etc/sysconfig/network-scripts/ifcfg-<interface-name> provide information specific to a particular network interface.
To edit or setup an interface, change directory to /etc/sysconfig/network-scripts/:
# cd /etc/sysconfig/network-scripts/
Edit edit or create the following files:
/etc/sysconfig/network-scripts/ifcfg-eth0: First Ethernet card configuration file
/etc/sysconfig/network-scripts/ifcfg-eth1: Second Ethernet card configuration file
To edit or create the first interface (eth0), type:
# vi ifcfg-eth0
Append or modify as follows:

Mokum Solutions, Inc. +1 415 252-9164

21 of 39

http://mokumsolutions.com

DEVICE=eth0
BOOTPROTO=static
DHCPCLASS=
HWADDR=00:31:58:66:A6:5E
IPADDR=192.168.2.120
NETMASK=255.255.255.0
GATEWAY=192.168.2.254
NETWORK=192.168.2.0
ONBOOT=yes
Save and close the file.
Define the hostname in /etc/sysconfig/network file and in /etc/hosts:
The /etc/sysconfig/network file is used by Linux to specify network configurations. By default, /etc/sysconfig/network contains the following options:
NETWORKING=boolean
Enter a Boolean yes to enable networking, enter no to disable networking.
NETWORKING=yes
HOSTNAME=value
Enter the hostname of the machine. For example:
HOSTNAME=hostname.example.com
As root type "vi /etc/sysconfig/network" to enter the hostname of the machine:
Append or modify as follows:
HOSTNAME=myserver.example.com
Save and close the file.
Oracle technology products, including Oracle Enterprise Manager, rely on a properly formatted /etc/hosts file which allows the host to be pingable, with long and
short host names. The host name in the /etc/hosts file must be associated with the server's public IP address.
The next example shows the proper syntax from a /etc/hosts file. Note that the localhost entries are one one line, and the IP address with the long and short
names are on the next line.
127.0.0.1 localhost.localdomain localhost
192.168.4.8 servername.com servername
The next example shows an improperly formatted /etc/hosts file. Note that the long and short names are on the same line as the localhost entries.
127.0.0.1 servername.com servername localhost.localdomain localhost
192.168.4.8 servername.com servername
Tip: The IPv6 entries in the /etc/hosts files should be removed to aviod "Bug 13652664 : AGENT DEPLOY FAILS WITH AGENT PORT PASSED BY USER IS
BUSY" with Oracle Management Agent installations:
::1
localhost localhost.localdomain localhost6 localhost6.localdomain6
The /etc/hosts file can be edited by the root user bu typing vi /etc/hosts, as shown in the next example.
# vi
127.0.0.1 localhost.localdomain localhost
192.168.4.8 servername.com servername
Save and close the file.
Next, restart networking:
# service network restart
Setup DNS in the /etc/resolv.conf file:
The resolv.conf file is used by Linux to configure the Domain Name System (DNS) resolver library. The resolv.conf file contains directives including the default
search domains used for fully qualified domain name (FQDN) completion when no domain suffix is supplied as part of a query. The resolv.conf file also contains a
list of IP addresses of nameservers available to a host. For more information about this file, refer to the resolv.conf man page.

Mokum Solutions, Inc. +1 415 252-9164

22 of 39

http://mokumsolutions.com

The /etc/resolv.conf file can be edited by the root user bu typing vi /etc/resolv.conf, as shown in the next example.
# vi /etc/resolv.conf
Setup the search prefix and the DNS Server as follows:
search my.domain1.com my.domain2.com
nameserver 8.8.8.8
nameserver 8.8.4.4
Save and close the file. Next, ping the gateway or other hosts to confirm connectivity:
$ ping yahoo.com

802.1Q Setup
The IEEE 802.1Q standard was introduced to partition large networks into smaller virtual local area networks (VLANs) using software without the need to move
cables or add switch ports. The IEEE 802.1Q standard also defines how multiple layer-2 networks/VLANs can share the same physical link, this is also referred to
as EtherChannel and 802.1Q trunking.
For example, with 802.1Q adding a network to a local area network (LAN) entails provisioning a VLAN on the switch and enabling the VLAN on the desired switch
ports and/or trunks. Linux hosts that are connected to the switch ports and/or trunks could use the new VLAN by creating a VLAN interface on the desired NIC
and/or bond without moving or changing the network cabling.
The following configuration enables 802.1q for the current session.
First, as root, enable the 8021q kernel module by typing "modprobe 8021q".
# modprobe 8021q
Next, create a VLAN interface on eth0, i.e. VLAN 21. Substitute 21 with the desired VLAN ID for your VLAN.
# vconfig add eth0 21
Next, plumb the VLAN interface.
# ifconfig eth0.21 xx.xx.xx.xx netmask xx.xx.xx.xx up
To preserve the 802.1 configuration across reboots, create a /etc/sysconfig/network-scripts file for the VLAN interface.
# vi /etc/sysconfig/network-scripts/ifcfg-eth0.21
DEVICE=eth0.21
IPADDR=xx.xx.xx.xx
NETMASK=xx.xx.xx.xx
ONBOOT=yes
BOOTPROTO=static
USERCTL=no
VLAN=yes
Next, edit the /etc/sysconfig/network-scripts/eth0 file as shown in the next example:
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
HWADDR=00:25:90:75:3C:2F
Once the /etc/sysconfig/network-scripts file is created, restart the network service to load the interface.
# service network restart

Disable IPv6

Mokum Solutions, Inc. +1 415 252-9164

23 of 39

http://mokumsolutions.com
Even if IPv6 is not being used, IPv6 can still cause problems such a duplicate addresses with many Oracle technology products. For example, IPv6 uses a dual
stack protocol format that runs IPv4 and IPv6 at the same time. IPv6 creates an IPv6 interface for each IPv4 interface. WebLogic and many other Oracle
technologies see the IPv6 interfaces as duplicate address. If IPv6 is not being used, a best practice is to disable IPv6.
Add the following entries to /etc/sysctl.conf:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
To disable IPv6 on a running system, as root type:
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6
or
sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1
With IPv6 disabled, if X forwarding breaks, edit /etc/ssh/sshd_config and make one of the following changes:
(1) Change the line
#AddressFamily any
to
AddressFamily inet
(inet is ipv4 only; inet6 is ipv6 only)
or
(2) Remove the hash mark (#) in front of the line
#ListenAddress 0.0.0.0
Next, restart ssh.
Next, type chkconfig ip6tables off
Finally, remove the IPv6 entries in the /etc/hosts file to aviod "Bug 13652664 : AGENT DEPLOY FAILS WITH AGENT PORT PASSED BY USER IS BUSY" with
Oracle Management Agent installations. The next example shows the Pv6 entries in the /etc/hosts file that should be removed.
::1
localhost localhost.localdomain localhost6 localhost6.localdomain6

iptables
iptables is a userspace firewall application used to configure the Linux IPv4 and IPv6 packet filtering rulesets. iptables is installed and enabled by default on
Oracle Linux with a default policy and ruleset in /etc/sysconfig/iptables. iptables rules can be configured at the command line as well as with the system setup
utility, i.e. "/usr/bin/setup".
Host firewalls, for example iptables, are a fundamental part of an information security program. If your information security program requires host firewalls, a best
practice is to configure host firewalls during the last phase of the Oracle deployment.
To open the necessary ports in iptables, as root edit the /etc/sysconfig/iptables file and add the desired iptables rules. The next example show the iptables rules
from a default Oracle Linux installation.
*filter
:INPUT ACCEPT [1:52]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [1:148]
-A INPUT -p tcp -m state --state NEW -m tcp --dport 10000 -j ACCEPT
COMMIT

Mokum Solutions, Inc. +1 415 252-9164

24 of 39

http://mokumsolutions.com
The next example shows the iptabes rules from a Oracle Linux host with an Oracle Database that allows a SQL client with IP address 192.168.30.101 to
communicate with the Database.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
# What: oracle database: permit SQL*Net traffic from client
-A INPUT -m state --state NEW -m tcp -p tcp -s 192.168.30.101 --dport 1521 -j ACCEPT
# End of modifications for oracle database
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
iptables can be disabled by typing the following command as root.
# service iptables stop && service ip6tables stop && chkconfig iptables off && chkconfig ip6tables off
iptables can be re-inabled by typing the following command as root.
# service iptables start && service ip6tables start && chkconfig iptables on && chkconfig ip6tables on

SELinux
Security Enhanced Linux (SELinux) is a default Linux feature that offers mandatory access controls, using Linux kernel security modules (LSM) along with
user-space tools. Starting with Oracle Database 11g Release 2 (11.2), Security Enhanced Linux is supported for Oracle Linux 4, Red Hat Enterprise Linux 4,
Oracle Linux 5, and Red Hat Enterprise Linux 5. Security Enhanced Linux is not supported for the Oracle Enterprise Manager 12c Oracle Management Service.
Mandatory access controls, for example Security Enhanced Linux, may be a part of your organizations information security program. If your information security
program requires mandatory access controls for the 12c Oracle Management Repository, a best practice is to configure Security Enhanced Linux during the last
phase of the Enterprise Manager deployment.
To confirm the status of SELinux, as root type sestatus as shown in the next example.
# sestatus
SELinux status:
disabled
The above example shows a host with SELinux disabled.
Security Enhanced Linux can be temporarily set to permissive by typing "echo 0 > /selinux/enforce", as root. Security Enhanced Linux can be re-enabled
(enforcing) by typing "echo 1 > /selinux/enforce", as root.
Security Enhanced Linux can be permanently disabled by changing the "SELINUX=enforcing" entry to "SELINUX=disabled" in the "/etc/selinux/config" file.
Security Enhanced Linux can be re-enabled by changing the "SELINUX=disabled" entry to "SELINUX=enforcing" in the "/etc/selinux/config" file. A re-boot is
required after changing the "SELINUX= value to enable to new settings.

OS Watcher Black Box Setup


OS Watcher Black Box (oswbb) is a utility that uses native Linux commands and shell scripts to collect and archive metrics for diagnostics and performance
troubleshooting. OS Watcher Black Box operates as a set of background processes that collect and archive data on a regular basis, using ps, top, mpstat, iostat,
netstat, traceroute and vmstat. OS Watcher Black Box is comprised of three components:
1. oswbb: a shell script that collects and archives data
2. oswbba: a java utility with a GUI used to analyze oswbb data with charts and graphs
3. oswbb-service-1.1.5-1.noarch.rpm: The init script to automatically start OS Watcher Black Box
OS Watcher Black Box (oswbb & oswbba) can be downloaded via My Oracle Support document ID 301137.1: OSWatcher Black Box (Includes: [Video]) [ID
301137.1]. The init script (oswbb-service-1.1.5-1.noarch.rpm) to automatically start OS Watcher Black Box can be downloaded via My Oracle Support document
ID 580513.1: How To Start OSWatcher Black Box Every System Boot [ID 580513.1]
Tip: OSW is one of Oracle support's primary tool for working Linux Service Requests (SRs). To expedite your Linux SRs, always include the OSW archive files
from each Linux Server.
OS Watcher Black Box Installation and Setup
Once you have downloaded the OS Watcher Black box tar file and the oswbb-service, copy the tar file and the RPM file to each Linux Server and untar the file in
the directory where you would like to run OS Watcher Black Box, i.e. /opt, and install the RPM.
The next example shows how to install OS Watcher Black Box. Substitute path_to_the_oswbb_directory with the directory name you would like to place and
run OS Watcher Black Box. As root type:
# tar xvf oswbb601.tar -C path_to_the_oswbb_directory, i.e. tar xvf oswbb601.tar -C /opt
Next, chown the oswbb directoty to root, chown -R /opt/oswbb.
Next, install the RPM by typing rpm -ivh oswbb-service-1.1.5-1.noarch.rpm. The oswbb-service RPM package adds an init script with the osw service to run the

Mokum Solutions, Inc. +1 415 252-9164

25 of 39

http://mokumsolutions.com
OS Watcher Black Box at system boot, and to stop it down gracefully at system shutdown. OS Watcher Black Box can be started and stoped using the standard
Linux init scripts:
# /sbin/chkconfig oswbb on
The oswbb-service RPM package automatically configures the osw service to start at runlevel 3, 5 and 5. The next example shows the default runlevels for the
oswatcher service.
# chkconfig --list |grep oswatcher
oswatcher
0:off 1:off 2:on 3:on 4:on 5:on 6:off
OS Watcher Black Box can be started by typing:
# /sbin/service oswbb start
OS Watcher Black Box can be stoped by typing:
# /sbin/service oswbb stop
The last step is to edit the OS Watcher Black Box configuration file with your enviromentail settings. The OS Watcher Black Box configuration file is located
at /etc/oswbb.conf.
The next example shows the default OS Watcher Black Box settings. The bold text below should be edited to meet your environmental requirements.
# cat /etc/oswbb.conf
# Set OSW_HOME to the directory where your OSWatcher tools are installed
OSW_HOME='/opt/osw'
# Set OSW_INTERVAL to the number of seconds between collections
OSW_INTERVAL='60'
# Set OSW_RETENTION to the number of hours logs are to be retained
OSW_RETENTION='48'
# Set OSW_USER to the owner of the OSWHOME directory
OSW_USER='root'
# Set OSW_COMPRESSION to the desired compression scheme
OSW_COMPRESSION='gzip'
The OSW_HOME directive controls the {OSWHOME} directory. {OSWHOME} is where the oswatcher logs are kept. For example, the
default OSW_HOME=/opt/osw creates the /opt/ows directory for the log files. The OSW_INTERVAL directive controls the interval in seconds between statistics
collections. The default OSW_INTERVAL='60' should not be modified, unless requested by Oracle support. The OSW_RETENTION='48' directive controls the
retention policy in hours of the log files in the {OSWHOME}/archive directory.
The OSW log files are saved in the following directories:
{OSWHOME}/archive/
oswiostat
oswmeminfo
oswmpstat
oswnetstat
oswprvtnet
oswps
oswslabinfo
oswtop
oswvmstat

Linux Patch Management using the Oracle Unbreakable Linux Network


Before an Oracle Linux host can be regsistered and patched from the Oracle Unbreakable Linux Network, Oracles GPG key must be imported using the rpm
command. To import the Oracles GPG key, as root type rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY.
The Unbreakable Linux Network registration requires an Oracle Single Sign-on account and a valid customer service identifier (CSI). Before registering the yum
server, visit the Unbreakable Linux Network, sign in, or create an Oracle Single Sign-on account, then sign in to the Unbreakable Linux Network portal.
Tip: If the RPM-GPG-KEY is not in the /etc/pki/rpm-gpg/ directory, locate the file and use the correct path to import the GPG key. For example, as root, type "find /
-name RPM-GPG-KEY -print" to locate the RPM-GPG-KEY file.
Once the GPG key has been imported, the Linux host can be registered at the Oracle Unbreakable Linux Network from the command line or using a X Windows
application. Linux 6 systems use the "uln_register" command as root to access the registration screen. The registration process requires you to enter your
Unbreakable Linux Network associated Oracle Single Sign-on user name and password and a valid Oracle Linux Support Identifier number (CSI).
Oracle Linux 6 systems use the --proxy option to specify a http proxy, i.e. # uln_register --proxy=<HOST NAME>:<PORT NUMBER> . If your proxy server
requires authentication, use the --proxyUser and --proxyPassword to add a username and password, i.e # uln_register proxy=<HOST NAME>:<PORT
NUMBER> --proxyUser=<USER NAME> --proxyPassword=<PASSWORD>
List 4 shows the seven steps to register an Oracle Linux 6 host with the Oracle Unbreakable Linux Network:
1.
2.
3.
4.
5.
6.
7.

Welcome
Unbreakable Linux Network Login
Register a System Profile
Register a System Profile - Packages
Send Profile Information to the Unbreakable Linux Network
Review System Subscription Details
Finished Registration

The following examples walk through the six steps to register a Linux host with the Oracle Unbreakable Linux Network.
Step 1. Welcome

Mokum Solutions, Inc. +1 415 252-9164

26 of 39

http://mokumsolutions.com
From the Welcome screen use the Alt key to select the Next tab, once the Next tab is selected press the Enter key to proceed.
Figure 49 shows the Welcome screen.

Step 2. Unbreakable Linux Network Login


On the Unbreakable Linux Network Login screen, enter your your Unbreakable Linux Network associated Oracle Single Sign-on User
name, Password, Password confirmation and a valid Oracle VM CSI number. Use the Alt key to select the Next tab, and then press the Enter key to proceed.
Figure 50 shows the Unbreakable Linux Network Login screen.

Step 3. Register a System Profile


On the Register a System Profile screen, accept the defaults and use the Alt key to select the Next tab. Once the Next tab is selected, press the Enter key to
proceed.
Note: The information gathered from the system profile step is saved in your user profile at the Oracle Unbreakable Linux Network.
Figure 51 shows the Register a System Profile screen.

Mokum Solutions, Inc. +1 415 252-9164

27 of 39

http://mokumsolutions.com

Step 4. Register a System Profile - Packages


On the Register a System Profile - Packages screen, accept the defaults and use the Alt key to select the Next tab. Once the Next tab is selected, press
the Enter key to proceed.
Figure 52 shows the Register a System Profile - Packages screen.

Step 5. Send Profile Information to the Unbreakable Linux Network


From the Send Profile Information to the Unbreakable Linux Network screen, accept the defaults and use the Alt key to select the Next tab. Once
the Next tab is selected, press the Enter key to proceed.
Figure 53 shows the Send Profile Information to the Unbreakable Linux Network screen.

Mokum Solutions, Inc. +1 415 252-9164

28 of 39

http://mokumsolutions.com

Step 6 Review System Subscription Details


On the Review System Subscription Details screen, review the subscription details and use the Alt key to select the OK tab. Once the OK tab is selected,
press the Enter key to proceed.
Figure 54 shows the Review System Subscription Details screen.

Step 7 Finished Registration


On the Finished Registration screen, accept the defaults and use the Alt key to select the Next tab. Once the Next tab is selected, press the Enter key to
proceed.
Figure 55 shows the Finished Registration screen.

Mokum Solutions, Inc. +1 415 252-9164

29 of 39

http://mokumsolutions.com

The Oracle Linux host has been successfully registered.


Next, type yum update -y to patch the host.

Linux Patch Management with Free Updates and Errata from Oracle
In March 2012, Oracle announced that Oracle Linux 4, 5 and 6 latest RPM patches, updates and erratas are available at no cost from separate yum repositories
on http://public-yum.oracle.com. The Oracle public yum repository allows us to keep Oracle Linux and Red Hat Enterprise Linux system up to date to the latest
update version, using the "_latest" RPM repository. The free Oracle Linux 4, 5 and 6 RPM patches, updates and erratas do not include Oracle support or any of
the benefits of the Oracle Linux Support program.
Tip: By default Oracle Linux hosts are pre-configured to use the Oracle public yum repository
The Oracle Linux Support program offers the following benefits over and above the free Oracle Linux RPM patches, updates and erratas:
Full indemnification against intellectual property claims. Remember the SCO lawsuits?
Use of the Oracle Enterprise Manager 12c Systems Management Plug-in for Linux for provisioning, patching, management and monitoring. The Systems
Management Plug-in for Linux has feature parity with Red Hat Satellite Server.
Access to additional Oracle software channels on the Unbreakable Linux Network (ULN).
The ability to create Support Requests with Oracle' World Class support organization.
The Oracle public yum server latest RPM channel include the base OS version installation RPM packages along with the latest software patches, updates and
fixes. Patch jobs using the latest RPM channel update hosts to their respected latest version update with the latest software patches, updates and fixes. A patch
job executed on a Oracle Linux 6 host would update the host from 6 to 6U3 with the latest latest software patches, updates and fixes. To keep a host at its
respected update level, a valid CSI and the Unbreakable Linux Network is required. With the Unbreakable Linux Network, it is possible to register a host the
el*/ol*_base channel along with the el*/ol*_patch RPM channel. When hosts are patched using the el*/ol*_base and el*/ol*_patch RPM channels, the hosts are
patched with the latest software patches, updates and fixes from their respected update channel, i.e. 6, 6U1, 6U2 and 6U3.
To configure an Oracle Linux, Red Hat Enterprise Linux 6 host to use Oracle's public yum repository, as root, change to the /etc/yum.repos.d/ directory and type
wget http://public-yum.oracle.com/public-yum-ol6.repo to download the public-yum-ol6.repo file. Next, type yum update -y to patch the host.
The next example shows how to download the public-yum-ol6.repo file from Oracle, then update an Oracle Linux or Red hat Enterprise Linux host. Type the
following commands as root:
# cd /etc/yum.repos.d/
# wget http://public-yum.oracle.com/public-yum-ol6.repo
# yum update -y
The next examples shows the public-yum-ol6.repo file.

Mokum Solutions, Inc. +1 415 252-9164

30 of 39

http://mokumsolutions.com

Tip: You can enable any of the repositories in the public-yum-ol6.repo file by changing enabled=0 to enabled=1.
# vi /etc/yum.repos.d/public-yum-ol6.repo
[ol6_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
[ol6_addons]
name=Oracle Linux $releasever Add ons ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/addons/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0
[ol6_ga_base]
name=Oracle Linux $releasever GA installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/0/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0
[ol6_u1_base]
name=Oracle Linux $releasever Update 1 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/1/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0
[ol6_u2_base]
name=Oracle Linux $releasever Update 2 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/2/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0
[ol6_u3_base]
name=Oracle Linux $releasever Update 3 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/3/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0
[ol6_u4_base]
name=Oracle Linux $releasever Update 4 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/4/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0
[ol6_u5_base]
name=Oracle Linux $releasever Update 5 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/5/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0
[ol6_UEKR3_latest]
name=Latest Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/UEKR3/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

Mokum Solutions, Inc. +1 415 252-9164

31 of 39

http://mokumsolutions.com
[ol6_UEK_latest]
name=Latest Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/UEK/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
[ol6_UEK_base]
name=Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/UEK/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0
[ol6_playground_latest]
name=Latest mainline stable kernel for Oracle Linux 6 ($basearch) - Unsupported
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/playground/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0
[ol6_MySQL]
name=MySQL 5.5 for Oracle Linux 6 ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/MySQL/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0
[ol6_gdm_multiseat]
name=Oracle Linux 6 GDM Multiseat ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/gdm_multiseat/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0
[ol6_ofed_UEK]
name=OFED supporting tool packages for Unbreakable Enterprise Kernel on Oracle Linux 6 ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/ofed_UEK/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0
[ol6_MySQL56]
name=MySQL 5.6 for Oracle Linux 6 ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/MySQL56/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0
[ol6_spacewalk20_server]
name=Spacewalk Server 2.0 for Oracle Linux 6 ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/spacewalk20/server/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0
[ol6_spacewalk20_client]
name=Spacewalk Client 2.0 for Oracle Linux 6 ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/spacewalk20/client/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0
Table 3 lists the repository directives.
Directive Description

Explanation

Mokum Solutions, Inc. +1 415 252-9164

32 of 39

http://mokumsolutions.com

baseurl

The location of the RPM repository, i.e. file://, ftp://, or http://. This directive is required

enabled

If set to 1, enables the RPM repository.

name

A descriptive name for the RPM repository. This directive is required

Tip: Consult the yum.conf(5) man page for additional details.

Install the oracle-rdbms-server preinstall RPM


The oracle-rdbms-server-11gR2-preinstall or oracle-rdbms-server-12cR1-preinstall (dependent on db version) RPM, formally know as oracle-validated, simplifies
meeting the software and system configuration prerequisites for installing the Oracle Database, Oracle Enterprise Manager, and many other Oracle technology products
on Oracle Linux 6. Installing the oracle-rdbms-server-11gR2-preinstall or oracle-rdbms-server-12cR1-preinstall RPM automatically installs all of the software RPM
prerequisites for Oracle Database and Oracle Enterprise Manager, as well as meeting the system configuration prerequisites, such as creating an oracle user and the
oinstall and dba groups, configuring the sysctl.conf settings, system startup parameters, user limits, and driver parameters. After the installation of the oracle-rdbmsserver-11gR2-preinstall or oracle-rdbms-server-12cR1-preinstall RPM, you can confidently start the Oracle Database and Oracle Enterprise Manager product installer.
The oracle-rdbms-server-11gR2-preinstall and oracle-rdbms-server-12cR1-preinstall RPMs are available at the Oracle Unbreakable Linux Network, on the Oracle
Linux media, and from the Oracle public yum repository.
Note: A prerequisite for the oracle-rdbms-server-11gR2-preinstall and oracle-rdbms-server-12cR1-preinstall RPMs is the Unbreakable Enterprise Kernel (UEK).
To install the oracle-rdbms-server preinstall RPM from the Oracle public yum repository, as root type the following commands:
# cd /etc/yum.repos.d/
# wget http://public-yum.oracle.com/public-yum-ol6.repo
Install the oracle-rdbms-server-12cR1-preinstall package as the root user:
# yum install oracle-rdbms-server-12cR1-preinstall
Install the oracle-rdbms-server-11gR2-preinstall package as the root user:
# yum install oracle-rdbms-server-11gR2-preinstall
By default the public-yum-ol6.repo file has the ol6_latest RPM channel enabled. The Oracle public yum server latest RPM channel include the base OS version installation
RPM packages along with the latest software patches, updates and fixes. Patch jobs using the latest RPM channel update hosts to their respected latest version update
with the latest software patches, updates and fixes. A patch job executed on a Oracle Linux 6U1 host would update the host from 6u1 to 6U5 with the latest latest software
patches, updates and fixes. To keep a host at its respected update level, a valid CSI and the Unbreakable Linux Network is required. With the Unbreakable Linux Network,
it is possible to register a host the el*/ol*_base channel along with the el*/ol*_patch RPM channel. When hosts are patched using the el*/ol*_base and el*/ol*_patch RPM
channels, the hosts are patched with the latest software patches, updates and fixes from their respected update channel, i.e. 6, 6U1, 6U2 and 6U3, etc...
Note: If the host is not 6U5/latest, once the oracle-rdbms-server preinstall is installed, edit the public-yum-ol6.repo file and disable the el6_latest RPM channel by
changing enabled=1 to enabled=0.
The next example shows the el6_latest entry from the public-yum-el6.repo file with the enabled=1 flag, i.e. the el6_latest RPM repository is enabled.
[ol6_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
The next example shows the el6_latest entry from the public-yum-el6.repo file with the enabled=0 flag, i.e. the el6_latest RPM repository is disabled.
[ol6_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0
A good practice after the rdbms-preinstall RPM installation is to set the password for the oracle user created during the script. As root, type the following:
$ passwd oracle
Changing password for user oracle.
New password:
Retype new password:

Mokum Solutions, Inc. +1 415 252-9164

33 of 39

http://mokumsolutions.com

passwd: all authentication tokens updated successfully.


$

Install the oracle-ebs-server-R12-preinstall RPM


The oracle-ebs-server-R12-preinstall RPM simplifies meeting the software and system configuration prerequisites for installing Oracle E-Business Suite on
Oracle Linux 5 and 6. Installing the oracle-ebs-server-R12-preinstall RPM automatically installs all of the software RPM prerequisites for Oracle E-Business
Suite, as well as meeting the system configuration prerequisites, such as creating an oracle user and the oinstall and dba groups, configuring the sysctl.conf
settings, system startup parameters, user limits, and driver parameters. After the installation of the oracle-ebs-server-R12-preinstall RPM, you can confidently
start the Oracle product installer. The oracle-ebs-server-R12-preinstall RPM is available in the Oracle Unbreakable Linux Network addons channel and from the
Oracle public yum repository addons channel.
To install the oracle-ebs-server-R12-preinstall RPM from the Oracle public yum repository, as root type the following commands:
# cd /etc/yum.repos.d
# wget http://public-yum.oracle.com/public-yum-ol6.repo
Next, using you favorite text editor edit the public-yum-ol6.repo file and enable the addons channel. Change the following line from:
[ol6_addons]
name=Oracle Linux $releasever Add ons ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/addons/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0
to:
[ol6_addons]
name=Oracle Linux $releasever Add ons ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/addons/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
Now we can install the oracle-ebs-server-R12-preinstall RPM as shown in the next example.
# yum install oracle-ebs-server-R12-preinstall -y

Install the oracle-em-agent preinstall RPM


The oracle-em-agent-12cR1-preinstall (use for Oracle Management Agent R1 through R3), and oracle-em-agent-12cR4-preinstall (use for Oracle Management
Agent R4) RPMs simplifies meeting the software and system configuration prerequisites for installing the Enterprise Manager agent (Oracle Management Agent (OMA))
on Oracle Linux 5, 6, and 7. Installing the oracle-em-agent preinstall RPM automatically installs all of the software RPM prerequisites for the Oracle Management
Agent, as well as meeting the system configuration prerequisites, such as creating an oracle user and the oinstall and dba groups, configuring the sysctl.conf settings,
system startup parameters, user limits, and driver parameters. The Oracle Management Agent RPM is available in the Oracle Unbreakable Linux Network addons

channel and from the Oracle public yum repository addons channel.
Note: If you allready installed the oracle-rdbms-server preinstall RPM, there is no need to install the oracle-em-agent preinstall RPM
To install the oracle-em-agent preinstall RPM from the Oracle public yum repository, as root type the following commands:
# cd /etc/yum.repos.d
# wget http://public-yum.oracle.com/public-yum-ol6.repo
Next, using you favorite text editor edit the public-yum-ol6.repo file and enable the addons channel. Change the following line from:
[ol6_addons]
name=Oracle Linux $releasever Add ons ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/addons/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0
to:
[ol6_addons]
name=Oracle Linux $releasever Add ons ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/addons/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
Now we can install the oracle-ebs-server-R12-preinstall RPM as shown in the next example.
Install the oracle-em-agent-12cR1-preinstall RPM package for Oracle Management Agent R1 through R3:
# yum install oracle-em-agent-12cR1-preinstall -y
Install the oracle-em-agent-12cR4-preinstall RPM package for Oracle Management Agent R4:

Mokum Solutions, Inc. +1 415 252-9164

34 of 39

http://mokumsolutions.com
# yum install oracle-em-agent-12cR4-preinstall -y

SSH and X11 Forwarding


Installing the Oracle software using the Oracle Universal Installer (OUI) GUI requires local or remote access to the server' console or a remote X Windows (X11)
session. Please note that the only software requirements on the Linux Oracle Enterprise Manager host for remote X Windows (X11) sessions is the xauth RPM
package. The xauth RPM package handles the X11 forwarding authentication. X-windows and xhost are not required on the Linux Oracle Enterprise Manager
host for remote X Windows (X11) sessions.
SSH and X11 forwarding enables the redirection of an X11 session from a remote Oracle Linux machine to a local desktop. For example, from a local desktop,
ssh to a remote Oracle Linux server using X11 forwarding and run the Oracle Universal Installer, i.e. by typing ./runInstaller. The Oracle Universal Installer will
be displayed on the local desktop and the Oracle Enterprise Manager 12c components can be installed on the remote Oracle Linux server.
On the Oracle Linux server, enable X11 forwarding in the /etc/ssh/sshd_config by adding "ForwardX11 yes" to the file as shown in the next example.
Change
#X11Forwarding no
to
X11Forwarding yes
Once the "ForwardX11 yes" entry has been added to the /etc/ssh/sshd_config file, restart ssh by typing "service sshd restart" to enable X11 forwarding. With X11
forwarding enabled, the Oracle Universal Installer (OUI) GUI can be exported from the Oracle Linux server to your local desktop.
Tip: To aviod X11 challanges install the xauth and xorg-x11-apps RPMs on the Linux host. To check for the RPMs, as root type, rpm -qa | grep -i xauth and rpm
-qa | grep -i xorg-x11-apps. To install xauth and the xorg-x11-apps RPMs, type yum -y install xorg-x11-apps xauth.
To enable X11 forwarding from a Linux desktop, use the "-X" switch with ssh. For example, type "ssh -X oracle@<ORACLE LINUX SERVER>" to create a ssh
tunnel with X11 forwarding. Do not forget that -X enables X11 forwarding, and -x actually disables X11 forwarding. Also, using the su command within a SSH
session with X11 forwarding breaks X11 authentication.
To test remote X Windows (X11), open a new ssh session with X11 forwarding enabled (ssh -X user@servername), and type xclock. The xclock application
should open on your desktop. xclock is an X window client application that is included in the xorg-x11-apps RPM package. xclock is often used to test remote X
Windows (X11) sessions.
Tip: To troubleshoot ssh connections, use ssh verbose mode, i.e. ssh -v -v -X user@servername
If your using a Windows PC, a PC X Server like XMing is required to run an X Windows session, along with an ssh client like putty that supports X11 forwarding.
If you get X11 forwarding request failed on channel 0 messages from an ssh connection, on the target Oracle Linux server edit the /etc/ssh/sshd_config file,
and ensure that "X11Forwarding yes" is not commented, add "X11UseLocalhost no", and uncomment "AddressFamily any". Next, restart sshd by typing "service
sshd restart", and your X11 apps will successfully run.

Install VNC Server


Many Oracle DBAs and Apps DBAs need VNC console access to get their job done. VNC is easy to install and configure.
First, as root, access the host and install and configure the VNC packages. The next example shows how to install VNC, and then configure VNC
to automatically start on every reboot.
# yum install tigervnc-server -y
Next, make the VNC server automatically start on every reboot.
# chkconfig vncserver on
Next, create the VNC password for the your Oracle DBA and Apps DBAs user accounts. The next example uses the user oracle account. Change the oracle
account name to your Oracle DBA and Apps DBAs user account name(s). As root, su to the oracle user account.
# su - oracle
$ vncpasswd
Password:
Verify:
Next, configure VNC for new user by adding the user name(s) in the /etc/sysconfig/vncservers file. Using your favorite text editor, edit /etc/sysconfig/vncservers
and add your users with their setting.
The next example shows the oracle user account configured with 1280x1024 display.
VNCSERVERS="2:oracle"
VNCSERVERARGS[2]="-geometry 1280x1024"
You can add additional users each with unique display sizes, as shown below:
VNCSERVERS="2:userX 3:userX 4:userX"
VNCSERVERARGS[2]="-geometry 1280x1024"
VNCSERVERARGS[3]="-geometry 1280x1024"
VNCSERVERARGS[4]="-geometry 800x600"
Next, start the VNC server.
# /etc/init.d/vncserver start
Finally, using your favorite VNC view access the host by typing its IP address or FQDN with the port 2, i.e. 192.168.20.100:2.

Mokum Solutions, Inc. +1 415 252-9164

35 of 39

http://mokumsolutions.com

Yum Command Examples Repository Listing, Install, Uninstall, & Update RPM Packages
Installing, removing, and updating RPM packages is a fundamental Linux lifecycle operation. This section of the Oracle Cloud Cookbook introduces the most
frequently used yum commands to query RPM repositories, install, uninstall, & update RPM packages.
Linux distributions have one or more package managers. The yum package manager is the default RPM package manager for Red Hat distributions such as
Oracle Linux and CentOS. Yum stands for Yellowdog Updater Modified. Yum is a client command for updating RPMs from RPM repositories on yum servers. Yum
servers maintain up-to-date RPM header and metadata that point yum clients to RPMs and their RPM dependencies.
The yum command requires an argument to specify the action to take. The most commonly used yum commands are:
install
remove
update
list
search
The install and remove commands work as expected, they install or remove the listed RPM packages. The install, remove and update commands determine what
other packages must be installed or removed (dependencies) and presents the details for confirmation. Wildcards can be used in the package names to specify a
group of related packages. For example:
# yum install 'foo'
# yum remove 'foo'
# yum update 'foo'
# yum install 'foo fie fo fum'
# yum remove 'foo fie fo fum'
# yum update 'foo fie fo fum'

Yum Repository Listing and Maintenance


The repolist command with its subcommands queries the RPM repository entries in a yum client's .repo files.
The next example shows the output from the "yum repolist enabled" command. The "yum repolist enabled" command lists a yum client's enabled repositories with
the status and the number of RPMs.
# yum repolist enabled
Loaded plugins: rhnplugin, security
This system is not registered with ULN.
ULN support will be disabled.
repo id
el5_latest
epel
repolist: 11,415

repo name
Oracle Linux 5 Latest (x86_64)
Extra Packages for Enterprise Linux 5 - x86_64

status
4,221
7,194

The next example shows the output from the "yum repolist disabled" command. The "yum repolist disabled" command lists a yum client's disabled repositories.
# yum repolist disabled
Loaded plugins: rhnplugin, security
This system is not registered with ULN.
ULN support will be disabled.
repo id
repo name
epel-debuginfo
Extra Packages for Enterprise Linux 5 - x86_64 - Debug
epel-source
Extra Packages for Enterprise Linux 5 - x86_64 - Source
epel-testing
Extra Packages for Enterprise Linux 5 - Testing - x86_64
epel-testing-debuginfo
Extra Packages for Enterprise Linux 5 - Testing - x86_64 - Debug
epel-testing-source
Extra Packages for Enterprise Linux 5 - Testing - x86_64 - Source
repolist: 0
The next example shows the output from the "yum repolist all" command. The "yum repolist all" command lists a yum client's enabled and disabled repositories
with the status and the number of RPMs.
# yum repolist all
Loaded plugins: rhnplugin, security
This system is not registered with ULN.
ULN support will be disabled.
repo id
repo name
el5_latest
Oracle Linux 5 Latest (x86_64)
epel
Extra Packages for Enterprise Linux 5 - x86_64

status
enabled: 4,221
enabled: 7,194

Mokum Solutions, Inc. +1 415 252-9164

36 of 39

http://mokumsolutions.com
epel-debuginfo
epel-source
epel-testing
epel-testing-debuginfo
epel-testing-source
repolist: 11,415

Extra Packages for Enterprise Linux 5 - x86_64 - Debug


Extra Packages for Enterprise Linux 5 - x86_64 - Source
Extra Packages for Enterprise Linux 5 - Testing - x86_64
Extra Packages for Enterprise Linux 5 - Testing - x86_64 - Debug
Extra Packages for Enterprise Linux 5 - Testing - x86_64 - Source

disabled
disabled
disabled
disabled
disabled

The "yum repolist -v" command verbosly lists all enabled repositories. The yum repolist -v command is useful to list the details from all configured repositories.
The next example shows the output from the "yum repolist -v" command.
# yum repolist -v
Loading "rhnplugin" plugin
Loading "security" plugin
Config time: 0.048
This system is not registered with ULN.
ULN support will be disabled.
Yum Version: 3.2.22
Setting up Package Sacks
pkgsack time: 0.039
Repo-id
: el5_latest
Repo-name : Oracle Linux 5 Latest (x86_64)
Repo-updated : Fri Oct 26 10:30:15 2012
Repo-pkgs : 4,221
Repo-size : 5.3 G
Repo-baseurl : http://192.168.4.13/yum/OracleLinux/OL5/latest/x86_64/
Repo-expire : 3,600 second(s) (last: Fri Oct 26 16:47:06 2012)
Repo-id
: epel
Repo-name : Extra Packages for Enterprise Linux 5 - x86_64
Repo-revision: 1351273445
Repo-tags : binary-x86_64
Repo-updated : Fri Oct 26 10:46:18 2012
Repo-pkgs : 7,194
Repo-size : 5.4 G
Repo-mirrors : http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=x86_64
Repo-expire : 3,600 second(s) (last: Fri Oct 26 16:47:13 2012)
repolist: 11,415
Clean the yum cache using yum clean
The yum clean command with its subcommands (clean [ headers | packages | metadata | dbcache | plugins | expire-cache | all) is used to clean the yum cache
headers, packages, metadata, dbcache, plugins and expire-cache. The yum clean command with its subcommands is useful to make sure the yum cache is
clean. The next example shows how to clean the yum cache.
# yum clean all
Loaded plugins: rhnplugin, security
Cleaning up Everything
Rebuild the yum cache using yum makecache
The yum makecache command downloads the metadata for all enabled yum repositories. The yum makecache command is useful to make sure the cache is
current.
# yum makecache
Loaded plugins: rhnplugin, security
This system is not registered with ULN.
ULN support will be disabled.
el5_latest
| 1.9 kB 00:00
el5_latest/filelists_db
| 7.1 MB 00:00
el5_latest/other_db
| 20 MB 00:01
el5_latest/primary_db
| 6.1 MB 00:00
epel
epel/filelists_db
epel/updateinfo
epel/other_db
epel/group_gz

| 3.7 kB 00:00
| 5.5 MB 00:06
| 473 kB 00:01
| 2.3 MB 00:03
| 168 kB 00:00

epel/primary_db
Metadata Cache Created

| 3.8 MB

00:05

Mokum Solutions, Inc. +1 415 252-9164

37 of 39

http://mokumsolutions.com

Listing RPM Packages & RPM Groups


List all available RPM packages using yum list
The yum list command without any options lists all of the packages in all configured repositories and all of the installed packages on a Linux host. Note that yum
list all and yum list generate the same output. The next example shows how to list all the available packages.
# yum list | less
List all the installed RPM packages using yum list installed
The yum list installed command lists all the installed packages on the system. The yum list installed command is equivalent to rpm -qa. The next example
shows how to list all the installed packages on the system.
# yum list installed | less
Check if a particular RPM package is installed using yum list
The next example shows how to confirm if a package, i.e. ntp, is already installed. Substitute the RPM package name ntp with the name of the RPM package you
would like to query.
# yum list ntp
Loaded plugins: rhnplugin, security
This system is not registered with ULN.
ULN support will be disabled.
Installed Packages
ntp.x86_64
4.2.2p1-15.el5_7.1

installed

List available software groups with yum grouplist


Repositories offer package groups to manage related packages as sets. Many 3rd party repositories add packages to these groups and provide their packages
as additional groups. The next example shows how to list all the available RPM package groups.
# yum grouplist
List which RPM package a file belong to with yum provides
The "yum provides" command lists which package a file belongs to. For example, to list the name of the package that has the /etc/ntp.conf file, type the following:
# yum provides /etc/ntp.conf
Loaded plugins: rhnplugin, security
This system is not registered with ULN.
ULN support will be disabled.
ntp-4.2.2p1-15.el5_7.1.x86_64 : Synchronizes system time using the Network Time Protocol (NTP).
Repo
: el5_latest
Matched from:
Filename : /etc/ntp.conf
ntp-4.2.2p1-15.el5_7.1.x86_64 : Synchronizes system time using the Network Time Protocol (NTP).
Repo
: installed
Matched from:
Other
: Provides-match: /etc/ntp.conf

Installing, Removing, Updating and Searching RPM Packages & RPM Groups
The yum install <packagename> command installs <packagename> including all of the required dependencies. The next example shows how to install the ntp
package. Substitute ntp with the package you would like to install.
# yum install ntp
It is possible to install multiple packages by adding the package names to the end of the line.
# yum install foo fie fo fum
The yum remove <packagename> command removes <packagename> including all of the required dependencies. The next example shows how to remove the
ntp package. Substitute ntp with the package you would like to remove.
# yum remove ntp
The yum update <packagename> command updates <packagename> including all of the required dependencies. The next example shows how to update the ntp
package. Substitute ntp with the package you would like to update.
# yum update ntp
The yum update command updates all of the RPM packages that need to be updated, including all of the required dependencies. The next example shows how

Mokum Solutions, Inc. +1 415 252-9164

38 of 39

http://mokumsolutions.com
to update all of the packages that need to be updated.
# yum update
TIp: The -y option can be used to answer yes to all questions. For example, yum update -y would install all packages without having to type "yes".
The yum search <search term> command searches the enables repositories for the search term. The next example shows how to search for the ntp package.
Substitute ntp with the package you would like to find.
# yum search ntp
Tip: Wildcards can be used with the search directive, such as * (match anything) and ? (match any single character).
The yum groupinstall 'the group's name enclosed in single quotes' command is used to install package groups. The following example shows how to install,
update and remove a package group.
# yum groupinstall 'FTP Server'
# yum groupupdate 'FTP Server'
# yum groupremove 'FTP Server'

How to Uninstall or Remove Oracle Linux


There is not an option to uninstall Oracle Linux, although there are many ways to remove Oracle Linux from a system. The method you select to remove Oracle
Linux or Red Hat Enterprise Linux from a system will depend on your organizations security requirements. For example, if the data on the hard drive needs to be
securely deleted, formatting or re-partitioning the hard drive will not completely remove the data from the disks. To completely wipe Oracle Linux or Red Hat
Enterprise Linux as well as the data from the hard disks, boot the system using data destruction application like Darik's Boot and Nuke (DBAN) and wipe all of the
disks. If the data on the hard drive does not need to be securely deleted, you could a) delete all the files on the disks b) format or re-partition the hard drives c)
uninstall the bootloader and d) install another operating system on top of the existing one.
List 3 shows several of the options to remove Oracle Linux from a system.
Boot the system using data destruction application like Darik's Boot and Nuke (DBAN) and wipe all of the disks.
Delete all the files on the disks, i.e. type rm -rf / as root.
Format or delete the partitions.
Uninstall the bootloader.
Install another operating system on top of Oracle Linux or Red Hat Enterprise Linux.

Mokum Solutions, Inc. +1 415 252-9164

39 of 39

S-ar putea să vă placă și