Operating Procedure Date: Installation of 11g database in Myapps1 server. Jun. 05, 10 Rev. No: 1.0 1 Introduction Identification Procedure Number Procedure Name Installation of Oracle11G Database in Myapps1 server. Table of Contents 1 INTRODUCTION .............................................................................................................. 1 1.1 1.2 1.3 1.4 IDENTIFICATION .................................................................................................................. 1 TABLE OF CONTENTS .......................................................................................................... 1 PURPOSE ........................................................................................................................... 1 REVISION LOG .................................................................................................................... 1 Purpose This document contains information about step by step guide to Install oracle 11g database in Myapps1 server. Revision Log Revision 1.0 Date 6/5/2010 Step By Step Guide to Install oracle 11G Database. Updated By A. Manuel Description of Change Creation Confidential and Proprietary Page 1 of 23 Operating Procedure Date: Installation of 11g database in Myapps1 server. Jun. 05, 10 Rev. No: 1.0 2. Preparing the Server to Install Oracle Database creation : 2.1 : Create oracle User Account Login as root and create te user oracle which belongs to dba group. #groupadd dba # useradd -g dba -G dba oradev # passwd oradev Note : Need to request Unix admin to create the user 2.2 : Create oracle installation Directory: Create a Directory with full permission i.e. 755 # pwd #/u01 #mkdir DEV # chown –Rh oradba:dba DEV #chmod –R 755 DEV Eg: drwxr-xr-x 6 oradev dba 4096 Feb 25 20:06 DEV Note : Need to request Unix admin to create the installation directory 2.3 . Setting System parameters: Edit the /etc/sysctl.conf and add following lines: kernel.sem = 250 32000 100 128 kernel.shmmax = 2147483648 kernel.shmmni = 128 kernel.shmall = 2097152 kernel.msgmnb = 65536 kernel.msgmni = 2878 fs.file-max = 65536 net.ipv4.ip_local_port_range = 1024 65000 Step By Step Guide to Install oracle 11G Database. Confidential and Proprietary Page 2 of 23 Operating Procedure Date: Installation of 11g database in Myapps1 server. Jun. 05, 10 Rev. No: 1.0 Note: You need execute "sysctl -p" or reboot system to apply above settings. Step2.4 Create oraInventory directory : #pwd # /u01/DEV #mkdir oraInventory # chown –Rh oradba:dba oraInventory #chmod –R 755 oraInventory Eg: /u01/DEV/oraInventory Note: This directory need to be created before starting the runInstaller Step 2.5 Update the oraInventory location in oraInst.loc file: Edit the /etc/oraInst.loc and add following lines: inventory_loc=/u01/DEV/oraInventory Step 2.6 Download the media from Edelivery.oracle.com V14230-01_1of2.zip V14230-01_2of2.zip Step 2.7 Ftp the media to server and untar the cpio file Unzip V14230-01_1of2.zip Unzip V14230-01_2of2.zip Note : FTP the media to the stage location and untar the software before starting the installation. Step By Step Guide to Install oracle 11G Database. Confidential and Proprietary Page 3 of 23 Operating Procedure Date: Installation of 11g database in Myapps1 server. Jun. 05, 10 Rev. No: 1.0 Step 2.8 Create the VNC session from oracle OS account to Install the Oracle software. Eg: # su - oradev [oradev@myapps1 u01] $ vncserver [oracle@ssnunx12 stage]$ vncserver New 'myapps1.dyndns.org:1 (oradev)' desktop is myapps1.dyndns.org:1 Starting applications specified in /home/oradev/.vnc/xstartup Log file is /home/oradev/.vnc/ myapps1.dyndns.org:1 .log [oracle@ssnunx12 stage]$ vncpasswd Password: Verify: Step 2.9 login to vncserver http://myapps1.dyndns.org:5801/ Step 2.10 check if xclock is working in VNC server Step 2.11 start the runInstaller from VNC session. Cd /u01/oracle11g_software/database $ . ./runInstaller Step By Step Guide to Install oracle 11G Database. Confidential and Proprietary Page 4 of 23 Operating Procedure Date: Installation of 11g database in Myapps1 server. Jun. 05, 10 Rev. No: 1.0 3.Installation Step with Screenshot. • bellow are the screen shot after executing the RunInstaller. Step By Step Guide to Install oracle 11G Database. Confidential and Proprietary Page 5 of 23 Operating Procedure Date: Installation of 11g database in Myapps1 server. Jun. 05, 10 Rev. No: 1.0 Change ORACLE HOME location : /u01/TEST1/oracle Change the Global Database name : TEST1 Enter database password: sys Note : You need set the ORACLE_HOME different from ORACLE_BASE .i.e. both cannot be the same location Eg: ORACLE_HOME=/u01/TEST1/oracle ORACLE_BASE=/u01/TEST1 Step By Step Guide to Install oracle 11G Database. Confidential and Proprietary Page 6 of 23 Operating Procedure Date: Installation of 11g database in Myapps1 server. Step By Step Guide to Install oracle 11G Database. Confidential and Proprietary Jun. 05, 10 Rev. No: 1.0 Page 7 of 23 Operating Procedure Date: Installation of 11g database in Myapps1 server. Step By Step Guide to Install oracle 11G Database. Confidential and Proprietary Jun. 05, 10 Rev. No: 1.0 Page 8 of 23 Operating Procedure Date: Installation of 11g database in Myapps1 server. Jun. 05, 10 Rev. No: 1.0 \ Step By Step Guide to Install oracle 11G Database. Confidential and Proprietary Page 9 of 23 Operating Procedure Date: Installation of 11g database in Myapps1 server. Step By Step Guide to Install oracle 11G Database. Confidential and Proprietary Jun. 05, 10 Rev. No: 1.0 Page 10 of 23 Operating Procedure Date: Installation of 11g database in Myapps1 server. Step By Step Guide to Install oracle 11G Database. Confidential and Proprietary Jun. 05, 10 Rev. No: 1.0 Page 11 of 23 Operating Procedure Date: Installation of 11g database in Myapps1 server. Step By Step Guide to Install oracle 11G Database. Confidential and Proprietary Jun. 05, 10 Rev. No: 1.0 Page 12 of 23 Operating Procedure Date: Installation of 11g database in Myapps1 server. Step By Step Guide to Install oracle 11G Database. Confidential and Proprietary Jun. 05, 10 Rev. No: 1.0 Page 13 of 23 Operating Procedure Date: Installation of 11g database in Myapps1 server. Step By Step Guide to Install oracle 11G Database. Confidential and Proprietary Jun. 05, 10 Rev. No: 1.0 Page 14 of 23 Operating Procedure Date: Installation of 11g database in Myapps1 server. Step By Step Guide to Install oracle 11G Database. Confidential and Proprietary Jun. 05, 10 Rev. No: 1.0 Page 15 of 23 Operating Procedure Date: Installation of 11g database in Myapps1 server. Jun. 05, 10 Rev. No: 1.0 [root@myapps1 db_1]# . ./root.sh Running Oracle 11g root.sh script... The following environment variables are set as: ORACLE_OWNER= oratest3 ORACLE_HOME= /u01/TEST3/11.1.0/db_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y Copying dbhome to /usr/local/bin ... The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y Copying oraenv to /usr/local/bin ... The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n) Step By Step Guide to Install oracle 11G Database. Confidential and Proprietary Page 16 of 23 Operating Procedure Date: Installation of 11g database in Myapps1 server. Jun. 05, 10 Rev. No: 1.0 [n]: y Copying coraenv to /usr/local/bin ... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script. Now product-specific root actions will be performed. Finished product-specific root actions. Step By Step Guide to Install oracle 11G Database. Confidential and Proprietary Page 17 of 23 Operating Procedure Date: Installation of 11g database in Myapps1 server. Step By Step Guide to Install oracle 11G Database. Confidential and Proprietary Jun. 05, 10 Rev. No: 1.0 Page 18 of 23 Operating Procedure Date: Installation of 11g database in Myapps1 server. Jun. 05, 10 Rev. No: 1.0 4. Post Installation steps: 4.1 Setup environment file for newly installed Oracle Database .bash_profile export ORACLE_HOME=/u01/DEV/oracle export ORACLE_BASE=/u01/DEV export ORACLE_SID=DEV export PATH=$ORACLE_HOME/bin:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib Note: ORACLE_SID is case-censetive , set lower or Upper case. 4.2 Verify Database Connection after successful Installation: [root@myapps1]# su - oradev [oradev@myapps2 ~]$ sqlplus '/as sysdba' 4.3 Update tnsnames.ora file /u01/DEV/network/admin # tnsnames.ora Network Configuration File: /u01/oracle/DISCO/network/admin/tnsnames.ora # Generated by Oracle configuration tools. DEV= (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=myapps1.dyndns.org)(PORT=1530)) (CONNECT_DATA= (SID=DEV) ) ) Note: you need to edit the database port in tnsnames.ora file the same port assigned in Listener.ora file. 4.3 Update Listener.ora file Step By Step Guide to Install oracle 11G Database. Confidential and Proprietary Page 19 of 23 Operating Procedure Date: Installation of 11g database in Myapps1 server. Jun. 05, 10 Rev. No: 1.0 /u01/DEV/network/admin # Listener.ora Network Configuration File: /u01/DEV/network/admin/listener.ora # Generated by Oracle configuration tools. SID_LIST_DEV = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = /u01/DEV) (PROGRAM = extproc) ) ) DEV = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC9)) (ADDRESS = (PROTOCOL = TCP)(HOST = myapps1.dyndns.org)(PORT = 1530)) ) ) Note: You have to edit the Listener.ora to change the listener name to DEV, by default oracle Installation names listener as LISTENER and assign default port 1521, but when you are using more then one database in the server then we need to change the Listener name and Port number to avoid port and listener name conflict. 5 Maintainance Steps: 5.1 How to start and Shutdown the Database [root@myapps1]# su - oradev [oradev@myapps2 ~]$ sqlplus '/as sysdba' SQL> startup SQL> shutdown 5.1 How to start and Shutdown the Database Listener: Login as oradev user. [oradev@myapps2 ~]$ lsnrctl start DEV Step By Step Guide to Install oracle 11G Database. Confidential and Proprietary Page 20 of 23 Operating Procedure Date: Installation of 11g database in Myapps1 server. Jun. 05, 10 Rev. No: 1.0 [oradev@myapps2 ~]$ lsnrctl stop DEV 3. Know Issue: 3.1 ORA-00845: MEMORY_TARGET not supported on this system ORA-00845 Memory_target not supported in this system. ORA-00845: MEMORY_TARGET not supported on this system - Linux Servers [ID 465048.1] Cause On Linux systems, insufficient /dev/shm mount size for PGA and SGA. AMM (Automatic Memory Management) is a New feature in 11G which manages both SGA and PGA together. Its is managed by MMAN, same as with 10g AMM MEMORY_TARGET is used instead of SGA_TARGET MEMORY_MAX_TARGET is used instead of SGA_MAX_SIZE (defaults to MEMORY_TARGET ) Step By Step Guide to Install oracle 11G Database. Confidential and Proprietary Page 21 of 23 Operating Procedure Date: Installation of 11g database in Myapps1 server. Jun. 05, 10 Rev. No: 1.0 It uses /dev/shm on Linux If max_target set over /dev/shm size, you may get the below error message :: ORA-00845: MEMORY_TARGET not supported on this system If you are installing Oracle 11G on a Linux system, note that Memory Size (SGA and PGA), which sets the initialization parameter MEMORY_TARGET or MEMORY_MAX_TARGET, cannot be greater than the shared memory filesystem (/dev/shm) on your operating system. NOTE: This error may also occur if /dev/shm is not properly mounted. Make sure your df output is similar to the following: $ df -k Filesystem 1K-blocks Used Available Use% Mounted on ... shmfs 6291456 832356 5459100 14% /dev/shm Solution Increase the /dev/shm mountpoint size. For example: # mount -t tmpfs shmfs -o size=7g /dev/shm Also, to make this change persistent across system restarts, add an entry in /etc/fstab similar to the following: shmfs /dev/shm tmpfs size=7g 0 NOTE: You should check with your OS Administrator and/or alert.log for information on "best" size fo shm. Steps Done on server to resolve the issue: Current setting: [oratest6@myapps1 ~]$ df -h /dev/shm Filesystem Size Used Avail Use% Mounted on none 3.0G 705M 2.3G 24% /dev/shm [oratest6@myapps1 ~]$ df -k /dev/shm Filesystem 1K-blocks Used Available Use% Mounted on none 3076428 721828 2354600 24% /dev/shm Step By Step Guide to Install oracle 11G Database. Confidential and Proprietary Page 22 of 23 Operating Procedure Date: Installation of 11g database in Myapps1 server. Jun. 05, 10 Rev. No: 1.0 Fix: Change this from root users [root@myapps1 oratest3]# mount -t tmpfs shmfs -o size=7g /dev/shm [root@myapps1 oratest3]# df -k /dev/shm Filesystem 1K-blocks Used Available Use% Mounted on none 7340032 0 7340032 0% /dev/shm [root@myapps1 oratest3]# df -h /dev/shm Filesystem Size Used Avail Use% Mounted on none 7.0G 0 7.0G 0% /dev/shm Step By Step Guide to Install oracle 11G Database. Confidential and Proprietary Page 23 of 23