Login as root:
1) Create required groups and user
[root@localhost ~]# /usr/sbin/groupadd oinstall
[root@localhost ~]# /usr/sbin/groupadd dba
Now, add oracle user whose primary group is oinstall and secondary group is dba
[root@localhost ~]# /usr/sbin/useradd -g oinstall -G dba oracle
[root@localhost ~]# 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.
2) Configure kernel parameters. Add the lines that are highlighted in blue:
[root@localhost ~]# vi /etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 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
To review that you have entered correct values, use the following command:
[root@localhost ~]# /sbin/sysctl -p
3) Set the shell limits for 'oracle' user (to increase the performance of software on Linux). Add the lines that are highlighted in blue:
[root@localhost ~]# vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
where nofile - max number of open files
nproc - max number of processes
"soft" for enforcing the soft limits
"hard" for enforcing hard limits
4) Add or edit the following line in /etc/pam.d/login file:
[root@localhost ~]# vi /etc/pam.d/login
session required /lib/security/pam_limits.so
5) Depending on the 'oracle' user's default shell, make changes to default shell start-up file:
To know your default shell:
[root@localhost ~]# echo $0
bash
[OR]
[root@localhost ~]# echo $SHELL
/bin/bash
For Bourne, Bash, or Korn shell, add the highlighted lines in blue to /etc/profile file
[root@localhost ~]# vi /etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/bash" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
6) Identify the required software directories. You must identify or create the following directories for Oracle software:
Oracle Base Directory: /u01/app/oracle
Oracle Home Directory: $ORACLE_BASE/product/10.2.0.1/db_1
Oracle Inventory Directory: $ORACLE_BASE/oraInventory
7) Set appropriate permissions on the Base directory:
[root@localhost ~]# chown -R oracle:oinstall /u01/app/oracle
[root@localhost ~]# chmod -R 775 /u01/app/oracle
8) Create directories for Database and Recovery files and set appropriate permissions on them:
[root@localhost ~]# mkdir /u03/oradata
[root@localhost ~]# chown oracle:oinstall /u03/oradata
[root@localhost ~]# chmod 775 /u03/oradata
[root@localhost ~]# mkdir /u06/flash_recovery_area
[root@localhost ~]# chown oracle:oinstall /u06/flash_recovery_area
[root@localhost ~]# chmod 775 /u06/flash_recovery_area
9) If you choose to create a database during the installation, then make sure to shutdown any existing listeners before starting the installer.
10) Check to see if you have all the required packages installed:
[root@localhost ~]# rpm -q
binutils.i386
compat-gcc-7.3-2.96.128.i386
compat-gcc-c++-7.3-2.96.128.i386
compat-libstdc++-7.3-2.96.128.i386
compat-libstdc++-devel-7.3-2.96.128.i386
cpp.i386
gcc.i386
gcc-c++.i386
glibc.i386
glibc-common.i386
glibc-devel.i386
glibc-headers.i386
glibc-kernheaders.i386
libstdc++.i386
libstdc++-devel.i386
libaio
libai-devel.i386
pdksh.i386
setarch.i386
sysstat.i386
If you don't see any of the package, you can install them from the installation media.
[root@localhost ~]#rpm -ivh
To upgrade the package:
[root@localhost ~]#rpm -Uvh
To remove the package:
[root@localhost ~]#rpm -e
[oracle@localhost ~]$ vi .bash_profile
umask 022
[oracle@localhost ~]$ . ./.bash_profile
Run 'runInstaller' from the installation media
[oracle@localhost ~]$ ./runInstaller
During the installation process, run the configuration scripts as suggested by the installer as 'root' user.
Post-Installation Tasks:
After successful installation of Oracle software, set user specific environment and startup programs
[oracle@localhost ~]$ vi .bash_profile
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/local/lib
PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export PATH
export ORACLE_BASE
export ORACLE_HOME
export LD_LIBRARY_PATH
[oracle@localhost ~]$ . ./.bash_profile
You should now able to work with the Oracle 10g database :)
No comments:
Post a Comment