Oracle 11gR2 Database Install Document v01
Oracle 11gR2 Database Install Document v01
Revision History
Date
26/02/2012
Version
01
Description
Oracle 11g R2 Install Document
Author
Patricio Ghirardi
Table of Contents
1
Introduction .......................................................................................................................................... 6
1.1
Purpose ........................................................................................................................................ 6
1.2
Document Scope.......................................................................................................................... 6
References ............................................................................................................................................ 6
2.1
2.2
Installation ............................................................................................................................................ 8
4.1
4.1.1
4.2
4.2.1
4.2.2
4.3
4.4
4.5
4.5.1
4.5.2
4.5.3
4.6
4.6.1
4.6.2
4.7
4.7.1
4.7.2
4.8
4.9
4.10
5.1.1
5.1.2
5.2
5.2.1
Step 1..................................................................................................................................... 14
5.2.2
Step 2..................................................................................................................................... 15
5.2.3
Step 3..................................................................................................................................... 16
5.2.4
Step 4..................................................................................................................................... 17
5.2.5
Step 5..................................................................................................................................... 18
5.2.6
Step 6..................................................................................................................................... 19
5.2.7
Step 7..................................................................................................................................... 20
5.2.7.1
5.2.8
Step 8..................................................................................................................................... 22
5.2.9
Step 9..................................................................................................................................... 23
5.2.10
Step 10 .............................................................................................................................. 24
5.2.11
Step 11 .............................................................................................................................. 25
5.2.12
Step 12 .............................................................................................................................. 26
5.2.12.1
5.2.12.2
5.2.12.3
5.2.13
Step 13 .............................................................................................................................. 30
5.2.14
Step 14 .............................................................................................................................. 31
5.2.15
Step 15 .............................................................................................................................. 32
5.2.16
Step 16 .............................................................................................................................. 33
5.2.16.1
5.2.17
5.2.18
Step 18 .............................................................................................................................. 36
5.2.19
Step 19 .............................................................................................................................. 37
5.2.19.1
5.2.19.2
5.2.20
Step 20 .............................................................................................................................. 40
5.2.20.1
5.2.20.2
5.2.20.3
5.2.20.4
5.2.21
Step 21 .............................................................................................................................. 45
6.1.1
6.1.2
This tool is mainly used to create new databases. Taking notes of all the information introduced within
the wizard about the new database is advised. ......................................................................................... 49
9
Appendix ............................................................................................................................................. 50
9.1
9.2
Troubleshooting ........................................................................................................................ 51
10
9.2.1
9.2.2
Glossary ........................................................................................................................................... 53
1 Introduction
1.1 Purpose
The purpose of this Install document is to outline the steps needed to install an Oracle 11g R2 Database
server.
The intended audience of this document is an Database Administrator, as well as IT Administrator.
2 References
The following are the locations of the repositories from which the installer software can be downloaded
as well as the URLs which contains official and unofficial details.
Oracle
Database
11g R2 Oracle.co
m
Oracle
Database
11g R2 Oracle
Tech
Network
URL
CD1
https://edelivery.oracle.com/EPD/Download/process_download/V1753001_1of2.zip?file_id=28216403&aru=11691100&userid=3945237&egroup_aru_numb
er=11735513&country_id=32&patch_file=V17530-01_1of2.zip
CD2
https://edelivery.oracle.com/EPD/Download/process_download/V1753001_2of2.zip?file_id=28216404&aru=11691100&userid=3945237&egroup_aru_numb
er=11735513&country_id=32&patch_file=V17530-01_2of2.zip
CD1
http://download.oracle.com/otn/linux/oracle11g/R2/linux.x64_11gR2_database_1of
2.zip
CD2
http://download.oracle.com/otn/linux/oracle11g/R2/linux.x64_11gR2_database_2of
2.zip
Table 2-1
URL
Official:
http://download.oracle.com/docs/cd/E11882_01/install.112/e16768/toc.htm
http://server.billhamilton.com:84/wp/oracle/installing-oracle-11gr2-on-rhel6in-4-long-steps/
http://www.oraclebase.com/articles/11g/OracleDB11gR2InstallationOnOracleLinux6.php
X-Windows
Forwarding:
http://www.math.umn.edu/systems_guide/putty_xwin32.html
Startup and
Shutdown:
http://www.oraclebase.com/articles/linux/AutomatingDatabaseStartupAndShutdownOnLinux.php
Table 2-2
Protocol
Port
TCP
1521
TCP
80,443
Table 3-1
4 Installation
4.1 Operating System Configuration
4.1.1 The /etc/hosts file
The hostname of the server must be on top of the "/etc/hosts" file according to this syntax:
<IP_address_of_the_server>
<FQDN_of_the_server>
<HOSTNAME_of_the_server>
Example :
127.0.0.1
<192.168.0.215>
localhost.localdomain
<oracle112.binnaris.com>
localhost
<oracle112>
Once added, the "/etc/hosts" file with the IP, FQDN, and hostname, should look as the following
example.
# Hosts file
# comments..
# ....
127.0.0.1
192.168.0.215
~
~
~
localhost.localdomain
oracle112.binnaris.com
localhost
oracle112
Swap Space
1.5 times the size of RAM
Equal to the size of RAM
16 GB
Table 4-1
RAM
16 or
more
8388608
4194304
3145728
2097152
1048576
dd command to create the swap file && set it as swap for the OS &&
mounting it
# dd if=/dev/zero of=/swapfile bs=1024 count=16777216
mkswap /swapfile -L swap && swapon /swapfile
# dd if=/dev/zero of=/swapfile bs=1024 count=8388608 &&
mkswap /swapfile -L swap && swapon /swapfile
# dd if=/dev/zero of=/swapfile bs=1024 count=4194304 &&
mkswap /swapfile -L swap && swapon /swapfile
# dd if=/dev/zero of=/swapfile bs=1024 count=3145728 &&
mkswap /swapfile -L swap && swapon /swapfile
&&
This will generate a directory named "database" whit all the files needed for installation.
ODBC Drivers
# zypper install unixODBC unixODBC-devel unixODBC-32bit
Linux OS packages
# zypper install pam pam-config pam-modules X11xorg-x11 wget
Group Creation
/usr/sbin/groupadd
/usr/sbin/groupadd
/usr/sbin/groupadd
/usr/sbin/groupadd
/usr/sbin/groupadd
/usr/sbin/groupadd
4.5.2
-g
-g
-g
-g
-g
-g
501
502
503
504
506
505
oinstall
dba
oper
asmadmin
asmdba
asmoper
4.5.3
# passwd oracle
New password: <password>
Confirm password: <password>
Password changed
#
Backup /etc/security/limits.conf
# cp /etc/security/limits.conf /etc/security/limits.conf.bak
4.6.2
# echo "#####################################################################
# Oracle Database 11g R2 Recommended user limits
#
oracle
soft
nproc
2047
oracle
hard
nproc
16384
oracle
soft
nofile 1024
oracle
hard
nofile 65536
oracle
soft
stack
10240
###########################################################################"
/etc/security/limits.conf
>>
# cp /etc/security/limits.conf /etc/security/limits.conf.bak
>>
mkdir -p /opt/oraInventory
chown -R oracle:oinstall /opt/oraInventory
chmod -R 775 /opt/oraInventory
5 Oracle Installer
This item describes the steps required to execute the database installation script. This script starts a GUI
program from where the database parameters are acquired.
# su oracle
# password: <oracle_user_password>
# /~>
5.1.2
# /~> /tmp/database/runInstaller.sh
5.2.2 Step 2
Database installation type selection.
5.2.3 Step 3
Database class or purpose selection.
5.2.4 Step 4
Single database or cluster database selection.
5.2.5 Step 5
Installation type selection.
5.2.6 Step 6
Database languages selection.
5.2.7 Step 7
Database edition selection.
5.2.8 Step 8
Base directory and binaries path.
5.2.9 Step 9
Inventory directory path.
5.2.10 Step 10
Database type.
5.2.11 Step 11
Global database name and SID.
5.2.12 Step 12
RAM memory assignation.
5.2.13 Step 13
Email notification.
5.2.14 Step 14
Database location.
5.2.15 Step 15
Enabling Automated backups.
5.2.16 Step 16
Database users password settings.
5.2.17 Step 17
Database users group assignation
5.2.18 Step 18
Verify if the requirements are met (in particular scenarios, this check will fail and ignoring them is OK)
5.2.19 Step 19
Check if all the values entered in the process are OK, and save the response answer file for further
reference and installation automation.
5.2.20 Step 20
Copy process.
<-------------
5.2.21 Step 21
Click "Close" to finish the installation.
################################################################################
#!/bin/sh
#
### BEGIN INIT INFO
# Provides: Oracle Database 11g R2
# Required-Start: $network $remote_fs
# Required-Stop: $network $remote_fs
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: Start the Oracle Database, Listner and Enterprise Manager daemons
#### END INIT INFO
#
# Set ORA_HOME to be equivalent to the $ORACLE_HOME
# from which you wish to execute dbstart and dbshut;
#
# Set ORA_OWNER to the user id of the owner of the
# Oracle database in ORA_HOME.
#
# Set ORACLE_HOME_LISTNER to the $ORACLE_HOME
ORA_HOME=/opt/oracle/product/11.2.0/db_1
ORA_OWNER=oracle
ORACLE_HOME_LISTNER=/opt/oracle/product/11.2.0/db_1
. /etc/rc.status
# Shell functions sourced from /etc/rc.status:
#
rc_check
check and set local and overall rc status
#
#
#
#
#
#
rc_status
rc_status -v
rc_status -v -r
rc_failed
rc_reset
rc_exit
https://<database_server_FQDN>:1158/em
This tool is mainly used to create new databases. Taking notes of all the information introduced within
the wizard about the new database is advised.
Table 0-1
Item
Value
Global
Database
Name:
SID:
ORACLE112
Creation
Logs:
/opt/oracle/cfgtoollogs/dbca/oracle112
Server
parameter
file:
/opt/oracle/product/11.2.0/db_1/dbs/spfileORACLE112.ora
Database
Control
URL:
https://oracle112.binnaris.com:1158/em
Encryption
Key:
/opt/oracle/product/11.2.0/db_1/oracle112.binnaris.com_oracle112/sysman/config/emkey.ora
9 Appendix
9.1 Log Files locations
Service
Log File
Description
Database
/opt/oracle/product/11.2.0/db_1/startup.log
/opt/oracle/product/11.2.0/db_1/shutdown.log
Startup
Database
Shutdown
Database
/opt/oracle/product/11.2.0/db_1/listener.log
Listener
/opt/oracle/diag/tnslsnr/ORACLE112/listener/alert/log.xml
ORACLE_HOME/hostname_sid/sysman/log/emdb.nohup
ORACLE_HOME/hostname_SID/sysman/log/emagent.log
ORACLE_HOME/hostname_SID/sysman/log/emagent.trc
ORACLE_HOME/hostname_SID/sysman/log/emoms.log
Main management
service log file
ORACLE_HOME/hostname_SID/sysman/log/emoms.trc
Main management
service trace file
ORACLE_HOME/hostname_SID/sysman/log/emdctl.log
Enterprise
Manager
Enterprise
Manager Agent
Enterprise
Manager Agent
Enterprise
Manager
Enterprise
Manager
Enterprise
Manager
Enterprise
ORACLE_HOME/hostname_SID/sysman/log/emdctl.trc
ORACLE_HOME/hostname_SID/sysman/log/emagentfetchlet.log
ORACLE_HOME/hostname_SID/sysman/log/emagentfetchlet.trc
Manager
Enterprise
Manager
Enterprise
Manager
9.2 Troubleshooting
9.2.1 Enterprise Manager Issues
Problem
Enterprise Manager, https://hostname.domain:1158/em , is not accessible
Information Source
Solution A
http://beyondoracle.wordpress.com/2009/02/08/oracle-enterprise-managerfails-to-start-oc4j-configuration-issue/
Make sure these environment variables are set correctly. Pay special attention to
the CASE of the contents of these variables, "ORACLE112" is NOT the same as
"oracle112". Try reset the environment variables:
export ORACLE_HOME=<ORACLE_HOME>
export ORACLE_SID=<ORACLE_SID>
9.2.2
Problem
Information Source
https://forums.oracle.com/forums/thread.jspa?messageID=10138627
Solution A
Solution B
Function
Comment
Edition mode
Save file
Exits the edition mode. no text will be written in the file, any key pressed will
be interpreted as a vi command.
[:]
Vi command
Indicates vi that a command, like save or quit, is about to be issued with the
next typed letter.
[q]
Exit vi
Quits vi
[w]
[ESC]
Table 10-1
11 Glossary
Word/Phrase/Acronym
Description