Monday Feb 15, 2010

Installing Oracle 11gR2 for x86 on Solaris



Oracle 11gR2 for x86 on Solaris is a winning combination!


Good Stuff!



 Last week I wrote a blog regarding Oracle 10g on Solaris, the title was:


Installing Oracle 10g for x86 on Solaris
(http://blogs.sun.com/michel/entry/oracle_10g_solaris_10)

I got some feed back asking if this problem still comes up when installing Oracle 11gR2?


I am glad to say that Oracle 11gR2 has been released and I am happy to announce, the perceived Solaris 10 problem does not exist in Oracle 11gR2. The Oracle Installation Documentation has been corrected and updated to reflect that /etc/system parameters in Solaris 10 has been deprecated. Since Solaris 10 came out in 2005, it has been using this better and improve mechanism for managing system resources. The perceived problem was caused by the previous documentation for installing Oracle 10g. It still reflected making changes for system kernel parameters by modifying the /etc/systems file, which again has been deprecated in Solaris 10 since it came out. I am guessing the problem was initially caused because Oracle 10g came out before Solaris 10.


Today however, Oracle 11gR2 documentation reflects how to verify and use Solaris 10 Resource Management. It shows how to verify, to create and how to use and manage Solaris 10 resource projects with Oracle.   For more information and details regarding how to verify and set up Solaris 10 System Kernel parameters for Oracle 11gR2, please check the Oracle installation documentation as follows:


Oracle® Database


Quick Installation Guide 11g Release 2 (11.2) for Solaris Operating System (x86-64)
http://download.oracle.com/docs/cd/E11882_01/install.112/e16362.pdf

Once you get the install documentation, please scroll down to chapter 6 for details. Below is an example snippet of the chapter title including the introduction paragraph that discusses configuring system kernel parameters for satisfying Oracle 11gR2 pre-requisites:


6 Configuring Kernel Parameters on Solaris 10


On Solaris 10, verify that the kernel parameters shown in the following table are set to values greater than or equal to the recommended value shown. The table also contains the resource controls that replace the /etc/system file for a specific kernel parameter. As Oracle Database does not set project information when starting processes, some /etc/system processes that are deprecated but not removed must still be set for Oracle Database.

The installation documentation basically goes through the steps for verifying system kernel parameter pre-requisites for installing Oracle 11gR2 on x86 for Solaris (much like I did in my previous blog for Oracle 10g).  


So the installation should now be simple and straight forward. A happy installer makes for happy installations! Now go have some fun!




Wednesday Feb 10, 2010

Installing Oracle 10g for x86 on Solaris


Oracle 10g and Solaris 10 a great combination!

Like many things, I created this documented out of necessity.  It contains information found in the Oracle installation documentation and somethings not clearly documented.   The problem was literally getting my installation started.  I encountered this problem while trying to install Oracle on a Solaris virtual machine on the X86 platform.   What happen is Oracle was failing to install because the Oracle Installer was not seeing the required Oracle system kernel parameters it needed.

So is it a Solaris 10 bug?  Is it an Oracle bug?
Answer:  Neither


It is really a combination of things:


A)  Oracle 10g came out in 2003 and Sun has improved how system parameters are configured in Solaris 10 which came out in 2005 (Note - for some strange reason the Oracle 10g installer on SPARC systems does not fail)

B) It is a misunderstanding of how Solaris 10 works.  Not understanding how system parameters in Solaris 10 works can make things a little challenging to say the least.


It is my hope and my intent that this article will help to make your install go easier and help you avoid this confusion as you get started with your Oracle installation on Solaris.    

There are some things that you need to understand about Solaris 10 and Oracle 10g that may not be so straight forward at first glance.  For example in the old days when you needed to change system parameters in Solaris before installing an Oracle database you just edited the /etc/systems file.  This is well documented and what you will find it documented in the Oracle installation documentation.  This really works well for Solaris 8 and Solaris 9.   In Solaris 10 system parameters are set through a different mechanism using Solaris 10 resource management.  Solaris Resource Management makes use of and requires understanding Solaris Resource Control Projects; the intent here is to help you understand how to make those system kernel parameter changes required for Oracle.

The basis for my article and my gratitude go to Aziz for his blog that help me to get started (http://saifulaziz.wordpress.com/2007/09/04/step-install-oracle-10g-r2-on-solaris-10-x86/).   So before we get too far ahead of ourselves, the following are the steps I followed to successfully install Oracle 10g on Solaris 10 X86.

Checked For Oracle Prerequisites And Install Requirements
Create Oracle Users, Groups & Profile
Configure Solaris 10 System Parameters Using Resource Control Projects
Run Oracle 10g Installer
Oracle Web Administration
Uninstall Oracle 10g

Checking Oracle Prerequisites and Install Requirements

Here we are just checking for the prerequisites found in the Oracle Installation Documentation.

Check Ram:
#/usr/sbin/prtconf | grep Memory

Check Swap:
# /usr/sbin/swap -s

Check /tmp is greater than 400mb:
# df -h /tmp

Check Solaris Version:
# uname -r

Check for required installed Solaris packages:
# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibm SUNWlibms SUNWsprot SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt

Check to nsswitch.conf configuration parameters:
# cat /etc/nsswitch.conf | grep hosts

Check host name:
# hostname

Create Oracle Users, Groups & .Profile

Create group name “dba”, oracle inventory group “oinstall” and “oracle” user according to your company standards, and if none, this is what I used for testing purposes.
Check to see if groups oinstall & dba exist, if they do not create them
# /usr/sbin/groupadd oinstall

# /usr/sbin/groupadd dba
Check to see if  Oracle user exists, if not create it
# useradd -u 101 -g 101 -G 100 -d /export/home/oracle -s /usr/bin/bash -c Oracle -m oracle
# id -a oracle
uid=101(oracle) gid=101(dba) groups=100(oinstall)

Then set oracle password
# passwd -r files oracle

Then use vi to edit the .profile and add the following
#vi /export/home/oracle/.profile
umask 022
TMP=/tmp
TMPDIR=$TMP
DISPLAY=localhost:0.0
export TMP TMPDIR DISPLAY
ORACLE_BASE=/u01/app/oracle/ [replace with your Oracle base Directory]
ORACLE_HOME=/u01/app/oracle/10.2.0/db1 [replace with your Oracle home Directory]
ORACLE_SID=orcl [replace with your database]
PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH

Note: The above directory structure is what I used for installing Oracle 10g for my testing, please define your own or use your company standards as required.

Configure Solaris 10 System Parameters Using Resource Control Projects

As the root user, issue the following command to create a new resource project
#projadd oracle

Append the following line to the "/etc/user_attr" file.
oracle::::project=oracle

then
#su – oracle
$ id -p
uid=101(oracle) gid=101(dba) projid=100(oracle)
$ prctl -n project.max-shm-memory -i project oracle
project: 100: oracle
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
project.max-shm-memory
        privileged       254MB      -   deny
        system          16.0EB    max   deny     

To set the kernel system value for the shared memory parameter open another root shell and perform the following two commands,  make sure at least one terminal session is still logged in as the oracle user.  Then from the root user shell issue these commands to set shared memory to 4GB.

# prctl -n project.max-shm-memory -v 4gb -r -i project oracle
# projmod -s -K "project.max-shm-memory=(priv,4gb,deny)" oracle

The first dynamically resets the value, while the second makes changes to the "/etc/project" file so the value is persistent between reboots. To see changes to /etc/project perform the following

# cat /etc/project
system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
oracle:100::::project.max-shm-memory=(priv,4294967296,deny)
#

Now to go back to the oracle shell command terminal and type the following again to see that the project information has been update to 4B for the shared memory kernel system parameter.

$ prctl -n project.max-shm-memory -i project oracle
project: 100: oracle
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
project.max-shm-memory
        privileged       4.00GB      -   deny
        system          16.0EB    max   deny     
If you've performed a new default Solaris installation, it is likely that this is the only system kernel parameter you need to set is "max-shm-memory" for Oracle 10g.

Run Oracle 10g Installer

The Oracle installer seems for some reason acts as it does not recognize the system parameter set using resource control projects, so when asked to verify, do so and continue with installation, these are only warnings that you must confirm you have checked.  Performing the Oracle Installation is pretty simple and straight forward just perform the following to allow installer to set a display and then run the Oracle installer as shown in the Oracle Installation Documentation.
#su – oracle
$xhost +
$export DISPLAY=localhost;0.0
$ xhost +<your-remote-pc-ipaddress
$ cd /opt/oracle/[which ever directory you unzipped Oracle 10g install bits]
$./runInstaller

I created the directory structure as was documented above  in my .profile for the user oracle.   The instance for the database I created was named “orcl” and my SID is “orcl.”  Once the database has installed it will ask you to finalize the installation by opening a root terminal shell and running the following commands, the path of these will vary depending on what you used for you directory structure.  For my installion these scripts were located as follows.
#/u01/app/oracle/oraInventory/orainstRoot.sh
#/u01/app/oracle/10.2.0/db1/root.sh
Once the database installation has finished it will give you information of where things are at, allow you to set up Oracle Database Instance passwords and give information for doing Database Administration via the web-based Enterprise Manager database administration tool)

Oracle 10g Web Administration

To begin web administration simply navigate to : http://localhost:1158/em and log on as SYS.
If the web administrator services is down check that the listener is running, if not started, open a terminal shell and login as oracle and start listener and then start the web console.
# su – oracle
$ lsnrctl start

$ emctl start dbconsole

Uninstall Oracle 10g

Open terminal shell window and login as oracle user

Then remove all databases by running

$dbca

Then stop oracle Database Web Console

$ORACLE_HOME/bin/emctl stop dbconsole

Then stop the Oracle listener

$ORACLE_HOME/bin/lsnrctl stop

Stop iSQL\*Plus

$ORACLE_HOME/bin/isqlplusctl stop

Stop Ultra Search

$ORACLE_HOME/bin/searchctl stop

Start Oracle Universal installer and deinstall Oracle home and products that you want to remove

$ORACLE_HOME/oui/bin/runInstaller

About

Wences is interested in data center technologies including Web 2.0, Cloud Computing, Eco Computing, Solaris 10, OpenSolaris, Information Security and Server Virtualization.

Search

Archives
« February 2010
SunMonTueWedThuFriSat
 
1
2
3
4
5
6
7
8
9
11
12
13
14
16
17
18
19
20
21
22
23
24
25
26
27
28
      
       
Today