Sep 17, 2008

Oracle 9i Installation on RH3,4,5

Overview
1. Pre-request
2. Creation of Os User (Oracle)
3. Create Corresponding Directories
4. Set Semaphore and share memory segment
5. Set the Environment Variables (.bash_profile)
6. Run the runInstaller


1. Pre - Request
You have to partition your hard drive for Linux box

> /temp - 500
> /boot - 200
> Swap - double the size of RAM (e.g.: 1 GB Ram, assign 2 GB (2048 bytes))
> / - remaining space will be assign to root

2. Creation of Os user and group

Enter into “root” user and do the following steps
] # groupadd oinstall expel oinstall is group for installing oracle software
] # groupadd dba expel dba is a group for oracle user to store database files
] # useradd -g oinstall –G dba oracle
Expl -g means that oinstall is primary group for oracle user
-G means that dba is a secondary group for oracle user
] # passwd oracle

3. Create required directories on which the oracle software will be installed.

] # mkdir -p /u01/app/oracle/product/9.2.0
Expl :make a directory
-p means will create the directory from base directory with the following directory /u01/---
] # chown -R oracle.oinstall /u01
Expl: change the ownership of oracle user to oinstall group for /u01
So here oracle software will be installed. This is your $ORACLE_HOME directory
-R means Recursive, ownership application to all directories available inside the u01
] # mkdir /var/opt/oracle
] # chown oracle.dba /var/opt/oracle
Expl: same scenario but here is used for temporary use by oracle user when using oracle
] # chmode 755 /var/opt/oracle
Expl: change the mode of your /var/... directory. It can be accessed by oracle user
7-rwx (owner), 5-rx (group), 5-rx (others).

4. Set semaphore and shared memory segments

We can set the values later also after installing oracle software. if we don’t set the value database will not be run and we can’t use DBCA also
It’s better to set the parameter early
] # cd ect\
] # VI sysctl.conf
Add these parameters
Kernel.shmmax = {half of Ur RAM}
Expl: if the RAM size is 1 GB. Give 512mb (512 x 1024 x 1024) bytes
Kernel.sem = 250 3200 100 128
Expl: you are increasing the number of process to 3200
Semmsi semmns semopm semmni
250 3200 100 128
] # cat sem –> to see the value of semaphore
] # init 6
It will restart the machine.
Now login into oracle user with password oracle.

5. Set the environment variables
Now we need to setup the environment variables in .batch_profile, so that when ever login to oracle user, he can able to use the oracle software without exporting the path.
.batch_profile is available for all users and it is hidden file also.
] $ ls –a -> will list the hidden file
] $ vi .batch_profile -> edit this file with vi command and set the following values
Export LD_ASSUME_KERNEL = 2.4.1 (not mandatory for AS 5)
Export ORACLE_BASE = /u01/app/oracle
Export ORACLE_HOME = $ORACLE_BASE/product/9.2.0
Export ORACLE_SID = demo (not mandatory)
Export ORACLE_TERM = xterm
Export NSL_LANG = American
Export ORA_NLS33 = $ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH = $ORACLE_HOME/lib: /lib: /usr/lib
LD_LIBRARY_PATH = $LD_LIBRARY_PATH:/usr/local/lib
Export PATH = $PATH: $ORACLE_HOME/bin
Export TNS_ADMIN = $ORACLE_HOME/network/admin (access to tns, listener file)
: wq –> save and exit
Restart the machine

6. Run the runInstaller

1. Extract the cd
Unzip
gunzip ship_9204_linux_disk1.cpio.gz
gunzip ship_9204_linux_disk2.cpio.gz
gunzip ship_9204_linux_disk3.cpio.gz
Unpack
cpio -idmv <>2. Run the runInstaller
] $ . /runInstaller
3. Welcome screen will appear , press NEXT
4. Inventory Location
/u01/app/oracle/orainventory - base directory
5. Unix Group Name [oinstall ]
Press NEXT; you will be prompted to run the orainstroo.sh shell script.
Run the script from the “root” user
6. File location
7. Available product components
8. Privileged operating system group
OSDBA - oradba (startup, shutdown)
OSOPER - oraoper (granted lesser privilege)
9. Summary, then run root.sh shell script.
What are the privilege enabled by the orainsta.sh are revoked by the root.sh
10. Oracle net config
Perform typical configuration
11. DBCA – automatically create a database while installing oracle s/w
12. EIO

If you need more information about the installation process. You can visit
http://www.puschitz.com/InstallingOracle9i.shtml
http://www.oracle-base.com/articles/9i/Oracle9iInstallationOnRedHatAS3.php#DownloadSoftware
http://people.redhat.com/drepper/assumekernel.html

I hope this document will help you to install oracle software on Linux box. If you find any mistakes on my installation method. Please advise me to correct the errors.


No comments: