Turing's Man Blog
- Last Updated on Sunday, 24 February 2013 21:55
- Published on Sunday, 30 December 2012 22:33
- Written by Pawel Wawrzyniak
- Hits: 40418
We have configured our fresh Oracle Solaris 11.1 (x86/64-bit) installation. Now we can start preparations for Oracle Database 11gR2 binaries installation. Let's check all the prerequisites – as presented in the official documentation – and then run the installation process with Oracle Universal Installer (OUI).
The most important documents for us are:
- Oracle Database Installation Guide 11g Release 2 (11.2) for Oracle Solaris
- Oracle Database Quick Installation Guide 11g Release 2 (11.2) for Oracle Solaris on x86-64 (64-Bit)
First of all, let's check the RAM requirements. According to documentation, a minimum is 1 GB and recommended amount of RAM is 2 GB or more. We set 2 GB for our virtual machine, so it's good, but anyway – use root role:
root@turingsman:~# prtconf | grep "Memory size"
Memory size: 2000 Megabytes
2000 Megabytes – OK.
Now, let's check the swap space. The rule is that for RAM size between 1 GB and 2 GB, the swap size should be equal to 1.5 times the size of RAM. If there is more than 2 GB RAM and less than 16 GB, then the swap size should be equal to the RAM size. If there is more than 16 GB of RAM, our swap size shouldn't be bigger than 16 GB.
Execute the following command:
root@turingsman:~# swap -lh
swapfile dev swaplo blocks free
/dev/zvol/dsk/rpool/swap 274,2 4K 2.0G 2.0G
2 GB is enough. If you have less than 2 GB, please refer to the ZFS documentation and expand swap to required size – the process of adjusting size of swap on an active system is very well documented in "Solaris Internals".
Now, for the sake of curiosity (and integrity of this tutorial), let's check for the system architecture:
root@turingsman:~# isainfo -kv
64-bit amd64 kernel modules
Good! Of course, this is supported architecture.
We will need at least 1 GB in the /tmp directory. Therefore, let's check it:
root@turingsman:~# df -h /tmp
Filesystem Size Used Available Capacity Mounted on
swap 2.5G 128M 2.4G 6% /tmp
OK. We've enough space. Otherwise, it should be expanded – refer to "Solaris Internals".
Our Oracle Database 11gR2 runtime files (binaries) will require about 5 GB, so it's important to select a proper volume with enough free space. If you created at least 30 GB hard drive for your virtual machine in VirtualBox, as it was recommended several times before – it's Ok. Otherwise, please refer to part 4A of this series.
Now, there is the most important information in official Oracle Database 11gR2 installation guide: no special kernel parameters, packages, or patches are required at the time of this release for Oracle Solaris 11.
Seems that the whole Oracle Database 11gR2 installation process on Oracle Solaris 11.1 is much easier than when compared to Oracle Solaris 10 or supported Linux distributions. I strongly recommend to follow the official documentation. However, as I made some additional modifications using Oracle Solaris projects feature I'll present them later in this article.
Alright. Enough about parameters, packages or patches (still, as I was experimenting with the whole thing, I made some more/less rational decisions myself – I'll present these modifications later).
We have to check what version of Solaris and what update level we’re using – to be sure we're compliant with the Oracle requirements:
root@turingsman:~# uname -a
SunOS turingsman 5.11 11.1 i86pc i386 i86pc
root@turingsman:~# uname -r
root@turingsman:~# cat /etc/release
Oracle Solaris 11.1 X86
Copyright (c) 1983, 2012, Oracle and/or its affiliates. All rights reserved.
Assembled 19 September 2012
Everything is OK.
We assume that there are no other Oracle products installed on this machine. This is the first installation, so we now have to create some required groups and users:
# groupadd oinstall
# groupadd dba
# useradd -d /export/home/oracle -m -s /bin/bash -g oinstall -G dba oracle
This command creates the oracle user and specifies "oinstall" as the primary group and "dba" as the secondary group.
Enter the following command to set the password of the oracle user:
root@turingsman:~# passwd -r files oracle
New Password: [type your favorite password]
Re-enter new Password: [re-type your favorite password]
passwd: password successfully changed for oracle
Check the shell limits:
root@turingsman:~# ulimit -t
root@turingsman:~# ulimit -f
root@turingsman:~# ulimit -d
root@turingsman:~# ulimit -s
root@turingsman:~# ulimit -n
root@turingsman:~# ulimit -v
Almost good. Oracle recommends the following minimum values for STACK (-s) = 32768 and NOFILES (-n) = 4096 limits. Tune them with the following commands:
root@turingsman:~# ulimit –s 32768
root@turingsman:~# ulimit –n 4096
You can check that limits were changed with the previous commands again (ulimit –s, ulimit –n).
To have these changes permanent, you should define the limits in /etc/system or use Oracle Solaris projects feature.
Now, I've unfortunately made some additional changes with the projects feature of Oracle Solaris. You can follow my way to stay compliant with the record of this exercise. Perform the following commands:
root@turingsman:~# projadd -U oracle -K "project.max-shm-memory=(priv,6g,deny)" user.oracle
root@turingsman:~# projmod -sK "project.max-sem-nsems=(priv,512,deny)" user.oracle
root@turingsman:~# projmod -sK "project.max-sem-ids=(priv,128,deny)" user.oracle
root@turingsman:~# projmod -sK "project.max-shm-ids=(priv,128,deny)" user.oracle
root@turingsman:~# projmod -sK "project.max-shm-memory=(priv,6g,deny)" user.oracle
root@turingsman:~# ndd -set /dev/tcp tcp_smallest_anon_port 9000
root@turingsman:~# ndd -set /dev/tcp tcp_largest_anon_port 65500
/ root@turingsman:~# ndd -set /dev/udp udp_smallest_anon_port 9000
root@turingsman:~# ndd -set /dev/udp udp_largest_anon_port 65500
root@turingsman:~# projmod -sK "process.max-file-descriptor=(priv,65536,deny)" user.oracle
Put in /etc/inittab the following lines for the TCP and UDP parameters to be sure that changes will be persistent among reboots:
tm::sysinit:/usr/sbin/ndd -set /dev/tcp tcp_smallest_anon_port 9000 > /dev/console
tm::sysinit:/usr/sbin/ndd -set /dev/tcp tcp_largest_anon_port 65500 > /dev/console
tm::sysinit:/usr/sbin/ndd -set /dev/udp udp_smallest_anon_port 9000 > /dev/console
tm::sysinit:/usr/sbin/ndd -set /dev/udp udp_largest_anon_port 65500 > /dev/console
Now, we have to create required directories:
root@turingsman:~# mkdir -p /u01/app/oracle
root@turingsman:~# mkdir -p /u02/oradata
Assign the required owners:
# chown -R oracle:oinstall /u01
# chown -R oracle:oinstall /u02
And change permissions:
# chmod -R 775 /u01
# chmod -R 775 /u02
Now, customize bash profile with the following variables (use vi editor to create ".bash_profile" file for oracle user):
export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH
Please note, we assume that Bash (Bourne-again shell) will be used by oracle user. So, log to the oracle account now:
# su – oracle
And run vi editor with the ".bash_profile" file for edition:
-bash-4.1$ vi .bash_profile
Now, put all the lines presented above into the file in vi editor and save file (hit "Esc" key, then hit "w" and "q" keys to perform write and quit operation). However, at this stage this can be tricky as all the paths presented in the ".bash_profile" file are to be created by Oracle Universal Installer (OUI). These paths don't exist at this stage of installation. Please only note, that if we change the paths in OUI we have to edit ".bash_profile" too. Also, our Oracle Database 11gR2 installation should be planned, so we can assume that the following paths pattern will be copied in OUI (this is our plan).
Now, we can copy the installation packages and unzip them for oracle user. So, login as oracle (if not logged in already) and create a directory for installation packages. This can be anywhere – we just have to remember that we will require a few GBs of space for zipped installation packages and unzipped content. For example, this can be done the following way:
root@turingsman:~# su - oracle
Oracle Corporation SunOS 5.11 11.1 September 2012
-bash-4.1$ mkdir orainstall
-bash-4.1$ cd orainstall
So, copy the installation packages to "orainstall" directory:
-bash-4.1$ cp /mnt/* orainstall/
Check we have both installation packages:
We can now unzip both of them here:
-bash-4.1$ unzip /mnt/solaris.x64_11gR2_database_1of2.zip –d /export/home/oracle/orainst
-bash-4.1$ unzip /mnt/solaris.x64_11gR2_database_2of2.zip –d /export/home/oracle/orainst
After a while, we should have a "database" directory available. Let's check it:
-bash-4.1$ ls -la
drwxr-xr-x 3 oracle oinstall 3 Dec 26 01:07 .
drwxr-xr-x 3 oracle oinstall 10 Dec 26 01:07 ..
drwxr-xr-x 8 oracle oinstall 10 Nov 24 2009 database
Before I ran Oracle Universal Installer (OUI) from database directory for good, I did some additional changes in the operating system. I installed JDK7 (with Add More Software tool – available directly from the Gnome desktop). Also, I installed SUNWmfrun package – to avoid possible error about Motif libraries. You can do the same to stay compliant with our exercise.
Also, some experts say that this is not required to export DISPLAY variable when OUI is executed locally. Well, seems this statement is not true. I had to export DISPLAY variable to avoid OUI errors during initial prerequisites check. This can be done with the following command from oracle user (Bash):
-bash-4.1$ DISPLAY=turingsman:0.0; export DISPLAY
Change "turingsman" with the name of your server, of course.
Now, we can run the famous Oracle Universal Installer – remember to be logged in on oracle user account. Let's check we have all we need in the database directory:
-bash-4.1$ cd database/
-bash-4.1$ ls -la
drwxr-xr-x 8 oracle oinstall 10 Nov 24 2009 .
drwxr-xr-x 3 oracle oinstall 3 Dec 26 01:07 ..
drwxr-xr-x 12 oracle oinstall 15 Nov 18 2009 doc
drwxr-xr-x 4 oracle oinstall 14 Nov 24 2009 install
drwxr-xr-x 2 oracle oinstall 5 Nov 24 2009 response
drwxr-xr-x 2 oracle oinstall 2 Nov 24 2009 rpm
-rwxr-xr-x 1 oracle oinstall 6513 Nov 24 2009 runInstaller
drwxr-xr-x 2 oracle oinstall 3 Nov 24 2009 sshsetup
drwxr-xr-x 14 oracle oinstall 30 Nov 24 2009 stage
-rw-r--r-- 1 oracle oinstall 5400 Nov 17 2009 welcome.html
Be sure to run the OUI from oracle user session in Gnome:
That's all for now. We will continue with the Oracle Universal Installer in the part 5 of this series.