| In this article i'm going to explain step by step installation | | | | Auto Startup and Shutdown of Database and Listener |
| of Oracle 11g Release 1 on RHEL 4 and 5,Enterprise | | | | Login as root and modify /etc/oratab file and change |
| Linux 4 and 5 by Oracle.This version is certified by | | | | last character to Y for apropriate database. |
| Oracle.Article also covers guide for Centos Linux 4 | | | | ORCL:/u01/app/oracle/product/11.1.0/db_1:Y |
| and 5. | | | | As root user create new file "oracle" (init script for |
| Guide includes: | | | | startup and shutdown the database) in /etc/init.d/ |
| 1.Pre-Installation Steps | | | | directory with following content: |
| 2.Installation | | | | #!/bin/bash |
| 3.Post-Installation Steps. | | | | # |
| Pre-Installation Steps: | | | | # oracle Init file for starting and stopping |
| 1. Create oracle users and groups.groupadd | | | | # Oracle Database. Script is valid for 10g and 11g |
| oinstallgroupadd dbagroupadd operuseradd -g oinstall | | | | versions. |
| -G dba,oper oraclepasswd oracle | | | | # |
| 2. Set Kernel Parameters | | | | # chkconfig: 35 80 30 |
| Edit /etc/sysctl.conf and add following lines.kernel.shmall | | | | # description: Oracle Database startup script |
| = 2097152kernel.shmmax = 2147483648kernel.shmmni | | | | # Source function library. |
| = 4096kernel.sem = 250 32000 100 128fs.file-max = | | | | . /etc/rc.d/init.d/functions |
| 6553600net.ipv4.ip_local_port_range = 1024 | | | | ORACLE_OWNER="oracle" |
| 65000net.core.rmem_default = | | | | ORACLE_HOME="/u01/app/oracle/product/11.1.0 |
| 4194304net.core.rmem_max = | | | | db_1"case "$1" instart)echo -n $"Starting Oracle DB:"su |
| 4194304net.core.wmem_default = | | | | - $ORACLE_OWNER -c "$ORACLE_HOME/bin |
| 262144net.core.wmem_max = 262144execute sysctl | | | | dbstart $ORACLE_HOME"echo "OK" |
| command | | | | ;;stop)echo -n $"Stopping Oracle DB:"su - |
| # sysctl -porreboot to apply above changes. | | | | $ORACLE_OWNER -c "$ORACLE_HOME/bin |
| For RedHat (OEL, Centos, WBL) 4 version: Edit the | | | | dbshut $ORACLE_HOME"echo "OK" |
| etc/pam.d/login file and add following line:session | | | | ;; |
| required /lib/security/pam_limits.so | | | | *)echo $"Usage: $0 {start|stop}"esac |
| For RedHat (OEL, Centos) 5 version: Edit the /etc | | | | Execute (as root) following commands (First script |
| pam.d/login file and add following line:session required | | | | change the permissions, second script is configuring |
| pam_limits.so | | | | execution for specific runlevels):chmod 750 /etc/init.d |
| Edit the /etc/security/limits.conf file and add following | | | | oraclechkconfig --add oracle --level 0356 |
| lines:oracle soft nproc 2047oracle hard nproc | | | | Auto Startup and Shutdown of Enterprise Manager |
| 16384oracle soft nofile 1024oracle hard nofile 65536 | | | | Database Control |
| 3. Creating oracle directoriesmkdir -p /u01/app/oracle | | | | As root user create new file "oraemctl" (init script for |
| product/11.1.0/db_1chown -R oracle:oinstall /u01chmod | | | | startup and shutdown EM DB Console) in /etc/init.d/ |
| -R 775 /u01 | | | | directory with following content: |
| 4. Setting Oracle Enviroment | | | | #!/bin/bash |
| Edit the /home/oracle/.bash_profile file and add | | | | # |
| following lines: | | | | # oraemctl Starting and stopping Oracle Enterprise |
| ORACLE_BASE=/opt/oracle | | | | Manager Database Control. |
| ORACLE_HOME=$ORACLE_BASE/product/11.1.0 | | | | # Script is valid for 10g and 11g versions. |
| db_1 | | | | # |
| ORACLE_SID=ORCL | | | | # chkconfig: 35 80 30 |
| LD_LIBRARY_PATH=$ORACLE_HOME/lib | | | | # description: Enterprise Manager DB Control startup |
| PATH=$PATH:$ORACLE_HOME/binexport | | | | script |
| ORACLE_BASE ORACLE_HOME ORACLE_SID | | | | # Source function library. |
| LD_LIBRARY_PATH PATH | | | | . /etc/rc.d/init.d/functions |
| Save the .bash_profile and execute following | | | | ORACLE_OWNER="oracle" |
| commands to load new user enviroment:cd /home | | | | ORACLE_HOME="/u01/app/oracle/product/11.1.0"case |
| oracle | | | | "$1" instart)echo -n $"Starting Oracle EM DB |
| . .bash_profile | | | | Console:"su - $ORACLE_OWNER -c |
| Login as root and issue the following command:xhost + | | | | "$ORACLE_HOME/bin/emctl start dbconsole"echo |
| Some additional packages are required for succesful | | | | "OK" |
| instalation of Oracle software. To check wheter | | | | ;;stop)echo -n $"Stopping Oracle EM DB Console:"su - |
| required packages are installed on your operating | | | | $ORACLE_OWNER -c "$ORACLE_HOME/bin/emctl |
| system use following command:rpm -q binutils elfutils | | | | stop dbconsole"echo "OK" |
| elfutils-libelf gcc gcc-c++ glibc glibc-common glibc-devel | | | | ;; |
| compat-libstdc++-33 cpp make compat-db sysstat | | | | *)echo $"Usage: $0 {start|stop}"esac |
| libaio libaio-devel unixODBC unixODBC-devel|sort | | | | Execute (as root) following commands (First script |
| Installation: | | | | change the permissions, second script is configuring |
| Download the Oracle 11g release 1 (11.1.0.6.0) software | | | | execution for specific runlevels):chmod 750 /etc/init.d |
| from Oracle website. | | | | oraemctlchkconfig --add oraemctl --level 0356 |
| Extract the files using following command:unzip | | | | You may consider to use rlwrap for comfortable work |
| linux_11gR1_database.zip | | | | with sqlplus and adrci utility. RPM package for RedHat |
| Now the system is prepared for Oracle software | | | | compatible (x86) distribution you can download here.su |
| installation. To start the installation process go to | | | | - |
| database directory and execute the following | | | | # rpm -ivh rlwrap-0.24-rh.i386.rpm |
| commands:cd database | | | | # exitecho "alias sqlplus='rlwrap sqlplus'" >> /home |
| ./runInstaller | | | | oracle/.bash_profileecho "alias adrci='rlwrap adrci'" |
| Click here for screenshot | | | | >> /home/oracle/.bash_profile |
| Post-Instalation: | | | | . /home/oracle/. |