In Part 1 of the HOWTO we built the virtual machine and configured the Oracle Linux 6 operating systems. Here we continue with the Database 12c installation.
In order to install Database 12c your VM has to meet some prerequisites as outlined in the Database Installation Guide for Linux. Most of the pre-installation tasks can be completed by installing the 12cR1 Pre-install RPM. Let’s open a terminal console and install this package.
[root@ol6 ~]# yum install oracle-rdbms-server-12cR1-preinstall.x86_64
Loaded plugins: refresh-packagekit, security
Setting up Install Process
--> Running transaction check
---> Package oracle-rdbms-server-12cR1-preinstall.x86_64 0:1.0-8.el6 will be installed
--> Finished Dependency Resolution
Package Arch Version Repository Size
oracle-rdbms-server-12cR1-preinstall x86_64 1.0-8.el6 ol6_latest 15 k
Installing for dependencies:
compat-libcap1 x86_64 1.10-1 ol6_latest 17 k
compat-libstdc++-33 x86_64 3.2.3-69.el6 ol6_latest 183 k
gcc-c++ x86_64 4.4.7-3.el6 ol6_latest 4.7 M
ksh x86_64 20100621-19.el6_4.4 ol6_latest 686 k
libaio-devel x86_64 0.3.107-10.el6 ol6_latest 13 k
libstdc++-devel x86_64 4.4.7-3.el6 ol6_latest 1.6 M
Install 7 Package(s)
Total download size: 7.2 M
Installed size: 23 M
Is this ok [y/N]: y
(1/7): compat-libcap1-1.10-1.x86_64.rpm | 17 kB 00:00
compat-libcap1.x86_64 0:1.10-1 compat-libstdc++-33.x86_64 0:3.2.3-69.el6 gcc-c++.x86_64 0:4.4.7-3.el6 ksh.x86_64 0:20100621-19.el6_4.4 libaio-devel.x86_64 0:0.3.107-10.el6
The pre-install RPM automatically creates the Oracle software owner account (named oracle). Let’s set a password for the account.
[root@ol6 ~]# passwd oracle
Changing password for user oracle.
BAD PASSWORD: it is based on a dictionary word
Retype new password:
passwd: all authentication tokens updated successfully.
Next you need to create the Oracle base and the Oracle inventory directories:
[root@ol6 ~]# mkdir -p /u01/app/oracle
[root@ol6 ~]# chown -R oracle:oinstall /u01/app/oracle/
[root@ol6 ~]# chmod -R 775 /u01/app/oracle/
[root@ol6 ~]# mkdir -p /u01/app/oraInventory
[root@ol6 ~]# chown -R oracle:oinstall /u01/app/oraInventory/
[root@ol6 ~]# chmod -R 775 /u01/app/oraInventory/
Time to switch to the oracle user. Logout from your current session and login back as oracle.
You will need the Database 12c Release 1 installation for Linux. Start the internet browser inside your virtual machine and go to the Database download section of OTN.
Download the two zip files to a convenient location (/home/oracle will do nicely). After both files are in place use unzip to extract their contents.
[root@ol6 ~]$ unzip /home/oracle/*.zip
Run the Oracle Universal Installer by executing:
[root@ol6 ~]$ /home/oracle/database/runInstaller.sh
As this is a test installation you do not have to register it with Oracle Support. Uncheck the “I wish to receive security updates via Oracle Support” box and click Next.
Select “Skip software updates” and click Next.
Select “Create and configure a database” and click Next.
Select “Server class” and click Next.
Make sure the installation type is set to “Single instance” and click Next.
Select “Advanced install” and click Next.
Select English for your product language and click Next.
Set the edition to Enterprise and click Next.
Set the Oracle base to /u01/app/oracle and the Oracle home to /u01/app/oracle/product/12.1.0/dbhome_1.
Set the inventory directory to /u01/app/oraInventory and the inventory owner to oinstall.
Set the database type to General Purpose and click Next.
Set the database name and SID to orcl and uncheck the “Create as Container database” option.
Leave the memory settings by default and go to the Character sets tab.
Set the database character set to Unicode (AL32UTF8).
At the Sample schemas tab select the “Create database with sample schemas”. This will install some sample data that you can experiment with.
Select File system as the database storage option and set the path to /u01/app/oracle/oradata.
You have no Cloud Control installation in this test setup, so skip the registration and click Next.
Do not enable the archivelog mode. Click Next.
Select “Use the same password for all accounts” and set the system password for your database.
Set all the groups to dba and click Next.
The installer presents you with a summary of the upcoming installation. Click Install.
Give the installer some time to copy the oracle binaries to the specified location.
At some point you will be asked to execute a pair of configuration scripts. Open a terminal console, become root and run the scripts in the specified order.
[oracle@ol6 ~]$ su -
[root@ol6 ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@ol6 ~]# /u01/app/oracle/product/12.1.0/dbhome_1/root.sh
Performing root user operation for Oracle 12c
The following environment variables are set as:
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Close the terminal and click OK in the Execute configuration scripts dialog.
After the database binaries are in place the installer will launch the Database Configuration Assistant (DBCA). The assistant will create the orcl database and will insert the sample data into it.
When DBCA completes it will display a dialog with the address of your Enterprise Manager console. Take a note of the URL and click OK.
The installation is now completed. Click Close to exit the installer.
Open a browser and type in the Enterprise Manager URL.
Login as user system (use the system password you set during the database installation).
You can see your Database 12c up and running.