silent方式安装oracle11gR2

静默安装oracle 11gR2, 适用于 RHEL5/6 CENTOS5/6

一、保证系统有足够的空间来安装oracle

另外

tmp目录必须大于120M

swap必须大于150M

二、需要安装的软件:

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

三、创建用户组

/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

四、修改内核参数

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

五、修改oracle用户的系统资源限制和权限

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

六、配置oracle用户环境变量

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

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

六、解压安装包

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/

七、修改oracle silent安装时读取的配置文件

切换到oracle用户

su - oracle

新建一个文件或者copy模板,命名为 db_install.rsp 内容为下(根据实际环境修改):

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=

运行安装:

./runInstaller -silent -responseFile /DataBase/db_install.rsp (读取的文件路径一定要是绝对路径,否则安装会报错-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 ...[[email protected] 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_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.   ----安装大概几分钟,看机器性能

八、以root用户身份执行root.sh脚本并验证安装是否成功

[[email protected] 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

[[email protected] db11g]# su - oracle

[[email protected] ~]$ 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>

九、配置侦听器,新建文件netca.rsp修改相关内容如下

[[email protected] 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"}

运行安装侦听器:

[[email protected] 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.报这种错后声明DISPLAY变量

[[email protected] database]$ export DISPLAY=10.10.73.132:0.0

[[email protected] 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

[[email protected] 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      -

[[email protected] database]$

十、安装数据库,新建文件dbca.rsp修改相关内容如下

[[email protected] 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"

运行安装数据库:

[[email protected] 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.

[[email protected] 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 :::42291                    :::*                        LISTEN      9467/ora_d000_umpay

tcp        0      0 :::22                       :::*                        LISTEN      -

udp        0      0 ::1:9123                    :::*                                    9467/ora_d000_umpay

udp        0      0 :::29367                    :::*                                    9463/ora_mmon_umpay

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

udp        0      0 ::1:21703                   :::*                                    9469/ora_s000_umpay

十一、验证安装是否成功

[[email protected] 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

后期脚本实现自动安装oracle

oracle修改字符编码为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;

silent方式安装oracle11gR2

时间: 2024-08-30 04:41:19

silent方式安装oracle11gR2的相关文章

rhel 5.8下静默安装oracle11gr2

1.图形界面下录制脚本如下: #-------------------------------------------------------------------------------# Do not change the following system generated value. #-------------------------------------------------------------------------------oracle.install.respon

静默方式安装10g数据库软件+升级patch+手工建库

通常我们安装Oracle数据库软件,都是用OUI图形界面来完成的,但有些Unix/Linux系统中并未安装图形系统,也就无法使用图形界面来安装Oracle的产品了,对于这种场景,就只能采用静默方式来安装了,Oracle提供了这种silent方式,主要是通过配置响应文件rsp来完成的. 一.静默安装10.2.0.1数据库软件 --解压安装包 [[email protected] u01]$ unzip 10201_database_linux32.zip [[email protected] u0

php5.3 fastcgi方式 安装以及和nginx整合

php5.3 fastcgi方式 安装以及和nginx整合 注意:不要随便改变基础库的版本,否则会对别的软件产生编译错误 1.基础依赖包安装: cd /software/zlib-1.2.3./configuremakemake install cd /software/libxml2-2.6.30./configure --prefix=/usr/local/libxml2/make make install  cd /software/libmcrypt-2.5.8./configure -

CentOS6.8(Linux) 安装Oracle11gR2填坑指南

安装前准备: Oracle11gR2安装介质: linux系统足够的磁盘空间和内存: linux系统需要有固定ip: Xmanager5(图形化安装需要): 依赖包可通过yum方式安装(需要联网环境): zip包的解压工具可通过yum方式安装(需要联网环境): root用户权限:思路: 设置固定IP.修改主机名并添加主机与IP的对应关系(不添加后面安装过程可能会报Oracle Net Configuration Assisant failed的错误): 设置固定IP:vi /etc/syscon

Linux平台安装Oracle11gR2数据库

1. 数据库安装先决条件 1.1 认证的操作系统检查确认 o RHEL4,OEL4 - update 7 or greater o RHEL5,OEL5 - 5.2 or greater o RHEL6,OEL6 - 6.0 or greater o SLES10 - Kernel 2.6.16.21-0.8 or greater o SLES11 - Kernel 2.6.27.19-5 or greater o Asianux Server 3 SP2 NOTE: On RHEL6/OEL6

linux CentOS7最小化安装环境静默安装Oracle11GR2数据库(静默创建实例)

执行安装前的准备工作: 1.安装操作系统:http://blog.51cto.com/mflag/23003592.安装依赖包:http://blog.51cto.com/mflag/23009093.上传并解压安装包;http://blog.51cto.com/mflag/23009124.修改配置文件:http://blog.51cto.com/mflag/2300914 运维.网管必会技能:linux centos7命令行静默安装oracle11GR2视频课程视频教程:http://edu

centos7最小化安装Oracle11gR2

1.准备CentOS 7 系统环境 我以 CentOS-7-x86_64-DVD-1511.iso 为例,简述Oracle 11g的安装过程. 由于是使用静默模式(silent)安装的,无需使用图形化界面,我选择了最小安装的服务器版的CentOS 7. 安装过程可参考 https://jingyan.baidu.com/article/fd8044fade8ac35031137a82.html 安装完成后,只有命令行界面. 2.下载 Oracle 11g Oracle官方网站 http://ww

linux CentOS7下快速静默安装Oracle11GR2数据库并创建实例

linux CentOS7下快速静默安装Oracle11GR2数据库并创建实例本文章适合已经熟悉安装过程,需要快速部署使用初学者建议分步学习:https://edu.51cto.com/course/15530.html linux.x64_11gR2_database_1of2.zip (oracle官网下载)linux.x64_11gR2_database_2of2.zip (oracle官网下载)rlwrap-0.42.tar.gz (51CTO下载里搜)三个安装包: 一.上传安装包 mk

CentOS 7以yum方式安装zabbix3.2及配置文件详解

一.zabbix简介与环境准备 简介详见 ---> zabbix简介 环境准备: CentOS 7(node7):zabbix-server,web,mysql,agent mariadb:5.5.50 zabbix组件:3.2.1 apache:2.4.6 二.安装与配置 1.安装数据库(mariadb),可直接yum安装 [[email protected] ~]# vim /etc/yum.repos.d/MariaDB.repo [mariadb]  name = MariaDB  ba