Вы находитесь на странице: 1из 10

complete 11gr2 installation step by step

1.pre requisite check


2.action
3.post requisite check
installation 11gr2 on file system
with root user do the following the task
for check the kernal parameter
The current values can be tested using the following command.
/sbin/sysctl -a | grep <param-name>
Oracle recommend the following minimum parameter settings.
Add or amend the following lines in the "/etc/sysctl.conf" file.
fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
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
then fire the command
/sbin/sysctl -p
##################################################################
Kernal parameter and their meaning
KernelParameter,Setting To GetYou Started, Purpose
aio-max-nr 1048576 The total number of concurrent outstanding I/O requests
shmmni 4096 Maximum number of shared memory segments
shmall 2097152 Maximum total shared memory (4 Kb pages)
shmmax 4294967295 Maximum size of a single shared memory segment. Set to e
ither (4GB -1) or 1/2 the size of physical memory (in bytes) whichever is lower
semmsl 250 Maximum number of semaphores per set
semmns 32000 Maximum number of semaphores
semopm 100 Maximum operations per semop call
semmni 128 Maximum number of semaphore sets
file-max 6815744 Maximum number of open files
ip_local_port_range 9000 65500 Range of ports to use for client connect
ions
rmem_default 262144 Default TCP/IP receive window
rmem_max 4194304 Maximum TCP/IP receive window
wmem_default 262144 Maximum TCP/IP send window
wmem_max 1048576 Maximum TCP/IP send window
##############################################################################
Then Add the following lines to the "/etc/security/limits.conf" file.
oracle soft nproc 131072
oracle hard nproc 131072
oracle soft nofile 131072
oracle hard nofile 131072
oracle soft core unlimited
oracle hard core unlimited
oracle soft memlock 50000000
oracle hard memlock 50000000
then check the rpm if not exist please install them
# From Oracle Linux 5 DVD
cd /media/cdrom/Server
rpm -Uvh binutils-2.*
rpm -Uvh compat-libstdc++-33*
rpm -Uvh compat-libstdc++-33*.i386.rpm
rpm -Uvh elfutils-libelf*
rpm -Uvh gcc-4.*
rpm -Uvh gcc-c++-4.*
rpm -Uvh glibc-2.*
rpm -Uvh glibc-common-2.*
rpm -Uvh glibc-devel-2.*
rpm -Uvh glibc-headers-2.*
rpm -Uvh ksh*
rpm -Uvh libaio-0.*
rpm -Uvh libaio-devel-0.*
rpm -Uvh libgomp-4.*
rpm -Uvh libgcc-4.*
rpm -Uvh libstdc++-4.*
rpm -Uvh libstdc++-devel-4.*
rpm -Uvh make-3.*
rpm -Uvh sysstat-7.*
rpm -Uvh unixODBC-2.*
rpm -Uvh unixODBC-devel-2.*
rpm -Uvh numactl-devel-*
cd /
eject
Create the new groups and users.
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
groupadd -g 54327 asmdba
groupadd -g 54328 asmoper
groupadd -g 54329 asmadmin
--user id is the same as for 12c installations
useradd -u 54321 -g oinstall -G dba,oper,asmadmin oracle
passwd oracle
Additional Setup
The following setup tasks must be performed regardless of which setup method you
used previously.
Set secure Linux to permissive by editing the "/etc/selinux/config" file, making
sure the SELINUX flag is set as follows.
SELINUX=permissive
and enforce it
setenforce Permissive
then create the directory
Create the directories in which the Oracle software will be installed.
mkdir -p /u01/app/oracle/product/11.2.0/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
then check this if exit otherwise add them.
The /etc/hosts file must contain a fully qualified name for the server.
<IP-address> <fully-qualified-machine-name> <machine-name>
For example.
127.0.0.1 oel6 oel6.dbaora.com localhost localhost.localdomain
login with oracle user and do the following tasks
add the following lines at the end of the ".bash_profile" file, remembering to a
djust them for your specific installation.
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=ol5-112.localdomain; export ORACLE_HOSTNAME
ORACLE_UNQNAME=DB11G; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_SID=DB11G; export ORACLE_SID
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
alias cdob='cd $ORACLE_BASE'
alias cdoh='cd $ORACLE_HOME'
alias tns='cd $ORACLE_HOME/network/admin'
alias envo='env | grep ORACLE'
umask 022
Stop and disable firewall
systemctl stop firewalld
systemctl disable firewalld
/////////
check the directories and aliases for user oracle
--I defined 4 aliases in .bash_profile of user oracle to make
--administration easier :)
[oracle@oel6 ~]$ alias envo cdob cdoh tns
alias envo='env | grep ORACLE'
alias cdob='cd $ORACLE_BASE'
alias cdoh='cd $ORACLE_HOME'
alias tns='cd $ORACLE_HOME/network/admin'
--run alias command envo to display environment settings
envo
ORACLE_UNQNAME=ORA11G
ORACLE_SID=ORA11G
ORACLE_BASE=/ora01/app/oracle
ORACLE_HOSTNAME=oel6.dbaora.com
ORACLE_HOME=/ora01/app/oracle/product/11.2.0/db_1
--run alias command cdob and cdoh to check ORACLE_BASE, ORACLE_HOME
[oracle@oel6 ~]$ cdob
[oracle@oel6 oracle]$ pwd
/ora01/app/oracle
[oracle@oel6 db_1]$ cdoh
[oracle@oel6 db_1]$ pwd
/ora01/app/oracle/product/11.2.0/db_1
Response files
Once Oracle 11GR2 binaries are unzipped you can find in directory /home/oracle/d
atabase/response dedicated files called response files used for silent mode instal
lations.
The response files store parameters necessary to install Oracle components:
db_install.rsp used to install oracle binaries, install/upgrade a database in s
ilent mode
dbca.rsp used to install/configure/delete a database in silent mode
netca.rsp used to configure simple network for oracle database in silent mode
cd /home/oracle/database/response
[oracle@oel6 response]$ ls
dbca.rsp db_install.rsp netca.rsp
##############
db_install.rsp contents
--force to install only database software
oracle.install.option=INSTALL_DB_SWONLY
--set your hostname
ORACLE_HOSTNAME=oel6.dbaora.com
--set unix group for oracle inventory
UNIX_GROUP_NAME=oinstall
--set directory for oracle inventory
INVENTORY_LOCATION=/ora01/app/oraInventory
--set oracle home for binaries
ORACLE_HOME=/ora01/app/oracle/product/11.2.0/db_1
--set oracle home for binaries
ORACLE_BASE=/ora01/app/oracle
--set version of binaries to install
-- EE - enterprise edition
oracle.install.db.InstallEdition=EE
--force to install advanced options
oracle.install.db.EEOptionsSelection=true
--specify which advanced option to install
-- oracle.oraolap:11.2.0.4.0 - Oracle OLAP
-- oracle.rdbms.dm:11.2.0.4.0 - Oracle Data Mining
-- oracle.rdbms.dv:11.2.0.4.0 - Oracle Database Vault
-- oracle.rdbms.lbac:11.2.0.4.0 - Oracle Label Security
-- oracle.rdbms.partitioning:11.2.0.4.0 - Oracle Partitioning
-- oracle.rdbms.rat:11.2.0.4.0 - Oracle Real Application Testing
-- WATCHOUT - should be one line I have changed format here :)
--It's wrong
oracle.install.db.optionalComponents=
oracle.rdbms.partitioning:11.2.0.4.0,
oracle.oraolap:11.2.0.4.0,
oracle.rdbms.dm:11.2.0.4.0,
oracle.rdbms.rat:11.2.0.4.0
--specify extra groups for database management
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oper
#################################
then following command fire for silent mode installation.
cd /home/oracle/database ./runInstaller -silent \ -responseFile /home/oracle/dat
abase/response/db_install.rsp
and then the output is following
[oracle@oel6 database]$ ./runInstaller -silent
-responseFile /home/oracle/database/response/db_install.rsp
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB.
Actual 41752 MB Passed
Checking swap space: must be greater than 150 MB.
Actual 4095 MB Passed
Preparing to launch Oracle Universal Installer
from /tmp/OraInstall2015-02-06_09-58-53PM.
Please wait ...[oracle@oel6 database]$ No protocol specified
[WARNING] - My Oracle Support Username/Email Address Not Specified
[SEVERE] - The product will be registered
anonymously using the specified email address.
You can find the log of this install session at:
/ora01/app/oraInventory/logs/installActions2015-02-06_09-58-53PM.log
The installation of Oracle Database 11g was successful.
Please check
'/ora01/app/oraInventory/logs/silentInstall2015-02-06_09-58-53PM.log'
for more details.
As a root user, execute the following script(s):
1. /ora01/app/oraInventory/orainstRoot.sh
2. /ora01/app/oracle/product/11.2.0/db_1/root.sh
Successfully Setup Software.
then start the sqlplus check for the binary verification
*************************************
Configure Oracle Net
Again based on response file Oracle Net will be configured
cd /home/oracle/database/response
cp netca.rsp netca.rsp.bck
You can edit netca.rsp to set own parameters. I didnt changed anything here. So j
ust start standard configuration. It will configure LISTENER with standard setti
ngs.
netca -silent -responseFile /home/oracle/database/response/netca.rsp
example output
netca -silent -responseFile /home/oracle/database/response/netca.rsp
Parsing command line arguments:
Parameter "silent" = true
Parameter "responsefile" = /home/oracle/database/response/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
Running Listener Control:
/ora01/app/oracle/product/11.2.0/db_1/bin/lsnrctl start LISTENER
Listener Control complete.
Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0

Configure database
The last setup is to create new database ORA11G
Prepare directories for database datafiles and flash recovery area
mkdir /ora01/app/oracle/oradata
mkdir /ora01/app/oracle/flash_recovery_area
backup original response file for dbca
cd /home/oracle/database/response
cp dbca.rsp dbca.rsp.bck
vi dbca.rsp
############################
the dbca.rsp file contains are the
set own parameters
--global database name
GDBNAME = "ORA11G.dbaora.com"
--instance database name
SID = "ORA11G"
--template name used to create database
TEMPLATENAME = "General_Purpose.dbc"
--password for user sys
SYSPASSWORD = "oracle"
--password for user system
SYSTEMPASSWORD = "oracle"
--creates database console
EMCONFIGURATION = "LOCAL"
--password for sysman user
SYSMANPASSWORD = "oracle"
--password for dbsnmp user
DBSNMPPASSWORD = "oracle"
--storage used to create database
--FS - it means OS data files
STORAGETYPE=FS
--default directory for oracle database datafiles
DATAFILEDESTINATION=/ora01/app/oracle/oradata
--default directory for flashback dataa
RECOVERYAREADESTINATION=/ora01/app/oracle/flash_recovery_area
STORAGETYPE=FS
--database character set
CHARACTERSET = "AL32UTF8"
--national database character set
NATIONALCHARACTERSET= "AL16UTF16"
--listener name to register database to
LISTENERS = "LISTENER"
--force to install sample schemas on the database
SAMPLESCHEMA=TRUE
--specify database type
--has influence on some instance parameters
DATABASETYPE = "OLTP"
--force to use autmatic mamory management
AUTOMATICMEMORYMANAGEMENT = "TRUE"
--defines size of memory used by the database
TOTALMEMORY = "800"
then run the following command
dbca -silent -responseFile /home/oracle/database/response/dbca.rsp
Example output
dbca -silent -responseFile /home/oracle/database/response/dbca.rsp
Copying database files
1% complete
3% complete
37% complete
Creating and starting Oracle instance
40% complete
45% complete
50% complete
55% complete
56% complete
57% complete
60% complete
62% complete
Completing Database Creation
66% complete
70% complete
73% complete
85% complete
96% complete
100% complete
Look at the log file
"/ora01/app/oracle/cfgtoollogs/dbca/ORA11G/ORA11G.log"
for further details.

Verify connection
sqlplus / as sysdba
show parameter db_name
Check status of database console
[oracle@oel6 ~]$ emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
https://oel6.dbaora.com:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.
Edit the /etc/oratab file to set restart flag for ORA11G to Y.
ORA11G:/ora01/app/oracle/product/11.2.0/db_1:Y

in silent mode installation


Oracle 11gR2 silent installation
Posted on June 21, 2011 by bigpang
Oracle silent installation is straightforward though it always change a little w
ith every major release. Here I show you tricks and tips during Oracle 11gR2 sil
ent installation.
Steps /no tricks here/
1#Create the oraInst.loc file.
2#Prepare a response file.
3#Run Oracle Universal Installer in silent or response file mode.
4#If you completed a software-only installation, then run Net Configuration Assi
stant and Database Configuration Assistant in silent or response file mode if r
equired.

Oracle 11gR2 Enterprise edition database home installation on Linux (RHEL5) x86_
64.
1) Customize value in response file
important note: copy from Oracle sample file: <oracle_installation_dir>/database
/response/db_install.rsp
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_sch
ema_v11_2_0
oracle.install.option=INSTALL_DB_SWONLY
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/oracle/OraInventory
ORACLE_HOME=/oracle/product/11.2.0/template
ORACLE_BASE=/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=dba
DECLINE_SECURITY_UPDATES=true
*********************************************
*********************************************
2) Silent installation
*********************************************
*********************************************
./runInstaller -silent -noconfig -responseFile /u01/download/db11ginstall.rsp
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 22753 MB Passed
Checking swap space: must be greater than 150 MB. Actual 3817 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-06-17_09
-02-07PM. Please wait ..
$ You can find the log of this install session at:
/oracle/OraInventory/logs/installActions2011-06-17_09-02-07PM.log
The following configuration scripts need to be executed as the "root" user.
#!/bin/sh
#Root scripts to run
/oracle/product/11.2.0/template/root.sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as "root"
3. Run the scripts
4. Return to this window and hit "Enter" key to continue
Successfully Setup Software.
/ * tricks and tips */
Trick 1 # If oracle home is not empty and we didnt use runInstaller *** -force op
tion, it will die with following messages
CAUSE: The chosen installation conflicted with software already installed in the
given Oracle home.
ACTION: Install into a different Oracle home.
Trick 2 # If system are not satisfied with Oracle installation requirement, it
will show following messages.
CAUSE: Some of the optional prerequisites are not met. See logs for details. /or
acle/OraInventory/logs/log
ACTION: Identify the list of failed prerequisite checks from the log: /oracle
/OraInventory/logs/.log. Then either from the log file or from installation manua
l find the appropriate configuration to meet the prerequisites and fix it manual
ly.
[WARNING] [INS-13014] Target environment do not meet some optional requirements.
Trick 3 # If DECLINE_SECURITY_UPDATES is not set to FALSE, Oracle will try to se
t up OCM (Oracle configuration management with metalink credential), it will die
with following messages.
[SEVERE] Email Address Not Specified
Trick 4 # If DBA and OS group is not specified properly, it may die with followi
ng messages
CAUSE: User is not a member of one or more of the chosen OS groups.
ACTION: Please choose OS groups of which user is a member.
Conclusion
Silent installation is still easy with patience.
Update at Sept 9, 2013
For Oracle 11.2.0.4 silent installation, I record response file and it shows off
following related parameters.
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
oracle.installer.autoupdates.option=SKIP_UPDATES
***********************
***********************
There are four phases to getting Oracle up and running on your server:
Prepare the server
Install the Oracle software and latest patch set
Create a database
Complete the server configuration
Response File Description
ENTERPRISE.RSP Enterprise Edition installation of Oracle Database
CUSTOM.RSP Custom installation of Oracle Database
DBCA.RSP Database Configuration Assistant
NETCA.RSP Oracle Net Services Configuration Assistant

Вам также может понравиться