Oracle 11gR2 database installation on Linux 5.7
Oracle 11gR2 database installation on Linux 5.7
I will show you how to install Oracle 11.2.0.1 database in the Linux 5.7 VM.
Before we get started, we need to perform some housekeeping tasks. We need to do two main things -
1. update the Linux rpms to the latest version and
2. enable Guest Additions on the VM in order to "share" folders between the host Win 7 OS and the guest Linux VM.
So, start up your Linux VM and login as root. Then select Applications > Accessories > Terminal to open up a command window in the VM, and type these commands
# cd /etc/yum.repos.d
# wget http://public-yum.oracle.com/public-yum-el5.repo
Edit the public-yum-el5.repo file using the "vi" editor - in the section labeled "[ol5_u7_base]", change the enabled value to 1 and save the file.
Then, issue these commands in succession (wait for each one to complete)
# yum update
# yum install gcc
# yum install kernel-devel
# yum install kernel-uek-devel
# yum install oracle-validated
These commands may take up to an hour or more, as they will download the latest rpms and install them. If any of these commands report an error, retry the command. After all of the commands successfully complete, reboot your Linux VM.
Then click Devices > Install Guest Additions from the VirtualBox menu - it will bring up this window
Double-click "autorun.sh" to install and link Guest Additions. This will take a few minutes. Hit the Enter key when this script completes.
Then select Devices > Shared Folders from the VirtualBox Menu to see this window
Click on the green "plus" icon on the top-right, and add a folder to share between the host Win 7 OS and the guest Linux VM - this will enable easy transfer of files between host Windows and guest Linux.
I chose to share "C:\Temp" folder on the Windows host as the "Temp" folder in the Linux guest - you can choose any other folder you wish (or multiple folders) - select all 3 check boxes. Click OK to see this
Reboot your Linux VM for the shared folders option to take effect. After you reboot, log in as root and navigate to the/media directory and you should see this
The "sf_Temp" directory is essentially a "soft link" to the C:\Temp directory on the Windows 7 host. Change the permissions of the directory in the VM to 777 (drwxrwxrwx).
Now that we have housekeeping all completed, we can download and install Oracle 11.2.0.1 database. Download the two zip files from here - pick either Linux x86 (32-bit) or Linux x86-64 (64-bit), depending on which version (32-bit or 64-bit) of the OS you have installed in the VM. This download will take some time as it is over 2G in size. After you have downloaded the two files, copy or move them to the C:\Temp directory on the Windows host so that the files can be copied into the Linux VM filesystem.
Next, we need to modify the Unix account "oracle", which we defined during the Linux install in part 2 of this series.
In the VM, select System > Administration > Users and Groups ...
... and create a group called "dba". Edit the "oracle" account to be part of the dba group, and make the dba group the primary group for oracle. You can also set your favorite shell for the oracle account (I use ksh). Once done, you should have
Next, login as oracle, and create a directory named "media" in the home directory of the oracle user (/home/oracle in this case). Copy the two zip files from the /media/sf_Temp directory to the /home/oracle/media directory, and change the ownership of the two files to be oracle:dba.
Then unzip each file using unzip command - this will create a directory named database and will unzip the contents of both files into this directory.
Next, login as root and create directory /u01/app/oracle - this will be used as the ORACLE_BASE directory for our Oracle install
# mkdir -p /u01/app/oracle
# chown oracle:dba /u01/app/oracle
Log back in as oracle and let's get started with the install process by following the official directions here.
Navigate to /home/oracle/media/database directory and execute the runInstaller script
# ./runInstaller
and you will see
Uncheck the checkbox, do not enter any information in these fields, click Next.
Click Yes.
Let's create a database too after installing the software, so just click Next.
Desktop Class will suffice for our purposes, so click Next.
Change the Character Set to Unicode (this is the recommended value), enter an Administrative password (twice to confirm, pl remember this password), then click Next.
I get this warning since I did not use a strong password - I will ignore it for now, so click Yes.
Change the Inventory Directory to be /u01/app/oracle/oraInventory, then click Next.
We again get a warning - ignore this for now, so click Yes.
Installer will go thru some pre-req checks and will show any missing pre-reqs
Let's install this missing package. Open up a new terminal session, log in as root, and execute
# yum install unixODBC-2.2.11
This will take a few minutes to install (enter "y" when prompted)
Exit out of the terminal session, then click the "Check Again" button in the Oracle Installer and it will re-verify pre-reqs, and you will see
Click Finish, and the software installation will begin.
You will likely see this error
Select the SELinux AVC denial icon on top tight and you will see that the listener is unable to start because of SELinux security issue.
To fix this, open up a new terminal session, log in as root, and issue the command indicated
# chcon -t textrel_shlib_t '/u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1'
Then click the Retry button in the Oracle installer and the Net Configuration Assistant step will complete successfully. The database configuration assistant will start next.
Click OK to continue
Open a terminal window, log in as root and execute the two scripts as indicated.
Exit out of the terminal session, and click OK in the Oracle Installer window.
Click Next
Click Close to complete.
Issue "ps -ef | grep orcl" command in the terminal session to confirm that the database processes are up and running.
To log in to the database, set these environment variables
# export ORACLE_BASE=/u01/app/oracle
# export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
# export ORACLE_SID=orcl
# export PATH=$ORACLE_HOME/bin:$PATH
# export TNS_ADMIN=/u01/app/oracle/product/11.2.0/dbhome_1/network/admin
and then execute
# sqlplus / as sysdba
to log in to the database, and execute command "select * from v$version;"
Hope this was helpful !!!
Before we get started, we need to perform some housekeeping tasks. We need to do two main things -
1. update the Linux rpms to the latest version and
2. enable Guest Additions on the VM in order to "share" folders between the host Win 7 OS and the guest Linux VM.
So, start up your Linux VM and login as root. Then select Applications > Accessories > Terminal to open up a command window in the VM, and type these commands
# cd /etc/yum.repos.d
# wget http://public-yum.oracle.com/public-yum-el5.repo
Edit the public-yum-el5.repo file using the "vi" editor - in the section labeled "[ol5_u7_base]", change the enabled value to 1 and save the file.
Then, issue these commands in succession (wait for each one to complete)
# yum update
# yum install gcc
# yum install kernel-devel
# yum install kernel-uek-devel
# yum install oracle-validated
These commands may take up to an hour or more, as they will download the latest rpms and install them. If any of these commands report an error, retry the command. After all of the commands successfully complete, reboot your Linux VM.
Then click Devices > Install Guest Additions from the VirtualBox menu - it will bring up this window
Double-click "autorun.sh" to install and link Guest Additions. This will take a few minutes. Hit the Enter key when this script completes.
Then select Devices > Shared Folders from the VirtualBox Menu to see this window
Click on the green "plus" icon on the top-right, and add a folder to share between the host Win 7 OS and the guest Linux VM - this will enable easy transfer of files between host Windows and guest Linux.
I chose to share "C:\Temp" folder on the Windows host as the "Temp" folder in the Linux guest - you can choose any other folder you wish (or multiple folders) - select all 3 check boxes. Click OK to see this
Reboot your Linux VM for the shared folders option to take effect. After you reboot, log in as root and navigate to the/media directory and you should see this
The "sf_Temp" directory is essentially a "soft link" to the C:\Temp directory on the Windows 7 host. Change the permissions of the directory in the VM to 777 (drwxrwxrwx).
Now that we have housekeeping all completed, we can download and install Oracle 11.2.0.1 database. Download the two zip files from here - pick either Linux x86 (32-bit) or Linux x86-64 (64-bit), depending on which version (32-bit or 64-bit) of the OS you have installed in the VM. This download will take some time as it is over 2G in size. After you have downloaded the two files, copy or move them to the C:\Temp directory on the Windows host so that the files can be copied into the Linux VM filesystem.
Next, we need to modify the Unix account "oracle", which we defined during the Linux install in part 2 of this series.
In the VM, select System > Administration > Users and Groups ...
... and create a group called "dba". Edit the "oracle" account to be part of the dba group, and make the dba group the primary group for oracle. You can also set your favorite shell for the oracle account (I use ksh). Once done, you should have
Next, login as oracle, and create a directory named "media" in the home directory of the oracle user (/home/oracle in this case). Copy the two zip files from the /media/sf_Temp directory to the /home/oracle/media directory, and change the ownership of the two files to be oracle:dba.
Then unzip each file using unzip command - this will create a directory named database and will unzip the contents of both files into this directory.
Next, login as root and create directory /u01/app/oracle - this will be used as the ORACLE_BASE directory for our Oracle install
# mkdir -p /u01/app/oracle
# chown oracle:dba /u01/app/oracle
Log back in as oracle and let's get started with the install process by following the official directions here.
Navigate to /home/oracle/media/database directory and execute the runInstaller script
# ./runInstaller
and you will see
Uncheck the checkbox, do not enter any information in these fields, click Next.
Click Yes.
Let's create a database too after installing the software, so just click Next.
Desktop Class will suffice for our purposes, so click Next.
Change the Character Set to Unicode (this is the recommended value), enter an Administrative password (twice to confirm, pl remember this password), then click Next.
I get this warning since I did not use a strong password - I will ignore it for now, so click Yes.
Change the Inventory Directory to be /u01/app/oracle/oraInventory, then click Next.
We again get a warning - ignore this for now, so click Yes.
Installer will go thru some pre-req checks and will show any missing pre-reqs
Let's install this missing package. Open up a new terminal session, log in as root, and execute
# yum install unixODBC-2.2.11
This will take a few minutes to install (enter "y" when prompted)
Exit out of the terminal session, then click the "Check Again" button in the Oracle Installer and it will re-verify pre-reqs, and you will see
Click Finish, and the software installation will begin.
You will likely see this error
Select the SELinux AVC denial icon on top tight and you will see that the listener is unable to start because of SELinux security issue.
To fix this, open up a new terminal session, log in as root, and issue the command indicated
# chcon -t textrel_shlib_t '/u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1'
Then click the Retry button in the Oracle installer and the Net Configuration Assistant step will complete successfully. The database configuration assistant will start next.
Click OK to continue
Open a terminal window, log in as root and execute the two scripts as indicated.
Exit out of the terminal session, and click OK in the Oracle Installer window.
Click Next
Click Close to complete.
Issue "ps -ef | grep orcl" command in the terminal session to confirm that the database processes are up and running.
To log in to the database, set these environment variables
# export ORACLE_BASE=/u01/app/oracle
# export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
# export ORACLE_SID=orcl
# export PATH=$ORACLE_HOME/bin:$PATH
# export TNS_ADMIN=/u01/app/oracle/product/11.2.0/dbhome_1/network/admin
and then execute
# sqlplus / as sysdba
to log in to the database, and execute command "select * from v$version;"
Hope this was helpful !!!
Thanks & regards,
Madhusudan Reddy K







































0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home