Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Install oracle11gR2 in silent mode

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Silent installation of oracle 11gR2 for RHEL5/6 CENTOS5/6

First, ensure that the system has enough space to install oracle

In addition,

Tmp directory must be greater than 120m

Swap must be greater than 150m

2. The software to be installed:

Binutils-2.17.50.0.6

Compat-libstdc++-33-3.2.3

Elfutils-libelf-0.125

Elfutils-libelf-devel-static-0.125

Gcc-4.1.2

Gcc-c++-4.1.2

Glibc-2.5-24

Glibc-common-2.5

Glibc-devel-2.5

Glibc-headers-2.5

Kernel-headers-2.6.18

Ksh-20060214

Libaio-0.3.106

Libaio-devel-0.3.106

Libgcc-4.1.2

Libgomp-4.1.2

Libstdc++-4.1.2

Libstdc++-devel-4.1.2

Make-3.81

Numactl-devel-0.9.8.i386

Sysstat-7.0.2

X86_64

Yum-y install binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel-static gcc gcc-c++ glibc glibc-devel glibc-common glibc-headers kernel-headers ksh libgcc libgomp libstdc++ libstdc++-devel make numactl-devel sysstat unixODBC unixODBC* libaio-devel libaio-devel* unixODBC-devel unixODBC-devel*

Binutils compat-libstdc++-33 compat-libstdc++-33.i686 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc.i686 glibc-common glibc-devel glibc-devel.i686 glibc-headers ksh libaio libaio.i686 libaio-devel libaio-devel.i686 libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel make sysstat

I386

Yum-y install binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33*.i686 elfutils-libelf-devel gcc gcc-c++ glibc*.i686 glibc glibc-devel

Glibc-devel*.i686 ksh libgcc*.i686 libgcc libstdc++ libstdc++*.i686 libstdc++-devel libstdc++-devel*.i686 libaio libaio*.i686 libaio-devel libaio-d

Evel*.i686 make sysstat sysstat unixODBC unixODBC*.i686 unixODBC-devel unixODBC-devel*.i686

Third, create user groups

/ usr/sbin/groupadd oinstall

/ usr/sbin/groupadd dba

/ usr/sbin/groupadd oper

/ usr/sbin/useradd-g oinstall-G dba,oper-d / home/oracle oracle

Echo "oracle" | passwd-- stdin oracle

Fourth, modify kernel parameters

Vim / etc/sysctl.conf

Net.ipv4.ip_forward = 0

Net.ipv4.conf.default.rp_filter = 1

Net.ipv4.conf.default.accept_source_route = 0

Kernel.sysrq = 0

Kernel.core_uses_pid = 1

Net.ipv4.tcp_syncookies = 1

Kernel.msgmnb = 65536

Kernel.msgmax = 65536

Kernel.shmmax = 536870912

Kernel.shmall = 2097152

Kernel.shmmni = 4096

Kernel.sem = 250 32000 100 128

Net.ipv4.ip_local_port_range = 9000 65500

Fs.aio-max-nr = 1048576

Fs.file-max = 6815744

Net.core.rmem_default = 262144

Net.core.rmem_max = 4194304

Net.core.wmem_default = 262144

Net.core.wmem_max = 1048586

Sysctp-p

5. Modify the system resource restrictions and permissions of oracle users

Grep 'limits' / etc/pam.d/system-auth

Session required pam_limits.so

Vim / etc/security/limits.conf

Oracle soft nproc 2047

Oracle hard nproc 16384

Oracle soft nofile 1024

Oracle hard nofile 65536

Oracle soft stack 10240

Configure oracle user environment variables

Vim / home/oracle/.bash_profile

ORACLE_BASE=/DataBase/oracle

ORACLE_HOME=$ORACLE_BASE/db11g

ORACLE_SID=umpay

Export ORACLE_OWNER=oracle

PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:$PATH

Export PATH ORACLE_BASE ORACLE_HOME ORACLE_SID

. / home/oracle/.bash_profile

Env | grep ORA

Create oraInst.loc

Vi / etc/oraInst.loc

Inventory_loc=/DataBase/oracle/oraInventory

Inst_group=oinstall

Chown oracle:oinstall / etc/oraInst.loc

Chmod 664 / etc/oraInst.loc

6. Extract the installation package

Mkdir-pv / DataBase/oracle/oraInventory

Unzip linux.x64_11gR2_database_1of2.zip-d / DataBase/

Unzip linux.x64_11gR2_database_2of2.zip-d / DataBase/

Chown-R oracle.oinstall / DataBase/

7. Modify the configuration files read during oracle silent installation

Switch to oracle user

Su-oracle

Create a new file or copy template and name it db_install.rsp (modify it according to the actual environment):

Oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0

Oracle.install.option=INSTALL_DB_SWONLY

ORACLE_HOSTNAME=dbserver

UNIX_GROUP_NAME=oinstall

INVENTORY_LOCATION=/DataBase/oracle/oraInventory

SELECTED_LANGUAGES=en,zh_CN

ORACLE_HOME=/DataBase/oracle/db11g

ORACLE_BASE=/DataBase/oracle

Oracle.install.db.InstallEdition=EE

Oracle.install.db.isCustomInstall=false

Oracle.install.db.customComponents=oracle.server:11.2.0.1.0,oracle.sysman.ccr:10.2.7.0.0,oracle.xdk:11.2.0.1.0,oracle.rdbms.oci:11.2.0.1.0,oracle.ne

Twork:11.2.0.1.0,oracle.network.listener:11.2.0.1.0,oracle.rdbms:11.2.0.1.0,oracle.options:11.2.0.1.0,oracle.rdbms.partitioning:11.2.0.1.0,oracle.or

Aolap:11.2.0.1.0,oracle.rdbms.dm:11.2.0.1.0,oracle.rdbms.dv:11.2.0.1.0,orcle.rdbms.lbac:11.2.0.1.0,oracle.rdbms.rat:11.2.0.1.0

Oracle.install.db.DBA_GROUP=dba

Oracle.install.db.OPER_GROUP=oinstall

Oracle.install.db.CLUSTER_NODES=

Oracle.install.db.config.starterdb.type=GENERAL_PURPOSE

Oracle.install.db.config.starterdb.globalDBName=umpay

Oracle.install.db.config.starterdb.SID=umpay

Oracle.install.db.config.starterdb.characterSet=AL32UTF8

Oracle.install.db.config.starterdb.memoryOption=true

Oracle.install.db.config.starterdb.memoryLimit=1024

Oracle.install.db.config.starterdb.installExampleSchemas=false

Oracle.install.db.config.starterdb.enableSecuritySettings=true

Oracle.install.db.config.starterdb.password.ALL=pass

Oracle.install.db.config.starterdb.password.SYS=

Oracle.install.db.config.starterdb.password.SYSTEM=

Oracle.install.db.config.starterdb.password.SYSMAN=

Oracle.install.db.config.starterdb.password.DBSNMP=

Oracle.install.db.config.starterdb.control=DB_CONTROL

Oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=

Oracle.install.db.config.starterdb.dbcontrol.enableEmailNotification=false

Oracle.install.db.config.starterdb.dbcontrol.emailAddress=

Oracle.install.db.config.starterdb.dbcontrol.SMTPServer=

Oracle.install.db.config.starterdb.automatedBackup.enable=false

Oracle.install.db.config.starterdb.automatedBackup.osuid=

Oracle.install.db.config.starterdb.automatedBackup.ospwd=

Oracle.install.db.config.starterdb.storageType=

Oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=

Oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=

Oracle.install.db.config.asm.diskGroup=

Oracle.install.db.config.asm.ASMSNMPPassword=

MYORACLESUPPORT_USERNAME=

MYORACLESUPPORT_PASSWORD=

SECURITY_UPDATES_VIA_MYORACLESUPPORT=

DECLINE_SECURITY_UPDATES=true

PROXY_HOST=

PROXY_PORT=

PROXY_USER=

PROXY_PWD=

Run the installation:

. / runInstaller-silent-responseFile / DataBase/db_install.rsp (the path of the file to be read must be absolute, otherwise the installation will report an error-ignorePrereq)

Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB. Actual 90617 MB Passed

Checking swap space: must be greater than 150 MB. Actual 15999 MB Passed

Preparing to launch Oracle Universal Installer from / tmp/OraInstall2014-04-22, 03-26-43AM. Please wait... [oracle@dbserver database] $[WARNING] [INS-32055] The Central Inventory is located in the Oracle base.

CAUSE: The Central Inventory is located in the Oracle base.

ACTION: Oracle recommends placing this Central Inventory in a location outside the Oracle base directory.

[WARNING] [INS-32055] The Central Inventory is located in the Oracle base.

CAUSE: The Central Inventory is located in the Oracle base.

ACTION: Oracle recommends placing this Central Inventory in a location outside the Oracle base directory.

You can find the log of this install session at:

/ DataBase/oracle/oraInventory/logs/installActions2014-04-22 October 03-26-43AM.log

The following configuration scripts need to be executed as the "root" user.

#! / bin/sh

# Root scripts to run

/ DataBase/oracle/oraInventory/orainstRoot.sh

/ DataBase/oracle/db11g/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. -install for about a few minutes to see the performance of the machine

Execute the root.sh script as the root user and verify that the installation is successful

[root@dbserver db11g] # / DataBase/oracle/db11g/root.sh

Check / DataBase/oracle/db11g/install/root_dbserver_2014-04-22, 03-40-29.log for the output of root script

[root@dbserver db11g] # su-oracle

[oracle@dbserver ~] $sqlplus / nolog

SQL*Plus: Release 11.2.0.1.0 Production on Tue Apr 22 03:41:04 2014

Copyright (c) 1982, 2009, Oracle. All rights reserved.

SQL >

SQL >

SQL >

9. Configure the listener, create a new file, netca.rsp, modify the relevant content as follows

[oracle@dbserver database] $more.. / netca.rsp

[GENERAL]

RESPONSEFILE_VERSION= "11.2"

CREATE_TYPE= "CUSTOM"

[oracle.net.ca]

INSTALLED_COMPONENTS= {"server", "net8", "javavm"}

INSTALL_TYPE= "" custom ""

LISTENER_NUMBER=1

LISTENER_NAMES= {"LISTENER"}

LISTENER_PROTOCOLS= {"TCP;1521"}

LISTENER_START= "" LISTENER ""

NAMING_METHODS= {"TNSNAMES", "ONAMES", "HOSTNAME"}

NSN_NUMBER=1

NSN_NAMES= {"EXTPROC_CONNECTION_DATA"}

NSN_SERVICE= {"PLSExtProc"}

NSN_PROTOCOLS= {"TCP;HOSTNAME;1521"}

Run the installation listener:

[oracle@dbserver database] $netca-silent-responseFile / DataBase/netca.rsp

* DISPLAY environment variable not set!

Oracle Net Configuration Assistant is a GUI tool

Which requires that DISPLAY specify a location

Where GUI tools can display.

Set and export DISPLAY, then re-run. Declare the DISPLAY variable after reporting this error

[oracle@dbserver database] $export DISPLAY=10.10.73.132:0.0

[oracle@dbserver database] $netca-silent-responseFile / DataBase/netca.rsp

Parsing command line arguments:

Parameter "silent" = true

Parameter "responsefile" = / DataBase/netca.rsp

Done parsing command line arguments.

Oracle Net Services Configuration:

Configuring Listener:LISTENER

Listener configuration complete.

Oracle Net Listener Startup:

Running Listener Control:

/ DataBase/oracle/db11g/bin/lsnrctl start LISTENER

Listener Control complete.

Listener started successfully.

Profile configuration complete.

Oracle Net Services configuration successful. The exit code is 0

[oracle@dbserver database] $netstat-nutlp

(Not all processes could be identified, non-owned process info

Will not be shown, you would have to be root to see it all.)

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name

Tcp 0 0:: 5989: * LISTEN-

Tcp 0 0: 1521: * LISTEN 8846/tnslsnr

Tcp 0 0:: 22: * LISTEN-

[oracle@dbserver database] $

10. Install the database, create a new file, dbca.rsp and modify the relevant contents as follows

[oracle@dbserver database] $more.. / dbca.rsp

[GENERAL]

RESPONSEFILE_VERSION = "11.2.0"

OPERATION_TYPE = "createDatabase"

[CREATEDATABASE]

GDBNAME = "dbserver"

SID = "umpay"

TEMPLATENAME = "General_Purpose.dbc"

[createTemplateFromDB]

SOURCEDB = "myhost:1521:orcl"

SYSDBAUSERNAME = "system"

TEMPLATENAME = "General_Purpose.dbc"

[createCloneTemplate]

SOURCEDB = "orcl"

TEMPLATENAME = "My Clone TEMPLATE"

[DELETEDATABASE]

SOURCEDB = "orcl"

[generateScripts]

TEMPLATENAME = "New Database"

GDBNAME = "orcl11.us.oracle.com"

[CONFIGUREDATABASE]

[ADDINSTANCE]

DB_UNIQUE_NAME = "orcl11g.us.oracle.com"

NODELIST=

SYSDBAUSERNAME = "sys"

[DELETEINSTANCE]

DB_UNIQUE_NAME = "orcl11g.us.oracle.com"

INSTANCENAME = "orcl11g"

SYSDBAUSERNAME = "sys"

EMCONFIGURATION = "LOCAL"

SYSMANPASSWORD = "123456"

DBSNMPPASSWORD = "123456"

Run the installation database:

[oracle@dbserver database] $dbca-silent-createdatabase-responseFile / DataBase/dbca.rsp

Enter SYS user password:

Enter SYSTEM user password:

Copying database files

1% complete

3% complete

11% complete

18% complete

26% complete

37% complete

Creating and starting Oracle instance

40% complete

45% complete

50% complete

55% complete

56% 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 "/ DataBase/oracle/cfgtoollogs/dbca/dbserver/dbserver.log" for further details.

[oracle@dbserver database] $netstat-nutlp

(Not all processes could be identified, non-owned process info

Will not be shown, you would have to be root to see it all.)

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name

Tcp 0 0:: 5989: * LISTEN-

Tcp 0 0: 1521: * LISTEN 8846/tnslsnr

Tcp 00: 42291: * LISTEN 9467/ora_d000_umpay

Tcp 0 0:: 22: * LISTEN-

Udp 00:: 1 9123: * 9467/ora_d000_umpay

Udp 0 0: 29367: * 9463/ora_mmon_umpay

Udp 0 0:: 1 53190: * 9435/ora_pmon_umpay

Udp 00:: 1 21703: * 9469/ora_s000_umpay

Verify that the installation is successful

[oracle@dbserver database] $sqlplus / nolog

SQL*Plus: Release 11.2.0.1.0 Production on Tue Apr 22 03:52:29 2014

Copyright (c) 1982, 2009, Oracle. All rights reserved.

SQL > conn / as sysdba

Connected.

SQL > show user

USER is "SYS"

SQL > show sga

Total System Global Area 1653518336 bytes

Fixed Size 2213896 bytes

Variable Size 956303352 bytes

Database Buffers 687865856 bytes

Redo Buffers 7135232 bytes

SQL >

END

Script to automatically install oracle

Automatic installation script

The script must be run: there must be linux.x64_11gR2_database_1of2.zip,linux.x64_11gR2_database_2of2.zip and edited dbca.rsp db_install.rsp netca.rsp file in the same directory of the script, otherwise the script will not run

#! / bin/sh

# #

# auto install oracle #

# DATE: 2014-04-18 #

# Last Update: 2014-07-2 #

# #

. / etc/sysconfig/network

. / etc/sysconfig/selinux

[$UID-ne 0] & & exit 2

[$NETWORKING = = no] & & exit 2

[$SELINUX! = "Disabled"] & & setenforce 0 > > / dev/null 2 > & 1There sed-I'/ SELINUX/s/enforcing/disabled/' / etc/selinux/config

[`hostname` = $HOSTNAME] | | exit 2

/ etc/init.d/iptables status | grep-Q "stopped" | | / sbin/iptables-F

For i in linux.x64_11gR2_database_1of2.zip linux.x64_11gR2_database_2of2.zip dbca.rsp db_install.rsp netca.rsp

Do

[- f $I] | | exit 2

Done

Echo-n 'Input ORACLE_BASE:'

Read ORACLE_BASE

Echo-n 'Input ORACLE_HOME:'

Read ORACLE_HOME

Echo-n 'Input ORACLE_SID:'

Read ORACLE_SID

Uname-a | grep-Q "x86" 64 "& & export OS=" x86 "64" | | export OS= "i386"

If [$OS = = "x86x64"]; then

Yum-y install gcc* gcc-* gcc-c++-* glibc-devel-* glibc-headers-* compat-libstdc* libstdc* elfutils-libelf-devel* libaio-devel* sysstat* unixODBC-* pdksh-*

Else

Yum-y install binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33*.i686 elfutils-libelf-devel gcc gcc-c++ glibc*.i686 glibc glibc-devel glibc-devel*.i686 ksh libgcc*.i686 libgcc libstdc++ libstdc++*.i686 libstdc++-devel libstdc++-devel*.i686 libaio libaio*.i686 libaio-devel libaio-devel*.i686 make sysstat sysstat unixODBC unixODBC*.i686 unixODBC-devel unixODBC-devel*.i686

Fi

For j in iptables rhnsd isdn avahi-daemon avahi-dnsconfd bluetooth cpuspeed hidd ip6tables mcstrans pcscd gpm xinetd portmap yum-updatesd restorecond setroubleshoot yum-updatesd libvirtd xendomains xend iptables sendmail postfix

Do

/ etc/init.d/$j stop

/ sbin/chkconfig-- level 2345$ j off

Done

/ usr/sbin/groupadd oinstall

/ usr/sbin/groupadd dba

/ usr/sbin/groupadd oper

/ usr/sbin/useradd-g oinstall-G dba,oper-d / home/oracle

Echo "oracle" | passwd-- stdin oracle

Mv / etc/sysctl.conf / etc/sysctl.conf- `date +% Ymure% mMur% d`

Cat / etc/sysctl.conf

Net.ipv4.ip_forward = 0

Net.ipv4.conf.default.rp_filter = 1

Kernel.core_uses_pid = 1

Kernel.sysrq = 0

Net.ipv4.tcp_syncookies = 1

Kernel.shmall = 2097152

Kernel.shmmax = 536870912

Kernel.shmmni = 4096

Kernel.sem = 250 32000 100 128

Fs.aio-max-nr = 1048576

Fs.aio-max-nr = 1048576

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_default = 262144

EOF

/ sbin/sysctl-p

Cat > / etc/security/limits.conf

Oracle soft nproc 2047

Oracle hard nproc 16384

Oracle soft nofile 1024

Oracle hard nofile 65536

EOF

Cat > / etc/pam.d/login

Session required pam_limits.so

EOF

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

LOCAL_IP= `/ sbin/ifconfig | grep "inet addr" | grep-v "127.0" | sed-e's _

Cat > / home/oracle/.bash_profile

ORACLE_BASE=$ORACLE_BASE

ORACLE_HOME=$ORACLE_HOME

ORACLE_SID=$ORACLE_SID

DISPLAY=$LOCAL_IP:0.0

PATH=\ $ORACLE_HOME/bin:\ $PATH

Export PATH ORACLE_BASE ORACLE_HOME ORACLE_SID DISPLAY

EOF

Cat > / etc/oraInst.loc

Inventory_loc=$ORACLE_BASE/oraInventory

Inst_group=oinstall

EOF

Chown oracle:oinstall / etc/oraInst.loc

Chmod 664 / etc/oraInst.loc

[- d $ORACLE_HOME] & & mv $ORACLE_HOME $ORACLE_HOME- `date +% Ymuri% MMI% d`

Mkdir-p $ORACLE_BASE/oraInventory

Mkdir-p $ORACLE_HOME

Unzip linux.x64_11gR2_database_1of2.zip-d $ORACLE_BASE/

Unzip linux.x64_11gR2_database_2of2.zip-d $ORACLE_BASE/

Cp dbca.rsp db_install.rsp netca.rsp $ORACLE_BASE/

Chown-R oracle:oinstall $ORACLE_BASE

Su-oracle-c "$ORACLE_BASE/database/runInstaller-silent-ignorePrereq-responseFile $ORACLE_BASE/db_install.rsp" & & sh $ORACLE_HOME/root.sh

Su-oracle-c "netca-silent-responseFile $ORACLE_BASE/netca.rsp"

Su-oracle-c "dbca-silent-createdatabase-responseFile $ORACLE_BASE/dbca.rsp"

Oracle modifies character encoding to utf8

Shutdown immediate

Startup mount

Alter session set sql_trace=true

Alter system enable restricted session

Alter system set job_queue_processes=0

Alter system set aq_tm_processes=0

Alter database open

Alter database character set internal_use utf8

Alter session set sql_trace=false

Shutdown immediate

Startup

Attachment: http://down.51cto.com/data/2364593

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report