September 20th, 2011, 04:29 AM
How to install Oracle 10g on Linux
steps to install 10g release 2 on redhat linux 5:-
1. create os groups
-g gid The numerical value of the group ID. This value must be unique, unless the -o option is used. The value must be non-negative. The default is to use the smallest ID value greater than 500 and greater than every other group. Values between 0 and 499 are typically reserved for system accounts.
login as root
[root@seat102 ~]# groupadd -g 501 dba
This command places an entry in /etc/group directory where etc is folder and group is filename(text file)
To check group dba is created fire the following command
[root@seat102 ~]# grep dba /etc/group
This file 'group' under /etc directory contains list of all groups in the system along with their id's so dba group along with 501 id is stored there.
2. create oracle user owner of oracle software and assign password:
Do not run the installer as the 'root' user,separate user required commonly named 'oracle'.This 'oracle' user must be the member of DBA group.
The numerical value of the user ID. This value must be unique, unless the -o option is used. The value must be non-negative. The default is to use the smallest ID value greater than 99 and greater than every other user. Values between 0 and 99 are typically reserved for system accounts.
The group name or ID for a new user initial group. The named group must exist, and a numerical group ID must have an existing entry .
[root@seat102 ~]#useradd -u 101 -g dba oracle
that is oracle user is created with default group dba and also /home/oracle directory is created which is home directory for oracle user.
to check this is done successfully do following
[root@seat102 ~]#grep oracle /etc/passwd
this file 'passwd' under /etc directory contains the list of all users with userid and their respective groupid.
create password for user oracle
[root@seat102 ~]#passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
3. creating and changing mode of apache user
Apache user owns HTTP server software but the user is automatically created when u install operating system.
[root@seat102 ~]#grep apache /etc/passwd
note that here uid is 48 and also gid is 48 now change gid to 501 (of dba group)
Before installing oracle set the primary group to the dba group for this apache user until the installation is complete.
[root@seat102 ~]#usermod -g dba apache
[root@seat102 ~]#grep apache /etc/passwd
Note that here groupid has changed to 501 that is apache user is now member of dba group.
4. creating directory structures:
[root@seat102 ~]# cd /
enters into root directory
[root@seat102 /]# mkdir -p u01
This command makes parent (-p) directory u01
Now make directory app under u01
[root@seat102 /]# cd u01
[root@seat102 u01 ]# mkdir app
Now make directory oracle under app
[root@seat102 u01 ]# cd app
[root@seat102 app]# mkdir oracle
[root@seat102 app]# cd
Now for /u01/app/oracle directory owner is root so we have to change the ownership to 'oracle' user
[root@seat102 ~]# ls -l
to check the ownership
To change the ownership
[root@seat102 /]#chown -R oracle:dba u01
Here -R stands for recursive i.e. it also changes ownership of directories inside u01 (app and oracle)
[root@seat102 /]# ls -l
5. Setting oracle environment variables:
[root@seat102 ~]# cd /home/oracle
[root@seat102 ~]# ls
doesnt show anything as files are hidden, inorder to see hidden files type -a along with ls command.
[root@seat102 ~]#ls -a
shows .bashrc file and to check permission on file
[root@seat102 ~]# ll -a
will display all files along with permissions and now edit this file for setting env variables.
[root@seat102 ~]#vi .bashrc (or vim .bashrc)
inorder to insert in this file press 'i' then edit following
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
It is case sensitive so be careful and write this same as above.And to save this changes press ESCAPE then press ':' and write wq and press enter.
6. Edit /etc/sysctl.conf file:
[root@seat102 ~]# cd /etc
[root@seat102 etc]# ls
check sysctl.conf file exists.
[root@seat102 etc]# vim sysctl.conf
now to insert in this file press 'i' and then edit following
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
then to save the settings press 'ESCAPE' then press ':' and write wq and press enter.
Inorder to have the effect of this settings restart ur system and now log in as oracle user.
7. copy the source as oracle user and change the mode of the directory.