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

Comments:

"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."

And it is my hope Oracle RDBMS will come PREINSTALLED / BUNDLED with the Solaris OS, like MySQL and PostgreSQL are now.

And not just preinstalled, I mean packaged as SVR4 packages and integrated into SMF!

It would save me tons of system engineering on Oracle I'm doing now (packaging and SMF integration), and that's what the added value is all about.

Posted by guest on February 11, 2010 at 05:01 AM CST #

Thanks for your input, always appreciate the feedback. I apologize for not being able to answer your question as I am not sure what the plans or the what is on the roadmap for Oracle RDBMS and Solaris bundling if any. I will pass along your suggestions as I agree with you that it would provide value add as you state. Thanks!

Posted by Wences Michel on February 11, 2010 at 05:36 AM CST #

I think I am the other for I said. Thank you!.

Posted by Frederick Benjamin-Flintstone on July 30, 2010 at 06:43 PM CDT #

Thanks for a great article. I have been trying to install Oracle on a virtual Solaris x64 machine for some time now, and this was exactly to the point --- especially the resource and kernel parameters caused me no end of confusion.

I agree with the other commenters about Oracle coming pre-installed or as packages. One other thing, though --- a downloadable virtual image with Solaris 10 and Oracle 10g (and/or 11g for t hat matter) would also be really cool

Jacob

Posted by Jacob Lorensen on August 12, 2010 at 09:20 PM CDT #

Post a Comment:
  • HTML Syntax: NOT allowed
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
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today