You are on page 1of 66

Oracle Linux 6 Boot Camp

Oracle Linux 6 Lab Exercise

Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied
upon in making purchasing decisions.
The development, release, and timing of any features or functionality described for
Oracle’s products remains at the sole discretion of Oracle.

Oracle Training Materials – Usage Agreement
Use of this Site (“Site”) or Materials constitutes agreement with the following terms
and conditions:
1. Oracle Corporation (“Oracle”) is pleased to allow its business partner (“Partner”)
to download and copy the information, documents, and the online training courses
(collectively, “Materials") found on this Site. The use of the Materials is restricted to
the non-commercial, internal training of the Partner’s employees only. The
Materials may not be used for training, promotion, or sales to customers or other
partners or third parties.
2. All the Materials are trademarks of Oracle and are proprietary information of
Oracle. Partner or other third party at no time has any right to resell, redistribute or
create derivative works from the Materials.
3. Oracle disclaims any warranties or representations as to the accuracy or
completeness of any Materials. Materials are provided "as is" without warranty of
any kind, either express or implied, including without limitation warranties of
merchantability, fitness for a particular purpose, and non-infringement.
4. Under no circumstances shall Oracle or the Oracle Authorized Delivery Partner be
liable for any loss, damage, liability or expense incurred or suffered which is claimed
to have resulted from use of this Site of Materials. As a condition of use of the
Materials, Partner agrees to indemnify Oracle from and against any and all actions,
claims, losses, damages, liabilities and expenses (including reasonable attorneys'
fees) arising out of Partner’s use of the Materials.
5. Reference materials including but not limited to those identified in the Boot Camp
manifest cannot be redistributed in any format without Oracle written consent.

OL 6 Package Management - Lab 3

Oracle Linux Package Management
V1.0 January 2013

1 Introduction
Oracle Linux software, updates, patches and applications are usually organized in
the form of RPM packages that contain all the relevant parts of an application (e.g.
binaries, configuration files, libraries). In this module, participants will learn how to
install and manage packages on Oracle Linux 6.
With a few basic exercises we will introduce the learner to some ways to perform
Linux package management in Oracle Linux 6. We will also cover Ksplice Zero
Downtime Patching technology which is a unique feature of Oracle Linux operating
system. Upon completion of this lab participants will have learned how to install,
update, and remove Linux packages using different utilities and methods.

2 Overview
In this lab we’ll be practicing Oracle Linux 6 Package Management tasks. We will
install, remove and update RPM packages using both the RPM and YUM utilities. We
will install the Oracle RDBMS Server 11gR2 Pre-install RPM package and explain the
purpose of this package. We’ll briefly review setting up a local yum repository.
Finally, we will also discuss Ksplice patching and how it can help improve uptime
and increase security of your Oracle Linux 6 systems.
Some of the topics and concepts we’ll review are listed below.





Install Packages using Oracle Linux ISO image as a local repository
Using the RPM utility
Using the YUM command
Install the Oracle RDBMS Server 11gR2 Pre-install RPM package
Set up a local YUM repository – no lab
Ksplice Zero Downtime Patching – optional lab

This practice can be accomplished with a single VirtualBox Oracle Linux 6.3
instance. You must have finished the Installation lab and already have an instance
of Oracle Linux 6.3 running in your VirtualBox environment.

For Oracle employees and authorized partners only. Do
not distribute to third parties.
© 2013 Oracle Corporation

OL 6 - Lab 03

Page 2 of 66

OL 6 Package Management - Lab 3
3 Pre-requisites
This lab requires the use of the following elements:



A current 64 bit laptop with at least 2GB RAM and 20GB free disk space
Operating system: A 64-bit version of Microsoft Windows, Mac OS X, Linux
or Solaris. Alternatively, a 32-bit host OS installed on a 64-bit CPU with VTx/AMD-V enabled in the BIOS.
Oracle VirtualBox Software 4.2.10 or later (with Extension Pack installed)
Oracle Linux 6.3 instance running inside VirtualBox:
o VM Image Provided by instructor or downloaded on your own
o Installed in Lab 1 of Oracle Linux 6 Boot camp

The following assumptions have been made regarding the environment where this
lab is being performed:
1. Network connectivity to the Internet is available
2. Your Oracle Linux 6.3 VirtualBox instance has been installed and you’ve
assigned a normal user/password and a ‘root’ user password.
a. The recommended user name is ‘student1’
b. The recommended password is ‘oracle’
c. The recommended root password is ‘oracle’

4 VirtualBox lab setup
If you already have an instance of Oracle Linux 6.3 installed in VirtualBox or have
already imported the Oracle Linux 6.3 image, you can skip this section and proceed
to the Labs in Section 5. If you need to import the Oracle Linux 6.3 appliance (image
in ova file provided for this training) then complete the steps in this section before
you start with the Labs.
1 - In the VirtualBox
main window choose
File > Import
Appliance …

For Oracle employees and authorized partners only. Do
not distribute to third parties.
© 2013 Oracle Corporation

OL 6 - Lab 03

Page 3 of 66

For Oracle employees and authorized partners only. © 2013 Oracle Corporation OL 6 .OL 6 Package Management .ova.3 Prebuilt image and click Open. The file is named Oracle_Linux_6_Bootca mp. button and navigate to the Oracle_Linux_6_Bootca mp.Lab 03 Page 4 of 66 ..3 VM image you downloaded or obtained from the instructor 3 . Do not distribute to third parties.From the Appliance Import Wizard click the Open appliance.Navigate to the folder where you downloaded or copied the Oracle Linux 6.ova file which is the pre-built Oracle Linux 6.Lab 3 2 .

Lab 3 4 . 6 .Choose ‘Next’ on the Appliance to import screen 5 .Confirm the default settings and choose “Import” to begin importing the virtual image. read and accept the license. For Oracle employees and authorized partners only.The progress bar will show the import progress. Usually looks slow in the beginning but this shouldn’t take more than a few minutes.Lab 03 Page 5 of 66 . Do not distribute to third parties.OL 6 Package Management . If you see a License Agreement window. © 2013 Oracle Corporation OL 6 .

Your new image has been imported and is ready for use. After booting. login as ‘root’ user and activate your network connection to start using the image.Lab 03 Page 6 of 66 . © 2013 Oracle Corporation OL 6 . Do not distribute to third parties. Once you have reviewed the settings. 8 .Lab 3 7 . you can select the image and click the Start button to boot Oracle Linux 6. The following video demonstrates how to import an appliance: Importing Oracle Linux VM Appliance Video For Oracle employees and authorized partners only.After your image has finished importing select it in the VB application and choose “Settings” and review settings. Select the Oracle Linux 6 Bootcamp image.OL 6 Package Management .

It is assumed that you already have downloaded the Oracle Linux 6.3 ISO image file (V33411-01. We will mount this ISO image file on our Oracle Linux 6.3 ISO image file (V33411-01. Do not distribute to third parties. For Oracle employees and authorized partners only. we will use the Oracle Linux 6. Once the ISO image file or the DVD media has been mounted.3 instance running inside VirtualBox application.OL 6 Package Management . Login as ‘root’ user to your Oracle Linux 6. we will configure it as a local yum repository and then install some RPM packages from this local repository.1 Install packages using Oracle Linux ISO image as a local repository In this lab.Lab 03 Page 7 of 66 .iso) that was downloaded from the Oracle Software Delivery Cloud. Choose the ‘Devices → CD/DVD Devices → Choose a virtual CD/DVD disk file’ option from the VirtualBox VM Machine menu options.iso) file on your local disk drive or it is accessible from your laptop.3 instance running inside VirtualBox application to perform this lab.Lab 3 5 Lab Exercises 5. See screenshot below. Installing from ISO image or DVD comes in handy when you do not have an internet connection to access the Oracle Public Yum Server. © 2013 Oracle Corporation OL 6 .

© 2013 Oracle Corporation OL 6 .Lab 3 Choose the Oracle Linux 6.3 ISO image file (V33411-01. For Oracle employees and authorized partners only.Lab 03 Page 8 of 66 .OL 6 Package Management . Do not distribute to third parties.3 ISO image file get mounted on your desktop. Double click the mounted DVD image to open the file manager and view the contents of the DVD image. You should now see the Oracle Linux 6.iso) from your hard drive as shown below.

© 2013 Oracle Corporation OL 6 . and select the Unmount option as shown in the screenshot below. Using a directory with spaces in the name may be a bit tricky and hence we will unmount this DVD image and mount it on a new mount point with a new name that does not include spaces in the directory name. This will keep the DVD media inserted the virtual drive and will allow us to mount it to a new directory mount point. For Oracle employees and authorized partners only.Lab 03 Page 9 of 66 . Do not distribute to third parties. right click the DVD media icon on your desktop. To unmount the DVD image.OL 6 Package Management .Lab 3 The DVD ISO image file was mounted on ‘/media’ and the mount name includes spaces in the directory name.

3 system. © 2013 Oracle Corporation OL 6 .Lab 3 Once the DVD media has been unmounted.OL 6 Package Management . use the mount command as shown below to mount the DVD device to this new directory called ‘/OL6DVD’. mounting read-only [root@examplehost /]# For Oracle employees and authorized partners only. [root@examplehost /]# mkdir /OL6DVD [root@examplehost /]# mount /dev/sr0 /OL6DVD mount: block device /dev/sr0 is write-protected. Create a new directory called ‘/OL6DVD’ on your Oracle Linux 6. Next. Do not distribute to third parties. we will create a new directory name without any spaces in the name of the directory and then mount the DVD ISO image file to that new directory.Lab 03 Page 10 of 66 .

OL 6 Package Management . © 2013 Oracle Corporation OL 6 . [root@examplehost /]# mount /dev/mapper/vg_examplehost-lv_root on / type ext4 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw. Do not distribute to third parties.nosuid.gid=5.mode=620) tmpfs on /dev/shm type tmpfs (rw.gvfs-fuse-daemon (rw.nodev) /dev/sr0 on /OL6DVD type iso9660 (ro) [root@examplehost /]# For Oracle employees and authorized partners only.Lab 03 Page 11 of 66 .rootcontext="system_u:object_r:tmpfs_t:s0") /dev/sda1 on /boot type ext4 (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) gvfs-fuse-daemon on /root/.Lab 3 You can run the mount command to verify that the Oracle Linux DVD ISO image file has indeed been mounted on the ‘/OL6DVD’ mount point.gvfs type fuse.

repo repodata [root@examplehost OL6DVD]# RPM-GPG-KEY RPM-GPG- Server supportinfo TRANS.en_US README-en.html HighAvailability RELEASE-NOTES-x86_64-en images RELEASE-NOTES-x86_64-en.OL 6 Package Management .py RELEASE-NOTES-en ScalableFileSystem GPL RELEASE-NOTES-en.html isolinux RELEASE-NOTES-x86-en LoadBalancer RELEASE-NOTES-x86-en.TBL UEK2 For Oracle employees and authorized partners only.html KEY-oracle eula. Do not distribute to third parties.Lab 03 Page 12 of 66 .Lab 3 Change directory and review the contents of the mounted DVD ISO image file as shown below.html media. [root@examplehost /]# cd /OL6DVD/ [root@examplehost OL6DVD]# ls EFI Packages ResilientStorage EULA README-en eula. © 2013 Oracle Corporation OL 6 .

[root@examplehost ~]# vi /etc/yum. As mentioned earlier.OL 6 Package Management .Lab 03 Page 13 of 66 .repos.d/local. © 2013 Oracle Corporation OL 6 .repos.d/local.repo [local] name=OL6u3 DVD Repository baseurl=file:///OL6DVD [root@examplehost ~]# For Oracle employees and authorized partners only. Use a text editor of your preference to create a configuration file ‘/etc/yum.repo [root@examplehost ~]# [root@examplehost ~]# cat /etc/yum.d/local.Lab 3 We will now configure this mounted DVD image file as a local package repository that can be used by yum command to install packages.repos. Do not distribute to third parties.repo’ as shown below. this learning exercise can be performed to install packages in situations where you do not have internet access and cannot use the Oracle Public Yum Server.

security repo id repo name status local OL6u3 DVD Repository 3. you can run the following RPM commands.OL 6 Package Management . If you see the ‘local’ repository in the output that means the DVD based repository is now available as repository. [root@examplehost ~]# yum repolist Loaded plugins: refresh-packagekit.092 [root@examplehost ~]# For Oracle employees and authorized partners only. Do not distribute to third parties.Lab 03 Page 14 of 66 . verify using the ‘yum repolist’ command and confirm that you can see a repository with the name ‘local’ in the list. © 2013 Oracle Corporation OL 6 .repo’) as shown above.repos.d/local.Lab 3 Once you have created the local repository file (‘/etc/yum.563 ol6_UEK_latest Latest Unbreakable Enterprise Kernel for Oracle Linux 6Server (x86_64) 120 ol6_latest Oracle Linux 6Server Latest (x86_64) 18. Note: You may have to import the Public keys from the Oracle Linux 6 DVD before you can install packages using the DVD based local yum repository.409 repolist: 22. To import the public keys. Next. you are now ready to use this repository to install packages using the yum command and this local repository.

For this exercise. we will install the ‘lsscsi’ rpm package.Lab 3 We will install a package from this local yum repository now to verify that is working correctly. verify two things: 1. Do not distribute to third parties.repo Verify that only repository available is the local repository using the ‘yum repolist’ command: [root@examplehost ~]#yum repolist For Oracle employees and authorized partners only. © 2013 Oracle Corporation OL 6 .repos. Before we install this package.OL 6 Package Management . Make sure ‘lsscsi’ rpm is not pre-installed using ‘rpm –q lsscsi’ command 2.d/public-yum-ol6.Lab 03 Page 15 of 66 . Make sure you disable all the enabled channels in the ‘/etc/yum.d/ [root@examplehost ~]# vi public-yum-ol6. List repositories using ‘yum repolist’ to make sure only the local repository is available [root@examplehost ~]#rpm –q lsscsi package lsscsi is not installed Edit and disable all channels by setting ‘enabled=0’ for all channels: [root@examplehost ~]# cd /etc/yum.repos.repo’ file 3.

© 2013 Oracle Corporation OL 6 . Note the Repository name is listed as ‘local’ in the above screenshot and this confirms that we are using the local repository (DVD image) to install this package.d]# yum install lsscsi Click ‘y’ to proceed with installation of ‘lsscsi’ rpm package. Do not distribute to third parties. For Oracle employees and authorized partners only.OL 6 Package Management .Lab 3 We will now install the ‘lsscsi’ rpm from the local repository using the yum command to verify that it is working correctly.Lab 03 Page 16 of 66 . Run the commands shown below: [root@examplehost yum.repos.

Lab 3 Once the ‘lsscsi’ package has been installed.Lab 03 Page 17 of 66 . you may run the ‘yum info’ command to find more information about this package as shown below. Do not distribute to third parties. [root@examplehost yum. © 2013 Oracle Corporation OL 6 .OL 6 Package Management .repos.d]# yum info lsscsi For Oracle employees and authorized partners only.

it is recommended to re-enable the channels in the ‘/etc/yum. Your host and the VirtualBox guest system must be able to connect to the Internet in order to download additional software packages. verify. Run the ‘man rpm’ command on your Oracle Linux 6. RPM Command Line Option Purpose rpm -i Install package rpm -U Upgrade package rpm -e Erase/remove package rpm -F Freshen package(similar to upgrade) rpm -q Query option rpm -V Verify option The Oracle Linux 6.3 instance should be up and running and you should be logged in as the Oracle Linux user with a terminal window opened to enter the following commands. © 2013 Oracle Corporation OL 6 . We have now learned how to mount the DVD image file and then use that mounted image as a local repository for ‘yum’ command. query. In this lab exercise. update and erase/remove packages.3 system and go through the common options and their purpose. Note: After completing the above exercise.repo’ file that you had earlier disabled.Lab 3 This concludes this lab.3. Refer to man pages of rpm command for complete details and more information. install. We will start this lab by reading the man page of rpm command.d/public-yum-ol6. The rpm command can be used to build. we will use some of the common command line options of rpm command.Lab 03 Page 18 of 66 . [root@examplehost ~]# man rpm For Oracle employees and authorized partners only.OL 6 Package Management . Do not distribute to third parties. We also verified by installing a package from this local repository. 5.2 Using the RPM Utility The RPM Package Manager can be used for Package Management tasks on Oracle Linux 6. Some of these command line options and their purpose is listed in the table below.repos.

el6.x86_64 pm-utils-1.Lab 3 Query (-q) Option Examples: To query for all the RPM packages.4.el6. © 2013 Oracle Corporation OL 6 .el6.noarch newt-python-0.56.52.noarch kurdit-unikurd-web-fonts-20020502-6.3.11-3.el6. run the rpm commands with the query option as shown below: [root@examplehost /]# rpm -qa im-chooser-1.1-3.5-9.noarch libuser-python-0.x86_64 lklug-fonts-0.3 system.el6.el6.30-3. [root@examplehost /]# rpm -qa | more For Oracle employees and authorized partners only.x86_64 filesystem-2.el6.el6..Lab 03 Page 19 of 66 .x86_64 perl-parent-0.x86_64 .08-10.x86_64 perl-libxml-perl-0. Do not distribute to third parties..OL 6 Package Management ..221-127..el6..6-4.13-5.. installed on your Oracle Linux 6.2.20090803cvs. .

el6_3.el6_3.3p1-81.x86_64 openssh-5.el6_3.3p1-81. run the following ‘rpm’ command: [root@examplehost /]# rpm -qa | grep ssh openssh-server-5.Lab 3 To query for all packages with the string ‘ssh’ in the package name.Lab 03 Page 20 of 66 . © 2013 Oracle Corporation OL 6 .2-11.2.x86_64 openssh-askpass-5.3p1-81.el6_3. Do not distribute to third parties.el6_3.3p1-81.OL 6 Package Management .x86_64 openssh-clients-5.x86_64 libssh2-1.x86_64 [root@examplehost /]# For Oracle employees and authorized partners only.

3 system: [root@examplehost /]# rpm -q foo package foo is not installed [root@examplehost /]# In addition to the name and version.Lab 03 Page 21 of 66 . Do not distribute to third parties.Lab 3 To query for an individual package. you can run the ‘rpm’ command as follows: [root@examplehost /]# rpm -q openssh-server openssh-server-5. we use the –i query option to list the details of ‘tcsh’ rpm package. license. For Oracle employees and authorized partners only. the build and installation date.g.3p1-81. e.el6_3.x86_64 [root@examplehost /]# To check if package ‘foo’ is installed on your Oracle Linux 6. size as well as a short summary and longer description of the package content. In the example below. © 2013 Oracle Corporation OL 6 .OL 6 Package Management . there is other information available.

noarch [root@examplehost /]# For Oracle employees and authorized partners only.3 system and want to find out which package installed this file on the system.Lab 3 [root@examplehost /]# rpm -qi tcsh Note: Observe in the above output that the –qi option also shows you the “Install Date” of a package. [root@examplehost /]# ls -l /etc/motd -rw-r--r--.8. In the example below we find a file ‘/etc/motd’ on our Oracle Linux 6.3 system belongs to you can run the following ‘rpm’ query command.14-16.Lab 03 Page 22 of 66 . 1 root root 0 Jan 12 2010 /etc/motd [root@examplehost /]# [root@examplehost /]# rpm -qf /etc/motd setup-2. © 2013 Oracle Corporation OL 6 . Do not distribute to third parties. If you want to find out which RPM a file on your Oracle Linux 6.el6.OL 6 Package Management .

gz /usr/share/man/man8/sshd.5.8.OL 6 Package Management .3p1 /usr/share/doc/openssh-server-5. In the example below.ssh-keycat /usr/share/man/man5/moduli.Lab 3 Another cool query option that can be used to find out the list of all files that are part of a particular package is the –ql option.gz /usr/share/man/man5/sshd_config.d/init.gz /var/empty/sshd [root@examplehost /]# For Oracle employees and authorized partners only.d/sshd /etc/rc. Do not distribute to third parties.8.Lab 03 Page 23 of 66 . [root@examplehost /]# rpm -ql openssh-server /etc/pam.d/sshd /etc/ssh/sshd_config /etc/sysconfig/sshd /usr/libexec/openssh/sftp-server /usr/libexec/openssh/ssh-keycat /usr/sbin/.d/ssh-keycat /etc/pam.3p1/HOWTO. © 2013 Oracle Corporation OL 6 .sshd.5.hmac /usr/sbin/sshd /usr/share/doc/openssh-server-5. we list all files in the ‘openssh-server’ package.gz /usr/share/man/man8/sftp-server.

OL 6 Package Management - Lab 3

The -d query option displays documentation files only in a particular package. In the
example below, the output shows all the documentation and man pages associated
with the ‘openssh-server’ package.
[root@examplehost /]# rpm -qd openssh-server
/usr/share/doc/openssh-server-5.3p1/HOWTO.ssh-keycat
/usr/share/man/man5/moduli.5.gz
/usr/share/man/man5/sshd_config.5.gz
/usr/share/man/man8/sftp-server.8.gz
/usr/share/man/man8/sshd.8.gz
[root@examplehost /]#

To list all the configuration files associated with a package, you can use the –c query
option of the ‘rpm’ command as shown below.

For Oracle employees and authorized partners only. Do
not distribute to third parties.
© 2013 Oracle Corporation

OL 6 - Lab 03

Page 24 of 66

OL 6 Package Management - Lab 3
[root@examplehost /]# rpm -qc openssh-server
/etc/pam.d/ssh-keycat
/etc/pam.d/sshd
/etc/ssh/sshd_config
/etc/sysconfig/sshd
[root@examplehost /]#

There is one more useful option that can be used with the rpm query commands. It
is the --changelog option. The --changelog option displays change information for a
package. In the example below, we look at changes that happened in different
versions of the ‘httpd’ package.
[root@examplehost /]# rpm -q httpd --changelog

For Oracle employees and authorized partners only. Do
not distribute to third parties.
© 2013 Oracle Corporation

OL 6 - Lab 03

Page 25 of 66

OL 6 Package Management - Lab 3
Other Options of rpm command:
To install a package, you can use the –i option of the ‘rpm’ command. In the example
below, we install the ‘zsh’ rpm package from the Oracle Linux 6.3 ISO image that was
mounted on ‘/OL6DVD’ mount point in an earlier lab. The ‘rpm’ command takes the
file name of the rpm package; hence you need to either ‘cd’ to the containing
directory, or provide a full path to the file. This is in contrast to ‘yum’ command,
which uses the repository metaphor and config files in ‘/etc/yum.repos.d’ to figure
out how to load packages.
[root@examplehost /]# cd /OL6DVD/Packages/
[root@examplehost Packages]# pwd
/OL6DVD/Packages
[root@examplehost Packages]# rpm -q zsh
package zsh is not installed
[root@examplehost Packages]#
[root@examplehost Packages]# ls zsh*rpm
zsh-4.3.10-5.el6.x86_64.rpm
[root@examplehost Packages]#
[root@examplehost Packages]# rpm -i zsh-4.3.105.el6.x86_64.rpm
[root@examplehost Packages]#
[root@examplehost Packages]# rpm -q zsh
zsh-4.3.10-5.el6.x86_64
[root@examplehost Packages]#

For Oracle employees and authorized partners only. Do
not distribute to third parties.
© 2013 Oracle Corporation

OL 6 - Lab 03

Page 26 of 66

below we will install the ‘ftp’ RPM package from the Oracle Public Yum Server.x86_64 [root@examplehost Packages]# In the above examples. Using the rpm command.17-51.OL 6 Package Management .rpm Preparing.rpm [root@examplehost Packages]# rpm -ihv ftp-0.el6..1751. we installed RPM packages that were locally available on the system.x86_64.. You will need internet connectivity for this exercise. In the example.el6.1.el6.x86_64. we install the ‘ftp’ package from the Oracle Linux 6 DVD using the –ihv option.17-51.1.1. ########################################### [100%] 1:ftp ########################################### [100%] [root@examplehost Packages]# [root@examplehost Packages]# rpm -q ftp ftp-0. For Oracle employees and authorized partners only. you can also install packages using other protocols like http.Lab 3 You can also use the –ihv option to get more verbose output.Lab 03 Page 27 of 66 . © 2013 Oracle Corporation OL 6 . Do not distribute to third parties. [root@examplehost Packages]# rpm -q ftp package ftp is not installed [root@examplehost Packages]# pwd /OL6DVD/Packages [root@examplehost Packages]# ls ftp* ftp-0. In the example below.

Lab 03 Page 28 of 66 .17-51.oracle.x86_64.rpm Preparing.1..17-51.. ########################################### [100%] 1:ftp ########################################### [100%] [root@examplehost /]# [root@examplehost /]# rpm -q ftp ftp-0.1.el6. This option works only if an update for a package is available.17-51.el6. it will not do anything (as in example below).x86_64 [root@examplehost /]# To update a package..el6.rpm Retrieving http://publicyum.rpm Retrieving http://publicyum.1.17-51.1.oracle. you can use the –u option of the ‘rpm command as shown in the example below. © 2013 Oracle Corporation OL 6 .1.x86_64 is already installed [root@examplehost /]# For Oracle employees and authorized partners only.1.Lab 3 [root@examplehost /]# rpm -ihv http://publicyum. Do not distribute to third parties.el6.com/repo/OracleLinux/OL6/3/base/x86_64/getPackag e/ftp-0.el6.17-51. If no updates are available.com/repo/OracleLinux/OL6/3/base/x86_64/getPackag e/ftp-0.x86_64.x86_64.com/repo/OracleLinux/OL6/3/base/x86_64/getPackag e/ftp-0.oracle.rpm Preparing.com/repo/OracleLinux/OL6/3/base/x86_64/getPackag e/ftp-0.OL 6 Package Management .x86_64.el6. [root@examplehost /]# rpm -Uhv http://publicyum.17-51.. ########################################### [100%] package ftp-0.oracle.

1. Do not distribute to third parties.el6.x86_64.oracle. In the example below.17-51.com/repo/OracleLinux/OL6/3/base/x86_64/getPackag e/ftp-0.rpm Retrieving http://publicyum. the –f option is to freshen a package installed on your system. This will also work only if there is a newer version of a package available than what is installed on your system.x86_64 [root@examplehost /]# To erase/remove a package from your system. © 2013 Oracle Corporation OL 6 .rpm [root@examplehost /]# rpm -q ftp ftp-0. [root@examplehost /]# rpm -Fhv http://publicyum.oracle.1.OL 6 Package Management .el6.17-51.1. you can run the ‘rpm command with the –e option.Lab 3 Similarly. [root@examplehost Packages]# rpm -e ftp [root@examplehost Packages]# [root@examplehost Packages]# rpm -q ftp package ftp is not installed [root@examplehost Packages]# For Oracle employees and authorized partners only.el6. we remove the ‘ftp’ package.com/repo/OracleLinux/OL6/3/base/x86_64/getPackag e/ftp-0.17-51.x86_64.Lab 03 Page 29 of 66 .

we verify the integrity of openssh-server package using –V option and also the integrity of ‘/etc/pam. [root@examplehost [root@examplehost [root@examplehost [root@examplehost /]# rpm -V openssh-server /]# /]# rpm -Vf /etc/pam. © 2013 Oracle Corporation OL 6 . If this command shows no output and exits it means that none of the files have been modified in any way since the last time the RPM database was updated. go through the man pages and try them out on your system.Lab 03 Page 30 of 66 . In the example below.d/sshd /]# If you would like to explore the remaining options of ‘rpm’ command.d/sshd’ file on the system using the –Vf option.OL 6 Package Management . Do not distribute to third parties.Lab 3 The –V option of ‘rpm’ command is the verify option and can be used to verify the integrity of a file or package installed on your system using checksum for verification. This concludes the lab on ‘rpm’ command. For Oracle employees and authorized partners only.

OL 6 Package Management . in which a list of related packages can be assembled into a group and installed by using the group name instead of the individual package names for installation. © 2013 Oracle Corporation OL 6 .3 system and go through the common options and their purpose. [root@examplehost ~]# man yum For Oracle employees and authorized partners only. YUM Command Line Option Purpose repolist Produces a list of configured repositories list List information about packages install Install package update Update package info Description and summary information Remove or erase Remove package Provides or whatprovides Which package provides clean Clean yum cache directory As we did in the earlier lab. YUM is an interactive rpm based package manager that can also do dependency analysis for package management tasks. This means that yum can automatically resolve package dependencies and determine which packages need to be installed to perform a successful package installation. we will use the common ‘yum’ command line options to do various package management tasks.Lab 03 Page 31 of 66 . Yum also supports the concept of “package groups”. This lab requires internet connectivity for your Oracle Linux 6.3 Using the YUM command YUM or “Yellowdog Updater. Refer to man pages of ‘yum’ command for complete details and more information. In this lab. we will start this lab by reading the man page of ‘yum’ command. Do not distribute to third parties. Some of these command line options and their purpose are listed in the table below.Lab 3 5. Run the ‘man yum’ command on your Oracle Linux 6.3 instance as we will connect to the Oracle Public Yum Server to install packages. Modified” is an open-source command-line packagemanagement utility for RPM-compatible Linux operating systems and has been released under the GNU General Public License.

repos.d/public-yum-ol6. you should see a listing similar to what is shown below. © 2013 Oracle Corporation OL 6 .repo’ file:   [ol6_latest] [ol6_uek_latest] For Oracle employees and authorized partners only. Make sure you have internet connectivity and the following two channels enabled in the ‘/etc/yum. Do not distribute to third parties.d’ directory.3 instance.Lab 03 Page 32 of 66 .respos.OL 6 Package Management .Lab 3 Look at the YUM repository configuration files in the ‘/etc/yum. On your Oracle Linux 6.

repo’ file on your system.oracle.repos. [root@examplehost yum.com/RPM-GPG-KEY-oracle-ol6 gpgcheck=1 enabled=1 If you do not have the ‘public-yum-ol6.OL 6 Package Management .oracle.d]# vi public-yum-ol6.com/public-yum-ol6.repo For Oracle employees and authorized partners only. you can use the ‘wget http://public-yum.Lab 03 Page 33 of 66 . Do not distribute to third parties.repos.com/public-yum-ol6.d]# wget http://publicyum.oracle.com/repo/OracleLinux/OL6/UEK/latest/$basearch/ gpgkey=http://public-yum.oracle. [root@examplehost ~]# cd /etc/yum.oracle.com/RPM-GPG-KEY-oracle-ol6 gpgcheck=1 enabled=1 [ol6_UEK_latest] name=Latest Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch) baseurl=http://publicyum.Lab 3 To enable a channel. remember you have to set ‘enabled=1’ as we did in an earlier lab.repos.repo [ol6_latest] name=Oracle Linux $releasever Latest ($basearch) baseurl=http://publicyum.repo’ command to get that file and then make sure both the above channels are enabled.com/repo/OracleLinux/OL6/latest/$basearch/ gpgkey=http://public-yum.oracle. © 2013 Oracle Corporation OL 6 .d/ [root@examplehost yum.

Lab 03 Page 34 of 66 . [root@examplehost /]# yum repolist For Oracle employees and authorized partners only.repo file’). Do not distribute to third parties.Lab 3 After you have enabled the channels in the repository configuration file (‘publicyum-ol6. © 2013 Oracle Corporation OL 6 . you can verify the available repositories by running the ‘yum repolist’ command.OL 6 Package Management .

Do not distribute to third parties.OL 6 Package Management . [root@examplehost /]# yum repolist all Loaded plugins: refresh-packagekit.419 ol6_playground_latest Latest mainline stable kernel for Oracle disabled ol6_u1_base Oracle Linux 6Server Update 1 installatio disabled ol6_u2_base Oracle Linux 6Server Update 2 installatio disabled ol6_u3_base Oracle Linux 6Server Update 3 installatio disabled repolist: 22.563 ol6_UEK_base Unbreakable Enterprise Kernel for Oracle disabled ol6_UEK_latest Latest Unbreakable Enterprise Kernel for enabled: 120 ol6_addons Oracle Linux 6Server Add ons (x86_64) disabled ol6_ga_base Oracle Linux 6Server GA installation medi disabled ol6_latest Oracle Linux 6Server Latest (x86_64) enabled: 18.102 [root@examplehost /]# For Oracle employees and authorized partners only.Lab 03 Page 35 of 66 .Lab 3 Running the ‘yum repolist all’ command will list the all available channels and their status as shown in the example below. © 2013 Oracle Corporation OL 6 . security repo id repo name status local OL6u3 DVD Repository enabled: 3.

el6. The installed argument creates a list of all packages that are currently installed on the local system. [root@examplehost /]# rpm -q ftp ftp-0. The ‘yum list available’ command only lists additional available packages that have not been installed yet.Lab 3 Once you have confirmed that above channels are enabled in your repository configuration file. remove it first using the –e option. If it is installed. © 2013 Oracle Corporation OL 6 .Lab 03 Page 36 of 66 . In the example below. The ‘yum list all’ command lists all available and installed packages.1. Let’s start with a few ‘yum list’ command and line options.OL 6 Package Management . [root@examplehost /]# yum list installed [root@examplehost /]# [root@examplehost /]# yum list available [root@examplehost /]# [root@examplehost /]# yum list all [root@examplehost /]# We will now install a package using the ‘yum’ command. we first check using rpm to see if ‘ftp’ package is already installed. you can proceed with running the ‘yum’ command examples below.x86_64 [root@examplehost /]# rpm -e ftp [root@examplehost /]# rpm -q ftp package ftp is not installed [root@examplehost /]# For Oracle employees and authorized partners only. Do not distribute to third parties.17-51.

..x86_64 0:0..el6_3...17-51.1 Complete! [root@examplehost /]# For Oracle employees and authorized partners only...el6_3.1. install this package using the ‘yum install’ command as shown below. Installed: ftp..OL 6 Package Management ... Do not distribute to third parties... security Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package ftp..1..Lab 03 Page 37 of 66 .17-51..1 will be installed --> Finished Dependency Resolution . .. © 2013 Oracle Corporation OL 6 .x86_64 0:0. [root@examplehost /]# yum install ftp Loaded plugins: refresh-packagekit..Lab 3 After removing the ‘ftp’ package. Installed size: 95 k Is this ok [y/N]: y Downloading Packages: . ..

You can list any package installed using the ‘yum list <package>’ command. In the example below.1 @ol6_latest [root@examplehost /]# For Oracle employees and authorized partners only. [root@examplehost /]# yum list ftp Loaded plugins: refresh-packagekit.1. we list the ftp package that was just installed.x86_64 0.Lab 3 Observe the above output and note that the ftp package was installed from the ‘ol6_latest’ channel repository on the Oracle Public Yum Server.OL 6 Package Management .Lab 03 Page 38 of 66 . © 2013 Oracle Corporation OL 6 .17-51. Do not distribute to third parties. security Installed Packages ftp.el6_3.

5. size information of the package.1.OL 6 Package Management . release.1. [root@examplehost /]# rpm -ql ftp /usr/bin/ftp /usr/bin/pftp /usr/share/man/man1/ftp. Do not distribute to third parties. Then we run the ‘yum provides’ command to find out about the package information for ‘/usr/bin/pftp’ file. © 2013 Oracle Corporation OL 6 .gz /usr/share/man/man1/pftp.gz [root@examplehost /]# For Oracle employees and authorized partners only. It also provides Version.Lab 03 Page 39 of 66 . In the example below. The provides option is used to find which package provides some feature or file.Lab 3 The ‘yum info’ command provides a summary and description information among other things. [root@examplehost /]# yum info ftp Another neat option of ‘yum’ command is the ‘provides’ or ‘whatprovides’ option. we first list all the files of the ‘ftp’ package.gz /usr/share/man/man5/netrc.

security ftp-0.1.x86_64 : The standard UNIX FTP (File Transfer Protocol) : client Repo : ol6_latest Matched from: Filename : /usr/bin/pftp ftp-0.Lab 03 Page 40 of 66 . © 2013 Oracle Corporation OL 6 .x86_64 : The standard UNIX FTP (File Transfer Protocol) : client Repo : installed Matched from: Other : Provides-match: /usr/bin/pftp For Oracle employees and authorized partners only.17-51.1.el6_3.1. Do not distribute to third parties.OL 6 Package Management .1.17-51.Lab 3 [root@examplehost /]# yum provides /usr/bin/pftp Loaded plugins: refresh-packagekit.el6_3.el6.x86_64 : The standard UNIX FTP (File Transfer Protocol) : client Repo : local Matched from: Filename : /usr/bin/pftp ftp-0.x86_64 : The standard UNIX FTP (File Transfer Protocol) : client Repo : ol6_latest Matched from: Filename : /usr/bin/pftp ftp-0.1.17-51.17-51.1.el6.

© 2013 Oracle Corporation OL 6 .. Do not distribute to third parties..Lab 03 Page 41 of 66 . [root@examplehost /]# yum remove ftp Loaded plugins: refresh-packagekit. .OL 6 Package Management .1 Complete! [root@examplehost /]# For Oracle employees and authorized partners only..1 will be erased --> Finished Dependency Resolution Dependencies Resolved . you can run the ‘yum remove’ command as shown in the example below where we are removing the ftp package. security Setting up Remove Process Resolving Dependencies --> Running transaction check ---> Package ftp.17-51.. .x86_64 0:0.1.Lab 3 To remove a package.el6_3.el6_3..1.17-51.. Removed: ftp.x86_64 0:0....

security Cleaning repos: local ol6_UEK_latest ol6_latest Cleaning up Everything [root@examplehost /]# For Oracle employees and authorized partners only. See more details of the things that can be cleaned from the yum cache directory by reading the man pages of the ‘yum’ command.Lab 03 Page 42 of 66 .Lab 3 The ‘yum clean all’ command can be used to clean the yum cache directory.OL 6 Package Management . © 2013 Oracle Corporation OL 6 . [root@examplehost /]# yum clean all Loaded plugins: refresh-packagekit. Do not distribute to third parties.

el6_3 ol6_latest 20 M xulrunner x86_64 10.el6_3 will be updated ---> Package xulrunner.x86_64 0:10.1.0.OL 6 Package Management .12-1. NOTE: The number of packages available for update depends on when you are running this command. Enter ‘N’ to abort.0.11-1. security Setting up Update Process Resolving Dependencies --> Running transaction check ---> Package firefox.x86_64 0:10.el6_3 ol6_latest 12 M Transaction Summary =========================================================== ==================== Upgrade 2 Package(s) Total download size: 31 M Is this ok [y/N]: N For Oracle employees and authorized partners only.0.1.1.4 release is available and running this will upgrade you to a new release.el6_3 will be updated ---> Package firefox. Do not run this upgrade if you have slow network connection as this process can take some time.1.1.0.el6_3 will be an update --> Finished Dependency Resolution Dependencies Resolved =========================================================== ==================== Package Arch Version Repository Size =========================================================== ==================== Updating: firefox x86_64 10.x86_64 0:10. [root@examplehost /]# yum update Loaded plugins: refresh-packagekit.0. The ‘yum update’ command will list all the updates available for your system. it shows updates are available for 2 packages.Lab 03 Page 43 of 66 .12-1.12-1.0. © 2013 Oracle Corporation OL 6 . It may be possible that a new 6.0. Do not distribute to third parties.0. In the example below.0.0.11-1.0.el6_3 will be an update ---> Package xulrunner.x86_64 0:10. We will skip this update packages and answer “N” to not install the listed updates.12-1.0.Lab 3 Let’s look at the ‘yum update’ command.1.

Lab 3 The ‘yum version’ command provides version information of the rpmdb.x86_64/1340761113 983:c0b9686ac4ec4eee40915e6af0637cbbbdb6185e @anaconda-UEK2/1340761412 2:90298f71eecc65eef0dde5e0356a6d6752dae199 @local/1340761113 1:7d984de900ff9726014ffe6c445128c617eba0be @ol6_UEK_latest For Oracle employees and authorized partners only. © 2013 Oracle Corporation OL 6 . as it is disabled Loading "refresh-packagekit" plugin Loading "security" plugin Config time: 0.2.036 Yum Version: 3. Do not distribute to third parties. [root@examplehost /]# yum version -v Not loading "rhnplugin" plugin.000 Installed: 6Server/x86_64 1105:27fc9ae4d52be4f30f57cbafc49fd01c7fdd8641 @anaconda-OracleLinuxServer201206261930.OL 6 Package Management .29 rpmdb time: 0.Lab 03 Page 44 of 66 .

OL 6 Package Management . Let’s now look at the ‘yumdownloader’ command. we will create a ‘/tmp/myrpm’ directory and then use the ‘yumdownloader’ command to download the ‘ftp’ RPM package to that directory. The ‘yumdownloader’ command can be used to download RPM packages from the yum repositories. © 2013 Oracle Corporation OL 6 . In the example below.Lab 03 Page 45 of 66 . Do not distribute to third parties.x86_64/1340761113 10:8f6dee8abc81fc92ad3d2109f75d1e0164607068 @ol6_latest 3:a10a504bd8486be240ef391de79d5240d2ec86fd version [root@examplehost /]# We have now tried out some of the common ‘yum’ command line options.Lab 3 3:9b14832f3037e39fb04c6e5d320f783bdc6f9dad @ol6_latest 115:f16be6cb13cbfe8bc2d55227cf6afbecfb87ad78 installed 1:7f9d92ed17ec41db742f514ecc87b54171cbfde1 Group-Installed: yum 13:e185ed7482b5c711b7a82068acf98a893c93c85a @anaconda-OracleLinuxServer201206261930. For Oracle employees and authorized partners only.

© 2013 Oracle Corporation OL 6 .1.conf For Oracle employees and authorized partners only.Lab 03 Page 46 of 66 .el6_3.x86_64.Lab 3 [root@examplehost /]# mkdir /tmp/myrpm [root@examplehost /]# cd /tmp/myrpm [root@examplehost myrpm]# yumdownloader ftp Loaded plugins: refresh-packagekit ftp-0.el6_3.rpm [root@examplehost myrpm]# | Now that we have looked at ‘yum’ command line examples.17-51. [root@examplehost /]# man yum.x86_64.1.OL 6 Package Management .1. Read the man pages of ‘yum.conf’ and understand all the parameters in this file.rpm 57 kB 00:00 [root@examplehost myrpm]# [root@examplehost myrpm]# pwd /tmp/myrpm [root@examplehost myrpm]# ls ftp-0.conf’ command.17-51. Do not distribute to third parties.conf’ file by running the ‘man yum.1. let’s look at the yum configuration file – ‘/etc/yum.

conf configuration file. Kernels in particular fall into this category. Practical range is 0-10. examine the ‘/etc/yum.Determines whether or not yum keeps the cache of headers and packages after successful installation.Number of packages listed in installonlypkgs to keep installed at the same time. Default is ‘2’. installonly_limit . © 2013 Oracle Corporation OL 6 .Debug message output level. Default is ’3’. cachedir . Refer to man pages of ‘yum.conf’ file are listed below.conf’ for complete list and more details.OL 6 Package Management . installonlypkgs .Lab 03 Page 47 of 66 . never updated.Lab 3 After reading the man pages of yum. Setting to 0 disables this feature. For Oracle employees and authorized partners only. Some of the important options in ‘yum.conf’ file on your system. this is not a complete list.List of package provides that should only ever be installed. Do not distribute to third parties. Go through this file and make sure you understand each option as described in the man pages. Review all the options and look at the default values. Value1 means keep cache debuglevel .stores cache and db files keepcache .

NOTE: Make sure you eject the Oracle Linux 6.Lab 3 This concludes the yum package management tool lab. Do not distribute to third parties.1).3 DVD (ISO image used in Lab 5. the VM will try to reinstall the OS at the next reboot. If you don’t eject and remove the Oracle Linux ISO file.iso from the Devices->CD/DVD Devices Menu option as shown in the screenshot below. For Oracle employees and authorized partners only.OL 6 Package Management . You should also unselect the V33411-01. © 2013 Oracle Corporation OL 6 .Lab 03 Page 48 of 66 .

Install the “oracle-rdbms-server-11gR2-preinstall” package using the ‘yum’ command as shown below. In order to install the Oracle Database 11g R2 on Oracle Linux 6. This makes the database installation simpler and easy. as outlined in the Linux Installation Guides. This RPM aids in the installation of the Oracle Database 11GR2 release The package name is “oracle-rdbms-server-11gR2-preinstall” package. This package is available both from the Oracle Public Yum Server and the ULN network for Oracle Linux 6 x86_64 (64 Bit) architecture. [root@examplehost /]# cat /etc/passwd | grep -i oracle [root@examplehost /]# cat /etc/group | grep -i oracle [root@examplehost /]# As you can see the ‘cat’ command above did not find any pre-existing oracle user/group on this system. For Oracle employees and authorized partners only.OL 6 Package Management . In this last Package Management lab.Lab 3 5. we will install this “oracle-rdbms-server11gR2-preinstall” RPM package and look at some of the changes that this package makes on a Oracle Linux 6. © 2013 Oracle Corporation OL 6 . Let’s look at our Oracle Linux 6.4 Install the Oracle RDBMS Server 11gR2 Pre-install RPM package The Oracle RDBMS Server 11gR2 Pre-install RPM package (formerly known as oracle-validated) is designed specifically for Oracle Linux 6. Do not distribute to third parties. you can complete most of the preinstallation configuration tasks.Lab 03 Page 49 of 66 . Using the Oracle RDBMS Server 11gR2 Pre-install RPM. your system needs to meet a few prerequisites. This package among other things creates the ‘oracle’ user and groups needed for Oracle Database installation.3 system.3 instance and make sure we do not have an already existing ‘oracle’ user and group.

0-6.2 M Installed size: 22 M For Oracle employees and authorized partners only.5 M Transaction Summary =========================================================== ===================== Install 7 Package(s) Total download size: 7..OL 6 Package Management ..x86_64 0:1.el6 local 13 k libstdc++-devel x86_64 4.6-4.Lab 3 [root@examplehost /]# yum install oracle-rdbms-server11gR2-preinstall Loaded plugins: refresh-packagekit.6-4. Do not distribute to third parties.0-6. --> Finished Dependency Resolution Dependencies Resolved =========================================================== Package Arch Version Repository Size =========================================================== Installing: oracle-rdbms-server-11gR2-preinstall x86_64 1.4.el6 local 684 k libaio-devel x86_64 0.el6 local 15 k Installing for dependencies: compat-libcap1 x86_64 1.Lab 03 Page 50 of 66 .4...3-69.3.10-1 local 17 k compat-libstdc++-33 x86_64 3.. .. security Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package oracle-rdbms-server-11gR2-preinstall.el6 local 4.el6 will be installed --> Processing Dependency: compat-libstdc++-33 for package: oracle-rdbms-server-11gR2-preinstall-1.2.10710.x86_64 .0-6.. © 2013 Oracle Corporation OL 6 .7 M ksh x86_64 2010062116..el6 local 183 k gcc-c++ x86_64 4. ..el6 local 1.el6.

2. .x86_64 0:1..el6 libstdc++-devel.Lab 3 Is this ok [y/N]: y ..x86_64 0:0.x86_64 0:1.el6 libaio-devel.OL 6 Package Management .Lab 03 Page 51 of 66 . © 2013 Oracle Corporation OL 6 .10-1 compat-libstdc++-33..6-4.x86_64 0:4.x86_64 0:4.6-4..el6 Dependency Installed: compat-libcap1.x86_64 0:3.3..el6 Complete! [root@examplehost /]# For Oracle employees and authorized partners only.4.107-10.0-6..el6 ksh.el6 gcc-c++.3-69.. Do not distribute to third parties. Installed: oracle-rdbms-server-11gR2-preinstall.x86_64 0:20100621-16.4.

© 2013 Oracle Corporation OL 6 .conf’ file and adds settings that are required for Oracle DB 11g. [root@examplehost /]# cat /etc/passwd | grep -i oracle oracle:x:54321:54321::/home/oracle:/bin/bash [root@examplehost /]# [root@examplehost /]# cat /etc/group | grep -i oracle dba:x:54322:oracle [root@examplehost /]# As you can see from the above output.3 system. we can now look at some of the things that this package changes on our Oracle Linux 6. You can check the changes made using the cat command as shown below. this package have created ‘oracle’ user and group needed to perform an Oracle DB 11g R2 installation.OL 6 Package Management . Let’s begin by looking at the ‘/etc/passwd’ and ‘/etc/group’ files to see if the ‘oracle’ user/group information was created.Lab 03 Page 52 of 66 . This package also makes changes to the ‘/etc/sysctl. Do not distribute to third parties.Lab 3 Once the oracle-rdbms-server-11gR2-preinstall package has been installed. For Oracle employees and authorized partners only.

sem is '250 32000 100 128' # oracle-rdbms-server-11gR2-preinstall setting for kernel.core.rmem_max is 4194304 # oracle-rdbms-server-11gR2-preinstall setting for net.ip_local_port_range is 9000 65500 [root@examplehost /]# For Oracle employees and authorized partners only.OL 6 Package Management .aiomax-nr is 1048576 # oracle-rdbms-server-11gR2-preinstall setting for net. Do not distribute to third parties.core.conf | grep oracle | more # oracle-rdbms-server-11gR2-preinstall setting for fs.ipv4.core.rmem_default is 2621 44 # oracle-rdbms-server-11gR2-preinstall setting for net.wmem_max is 1048576 # oracle-rdbms-server-11gR2-preinstall setting for fs.shmmax is 4294967295 o n i386 # oracle-rdbms-server-11gR2-preinstall setting for net.filemax is 6815744 # oracle-rdbms-server-11gR2-preinstall setting for kernel. © 2013 Oracle Corporation OL 6 .shmall is 2097152 on i 386 # oracle-rdbms-server-11gR2-preinstall setting for kernel.shmall is 1073741824 o n x86_64 # oracle-rdbms-server-11gR2-preinstall setting for kernel.wmem_default is 2621 44 # oracle-rdbms-server-11gR2-preinstall setting for net.Lab 03 Page 53 of 66 .Lab 3 [root@examplehost /]# cat /etc/sysctl.core.shmmni is 4096 # oracle-rdbms-server-11gR2-preinstall setting for kernel.shmmax is 439804651110 4 on x86_64 # oracle-rdbms-server-11gR2-preinstall setting for kernel.

Lab 3 This package also makes changes to the ‘/etc/security/limits.Lab 03 Page 54 of 66 . Do not distribute to third parties.OL 6 Package Management . You can check the changes made using the cat command as shown below.conf | grep oracle # oracle-rdbms-server-11gR2-preinstall setting for nofile soft limit is 1024 oracle soft nofile 1024 # oracle-rdbms-server-11gR2-preinstall setting for nofile hard limit is 65536 oracle hard nofile 65536 # oracle-rdbms-server-11gR2-preinstall setting for nproc soft limit is 2047 oracle soft nproc 2047 # oracle-rdbms-server-11gR2-preinstall setting for nproc hard limit is 16384 oracle hard nproc 16384 # oracle-rdbms-server-11gR2-preinstall setting for stack soft limit is 10240KB oracle soft stack 10240 # oracle-rdbms-server-11gR2-preinstall setting for stack hard limit is 32768KB oracle hard stack 32768 [root@examplehost /]# For Oracle employees and authorized partners only. [root@examplehost /]# cat /etc/security/limits. © 2013 Oracle Corporation OL 6 .conf’ file and adds settings that are required for Oracle DB 11g.

subscribing to channels.Lab 03 Page 55 of 66 . © 2013 Oracle Corporation OL 6 .5 Setup a Local YUM Repository The article below describes how to download the latest Oracle Linux packages from the Unbreakable Linux Network (ULN) and make the packages available through a local yum server. Do not distribute to third parties.OL 6 Package Management .Lab 3 Well. creating and then populating the yum repository directory and finally making the repository directory available via HTTP access. 5. For Oracle employees and authorized partners only. you can refer to this Viewlet. We will not be doing a lab on this topic but it is recommended to go through the document below and practice this lab independently at a later time. that completes this lab exercise. If you are interested in learning how to do a Database install on Oracle Linux 6. We will not be doing the actual Database installation in this boot camp. How to Create a Local Yum Repository The high level steps involve registering your server machine with ULN using the ‘uln_register’ command.

Most Kernel updates require a system reboot for them to become effective. We have also provided some other resources in the References section below. rebooting when installing and applying important kernel and security updates. Do not distribute to third parties. There is literally no interruption what so ever. Ksplice technology offers several advantages over the traditional approach of installing updates. This means you can install a Ksplice delivered kernel patch while applications are running on your Oracle Linux 6 system. Using Ksplice Zero Downtime patching. If your instructor provides you with a trial license key. you can do the following Ksplice lab.Lab 3 5. To learn about the Local and Offline modes. you will not be able to perform the Ksplice lab but you can however go through the following Viewlet which covers the standard mode of operation for Ksplice: Getting Started with Ksplice Zero Downtime Updates The above viewlet will show you how to install and use Ksplice Zero downtime updates on your Oracle Linux 6 systems. For Oracle employees and authorized partners only.6 Ksplice Zero Downtime Patching Ksplice is a feature of Oracle Linux that lets you install and apply important kernel and security updates without rebooting the system. This Ksplice Zero downtime patching feature comes free with Oracle Linux Premier Support offering. you can eliminate downtime. Oracle is the only enterprise Linux vendor that can offer zero downtime updates. Some advantages of using Ksplice are listed below:  Improved Availability of Oracle Linux systems  Enhanced Security  Reduced Operational Cost  Improved Serviceability There are 3 modes of operation for Ksplice:  Standard  Local  Offline Note: Installation of Ksplice is very simple but it requires a license key. If the trial license key is unavailable. disruption. you can refer to this blog and also the Ksplice User’s Guide.OL 6 Package Management .Lab 03 Page 56 of 66 . © 2013 Oracle Corporation OL 6 .

com:port For Oracle employees and authorized partners only.com:port # export https_proxy=https://proxy. setup your proxy server settings. To get the Ksplice install package. Setting up Ksplice involves 3 simple steps: a) Get the Ksplice Uptrack access key (license key) b) Setup Oracle Ksplice Uptrack account c) Download and install Ksplice software Note: Your instructor will provide you with the Ksplice trial license key to perform this lab. you will need to make sure you have internet connectivity available on your system. Do not distribute to third parties. if needed. © 2013 Oracle Corporation OL 6 .Lab 3 Ksplice Standard Mode Lab Exercise: Applying Rebootless Kernel updates In multi-tier and cloud environments. you should actually be running a Linux kernel version for which an update is available. scheduling reboots of Linux Servers can be troublesome and inconvenient as service disruptions are usually frowned upon because they introduce time delays and increase cost of service.company. Also. In order for Ksplice to work. # export http_proxy=http://proxy. You do not have to setup Oracle Ksplice Uptrack account as this has already been done by the instructor while obtaining the trial key.OL 6 Package Management . you will learn how to download and install Ksplice and how to use it for applying kernel patches without rebooting. We will only perform the 3rd step of downloading and installing the Ksplice software in this lab exercise. You can use the following ‘export’ command line option to set the proxy server. Oracle Ksplice delivers zero downtime updates for Oracle Linux and these updates are made available via the Oracle Ksplice Uptrack service for both the Unbreakable Enterprise Kernel (UEK) as well as the Red Hat compatible kernel.Lab 03 Page 57 of 66 .yourcompany. In this exercise. Ksplice Uptrack service enables the customers to apply security and other critical fixes without rebooting.

[root@examplehost Downloads]# wget -N https://www.Lab 3 The next step is to use the ‘wget’ command to download the install-uptrack script. Run the ‘wget -N https://www. © 2013 Oracle Corporation OL 6 . Change directory and go to the Downloads directory as shown below.ksplice.ksplice.Lab 03 Page 58 of 66 .com/uptrack/install-uptrack For Oracle employees and authorized partners only.OL 6 Package Management . Do not distribute to third parties.com/uptrack/install-uptrack’ command as shown below to download the uptrack script.

Lab 03 Page 59 of 66 . you need to provide the Ksplice trial access key that you received from your instructor as the argument to the ‘sh installuptrack’ command. © 2013 Oracle Corporation OL 6 .Lab 3 Typing the ‘sh install-uptrack’ command will list the usage options as shown in the screenshot below. Do not distribute to third parties. Run the ‘sh install-uptrack <ACCESS KEY>’ command to install the Ksplice software. [root@examplehost]# sh install-uptrack <ACCESS KEY ##> For Oracle employees and authorized partners only. See example below.OL 6 Package Management . [root@examplehost]# sh install-uptrack As you can see from the above screenshot.

Lab 03 Page 60 of 66 . © 2013 Oracle Corporation OL 6 . Do not distribute to third parties.OL 6 Package Management .Lab 3 For Oracle employees and authorized partners only.

Lab 03 Page 61 of 66 . In the example below. Run the ‘uptrack-uname –r’ command to check the effective kernel version. © 2013 Oracle Corporation OL 6 .Lab 3 The Ksplice Uptrack service is now installed.39-400. The ‘uptrack-uname’ command accepts the same flags as the ‘uname’ command. Do not distribute to third parties.6.1.x86_64 [root@examplehost ~]# On systems installed with Ksplice uptrack service.1.el6uek. You can see the output is same as what you received with ‘uname –r’ command at this time. Check the initial kernel version of your Oracle Linux 6 system using the ‘uname –r’ command.OL 6 Package Management . For Oracle employees and authorized partners only. [root@examplehost ~]# uname -r 2.6. the initial kernel version is 2.39-400. it is recommended to use the ‘uptrack-uname’ command. This is because we have not yet started using the Ksplice uptrack service to apply kernel patches.17.17.

we check for UEK kernel updates using the ‘yum list kernel-uek’ command.6. [root@examplehost ~]# yum list kernel-uek You can also check for available Ksplice updates using the ‘uptrack-show --available’ command.Lab 3 [root@examplehost ~]# uptrack-uname -r There are a couple of different ways to check for available kernel updates.Lab 03 Page 62 of 66 . You can use the ‘rpm’ query command or the ‘yum list’ command as shown below to check for available updates. [root@examplehost ~]# uptrack-show --available For Oracle employees and authorized partners only.17.39-400. this command also shows that there is a Ksplice update available.2. © 2013 Oracle Corporation OL 6 . As you can see in the output below. The output shows that there is a new kernel update available and its version is 2. In the example below. Do not distribute to third parties.OL 6 Package Management .

39400.2. [root@examplehost ~]# uname -r For Oracle employees and authorized partners only.OL 6 Package Management . © 2013 Oracle Corporation OL 6 . Do not distribute to third parties.6. [root@examplehost ~]# uptrack-upgrade You can also run the ‘uptrack-uname –r’ command to check the effective kernel version. [root@examplehost ~]# uptrack-uname -r This shows how easily you updated the kernel version of your Oracle Linux 6 system without rebooting the system and while your applications were running on the system.Lab 03 Page 63 of 66 . As you can see that the ‘uptrack-upgrade’ command has applied the available update and it then shows the new effective kernel version as 2. Hence it is recommended to use the ‘uptrack-uname’ command on Ksplice enabled systems. Run the ‘uname –r’ command and you will notice that it continues to show the old kernel version. Ksplice Uptrack service applies the kernel updates in memory of the system. We do this intentionally by design because some applications are not used to kernel version changes underneath them while they are running and because of some other technical reasons.Lab 3 We will install and apply the available Ksplice update using the ‘uptrack-upgrade’ command.17.

OL 6 Package Management . you can run the ‘uptrack-show’ command as shown in the example below. Do not distribute to third parties.Lab 3 To find out what Ksplice updates are installed on an Oracle Linux 6 system. You can run the ‘uptrack-remove’ command to remove all updates or specific updates using the update IDs.Lab 03 Page 64 of 66 . In the example below. If you install a Kernel update using Ksplice and for some reason want to back out and go back to the original kernel version you can do that using the ‘uptrack-remove’ command. we do not remove the Ksplice updates by answering ‘N’ to abort. [root@examplehost ~]# uptrack-show The good thing about Ksplice updates are that they are easy to remove as well. © 2013 Oracle Corporation OL 6 . Run the ‘uptrack-remove’ command to remove the installed Ksplice updates. [root@examplehost ~]# uptrack-remove --all For Oracle employees and authorized partners only.

you can ask your instructor to use the Ksplice Uptrack account to log in and demonstrate the available functionality. [root@examplehost ~]# cat /etc/uptrack/uptrack. Ksplice also offers a web interface that can you used to manage your Ksplice enabled systems.conf’ command to examine this configuration file. You can configure your systems to automatically install updates as they become available. set autoinstall = yes in your ‘/etc/uptrack/uptrack.OL 6 Package Management . You can run the ‘cat /etc/uptrack/uptrack.conf’ file. For Oracle employees and authorized partners only. or pass the --autoinstall flag during installation.conf’ file. If you are interested in seeing the Ksplice web interface. Do not distribute to third parties. To enable autoinstall. © 2013 Oracle Corporation OL 6 .conf Oracle Ksplice patches are stored locally on the file system in ‘/var/cache/uptrack’ directory and by default will automatically be re-applied after a reboot.Lab 3 The main configuration file of Ksplice uptrack service is the ‘/etc/uptrack/uptrack. Examine the ‘/etc/uptrack/uptrack.conf’ file on your system and familiarize with the available settings.Lab 03 Page 65 of 66 . This concludes the short lab on using Ksplice zero downtime patching.

7 References For more information and next steps.3 using a local repository as well as using the Oracle Public Yum Server. You also looked the ‘oracle-rdbms-server-11gR2-preinstall’ package and observed what it changes on the system. please consult additional resources: Click the hyperlinks to access the resource. You installed. Do not distribute to third parties. We also learned about the unique Ksplice Zero Downtime Patching feature of Oracle Linux 6 that helps you keep your systems secure and reduces operational costs. listed.Lab 03 Page 66 of 66 .Lab 3 6 Lab Summary In this lab you learned about package management on Oracle Linux 6.OL 6 Package Management . removed packages using both RPM and YUM commands. © 2013 Oracle Corporation OL 6 . Oracle Linux 6 Yum Documentation Oracle Linux 6 ULN Documentation Ksplice User’s Guide Ksplice (PDF) Ksplice Offline (PDF) Ksplice (FAQ) For Oracle employees and authorized partners only.