Anda di halaman 1dari 62

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
Oracles 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 Partners 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 Partners 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.

Oracle Linux 6 Installation - Lab 1

Installation of Oracle Linux 6.3


V 1.0 January 2013

1 Introduction
In this lab, participants will download Oracle Linux 6.3 software from the Oracle
Software Delivery Cloud and then learn how to do a simple installation of Oracle
Linux 6.3 inside the VirtualBox application. After installing Oracle Linux 6.3,
participants will update the base install with latest packages and updates. This lab
will also include steps to install VirtualBox Guest Additions software on Oracle Linux
6.3 (64 bit). This training was developed using Oracle Linux 6.3 release but you
should be able to use Oracle Linux 6.4 (64 bit) release too to perform all the lab
exercises.
Upon completion of this lab, participants will have learned how to obtain Oracle
Linux software, do a simple installation of Oracle Linux 6.3 and then update the
installed software with latest packages and patches.

2 Overview
There are four significant steps involved to complete this lab:
A.
B.
C.
D.

Create a Virtual Machine in VirtualBox Application


Install Oracle Linux 6.3 in the Virtual Machine
Update Oracle Linux 6.3 with latest patches and updates
Install VirtualBox Guest Additions Software

We will begin by downloading the Oracle Linux operating system software. Next we
will create a Virtual Machine and configure its settings. This Virtual Machine
running inside VirtualBox Application will be used to install Oracle Linux 6.3
operating system. We will do a simple installation of Oracle Linux 6.3 operating
system in this lab. After installing Oracle Linux 6.3, we will use the Oracle Public
Yum Server to update the image with latest packages and updates. Finally, we will
install VirtualBox Guest Additions Software.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 2 of 62

Oracle Linux 6 Installation - Lab 1


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.x with Extension Pack 4.2) installed
Oracle Linux 6u3 64 bit ISO image file or DVD media (Part # V33411-01)

The following assumptions have been made regarding the environment where this
lab is being performed:
1. Network connectivity to the Internet is required
2. Participants should have downloaded Oracle Linux 6.3 x64 bit ISO image
from the Oracle Software Delivery Cloud.
3. If you use Oracle Linux 6.4 x64 bit ISO image the versions shown in the
training lab documents will differ but you should be able to complete all labs.

4 Pre-requisites
The Software Environment used to capture screen shots captured/shown in this lab
is shown below:

Windows 7 Host Operating System


VirtualBox Version 4.2.6
Installation of Oracle Linux 6.3 (64 bit version)

Note: You can also install Oracle Linux 6.4 (64 bit) instead of Oracle Linux 6.3
and perform all the lab exercises. The product versions and screenshots shown
in this document may slightly differ depending on the product versions you use
when you perform the lab.

4.1 Oracle VirtualBox Hypervisor Software basics


Your host system should already have Oracle VirtualBox hypervisor software
installed and ready to use. If not, the latest version can be provided by your
instructor or you can download it from Oracle.com using the link below.
Download VirtualBox

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 3 of 62

Oracle Linux 6 Installation - Lab 1

VirtualBox Notes:

VirtualBox Installation Documentation


Installing VirtualBox Video
VirtualBox mouse capture can sometimes be awkward in the way it handles
mouse interaction between VirtualBox and your OS. Use the right control
key on your keyboard to return mouse control back to your default
environment. You can change this in VirtualBox preferences. Once the Oracle
Linux OS installation is complete, we will install VirtualBox Guest Additions
software.
VirtualBox Guest Additions Software will make life much easier by providing
closer integration between host and guest and improving the interactive
performance of guest systems. The Guest Additions are designed to be
installed inside a virtual machine after the guest operating system has been
installed and this software helps improve mouse pointer integration between
the guest and host operating systems.

4.2 Download Oracle Linux 6.3 ISO image file


You will need the ISO image for Oracle Linux 6.3 x64 bit version to do this lab. You
should already have downloaded the ISO image if you completed the pre-requisites
of this training. If you have already downloaded the ISO image on your laptop/host
system, skip this section and proceed to Section 5.1. In case you need to download
the ISO image file, you can download the ISO image file and save it on the disk drive
of your laptop. You can use the location provided below to download the ISO file.
Download Oracle Linux 6.3 x86 64 bit ISO Image
Screenshots to Download the ISO Image:
Sign In / Register at Oracle Software Delivery Cloud:

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 4 of 62

Oracle Linux 6 Installation - Lab 1

Select Oracle Linux as Product Pack and Platform as x86 64 bit:

Select Oracle Linux Release 6 Update 3 Media Pack for X86 (64 bit):

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 5 of 62

Oracle Linux 6 Installation - Lab 1

Download Oracle Linux Release 6 Update 3 for x86_64 (64 Bit) ISO image file:
Part # V33411-01
Save the ISO image file on the disk drive of your laptop as V33411-01.iso image file.

NOTE for 32 bit Version:


If you do not have a 64 bit laptop or system, you may use the 32 bit Oracle Linux 6.3
ISO. The part number for Oracle Linux Release 6 Update 3 for x86 (32 Bit) ISO is
V33415-01. This ISO file can be downloaded from Oracle Software Delivery Cloud.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 6 of 62

Oracle Linux 6 Installation - Lab 1

Important: This Oracle Linux 6 boot camp training and all the labs for this training
were created for 64 bit Operating System. If you decide to use 32-bit Oracle Linux 6
Operating System then some of the labs cannot be completed. These are labs for
which only 64 bit version of the software is available like the DTrace lab. Hence it is
strongly recommended to use 64 bit setups for this Oracle Linux 6 boot camp
training.
Important Note for Some 32 bit and 64 bit Version Installations:
If you are using the 32 bit ISO of Oracle Linux 6.3 and installing inside VirtualBox
then you may encounter an issue after the installation. This issue has also been seen
in a few 64 bit environments but mostly affects 32 bit installations. After the
installation when the FirstBoot tool runs if you experience a problem with
VirtualBox application (like a crash of VirtualBox) then you should boot your Oracle
Linux host system in single user mode and disable the FirstBoot application by
creating the /etc/sysconfig/firstboot file as explained in the steps below.

To boot the system in single user mode interrupt the boot sequence when
you see the following screen by pressing a key on your keyboard.

Once you interrupt the boot process you should see a menu similar to the
screenshot shown below. In the example below, you will see that Oracle
Linux 6 was installed with 2 kernels (UEK and RHCK). We will select the first
kernel entry which is the Unbreakable Enterprise Kernel (UEK) and then
click the e key to edit the kernel boot options.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 7 of 62

Oracle Linux 6 Installation - Lab 1

Once you use the e key to edit the UEK kernel entry, you will see a screen
similar to one shown below. You should expect to see three lines similar to
what is shown below. These 3 lines correspond to the entries in the
/boot/grub/grub.conf file of your system. Select the second line which is
the kernel options line and then click the e key to edit the kernel options.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 8 of 62

Oracle Linux 6 Installation - Lab 1

After selecting the kernel line and clicking the e key to edit the kernel
options you will see a screen similar to the one shown below. Add the kernel
option single at the end of the kernel option lines and click the
Enter/Return key on your keyboard.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 9 of 62

Oracle Linux 6 Installation - Lab 1

Next click the b key on your keyboard to boot the system. The system
should now boot into single user mode because of the single kernel option
that was added to the list of kernel options. You should see the root user
login prompt once the system has booted into single user mode as shown
below.

Next create the /etc/sysconfig/firstboot file as shown below. This file


should have been created by default but because of the bug we noticed with
the VirtualBox application crashing this file could not get created during
install time. The workaround is to create this file by booting into single user
mode as shown below.

# echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot

After creating this file, you can reboot the system by typing the reboot command
and boot normally into runlevel 5. Use the above workaround only if you run into
VirtualBox application crash issue when FirstBoot Tool runs during installing the
Operating System.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 10 of 62

Oracle Linux 6 Installation - Lab 1


5 Lab Exercises
5.1 Create Virtual Machine in VirtualBox
In this lab exercise, we will create a Virtual Machine inside VirtualBox application.
This Virtual Machine will be later used for installation of Oracle Linux 6.3.
Follow the steps below to create a Virtual Machine inside VirtualBox. It is assumed
that you already have VirtualBox installed. Start the VirtualBox application and
perform the steps below to create a Virtual Machine for Oracle Linux 6.3 installation.
Name:
Operating System:
Version:
Base Memory Size:
Storage:
Disk File Allocation:

Oracle Linux 6.3


Oracle Linux
Oracle Linux 6 (64 bit)
1GB Minimum
Dynamically allocated storage
12 GB Virtual disk file allocation

The screenshots shown below were captured using Version 4.2.6 of VirtualBox
application running on a Windows 7 host operating system. They may differ
somewhat if you are using a newer version of VirtualBox application.
In the VirtualBox
Manager screen, click
New to start creating a
Virtual Machine.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 11 of 62

Oracle Linux 6 Installation - Lab 1


Name your VM Oracle
Linux 6.3
OS Type:
Linux
Version:
Oracle (64 bit)
Click Next

Choose an amount of
memory between 1.0GB
and 2GB depending on
available free memory on
your host laptop.
A simple install with GUI
login interface can be
done with 1GB memory.
Click Next

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 12 of 62

Oracle Linux 6 Installation - Lab 1


Click Next to create a new
hard disk.
The recommended size
for a basic install is 12 GB
and we will use this as
the size of our virtual
hard drive for this lab.

Click Next well accept


the VDI hard drive image
default.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 13 of 62

Oracle Linux 6 Installation - Lab 1


Click Next to allow
storage space to be
dynamically allocated.

Click the Create button to


proceed with creating the
Virtual Machine.
You can choose the
location of your virtual
hard drive by clicking the
folder with green arrow.
We will use the default
location and a size of
12GB for our virtual hard
drive on which we will
install Oracle Linux 6.3.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 14 of 62

Oracle Linux 6 Installation - Lab 1


Your new Oracle Linux
6.3 Virtual Machine has
now been created.
Oracle Linux 6.3 will be
installed in this Virtual
Machine.

Click on Settings to
review or change the
settings of your Virtual
Machine.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 15 of 62

Oracle Linux 6 Installation - Lab 1


Review the Oracle Linux
6.3 Virtual Machine
Settings on this window.

Navigate to the System


Settings and Review
Motherboard settings.
Screenshot is an example.
Settings may differ based
on your host laptop
configuration.
Review the Boot Order
and Extended Features
settings. Enable IO APIC
is selected.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 16 of 62

Oracle Linux 6 Installation - Lab 1


Review Processor
settings under Systems
configuration.
Screenshot is an example.
Settings may differ based
on your host laptop
configuration.

Review Acceleration
Settings under Systems
Configuration.
Screenshot is an example.
Settings may differ based
on your host laptop
configuration.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 17 of 62

Oracle Linux 6 Installation - Lab 1


Review Network Settings.
Screenshot is an example.
Settings may differ based
on your host laptop and
network configuration.

We are now ready to


install Oracle Linux 6.3.

This completes the creation of the Virtual Machine which will be used for installing
Oracle Linux 6.3 release.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 18 of 62

Oracle Linux 6 Installation - Lab 1

5.2 Install Oracle Linux 6.3


During an initial installation, we will answer basic questions pertaining to language
preference, time zone, disk partition information (use whole disk in our lab), create a
username and a password, specify a meaningful user name, and create a root user
password.
Make sure your
Oracle Linux 6.3
Virtual Machine is
selected.
Click the green Start
button on the
VirtualBox
Application to begin
the process of
installing Oracle
Linux 6.3 operating
system.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 19 of 62

Oracle Linux 6 Installation - Lab 1


You will see the
Select start-up disk
window.
Click the yellow
folder with green
arrow to select the
ISO image that will be
used to install Oracle
Linux 6.3

Select the Oracle


Linux 6.3 ISO image
that you downloaded
in Step 4.2. This is the
ISO image file with
part number
V33411-01 that you
downloaded earlier.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 20 of 62

Oracle Linux 6 Installation - Lab 1


Once you have
selected the Oracle
Linux 6.3 ISO image,
click the Start
button to boot using
this DVD image.

There is a host key


assigned by
VirtualBox to toggle
the mouse/keyboard
control between the
host and guest
operating systems.
Usually, it is the
Right Control key in
case of Windows host
systems. You can
find it on the lower
right corner of the
VirtualBox
application window.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 21 of 62

Oracle Linux 6 Installation - Lab 1


You are presented
with the Welcome
Screen which is the
first step of
Installation.
Select the Install or
upgrade an existing
system option.

You will see installer


running and
messages similar to
what is shown in this
screenshot.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 22 of 62

Oracle Linux 6 Installation - Lab 1


Select Skip to skip
the media test.
Do not perform
media test in this
step since a ISO
image file stored
locally is being used
for installation.

Click Next to proceed


with the installation
steps.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 23 of 62

Oracle Linux 6 Installation - Lab 1


Select language to
use during
installation process.

Select the keyboard


for the system.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 24 of 62

Oracle Linux 6 Installation - Lab 1


Select Basic Storage
Devices option for
this lab.

Since this is a fresh


install, click the Yes,
discard any data
option.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 25 of 62

Oracle Linux 6 Installation - Lab 1


In this step, we set
the hostname of the
Oracle Linux server.
Enter
examplehost.com as
the host name.

You can also


configure the
Network here.

Click the Configure


Network option to
review/configure the
network settings.
Screenshot is an
example of Network
Connections screen.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 26 of 62

Oracle Linux 6 Installation - Lab 1


Select the System
eth0 device and click
Edit. You can
configure MTU
settings, IPV4, IPV6
settings. Select the
Connect
automatically
checkbox. Click
Apply in the
network
configuration tool.
Network
configuration can
optionally also be
performed after
completing this
installation.
Select the nearest
city in your time zone
on this screen and
click Next.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 27 of 62

Oracle Linux 6 Installation - Lab 1


Enter and remember
the root user
password. This root
user account is used
for system
administration. We
will use oracle as
the root user
password. You will
get a warning that it
is a weak password;
we will ignore it and
use the oracle
password to keep it
simple. Click Next.
You can select the
type of installation in
this step. Disk
partitioning layout
can be done here.
We will review the
partitions in this lab
but use the default
settings and go with
the Replace Existing
Linux System option.
Dont click Next at
this time.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 28 of 62

Oracle Linux 6 Installation - Lab 1


Select the Review
and modify partition
layout option. Click
Next.
Note: We are just
reviewing the
partition, not
creating or changing
the default layout in
this lab.

Review the default


partition created by
the installer. This is
where you can create
standard, RAID,
partitions, create
LVM volumes etc.
Do not change or
create any partitions.
Click Cancel. Click
Back and uncheck
the Review and
modify partition
layout option. Click
Next.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 29 of 62

Oracle Linux 6 Installation - Lab 1


Click Write changes
to disk to write
storage configuration
the disk.

For this lab, we will


use the Desktop
option. This option
will install GUI for
Oracle Linux and
provide a desktop
environment.
Selecting Basic will
install the OS without
GUI/Desktop
software. Click Next.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 30 of 62

Oracle Linux 6 Installation - Lab 1


Oracle Linux
installation will start
now and you should
see a progress bar
showing packages
getting installed.

This step may take a


few minutes (5-15
min) depending on
speed of computer
and number of
packages.
Once the packages
have been installed,
post installer
configuration is
performed.
Bootloader will also
get installed at this
time.
This step may also
take a couple of
minutes to complete.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 31 of 62

Oracle Linux 6 Installation - Lab 1


You should see the
Congratulations
message if your
installation is
successful. Click
Reboot button.

The system reboot


will start and present
you with the GRUB
screen with a choice
of 2 kernels that get
installed.
Oracle Linux 6.3
comes with UEK
kernel and RHCK
kernel. Default is the
UEK kernel and we
will use this kernel.
Click Enter.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 32 of 62

Oracle Linux 6 Installation - Lab 1


Oracle Linux 6.3
System will now boot
using the UEK kernel.

You will see the


Welcome screen. This
is the FirstBoot tool
which runs only after
a fresh install and
only on systems
booting in graphics
run level.
Click Forward.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 33 of 62

Oracle Linux 6 Installation - Lab 1


Read and agree to
License agreement.
Click Forward.

We will skip setup of


Software Updates at
this time as this is a
training environment
and ULN access
requires
subscription.
It is recommended
though to setup
Software Updates. If
not done at this
stage, you should set
this up after
installation.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 34 of 62

Oracle Linux 6 Installation - Lab 1


Create a normal
Oracle Linux user for
your system in this
step.

Optionally, you can


also use Network
authentication like
NIS etc. or create
user with advanced
configuration
options.

We create a user with


username student1
in this step for this
lab. The password for
this student1 user
will be oracle. It will
warn you that this is
a weak password;
acknowledge the
warning and proceed.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 35 of 62

Oracle Linux 6 Installation - Lab 1


Set the date and time
for the system, if
necessary. If you
have network
connectivity, it is
recommended to
synchronize the date
and time over the
network. Click
Forward.

Kdump configuration
will not be done since
it is not supported in
VM environment
during install time.
Ignore the
insufficient memory
to enable kdump
message. Click
Finish to complete
the FirstBoot tool
configuration.
Refer to the note
Important Note for
Some 32 bit and 64
bit Version
Installations in this
document if you run
into an application
crash issue at this
stage when you click
the Finish button.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 36 of 62

Oracle Linux 6 Installation - Lab 1


5.3 Using your Oracle Linux Server for the first time
Since we installed the Oracle Linux 6.3 operating system with Desktop option, we
will be presented with the Graphical User Interface (GUI) screen. We will login to
our Oracle Linux system and verify system information.
Select student1
user1 and proceed
with login.

Enter the password


of student1 user. It
was set as oracle in
the previous lab
unless you chose a
different one.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 37 of 62

Oracle Linux 6 Installation - Lab 1


Right Click on the
Desktop, and Open a
Terminal window.

Type the uname a


command to check
the OS information.
The release string
can be checked using
the cat /etc/oraclerelease command.
You can also run the
lsb_release d
command to print the
release distribution
information.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 38 of 62

Oracle Linux 6 Installation - Lab 1


Logout of the
Desktop GUI
environment by
using the System ->
Logout option

We have now completed Oracle Linux 6.3 installation and have a working system
that will be used for doing all the training labs. If you ran into issues or could not get
the system to install properly on your laptop, you may check with your instructor to
see if a pre-installed Oracle Linux 6.3 VM image works on your system.
NOTE: It is recommended to take a snapshot of your system at this time using
the VirtualBox snapshot capability. This will be your clean vanilla install
snapshot. Shutdown the system and create a snapshot in VirtualBox.

5.4 Updating your Oracle Linux 6.3 Server with latest patches and updates
Like any other operating system, patches and updates are released regularly for
Oracle Linux. In this lab, we will update the base image with the latest patches and
updates using the Oracle Public Yum Server. We will log out as student1 user and
log back in as root user to perform this lab.
Note: The versions of products/patches/updates may differ from what is shown in
the screenshots shown below. The versions will depend on what is the latest version
available at the time you perform this lab. But the steps/commands used below
should be applicable to later versions of Oracle Linux 6.3 release.
Note: This lab requires internet connectivity.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 39 of 62

Oracle Linux 6 Installation - Lab 1

When you first login as root user, on a freshly installed Oracle Linux system, you
should expect to see a warning message similar to what is shown below. Read this
message, acknowledge the warning and then click Close to proceed.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 40 of 62

Oracle Linux 6 Installation - Lab 1


After logging in as root user, open a Terminal window and perform the following
steps:
[root@examplehost /]# cd /etc/yum.repos.d/
[root@examplehost yum.repos.d]#
Check to see if there is a /etc/yum.repos.d/public-yum-ol6.repo file already
present. If one is present, move it out of this directory if you wish to preserve the
original file or delete this file.
[root@examplehost yum.repos.d]# rm public-yum-ol6.repo
rm: remove regular file `public-yum-ol6.repo'? y
[root@examplehost yum.repos.d]#
Note: Make sure you have enabled your network connection and you have internet
connectivity. You may have to enable your network connection if it is inactive. The
network connection can be enabled by either using the GUI or the ifup command as
shown in the screenshot below.

Alternatively, from the UI, click the System eth0 interface from the Network icon on
the top right side.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 41 of 62

Oracle Linux 6 Installation - Lab 1


To activate the network interface upon every reboot of the system, you can right
click the Network icon and then click Edit Connections option.

In the Network Connections window, select the network interface System eth0
and then click the Edit button.

Click on Connect automatically and then click the Apply button. Next time you
reboot your system it will automatically activate the network interface while
booting.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 42 of 62

Oracle Linux 6 Installation - Lab 1


Also, set the proxy server if needed under System -> Preferences -> Network
Proxy.
Proxy Server Configuration (if required):
Network Proxy configuration can be found under System -> Preferences ->
Network Proxy menu option as shown below.

Depending on your Network environment, you can define a Manual Proxy


configuration or automatic proxy configuration settings. Check with your network
administrator to find out the proxy server information and enter it in the Network
Proxy Preferences window.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 43 of 62

Oracle Linux 6 Installation - Lab 1

Verify internet connectivity by opening a web page in your browser to make sure
you can access the internet.
We will download new repository configuration file from the Oracle Public Yum
Server using the wget http://public-yum.oracle.com/public-yum-ol6.repo
command as shown below. This is because the repository configuration file gets
updated when new releases or channels are introduced.
[root@examplehost yum.repos.d]# wget http://publicyum.oracle.com/public-yum-ol6.repo
--2013-01-09 16:08:28-- http://publicyum.oracle.com/public-yum-ol6.repo
Resolving public-yum.oracle.com... 141.146.44.34
Connecting to public-yum.oracle.com|141.146.44.34|:80...
connected.
HTTP request sent, awaiting response... 200 OK
Length: 2201 (2.1K) [text/plain]
Saving to: public-yum-ol6.repo
100%[================================================>]
2,201
--.-K/s
in 0s
2013-01-09 16:08:28 (227 MB/s) - public-yum-ol6.repo
saved [2201/2201]
[root@examplehost yum.repos.d]#

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 44 of 62

Oracle Linux 6 Installation - Lab 1

Edit the repository configuration file (public-yum-ol6.repo) and review the


contents of this file. Look at all the channels available. Enable following two
channels in this repository configuration file:

ol6_latest
ol6_UEK_latest

These 2 channels should be enabled by default but if you need to enable them set
enabled=1 as shown below. Edit the repo configuration file using vi or any other
editor that you are familiar with.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 45 of 62

Oracle Linux 6 Installation - Lab 1


[root@examplehost yum.repos.d]# vi public-yum-ol6.repo
[ol6_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=http://publicyum.oracle.com/repo/OracleLinux/OL6/latest/$basearch/
gpgkey=http://public-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.oracle.com/repo/OracleLinux/OL6/UEK/latest/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=1
Note: At the time of creation of this lab, Oracle Linux 6.3 was the latest release. If
you are doing this lab at a time when a newer release like Oracle Linux 6.4 is
available, the ol6_latest channel will pick up updates/patches available for the 6.4
release and upgrade your system to Oracle Linux 6.4.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 46 of 62

Oracle Linux 6 Installation - Lab 1

Once you have verified and enabled both the channels in the Repository
configuration file, you are ready to update your system with latest patches and
packages.
As was mentioned earlier, to update the packages, you need to ensure that you have
internet connectivity. We will connect to the Oracle Public Yum Server to download
the latest updates and patches available for Oracle Linux 6.3 release. You may also
need to configure your Network proxy server settings inside the Oracle Linux
system to be able to connect to the internet.
Once you have confirmed network connectivity to internet is available, you can run
the yum update command to update Oracle Linux 6.3 base packages and install the
latest patches. See the commands and screen shots below.
root@examplehost yum.repos.d]# yum update
Again, remember that the ol6_latest channel is enabled and running yum update
can even upgrade your system to the latest dot release like Oracle Linux 6.4 release
if that release is available at the time of doing this lab. When these screenshots
below were captured, the latest release was 6.3 and 6.4 had not been released yet.
Note: If you run yum -y update and get a message about another copy of yum is
running, check using ps ef to find the process id and kill it if needed and then try
running the command again. This can happen if PackageKit application is checking
for updates at the same time as you run the yum command.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 47 of 62

Oracle Linux 6 Installation - Lab 1

Click y to begin downloading the available updates and packages. Depending on the
number of updates and patches and your internet speed, this step may take a few
minutes. Click N if you have a slow internet connection and wish to perform this
lab later.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 48 of 62

Oracle Linux 6 Installation - Lab 1

Click y to import the GPG key. The installation of updates will now start and you
should expect to see messages similar to what is shown in the screenshot below.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 49 of 62

Oracle Linux 6 Installation - Lab 1

Run the uname a command after the patches and updates have been installed.
Check the output of the uname command and note the kernel version. In the above
screenshot, we can see the system is running UEK Kernel Version 2.6.39-200.24.1.
This version corresponds to UEK Release 2 and was the initial version of our
System. It continues to show the initial version because that is the kernel version
that we had booted into before applying the patches.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 50 of 62

Oracle Linux 6 Installation - Lab 1


Since the patches included a newer kernel version, it is recommended to reboot the
server and to use the new kernel version that was installed. Reboot the system after
installing all the patches and updates.
To reboot the system, click the System->Shutdown menu option or run the reboot
command line program. Once the system has rebooted you can log back in and
verify using the uname -a command that the new kernel is applied and running. In
the screenshot below, you can see the new kernel version. This version may differ
depending on when you are doing the install and what is the latest kernel version
available at that time. You can also check the release (-r option) and the distribution
(-d option) information using the lsb_release command as shown below.

5.5 Install VirtualBox Guest Additions Software


VirtualBox Guest Additions will make your life much easier by providing closer
integration between host and guest and improving the interactive performance of
guest systems. The Guest Additions are designed to be installed inside a virtual
machine after the guest operating system has been installed. They consist of device
drivers and system applications that optimize the guest operating system for better
performance and usability. Please see the section called Supported guest operating
systems for details on what guest operating systems are fully supported with Guest
Additions by VirtualBox.
The VirtualBox Guest Additions for all supported guest operating systems are provided
as a single CD-ROM image file which is called VBoxGuestAdditions.iso. This image
file is located in the installation directory of VirtualBox. To install the Guest Additions
for a particular VM, you mount this ISO file in your VM as a virtual CD-ROM and install
from there.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 51 of 62

Oracle Linux 6 Installation - Lab 1


The Guest Additions offer some of the following features:

Improved Mouse pointer integration


Shared folders
Better video support
Time Synchronization

Steps to Install VirtualBox Guest Additions software:


Login as root user or use the sudo functionality to install the Guest Additions
software. From the Devices Menu option of VirtualBox application, click the Install
Guest Additions option as shown in the screenshot below.

Clicking the Install Guest Additions option will automatically mount the Guest
Additions ISO image file and you will see the prompt dialog box as shown in the
screenshot below.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 52 of 62

Oracle Linux 6 Installation - Lab 1

Click OK button to auto-run the installer for Guest Additions software. You will see a
dialog window like following:

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 53 of 62

Oracle Linux 6 Installation - Lab 1

Click Run to begin running the install script for Guest Additions. You will see a
VirtualBox Guest Additions installation window with install messages. If you see a
failure during install, it is most likely due to missing gcc utility or mismatch of kernel
headers/devel package. You may expect to see a screen shot similar to what is
shown below for such failures:

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 54 of 62

Oracle Linux 6 Installation - Lab 1

As you can see from the messages above, it complains about missing gcc utility and
missing kernel-uek-devel package. These two packages are required for building
the VirtualBox Guest Additions module and must be installed on your system before
you can install the VirtualBox Guest Additions software. Lets install the gcc and
kernel-uek-devel packages and then try running the Guest Additions installer
again.
To install gcc and the kernel-uek-devel packages, simply run the yum install
command as shown below. Using the -y flag of yum along with the two package
names as shown below will install these two packages on your system.
# yum y install gcc kernel-uek-devel-$(uname -r)

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 55 of 62

Oracle Linux 6 Installation - Lab 1

Now that gcc and kernel-uek-devel packages are installed, lets run the Guest
Additions installer again. To run the installer, double click the VirtualBox Guest
Additions CD on the desktop and click the autorun.sh script.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 56 of 62

Oracle Linux 6 Installation - Lab 1

Run the autorun.sh script from the Guest Additions CD by opening the CD in File
Manager application.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 57 of 62

Oracle Linux 6 Installation - Lab 1

Click on Run in Terminal option when it prompts you to run the autorun.sh script
as shown above. The installer will run and you should see Guest Additions software
get installed as shown below.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 58 of 62

Oracle Linux 6 Installation - Lab 1


You can confirm and see that everything installed OK. Close this VirtualBox Guest
Addition install window. This completes the installation of Guest Additions software
and now you should see better mouse pointer integration between the host and
guest operating systems.

5.6 Snapshot the Virtual Machine


We have our Virtual Machine running Oracle Linux 6.3 with latest patches and also
the Guest Additions software installed. It is a good idea to capture a snapshot of this
Virtual Machine before proceeding with any other labs or any other exercises. We
will use the VirtualBox snapshot feature to create a snapshot of this image.
You should shutdown the Oracle Linux System and then create a snapshot.
Shutdown the Oracle Linux 6 system using the System->Shutdown menu option.
To create a snapshot, from the VirtualBox Application, Click the Snapshots option
on the top right side. See screenshot below.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 59 of 62

Oracle Linux 6 Installation - Lab 1


Click the Camera icon to create a snapshot as shown below:

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 60 of 62

Oracle Linux 6 Installation - Lab 1


Clicking the Snapshot icon will display the following window:

Give a logical name for the snapshot and enter a short description to remember the
state of the system when this snapshot was created. See example above. Once the
snapshot is created you will see the following window.

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 61 of 62

Oracle Linux 6 Installation - Lab 1

We now have a snapshot created for our Oracle Linux 6 system. If you ever need to
restore back to this clean image you can use this snapshot and boot into it.

6 Lab Summary
In this lab exercise, you learned how to create a virtual machine inside VirtualBox
application and then install Oracle Linux 6.3 operating system in that virtual
machine. You also learned how to update the base release of Oracle Linux 6.3 with
the latest patches and updates from the Oracle Public Yum Server.

7 References
For more information and next steps, please consult additional resources: Click the
hyperlinks to access the resource.
Installation Guide
Oracle Linux Installation Viewlet

For Oracle employees and authorized partners only. Do


not distribute to third parties.
2013 Oracle Corporation

OL 6 - Lab 01

Page 62 of 62

Anda mungkin juga menyukai