Documente Academic
Documente Profesional
Documente Cultură
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
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
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
Roddy Rodstein
07/18/14
1.4
Content Refresh
Roddy Rodstein
12/01/14
AARnet
http
ftp
http://mirror.aarnet.edu.au
/pub/oraclelinux/
ftp://mirror.aarnet.edu.au
/pub/oraclelinux/
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
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
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.
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.
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.
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.
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.
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.
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
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
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
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
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
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
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
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
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.
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.
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.
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
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
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.
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
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
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.
27 of 39
http://mokumsolutions.com
28 of 39
http://mokumsolutions.com
29 of 39
http://mokumsolutions.com
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.
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
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
32 of 39
http://mokumsolutions.com
baseurl
The location of the RPM repository, i.e. file://, ftp://, or http://. This directive is required
enabled
name
33 of 39
http://mokumsolutions.com
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:
34 of 39
http://mokumsolutions.com
# yum install oracle-em-agent-12cR4-preinstall -y
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'
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
36 of 39
http://mokumsolutions.com
epel-debuginfo
epel-source
epel-testing
epel-testing-debuginfo
epel-testing-source
repolist: 11,415
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
37 of 39
http://mokumsolutions.com
installed
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
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'
39 of 39