In this post, I’m installing the Oracle Database 11g Release 2 (184.108.40.206) software on Oracle Linux 6.4, along with optional instructions on how to apply the latest Patch Set Update (PSU) to your new Oracle home.
First and foremost, before you start, make sure your Linux server meets the minimum hardware requirements:
- 1GB of RAM (plus appropriately sized swap space)
- 4.5GB of disk space for the software installation
- 1GB of disk space for your /tmp directory
More details around the requirements can be found here.
Once you’ve installed and configured Linux appropriately (see my Linux installation post here), make sure that the ‘oracle’ user has correct ownership of the /u01 mount point:
chown -R oracle:oinstall /u01 chmod -R 775 /u01
…and that the ‘oracle’ account has a password set.
Package and OS requirements
In this example, I’m meeting the package and Operating System requirements by running the following yum command (as root):
yum install oracle-rdbms-server-11gR2-preinstall
This pre-install package will meet the necessary configuration tasks for you, and whilst the name implies it’s for installing Oracle Database Server 11gR2 software, it’s also a useful starting point to prepare your system for installing other Oracle software 😉
If you don’t install the package bundle above, then you’ll have to meet all of the required prerequisites manually, by working through the Oracle documentation here… which involves a lot more effort…
Also, make sure that the ‘/etc/hosts’ file contains a Fully Qualified Domain Name (FQDN) for your server, for example:
127.0.0.1 localhost.localdomain localhost 192.168.28.13 linux03.vbox linux03
Once that’s done, you’re ready to download the software…
Download the ‘patch’ software
Currently, the Oracle Database 220.127.116.11 files are not available to download from the usual Oracle Technology Network (OTN) area, instead you have to log into My Oracle Support (MOS) and search for patch number ‘10404530’. It’s probably worth mentioning at this point, that the ‘patch’ is a full install, despite the reference – so you don’t need to download Oracle Database 18.104.22.168 files in addition here 😉
Once you’ve searched for the ‘patch’, select the link appropriate to your platform, in this case ‘Linux x86-64’. When you click download, there will be a total of 7 zip files available. For a standard installation, you only need zip parts 1 and 2…
- p10404530_112030_platform_1of7.zip (Oracle Database, including Oracle RAC components)
- p10404530_112030_platform_2of7.zip (Oracle Database, including Oracle RAC components)
- p10404530_112030_platform_3of7.zip (Oracle Grid Infrastructure, includes: Oracle ASM, Oracle Clusterware, Oracle Restart)
- p10404530_112030_platform_4of7.zip (Oracle Database Client)
- p10404530_112030_platform_5of7.zip (Oracle Gateways)
- p10404530_112030_platform_6of7.zip (Oracle Examples)
- p10404530_112030_platform_7of7.zip (Deinstall)
Once you’ve downloaded the software, unzip both files to a staging area:
unzip /tmp/p10404530_112030_Linux-x86-64_1of7.zip -d /u01/app/oracle/software unzip /tmp/p10404530_112030_Linux-x86-64_2of7.zip -d /u01/app/oracle/software
All of the contents from the above will be extracted to a “database” directory.
Start the installer
Open an X-Windows session to the server as the ‘oracle’ user.
Once you’ve met the requirements, and have unzipped the software, you can start the install:
Once the GUI starts, respond as follows:
- Configure Security Updates
- Uncheck ‘I wish to receive security updates via My Oracle Support’
- Confirm with ‘Yes’
- Download Software Updates
- Skip software updates
- Installation Option
- Install database software only (you can opt to create a database instance at the same time, but I’m keeping the two separate here)
- Grid Installation Options
- Single instance database installation
- Product Languages
- Select any additional required languages and move across, otherwise leave just the default ‘English’ selected
- Database Edition
- Enterprise Edition (4.5GB) (…or as appropriate depending on which edition you’re licensed for!)
- Installation Location
- Oracle Base: /u01/app/oracle
- Software Location: /u01/app/oracle/product/22.214.171.124
- Create Inventory (first Oracle installation only)
- Inventory Directory: /u01/app/oraInventory
- oraInventory Group Name: oinstall
- Operating System Groups
- Database Administrator (OSDBA) Group: dba
- Database Operator (OSOPER) Group (Optional): dba
- Prerequisites checks
- All prerequisite checks should complete successfully here, if not, then obviously they will need addressing before proceeding
- Check everything is correct!
- Click Install
Run the root.sh script(s)
When prompted, run the following as root:
/u01/app/oraInventory/orainstRoot.sh (first Oracle installations only)
[root@linux03 ~]# /u01/app/oraInventory/orainstRoot.sh Changing permissions of /u01/app/oraInventory. Adding read,write permissions for group. Removing read,write,execute permissions for world.
[root@linux03 ~]# /u01/app/oracle/product/126.96.36.199/root.sh Performing root user operation for Oracle 11g The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/188.8.131.52 Enter the full pathname of the local bin directory: [/usr/local/bin]: <enter> 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. Finished product-specific root actions.
Finally, back to the GUI, click close to finish, and you’re all done
Update environment settings
Once the installation has finished, add the appropriate environment variables to your ‘oracle’ user profile.
For example, add this to your existing .bash_profile:
vi /home/oracle/.bash_profile # Oracle variables TMP=/tmp; export TMP TMPDIR=$TMP; export TMPDIR ORACLE_HOSTNAME=linux03.vbox; export ORACLE_HOSTNAME ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE ORACLE_HOME=$ORACLE_BASE/product/184.108.40.206; export ORACLE_HOME #ORACLE_SID=SNAP11G; export ORACLE_SID #PATH=/usr/sbin:$PATH; export PATH PATH=$ORACLE_HOME/bin:$PATH; export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
Reload your profile with the new variables:
Now you’re ready to create your database
Apply the latest PSU (220.127.116.11.6) – optional
At the time of writing this post, the latest Patch Set Update (PSU) was released in April 2013, that being patch 16056266 for PSU level 18.104.22.168.6.
Unzip the OPatch utility to your new ORACLE_HOME, and verify the version number:
export PATH=$PATH:$ORACLE_HOME/OPatch unzip -o /tmp/p6880880_112000_Linux-x86-64.zip -d $ORACLE_HOME opatch version
Unzip the PSU contents to a staging area:
mkdir $ORACLE_HOME/Patches unzip /tmp/p16056266_112030_Linux-x86-64.zip -d $ORACLE_HOME/Patches
Check for any potential patch conflicts (which for a new installation, there shouldn’t be!):
opatch prereq CheckConflictAgainstOHWithDetail -ph ./ -invPtrLoc $ORACLE_HOME/oraInst.loc
Apply the PSU patch:
opatch apply -invPtrLoc $ORACLE_HOME/oraInst.loc ... Email address/User Name: You have not provided an email address for notification of security issues. Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: y Please shutdown Oracle instances running out of this ORACLE_HOME on the local system. (Oracle Home = '/u01/app/oracle/product/22.214.171.124') Is the local system ready for patching? [y|n] y User Responded with: Y Backing up files... Patching component oracle.rdbms, 126.96.36.199.0... ... OPatch found the word "warning" in the stderr of the make command. Please look at this stderr. You can re-run this make command. Stderr output: ins_emagent.mk:113: warning: overriding commands for target `nmosudo' ins_emagent.mk:52: warning: ignoring old commands for target `nmosudo' /u01/app/oracle/product/188.8.131.52/sysman/lib/ins_emagent.mk:113: warning: overriding commands for target `nmosudo' /u01/app/oracle/product/184.108.40.206/sysman/lib/ins_emagent.mk:52: warning: ignoring old commands for target `nmosudo'
As per MOS note 1448337.1, you can safely ignore OPatch warnings if they’re like the ones above.
Check the inventory to verify the patch has been registered correctly:
$ORACLE_HOME/OPatch/opatch lsinventory -bugs_fixed | grep -i -E 'DATABASE PSU|DATABASE PATCH SET UPDATE'
Creating an Oracle 11g Database using DBCA (non-ASM)