======Install Oracle 11gR2======
This page shows how to install 64bit Oracle 11gR2 SP3 on CentOS 6 64bit.
=====Prerequisites=====
You must have a CentOS machine already set up in accordance with the [[linux:install_centos6|Install CentOS 6]] guide.
It is assumed that the system has a blank 80G+ disk attached to it at /dev/sdc.
====Download Installers====
For this guide, we assume that installer has been downloaded and is in /tmp such that the following exists '\\fileserver\setups\Oracle\database\runInstaller'. We mount this directly on to the machine so we shouldn't have to download anything. However, just in case the installation files have been deleted, this is how you can get them back.
You need to have downloaded the Oracle Database installation files for Linux x64. The account you use to log into the Oracle network (if prompted).
* You can download Oracle Database 11g Release 2 (11.2.0.1.0) from [http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-linx8664soft-100572.html here].
* Main Oracle Database download page is [http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html here].
=====Preparation=====
We need to prepare the machine to have Oracle installed. We assume that a 110GB disk has been added to the system at /dev/sdc (sda is the system disk and sdb is the swap space disk).
Unless otherwise specified, the following should be run as the root user.
====Install Prerequisite Software====
Oracle 11gR2 requires the following software packages to be installed on CentOS 6.4.
yum -y install \
compat-libstdc++* gcc-c++ ksh elfutils-libelf-devel libaio-devel \
unixODBC unixODBC-devel libaio.i686 libaio-devel.i686 libgcc.i686 \
libstdc++.i686 libstdc++-devel libstdc++-devel.i686 unixODBC.i686 \
unixODBC-devel.i686 xdpyinfo
====Create User and Groups====
Create user 'oracle' and appropriate groups.
* oinstall (group) 200 - The Oracle Inventory group
* dba (group) - 201 - The OSDBA group
* oper (group) - 202 - The OSOPER group
* oracle (user) - 440 - The Oracle software owner
groupadd oinstall -g 200
groupadd dba -g 201
groupadd oper -g 202
useradd -g oinstall -G dba,oper -u 440 oracle
Set the password for the user 'oracle'.
passwd oracle
====Set Kernel Parameters====
cat << EOF >> /etc/sysctl.conf
- Set to meet install requirements of Oracle 11gR2
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
fs.file-max = 6815744
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
EOF
Tell the kernel to re-read the kernel parameter configuration file.
sysctl -p
====Set Shell Limits====
Increase the shell limits for the oracle user to improve the performance of the software.
cat << EOF >> /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF
====Configure PAM====
Modify PAM configuration
cat << EOF >> /etc/pam.d/login
session required pam_limits.so
EOF
====Edit Profile Scripts====
Tweak the default profile script.
cat << EOF >> /etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
EOF
Ensure the 'oracle' user bash scripts can run
chmod u+x ~oracle/.bash_profile
chmod u+x ~oracle/.bash_logout
chmod u+x ~oracle/.bashrc
Set 'oracle' user default umask
cat << EOF >> ~oracle/.bashrc
umask 022
EOF
Edit the Bash profile for the Oracle user.
FILENAME=~oracle/.bash_profile
echo "" >> $FILENAME
echo "# Oracle Settings" >> $FILENAME
echo "TMP=/tmp; export TMP" >> $FILENAME
echo "ORACLE_UNQNAME=database; export ORACLE_UNQNAME" >> $FILENAME
echo "ORACLE_BASE=/oracle/base; export ORACLE_BASE" >> $FILENAME
echo "ORACLE_HOME=\$ORACLE_BASE/home; export ORACLE_HOME" >> $FILENAME
echo "ORACLE_SID=sidney; export ORACLE_SID" >> $FILENAME
echo "ORACLE_TERM=xterm; export ORACLE_TERM" >> $FILENAME
echo "PATH=/usr/sbin:\$PATH:\$ORACLE_HOME/bin; export PATH" >> $FILENAME
====Setup Oracle Disk====
Now we setup the extra disk (/dev/sdc).
# Create a new physical volume
pvcreate /dev/sdc
- Create a new volume group.
vgcreate datavg /dev/sdc
- Create the needed logical volumes.
lvcreate -L 6G -n base datavg
lvcreate -L 60G -n data datavg
lvcreate -L 8300 -n recovery datavg
lvcreate -L 75 -n inventory datavg
- Format the newly created logical volumes.
mkfs -t ext4 /dev/mapper/datavg-base
mkfs -t ext4 /dev/mapper/datavg-data
mkfs -t ext4 /dev/mapper/datavg-recovery
mkfs -t ext4 /dev/mapper/datavg-inventory
- Prepare a place to mount the oracle partitions.
mkdir -p /oracle/data
mkdir -p /oracle/base
mkdir -p /oracle/recovery
mkdir -p /oracle/inventory
- Set the permissions/ownership for the oracle mount points.
chown -R oracle:oinstall /oracle
chmod -R 775 /oracle
- Add entries for the new partitions in /etc/fstab
cat >> /etc/fstab <<'END_OF_TEXT'
/dev/mapper/datavg-base /oracle/base ext4 defaults 1 2
/dev/mapper/datavg-data /oracle/data ext4 defaults 1 2
/dev/mapper/datavg-recovery /oracle/recovery ext4 defaults 1 2
/dev/mapper/datavg-inventory /oracle/inventory ext4 defaults 1 2
END_OF_TEXT
- Mount the new partitions
mount -a
- Blanket set the permissions on all the newly mounted partitions.
chown -R oracle:oinstall /oracle
chmod -R 775 /oracle
- Now we have blanket changed permissions for everything under /oracle, we need to correct the permissions on the lost+found dirs.
chown -R root:root /oracle/data/lost+found
chown -R root:root /oracle/base/lost+found
chown -R root:root /oracle/recovery/lost+found
chown -R root:root /oracle/inventory/lost+found
chmod -R 700 /oracle/data/lost+found
chmod -R 700 /oracle/base/lost+found
chmod -R 700 /oracle/recovery/lost+found
chmod -R 700 /oracle/inventory/lost+found
====Open Firewall====
The database listens on 1521 and the web 'enterprise manager' is on port 1158.
iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 1158 -j ACCEPT
iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 1521 -j ACCEPT
service iptables save
service iptables restart
=====Install Oracle=====
====Silent Install====
===Create Response File===
Before installing silently, you will need to setup a response file. Copy and paste the following into a file called /tmp/dbresponse.rsp
####################################################################
-# Copyright(c) Oracle Corporation 1998,2011. All rights reserved.##
-# ##
-# Specify values for the variables listed below to customize ##
-# your installation. ##
-# ##
-# Each variable is associated with a comment. The comment ##
-# can help to populate the variables with the appropriate ##
-# values. ##
-# ##
-# IMPORTANT NOTE: This file contains plain text passwords and ##
-# should be secured to have read permission only by oracle user ##
-# or db administrator who owns this installation. ##
-# ##
-###################################################################
--------------------------------------------------------------------------------
- Do not change the following system generated value.
--------------------------------------------------------------------------------
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
--------------------------------------------------------------------------------
- Specify the installation option.
- It can be one of the following:
- 1. INSTALL_DB_SWONLY
- 2. INSTALL_DB_AND_CONFIG
- 3. UPGRADE_DB
--------------------------------------------------------------------------------
oracle.install.option=INSTALL_DB_AND_CONFIG
--------------------------------------------------------------------------------
- Specify the hostname of the system as set during the install. It can be used
- to force the installation to use an alternative hostname rather than using the
- first hostname found on the system. (e.g., for systems with multiple hostnames
- and network interfaces)
--------------------------------------------------------------------------------
ORACLE_HOSTNAME=templatedb.example.com
--------------------------------------------------------------------------------
- Specify the Unix group to be set for the inventory directory.
--------------------------------------------------------------------------------
UNIX_GROUP_NAME=oinstall
--------------------------------------------------------------------------------
- Specify the location which holds the inventory files.
- This is an optional parameter if installing on
- Windows based Operating System.
--------------------------------------------------------------------------------
INVENTORY_LOCATION=/oracle/inventory/inventory
--------------------------------------------------------------------------------
- Specify the languages in which the components will be installed.
-
- en : English ja : Japanese
- fr : French ko : Korean
- ar : Arabic es : Latin American Spanish
- bn : Bengali lv : Latvian
- pt_BR: Brazilian Portuguese lt : Lithuanian
- bg : Bulgarian ms : Malay
- fr_CA: Canadian French es_MX: Mexican Spanish
- ca : Catalan no : Norwegian
- hr : Croatian pl : Polish
- cs : Czech pt : Portuguese
- da : Danish ro : Romanian
- nl : Dutch ru : Russian
- ar_EG: Egyptian zh_CN: Simplified Chinese
- en_GB: English (Great Britain) sk : Slovak
- et : Estonian sl : Slovenian
- fi : Finnish es_ES: Spanish
- de : German sv : Swedish
- el : Greek th : Thai
- iw : Hebrew zh_TW: Traditional Chinese
- hu : Hungarian tr : Turkish
- is : Icelandic uk : Ukrainian
- in : Indonesian vi : Vietnamese
- it : Italian
-
- all_langs : All languages
-
- Specify value as the following to select any of the languages.
- Example : SELECTED_LANGUAGES=en,fr,ja
-
- Specify value as the following to select all the languages.
- Example : SELECTED_LANGUAGES=all_langs
--------------------------------------------------------------------------------
SELECTED_LANGUAGES=en,en_GB
--------------------------------------------------------------------------------
- Specify the complete path of the Oracle Home.
--------------------------------------------------------------------------------
ORACLE_HOME=/oracle/base/home
--------------------------------------------------------------------------------
- Specify the complete path of the Oracle Base.
--------------------------------------------------------------------------------
ORACLE_BASE=/oracle/base
--------------------------------------------------------------------------------
- Specify the installation edition of the component.
-
- The value should contain only one of these choices.
- EE : Enterprise Edition
- SE : Standard Edition
- SEONE : Standard Edition One
- PE : Personal Edition (WINDOWS ONLY)
--------------------------------------------------------------------------------
oracle.install.db.InstallEdition=SEONE
--------------------------------------------------------------------------------
- This variable is used to enable or disable custom install and is considered
- only if InstallEdition is EE.
-
- true : Components mentioned as part of 'optionalComponents' property
- are considered for install.
- false : Value for 'optionalComponents' is not considered.
--------------------------------------------------------------------------------
oracle.install.db.EEOptionsSelection=false
--------------------------------------------------------------------------------
- This property is considered only if 'EEOptionsSelection' is set to true
-
- Description: List of Enterprise Edition Options you would like to enable.
-
- The following choices are available. You may specify any
- combination of these choices. The components you choose should
- be specified in the form "internal-component-name:version"
- Below is a list of components you may specify to enable.
-
- oracle.oraolap:11.2.0.3.0 - Oracle OLAP
- oracle.rdbms.dm:11.2.0.3.0 - Oracle Data Mining RDBMS Files
- oracle.rdbms.dv:11.2.0.3.0- Oracle Database Vault option
- oracle.rdbms.lbac:11.2.0.3.0 - Oracle Label Security
- oracle.rdbms.partitioning:11.2.0.3.0 - Oracle Partitioning
- oracle.rdbms.rat:11.2.0.3.0 - Oracle Real Application Testing
--------------------------------------------------------------------------------
oracle.install.db.optionalComponents=
-##############################################################################
- #
- PRIVILEGED OPERATING SYSTEM GROUPS #
- ------------------------------------------ #
- Provide values for the OS groups to which OSDBA and OSOPER privileges #
- needs to be granted. If the install is being performed as a member of the #
- group "dba", then that will be used unless specified otherwise below. #
- #
- The value to be specified for OSDBA and OSOPER group is only for UNIX based #
- Operating System. #
- #
-##############################################################################
-------------------------------------------------------------------------------
- The DBA_GROUP is the OS group which is to be granted OSDBA privileges.
--------------------------------------------------------------------------------
oracle.install.db.DBA_GROUP=dba
-------------------------------------------------------------------------------
- The OPER_GROUP is the OS group which is to be granted OSOPER privileges.
- The value to be specified for OSOPER group is optional.
-------------------------------------------------------------------------------
oracle.install.db.OPER_GROUP=oper
--------------------------------------------------------------------------------
- Specify the cluster node names selected during the installation.
- Example : oracle.install.db.CLUSTER_NODES=node1,node2
--------------------------------------------------------------------------------
oracle.install.db.CLUSTER_NODES=
-------------------------------------------------------------------------------
- This variable is used to enable or disable RAC One Node install.
-
- true : Value of RAC One Node service name is used.
- false : Value of RAC One Node service name is not used.
-
- If left blank, it will be assumed to be false.
-------------------------------------------------------------------------------
oracle.install.db.isRACOneInstall=false
-------------------------------------------------------------------------------
- Specify the name for RAC One Node Service.
-------------------------------------------------------------------------------
oracle.install.db.racOneServiceName=
--------------------------------------------------------------------------------
- Specify the type of database to create.
- It can be one of the following:
- - GENERAL_PURPOSE/TRANSACTION_PROCESSING
- - DATA_WAREHOUSE
--------------------------------------------------------------------------------
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
--------------------------------------------------------------------------------
- Specify the Starter Database Global Database Name.
--------------------------------------------------------------------------------
oracle.install.db.config.starterdb.globalDBName=database.example.com
--------------------------------------------------------------------------------
- Specify the Starter Database SID.
--------------------------------------------------------------------------------
oracle.install.db.config.starterdb.SID=sidney
--------------------------------------------------------------------------------
- Specify the Starter Database character set.
-
- One of the following
- AL32UTF8, WE8ISO8859P15, WE8MSWIN1252, EE8ISO8859P2,
- EE8MSWIN1250, NE8ISO8859P10, NEE8ISO8859P4, BLT8MSWIN1257,
- BLT8ISO8859P13, CL8ISO8859P5, CL8MSWIN1251, AR8ISO8859P6,
- AR8MSWIN1256, EL8ISO8859P7, EL8MSWIN1253, IW8ISO8859P8,
- IW8MSWIN1255, JA16EUC, JA16EUCTILDE, JA16SJIS, JA16SJISTILDE,
- KO16MSWIN949, ZHS16GBK, TH8TISASCII, ZHT32EUC, ZHT16MSWIN950,
- ZHT16HKSCS, WE8ISO8859P9, TR8MSWIN1254, VN8MSWIN1258
--------------------------------------------------------------------------------
oracle.install.db.config.starterdb.characterSet=AL32UTF8
-------------------------------------------------------------------------------
- This variable should be set to true if Automatic Memory Management
- in Database is desired.
- If Automatic Memory Management is not desired, and memory allocation
- is to be done manually, then set it to false.
-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.memoryOption=true
--------------------------------------------------------------------------------
- Specify the total memory allocation for the database. Value(in MB) should be
- at least 256 MB, and should not exceed the total physical memory available
- on the system.
- Example: oracle.install.db.config.starterdb.memoryLimit=512
--------------------------------------------------------------------------------
oracle.install.db.config.starterdb.memoryLimit=751
--------------------------------------------------------------------------------
- This variable controls whether to load Example Schemas onto
- the starter database or not.
--------------------------------------------------------------------------------
oracle.install.db.config.starterdb.installExampleSchemas=false
--------------------------------------------------------------------------------
- This variable includes enabling audit settings, configuring password profiles
- and revoking some grants to public. These settings are provided by default.
- These settings may also be disabled.
--------------------------------------------------------------------------------
oracle.install.db.config.starterdb.enableSecuritySettings=true
-##############################################################################
- #
- Passwords can be supplied for the following four schemas in the #
- starter database: #
- SYS #
- SYSTEM #
- SYSMAN (used by Enterprise Manager) #
- DBSNMP (used by Enterprise Manager) #
- #
- Same password can be used for all accounts (not recommended) #
- or different passwords for each account can be provided (recommended) #
- #
-##############################################################################
-------------------------------------------------------------------------------
- This variable holds the password that is to be used for all schemas in the
- starter database.
--------------------------------------------------------------------------------
oracle.install.db.config.starterdb.password.ALL=
--------------------------------------------------------------------------------
- Specify the SYS password for the starter database.
--------------------------------------------------------------------------------
oracle.install.db.config.starterdb.password.SYS=DATABASE_PASSWORD_HOLDER
--------------------------------------------------------------------------------
- Specify the SYSTEM password for the starter database.
--------------------------------------------------------------------------------
oracle.install.db.config.starterdb.password.SYSTEM=DATABASE_PASSWORD_HOLDER
--------------------------------------------------------------------------------
- Specify the SYSMAN password for the starter database.
--------------------------------------------------------------------------------
oracle.install.db.config.starterdb.password.SYSMAN=DATABASE_PASSWORD_HOLDER
--------------------------------------------------------------------------------
- Specify the DBSNMP password for the starter database.
--------------------------------------------------------------------------------
oracle.install.db.config.starterdb.password.DBSNMP=DATABASE_PASSWORD_HOLDER
--------------------------------------------------------------------------------
- Specify the management option to be selected for the starter database.
- It can be one of the following:
- 1. GRID_CONTROL
- 2. DB_CONTROL
--------------------------------------------------------------------------------
oracle.install.db.config.starterdb.control=DB_CONTROL
--------------------------------------------------------------------------------
- Specify the Management Service to use if Grid Control is selected to manage
- the database.
--------------------------------------------------------------------------------
oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=
-##############################################################################
- #
- SPECIFY BACKUP AND RECOVERY OPTIONS #
- ------------------------------------ #
- Out-of-box backup and recovery options for the database can be mentioned #
- using the entries below. #
- #
-##############################################################################
-------------------------------------------------------------------------------
- This variable is to be set to false if automated backup is not required. Else
- this can be set to true.
--------------------------------------------------------------------------------
oracle.install.db.config.starterdb.automatedBackup.enable=true
-------------------------------------------------------------------------------
- Regardless of the type of storage that is chosen for backup and recovery, if
- automated backups are enabled, a job will be scheduled to run daily to backup
- the database. This job will run as the operating system user that is
- specified in this variable.
--------------------------------------------------------------------------------
oracle.install.db.config.starterdb.automatedBackup.osuid=oracle
--------------------------------------------------------------------------------
- Regardless of the type of storage that is chosen for backup and recovery, if
- automated backups are enabled, a job will be scheduled to run daily to backup
- the database. This job will run as the operating system user specified by the
- above entry. The following entry stores the password for the above operating
- system user.
--------------------------------------------------------------------------------
oracle.install.db.config.starterdb.automatedBackup.ospwd=ORACLE_USER_PASSWORD_HOLDER
--------------------------------------------------------------------------------
- Specify the type of storage to use for the database.
- It can be one of the following:
- - FILE_SYSTEM_STORAGE
- - ASM_STORAGE
--------------------------------------------------------------------------------
oracle.install.db.config.starterdb.storageType=FILE_SYSTEM_STORAGE
--------------------------------------------------------------------------------
- Specify the database file location which is a directory for datafiles, control
- files, redo logs.
-
- Applicable only when oracle.install.db.config.starterdb.storage=FILE_SYSTEM_STORAGE
--------------------------------------------------------------------------------
oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=/oracle/data
--------------------------------------------------------------------------------
- Specify the backup and recovery location.
-
- Applicable only when oracle.install.db.config.starterdb.storage=FILE_SYSTEM_STORAGE
--------------------------------------------------------------------------------
oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=/oracle/recovery
--------------------------------------------------------------------------------
- Specify the existing ASM disk groups to be used for storage.
-
- Applicable only when oracle.install.db.config.starterdb.storageType=ASM_STORAGE
--------------------------------------------------------------------------------
oracle.install.db.config.asm.diskGroup=
--------------------------------------------------------------------------------
- Specify the password for ASMSNMP user of the ASM instance.
-
- Applicable only when oracle.install.db.config.starterdb.storage=ASM_STORAGE
--------------------------------------------------------------------------------
oracle.install.db.config.asm.ASMSNMPPassword=
-------------------------------------------------------------------------------
- Specify the My Oracle Support Account Username.
-
- Example : MYORACLESUPPORT_USERNAME=abc@oracle.com
-------------------------------------------------------------------------------
MYORACLESUPPORT_USERNAME=my_oracle_account@example.com
-------------------------------------------------------------------------------
- Specify the My Oracle Support Account Username password.
-
- Example : MYORACLESUPPORT_PASSWORD=password
-------------------------------------------------------------------------------
MYORACLESUPPORT_PASSWORD=ONLINE_PORTAL_PASSWORD
-------------------------------------------------------------------------------
- Specify whether to enable the user to set the password for
- My Oracle Support credentials. The value can be either true or false.
- If left blank it will be assumed to be false.
-
- Example : SECURITY_UPDATES_VIA_MYORACLESUPPORT=true
-------------------------------------------------------------------------------
SECURITY_UPDATES_VIA_MYORACLESUPPORT=true
-------------------------------------------------------------------------------
- Specify whether user doesn't want to configure Security Updates.
- The value for this variable should be true if you don't want to configure
- Security Updates, false otherwise.
-
- The value can be either true or false. If left blank it will be assumed
- to be false.
-
- Example : DECLINE_SECURITY_UPDATES=false
-------------------------------------------------------------------------------
DECLINE_SECURITY_UPDATES=false
-------------------------------------------------------------------------------
- Specify the Proxy server name. Length should be greater than zero.
-
- Example : PROXY_HOST=proxy.domain.com
-------------------------------------------------------------------------------
PROXY_HOST=
-------------------------------------------------------------------------------
- Specify the proxy port number. Should be Numeric and atleast 2 chars.
-
- Example : PROXY_PORT=25
-------------------------------------------------------------------------------
PROXY_PORT=
-------------------------------------------------------------------------------
- Specify the proxy user name. Leave PROXY_USER and PROXY_PWD
- blank if your proxy server requires no authentication.
-
- Example : PROXY_USER=username
-------------------------------------------------------------------------------
PROXY_USER=
-------------------------------------------------------------------------------
- Specify the proxy password. Leave PROXY_USER and PROXY_PWD
- blank if your proxy server requires no authentication.
-
- Example : PROXY_PWD=password
-------------------------------------------------------------------------------
PROXY_PWD=
-------------------------------------------------------------------------------
- Specify the proxy realm.
-
- Example : PROXY_REALM=metalink
-------------------------------------------------------------------------------
PROXY_REALM=
-------------------------------------------------------------------------------
- Specify the Oracle Support Hub URL.
-
- Example : COLLECTOR_SUPPORTHUB_URL=https://orasupporthub.company.com:8080/
-------------------------------------------------------------------------------
COLLECTOR_SUPPORTHUB_URL=
-------------------------------------------------------------------------------
- Specify the auto-updates option. It can be one of the following:
- a.MYORACLESUPPORT_DOWNLOAD
- b.OFFLINE_UPDATES
- c.SKIP_UPDATES
-------------------------------------------------------------------------------
oracle.installer.autoupdates.option=SKIP_UPDATES
-------------------------------------------------------------------------------
- In case MYORACLESUPPORT_DOWNLOAD option is chosen, specify the location where
- the updates are to be downloaded.
- In case OFFLINE_UPDATES option is chosen, specify the location where the updates
- are present.
oracle.installer.autoupdates.downloadUpdatesLoc=
-------------------------------------------------------------------------------
- Specify the My Oracle Support Account Username which has the patches download privileges
- to be used for software updates.
- Example : AUTOUPDATES_MYORACLESUPPORT_USERNAME=abc@oracle.com
-------------------------------------------------------------------------------
AUTOUPDATES_MYORACLESUPPORT_USERNAME=my_oracle_account@example.com
-------------------------------------------------------------------------------
- Specify the My Oracle Support Account Username password which has the patches download privileges
- to be used for software updates.
-
- Example : AUTOUPDATES_MYORACLESUPPORT_PASSWORD=password
-------------------------------------------------------------------------------
AUTOUPDATES_MYORACLESUPPORT_PASSWORD=ONLINE_ORACLE_ACCOUNT_PASSWORD_HOLDER
===Edit Response File===
We need to set various passwords in the default response file given above. Assuming the file is /tmp/dbresponse.rsp.
echo "Enter the password for the Oracle system account:"
read -s ORA_PASSWORD
echo "Enter the password for the Oracle db accounts:"
read -s ORA_SYS_PASSWORD
echo "Enter the password for my_oracle_account@example.com:"
read -s ONLINE_PORTAL_PASSWORD
sed -i "s/ORACLE_USER_PASSWORD_HOLDER/$ORA_PASSWORD/g" /tmp/dbresponse.rsp
sed -i "s/DATABASE_PASSWORD_HOLDER/$ORA_SYS_PASSWORD/g" /tmp/dbresponse.rsp
sed -i "s/ONLINE_ORACLE_ACCOUNT_PASSWORD_HOLDER/$ONLINE_PORTAL_PASSWORD/g" /tmp/dbresponse.rsp
===Run Silent Install===
su - oracle
/mnt/share/database/runInstaller -silent -responseFile /tmp/dbresponse.rsp
Now wait until you are told that the Database is installed and configured. This will take at least ten minutes. The "The installation of Oracle Database 11g was successful" message does not mean the installation is finished. After another eight minutes or so, you will see the following text.
As a root user, execute the following script(s):
1. /oracle/inventory/inventory/orainstRoot.sh
2. /oracle/base/home/root.sh
This indicates that the installation has finished. Now move onto the post installation section of this guide which will include running the scripts mentioned (orainstRoot.sh and root.sh).
====Manual Installation====
Log into the GUI on the local console as the user 'oracle'. Open a terminal and run the following.
/mnt/share/database/runInstaller
The Oracle wizard should appear. Run through it setting the values as follows.
**Configure Security Updates**
* Email: my_oracle_account@example.com
* Password: See Keypass
* Tick 'I wish to receive security updates via My Oracle Support'.
**Download Sofwtare Updates**
* Select 'Skip software updates'.
**Installation Option**
* Create and configure a database
**System Class**
* Server Class
**Grid Installation Options**
* Single Instance Database Installation
**Install Type**
* Advanced Install
**Product Languages**
* English (United Kingdom)
**Database Edition**
* Standard Edition One (4.42 GB)
**Installation Location**
* Oracle Base: /oracle/base
* Software Location: /oracle/base/home
**Create Inventory**
* Inventory Directory: /oracle/inventory/inventory
* oraInventory Group Name: oinstall
**Configure Type**
* General Purpose/Transaction Processing
**Database Identifiers**
* NOTE: Change 'template' in both fields to the name of the server you are setting up.
* Global database name: database.example.com
* Oracle Service Identifier: sidney
**Configuration Options**
* Defaults (I assume it can be changed later)
**Management Options**
* Use Oracle Enterprise Manager database control for database management.
**Database Storage**
NOTE: Notice that the default value needs to be changed to the one listed here.
* Specify Database file location /oracle/data
**Backup and Recovery**
* Enable automated backups
* Recovery area: /oracle/recovery
* username: oracle
* password: e.g. the password you set for the user 'oracle' earlier
**Schema Passwords**
* Tick the "Use the same password for all accounts" radio button
* Set the password to the standard database admin password.
**Operating System Groups**
* Database administrator group: dba
* Database operator group: oper
**Prerequisite Checks**
* For 11.2.0.3, the only warning will be the absence of pdksh. This can be ignored because we installed the "ksh" package in its place. For more details, see [http://www.oracle-base.com/articles/11g/oracle-db-11gr2-installation-on-oracle-linux-6.php here].
* Tick 'Ignore all'.
* Click 'Next'. and click next
**Summary**
* Click 'Finish'.
**Install Product**
* Watch as Oracle installs.
**Install Summary**
* After taking some time of installing, you will get a summary screen. On this screen is a button called "Password Management". You don't need to do anything here as SYS and SYSTEM are already unlocked.
* Ignore any popup windows telling you that 'Oracle Configuration Manager Configuration' failed.
* You then get taken to a "Execute Configuration Scripts" window. DO NOT PRESS OK YET.
* Seriously: DO NOT PRESS OK YET.
* Follow the instructions and run the scripts specified. This usually means "run the following from a root prompt"
/oracle/inventory/orainstRoot.sh
/oracle/base/home/root.sh
* Once the scripts have run, press 'OK'.
* Click 'Next'.
* Click 'Close'.
* If the configuration assistants failed, say Yes to continuing.
=====Post Installation=====
If you installed Oracle silently using the response file, you must now run these as root. If you installed Oracle using the GUI, you have probably already run these as root and should not run them again.
su -
/oracle/inventory/inventory/orainstRoot.sh
/oracle/base/home/root.sh
Set oracle to start on bootsed -i "s/:N/:Y/g" /etc/oratab
Create the oracle init script (/etc/init.d/oracle)
cat < EOF >> /etc/init.d/oracle
-!/bin/bash
- chkconfig: 2345 95 20
- /etc/rc.d/init.d/oracle
- Description: Starts and stops the Oracle database, listeners and Enterprise Manager
- We need this next line to get the PATH variable setup correctly
. ~oracle/.bash_profile
case $1 in
start)
echo "Starting Oracle"
echo "--------------------" >> /var/log/oracle
date +"! %T %a %D : Starting Oracle Databases as part of system up." >> /var/log/oracle
echo "--------------------" >> /var/log/oracle
echo -n "Starting Oracle Databases: "
su - oracle -c "dbstart" >> /var/log/oracle
echo "Done."
echo -n "Starting Oracle Listeners: "
su - oracle -c "lsnrctl start" >> /var/log/oracle
echo "Done."
echo -n "Starting Oracle Enterprise Manager: "
su - oracle -c "emctl start dbconsole" >> /var/log/oracle
echo "Done."
echo ""
echo "--------------------" >> /var/log/oracle
date +"! %T %a %D : Finished." >> /var/log/oracle
echo "--------------------" >> /var/log/oracle
touch /var/lock/subsys/oracle
;;
stop)
echo "Shutting Down Oracle"
echo "--------------------" >> /var/log/oracle
date +"! %T %a %D : Shutting Down Oracle Databases as part of system down." >> /var/log/oracle
echo "--------------------" >> /var/log/oracle
echo -n "Shutting Down Oracle Enterprise Manager: "
su - oracle -c "emctl stop dbconsole" >> /var/log/oracle
echo "Done."
echo -n "Shutting Down Oracle Listeners: "
su - oracle -c "lsnrctl stop" >> /var/log/oracle
echo "Done."
rm -f /var/lock/subsys/oracle
echo -n "Shutting Down Oracle Databases: "
su - oracle -c "dbshut" >> /var/log/oracle
echo "Done."
echo ""
echo "--------------------" >> /var/log/oracle
date +"! %T %a %D : Finished." >> /var/log/oracle
echo "--------------------" >> /var/log/oracle
;;
restart)
echo "Restarting Oracle"
echo "--------------------" >> /var/log/oracle
date +"! %T %a %D : Restarting Oracle Databases as part of system up." >> /var/log/oracle
echo "--------------------" >> /var/log/oracle
echo -n "Restarting Oracle Databases: "
su - oracle -c "dbshut" >> /var/log/oracle
su - oracle -c "dbstart" >> /var/log/oracle
echo "Done."
echo -n "Restarting Oracle Listeners: "
su - oracle -c "lsnrctl stop" >> /var/log/oracle
su - oracle -c "lsnrctl start" >> /var/log/oracle
echo "Done."
echo -n "Restarting Oracle Enterprise Manager: "
su - oracle -c "emctl stop dbconsole" >> /var/log/oracle
su - oracle -c "emctl start dbconsole" >> /var/log/oracle
echo "Done."
echo ""
echo "--------------------" >> /var/log/oracle
date +"! %T %a %D : Finished." >> /var/log/oracle
echo "--------------------" >> /var/log/oracle
touch /var/lock/subsys/oracle
;;
*)
echo "Usage: oracle {start|stop|restart}"
exit 1
esac
exit 0
EOF
Set the oracle init script to run on boot automatically
chmod u+x /etc/init.d/oracle
chkconfig --add oracle
chkconfig oracle on
Reboot the machine
init 6
Once rebooted, leave the machine on the logon screen. On your own machine, go to the following page in your web browser (replace template with the name of the machine).
https://templatedb.example.com:1158/em
=====Get a Cloned/Deployed Oracle Server Running=====
It takes about eight minutes to deploy an Oracle VM.
The secret to cloning is to first make the 'clone' work as templatedb. Once the machine can boot and run oracle as 'templatedb', then you can change the hostname/IP address.
When you deploy from a VMware template, the machine name should be 'templatedb'. When you boot it for the first time, the network won't work. You will have to log into the local console as root and open up a terminal.
Before you rename the system, remember to change to root
* Use the 'ifconfig -a' command to determine if the network card is called eth0, eth1, eth2, etc.
* Use the following command and look for a file called ifcfg-eth0, ifcfg-eth1, etc.cd /etc/sysconfig/network-scripts; ls
* If the file name does not match the name of the network card, rename it as appropriate. Then edit the file and edit the top line as appropriate. Also, remove the MAC address line if it is present. Save and exit the text editor.
* su to oracle and update gvm if needed.
* Restart the computer.
* If you can now ping other machines on the network, reboot the computer. e.g. ping mail
* Make sure you can view and log into https://templatedb.example.com:1158/em/. Logging in is important as you will need to reset the passwords as they may be expiring
* Log in to the web page as system. If prompted to change passwords, keep them all as they are now.
* The machine will now working as templatedb on the network and you can run through the process for [[Useful_Oracle#Change_Hostname_and_IP changing|hostname and IP address ]].