Install Oracle in Silent Mode 11G Release 2 (11.2) on OEL6

Share Embed Donate


Short Description

Install 11g silent mode...

Description

Install Oracle in silent mode 11G Release 2 (11.2) on OEL6 | DBAORA

Home

About me

Installations

Learnings

New features 11g

Search

New features 12c

Posted on February 6, 2015

← Previous

Install Oracle in silent mode 11G Release 2 (11.2) on OEL6

This article presents how to install Oracle 11G Release 2 in silent mode.

Silent mode installation allows to configure necessary Oracle components without using graphical interface nor any interaction with end user. It’s very useful method especially when you want to prepare standard installation using shell scripts.

Read following article how to install Oracle Enterprise Linux 6: Install Oracle Enterprise Linux 6 (for comfort set 4G memory for your virtual machine before proceeding with Oracle software installation).

Installation software is available on OTN version 11.2.0.1 or metalink 11.2.0.4. In this installation I’m presenting installation for 11.2.0.4 but for previous version 11.2.0.X it shouldn’t be different.

Oracle Database 11g Release 2 (11.2.0.4) Software (MOS) Oracle Database 11g Release 2 (11.2.0.1) Software (OTN)

Following components will be installed in silent mode:

oracle binaries: Oracle Enterprise Edition 11G Release 2 network components: listener LISTENER database components: database ORA11G.dbaora.com and database

http://dbaora.com/install-oracle-in-silent-mode-11g-release-2-11-2/[25/02/2016 13:52:05]

Next →

Install Oracle in silent mode 11G Release 2 (11.2) on OEL6 | DBAORA

console

Oracle software that was verified

release 11.2.0.4

p13390677_112040_Linux-x86-64_1of7.zip p13390677_112040_Linux-x86-64_2of7.zip

OS configuration and preparation

OS configuration is executed as root. To login as root just execute following command in terminal.

su - root

Add groups

--groups for database management --groups id are the same as for 12C installations --some groups are not required here but can be used --later for grid binaries installation groupadd groupadd groupadd groupadd groupadd groupadd

-g -g -g -g -g -g

54321 54322 54323 54327 54328 54329

oinstall dba oper asmdba asmoper asmadmin

Add user Oracle --user id is the same as for 12c installations useradd -u 54321 -g oinstall -G dba,oper,asmadmin oracle

Change password for user

passwd oracle

Add kernel parameters to /etc/sysctl.conf kernel.shmmni = 4096 kernel.shmmax = 4398046511104 kernel.shmall = 1073741824 kernel.sem = 250 32000 100 128 fs.aio-max-nr = 1048576 fs.file-max = 6815744 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

http://dbaora.com/install-oracle-in-silent-mode-11g-release-2-11-2/[25/02/2016 13:52:05]

Install Oracle in silent mode 11G Release 2 (11.2) on OEL6 | DBAORA

Apply kernel parameters

/sbin/sysctl -p

Add following lines to set shell limits for user oracle in file /etc/security/limits.conf

oracle oracle oracle oracle oracle oracle oracle oracle

soft hard soft hard soft hard soft hard

nproc nproc nofile nofile core core memlock memlock

131072 131072 131072 131072 unlimited unlimited 50000000 50000000

The /etc/hosts file must contain a fully qualified name for the server.



For example.

127.0.0.1 oel6 oel6.dbaora.com localhost localhost.localdomain

Modify .bash_profile for user oracle in his home directory

# Oracle Settings export TMP=/tmp export export export export export

ORACLE_HOSTNAME=oel6.dbaora.com ORACLE_UNQNAME=ORA11G ORACLE_BASE=/ora01/app/oracle ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1 ORACLE_SID=ORA11G

PATH=/usr/sbin:$PATH:$ORACLE_HOME/bin export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;

alias alias alias alias

cdob='cd $ORACLE_BASE' cdoh='cd $ORACLE_HOME' tns='cd $ORACLE_HOME/network/admin' envo='env | grep ORACLE'

umask 022

Check which packages are installed and which are missing

rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE}(% {ARCH})\n' binutils \

http://dbaora.com/install-oracle-in-silent-mode-11g-release-2-11-2/[25/02/2016 13:52:05]

Install Oracle in silent mode 11G Release 2 (11.2) on OEL6 | DBAORA

compat-libstdc++-33 \ elfutils-libelf \ elfutils-libelf-devel \ gcc \ gcc-c++ \ glibc \ glibc-common \ glibc-devel \ glibc-headers \ ksh \ libaio \ libaio-devel \ libgcc \ libstdc++ \ libstdc++-devel \ make \ sysstat \ unixODBC \ unixODBC-devel

Install missing packages. It’s just example (many in one step):

yum install unixODBC unixODBC-devel sysstat

Stop and disable firewall

systemctl stop firewalld systemctl disable firewalld

Create directory structure

ORACLE_BASE – /ora01/app/oracle

ORACLE_HOME – /ora01/app/oracle/product/11.2.0/db_1

mkdir -p /ora01/app/oracle/product/11.2.0/db_1 chown oracle:oinstall -R /ora01

Secure Linux

Disable secure linux by editing the /etc/selinux/config file, making sure the SELINUX flag is set as follows.

SELINUX=permissive

and enforce it

setenforce Permissive

Disable firewall

service iptables stop chkconfig iptables off

http://dbaora.com/install-oracle-in-silent-mode-11g-release-2-11-2/[25/02/2016 13:52:05]

Install Oracle in silent mode 11G Release 2 (11.2) on OEL6 | DBAORA

Install database software

As Oracle user unzip software

su - oracle cd /home/oracle --unzip software 11.2.0.4 unizp p13390677_112040_Linux-x86-64_1of7.zip unzip p13390677_112040_Linux-x86-64_2of7.zip

It should unzip it to one directory “database”

[oracle@oel6 ~]$ ls database  p13390677_112040_Linux-x86-64_1of7.zip  p13390677_112040_Linux-x86-64_2of7.zip

Check 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/database/response dedicated files called “response files” used for silent mode installations.

The response files store parameters necessary to install Oracle components:

db_install.rsp – used to install oracle binaries, install/upgrade a 

http://dbaora.com/install-oracle-in-silent-mode-11g-release-2-11-2/[25/02/2016 13:52:05]

Install Oracle in silent mode 11G Release 2 (11.2) on OEL6 | DBAORA

database in silent 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

Install Oracle binaries

It’s the best to preserve original response file db_install.rsp before editing it

[oracle@oel6 response]$ cp db_install.rsp db_install.rsp.bck

Edit file db_install.rsp to set parameters required to install binaries. This is just example and in next releases parameters can be different. Each of presented parameter is very well described in db_install.rsp. I just give here brief explanations.

--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 :)

http://dbaora.com/install-oracle-in-silent-mode-11g-release-2-11-2/[25/02/2016 13:52:05]

Install Oracle in silent mode 11G Release 2 (11.2) on OEL6 | DBAORA

--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

once edition is completed. Start binaries installation

cd /home/oracle/database ./runInstaller -silent \ -responseFile /home/oracle/database/response/db_install.rsp

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/installActions201502-06_09-58-53PM.log The installation of Oracle Database 11g was successful. Please check '/ora01/app/oraInventory/logs/silentInstall2015-0206_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.

you are asked to run two scripts as user root. Once it’s done binaries are installed

[root@oel6 /]# /ora01/app/oraInventory/orainstRoot.sh

http://dbaora.com/install-oracle-in-silent-mode-11g-release-2-11-2/[25/02/2016 13:52:05]

Install Oracle in silent mode 11G Release 2 (11.2) on OEL6 | DBAORA

/ora01/app/oracle/product/11.2.0/db_1/root.sh

quick binary verification

[oracle@oel6 ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Fri Feb 6 22:08:57 2015 Copyright (c) 1982, 2013, Oracle.  All rights reserved. Connected to an idle instance. SQL>

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 didn’t changed anything here. So just start standard configuration. It will configure LISTENER with standard settings.

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

Check LISTENER status

lsnrctl status LSNRCTL for Linux: Version 11.2.0.4.0 Production on 06-FEB-2015 23:00:09 Copyright (c) 1991, 2013, Oracle.  All rights

http://dbaora.com/install-oracle-in-silent-mode-11g-release-2-11-2/[25/02/2016 13:52:05]

Install Oracle in silent mode 11G Release 2 (11.2) on OEL6 | DBAORA

reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC) (KEY=EXTPROC1522))) STATUS of the LISTENER -----------------------Alias                     LISTENER Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production Start Date                06-FEB-2015 22:58:06 Uptime                    0 days 0 hr. 2 min. 2 sec Trace Level               off Security                  ON: Local OS Authentication SNMP                      OFF Listener Parameter File   /ora01/app/oracle/product/11.2.0/db_1/network/admin/lis Listener Log File         /ora01/app/oracle/diag/tnslsnr/oel6/listener/alert/log. Listening Endpoints Summary...   (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc) (KEY=EXTPROC1521)))   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oel6) (PORT=1521))) The listener supports no services The command completed successfully

Configure database

The last setup is to create new database ORA11G.dbaora.com

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

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"

http://dbaora.com/install-oracle-in-silent-mode-11g-release-2-11-2/[25/02/2016 13:52:05]

Install Oracle in silent mode 11G Release 2 (11.2) on OEL6 | DBAORA

--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_recover

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"

run database installation

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

http://dbaora.com/install-oracle-in-silent-mode-11g-release-2-11-2/[25/02/2016 13:52:05]

Install Oracle in silent mode 11G Release 2 (11.2) on OEL6 | DBAORA

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

[oracle@oel6 admin]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Fri Feb 6 23:45:16 2015 Copyright (c) 1982, 2013, Oracle.  All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> show parameter db_name NAME         TYPE   VALUE ------------ ------- ------db_name      string  ORA11G SQL>

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/aboutApplicatio 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

http://dbaora.com/install-oracle-in-silent-mode-11g-release-2-11-2/[25/02/2016 13:52:05]

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF