广告
返回顶部
首页 > 资讯 > 数据库 >RedHat 6 静默安装Oracle 11gR2
  • 406
分享到

RedHat 6 静默安装Oracle 11gR2

2024-04-02 19:04:59 406人浏览 独家记忆
摘要

之前看了网上很多篇linux静默安装oracle的文章,但安装测试时老觉得有问题,后来直接找来Oracle官方英文文档并仔细阅读研究rsp文件的内容说明,经过自己在虚拟机中的安装测试,使用RedHat 6.

之前看了网上很多篇linux静默安装oracle的文章,但安装测试时老觉得有问题,后来直接找来Oracle官方英文文档并仔细阅读研究rsp文件的内容说明,经过自己在虚拟机中的安装测试,使用RedHat 6.5(内核版本:2.6.32-431.el6.x86_64)上静默安装Oracle 11gR2(版本:11.2.0.3),整理出了本文,主要包括了环境要求与准备、静默安装Oracle软件与监听、静默安装Oracle数据库、安装完成后检查、设置Oracle开机自动启动等部分。


一、 环境要求与准备

1、硬件要求

(1)内存

Minimum: 1 GB of RAM

Recommended: 2 GB of RAM or more

To determine the RAM size, enter the following command:

# grep MemTotal /proc/meminfo

 

(2)SWAP

Available RAM Swap Space Required

Between 1 GB and 2 GB 1.5   ——times the size of the RAM

Between 2 GB and 16 GB ——Equal to the size of the RAM

More than 16 GB ——16 GB

# grep SwapTotal /proc/meminfo

 

(3)ASM

Automatic Memory Management feature  requires more shared memory ( /dev/shm) and file descriptors

#df -h /dev/shm/

Note: MEMORY_MAX_TARGET and  MEMORY_TARGET cannot be used when LOCK_SGA is enabled or with HugePages on Linux.

 

(4)磁盘空间

At least 1 GB of disk space in the  /tmp directory

Enterprise Edition ——At least 4.7 GB for Software Files and 1.7 GB  for Data Files

Standard Edition ——At least 4.6 GB for Software Files and 1.5 GB  for Data Files


2、软件要求

(1)操作系统要求

■ Asianux Server 3 SP2

■ Asianux Server 4 SP3

■ Oracle Linux 4 Update 7

■ Oracle Linux 5 Update 2 (with Red Hat Compatible Kernel)

■ Oracle Linux 5 Update 5

■ Oracle Linux 6

■ Oracle Linux 6 (with Red Hat Compatible Kernel)

■ Oracle Linux 7

■ Oracle Linux 7 (with the Red Hat Compatible Kernel)

■ Red Hat Enterprise Linux 4 Update 7

■ Red Hat Enterprise Linux 5 Update 2

■ Red Hat Enterprise Linux 6

■ Red Hat Enterprise Linux 7

■ SUSE Linux Enterprise Server 10 SP2

■ SUSE Linux Enterprise Server 11

 

(2)内核要求

■On Red Hat Enterprise Linux 5 Update 5

2.6.18 or later

■On Red Hat Enterprise Linux 6

2.6.32-71.el6.x86_64 or later

■ On Red Hat Enterprise Linux 7

3.10.0-54.0.1.el7.x86_64 or later

 

(3)依赖包要求

Note: Starting with Oracle Database 11g Release 2 (11.2.0.2), all the 32-bit packages, except for  GCc-32bit-4.3 , listed in the following table are no longer required for installing a database on Linux x86-64. Only the 64-bit packages are required. However, for any Oracle Database 11g release before 11.2.0.2, both the 32-bit and 64-bit packages listed in the following table are required.

 The following or later version of packages for Oracle Linux 6, Red Hat Enterprise Linux 6, and Asianux Server 4 must be installed:


binutils-2.20.51.0.2-5.11.el6 (x86_64)

compat-libcap1-1.10-1 (x86_64)

compat-libstdc++-33-3.2.3-69.el6 (x86_64)

compat-libstdc++-33-3.2.3-69.el6.i686

gcc-4.4.4-13.el6 (x86_64)

gcc-c++-4.4.4-13.el6 (x86_64)

glibc-2.12-1.7.el6 (i686)

glibc-2.12-1.7.el6 (x86_64)

glibc-devel-2.12-1.7.el6 (x86_64)

glibc-devel-2.12-1.7.el6.i686

ksh

libgcc-4.4.4-13.el6 (i686)

libgcc-4.4.4-13.el6 (x86_64)

libstdc++-4.4.4-13.el6 (x86_64)

libstdc++-4.4.4-13.el6.i686

libstdc++-devel-4.4.4-13.el6 (x86_64)

libstdc++-devel-4.4.4-13.el6.i686

libaio-0.3.107-10.el6 (x86_64)

libaio-0.3.107-10.el6.i686

libaio-devel-0.3.107-10.el6 (x86_64)

libaio-devel-0.3.107-10.el6.i686

make-3.81-19.el6

sysstat-9.0.4-11.el6 (x86_64)


(4)ODBC要求

On Oracle Linux 6, Red Hat Enterprise Linux 6:

unixODBC-2.2.14-11.el6 (x86_64) or later

unixODBC-2.2.14-11.el6.i686 or later

unixODBC-devel-2.2.14-11.el6 (x86_64) or later

unixODBC-devel-2.2.14-11.el6.i686 or later


3、用户和组要求

The following local operating system groups and users are required if you are installing Oracle Database:

■ The Oracle Inventory group (typically,  oinstall )

■ The OSDBA group (typically,  dba )

■ The Oracle software owner (typically,  oracle )

■ The OSOPER group (optional. Typically,  oper )

# grep dba /etc/group

# id oracle

#groupadd dba

#groupadd oinstall

If the oracle user exists:

# /usr/sbin/usermod -g oinstall -G dba oracle

If the oracle user does not exist:

# /usr/sbin/useradd -g oinstall -G dba oracle

set the passWord: 

# passwd oracle


4、内核参数要求

RedHat 6 静默安装Oracle 11gR2

Note: If the current value of any parameter is higher than the value listed in this table, then do not change the value of that parameter.本文原始出处:江健龙的技术博客Http://jiangjianlong.blog.51cto.com/3735273/1832986

修改方法:

create or edit the  /etc/sysctl.conf file, and add or edit lines similar to the following:

 

fs.aio-max-nr = 1048576

fs.file-max = 6815744

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

 

Note: if any of the current values are larger than the

minimum value, then specify the larger value。

使生效:

# /sbin/sysctl -p或reboot

 

如果运行 #sysctl  -p 命令报错

error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key

error: "net.bridge.bridge-nf-call-iptables" is an unknown key

error: "net.bridge.bridge-nf-call-arptables" is an unknown key

则解决方法为执行如下命令:

#modprobe  bridge

 

查看:

# /sbin/sysctl -a


5、资源限制要求

修改好后必须使用Oracle用户登出再登录才生效

$ ulimit -Sn

4096

$ ulimit -Hn

65536

$ ulimit -Su

2047

$ ulimit -Hu

16384

$ ulimit -Ss

10240

$ ulimit -Hs

32768

修改方法:

vi /etc/security/limits.conf

末尾加入以下内容:

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 4096

oracle hard nofile 65536

oracle hard stack 32768


6、创建安装目录

Oracle_Base目录:/u01/app/oracle/

Oracle_Home目录:/u01/app/oracle/11gr2

Oracle清单目录:/u01/app/oracle/oraInventory

RedHat 6 静默安装Oracle 11gR2


7、配置Oracle用户环境变量

vi /home/oracle/.bash_profile

export EDITOR=vi

export ORACLE_SID=orcl

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/11gr2

export nls_date_fORMat="yyyy-mm-dd hh34:mi:ss"

export PATH=/u01/app/oracle/11gr2/bin:$PATH

 

执行命令ource .bash_profile 使配置生效  


8、编辑/etc/profile

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

本文原始出处:江健龙的技术博客http://jiangjianlong.blog.51cto.com/3735273/1832986


二、 静默安装Oracle 软件和监听

1、静默安装命令

$ /directory_path/runInstaller [-silent] [-noconfig] -responseFile responsefilename

■-noconfig suppresses running the configuration assistants during installation,

and a software-only installation is performed instead.

■ responsefilename is the full path and file name of the installation response

file that you configured.


2、编辑应答文件db_install.rsp

更改以下内容,其他不需要改,标橙色的需注意要结合实际环境更改。Oracle版本:11.2.0.3

oracle.install.option=INSTALL_DB_SWONLY

ORACLE_HOSTNAME=rh7

UNIX_GROUP_NAME=oinstall

SELECTED_LANGUAGES=en,zh_CN

ORACLE_HOME=/u01/app/oracle/11gr2

ORACLE_BASE=/u01/app/oracle/

INVENTORY_LOCATION=/u01/app/oraInventory

oracle.install.db.InstallEdition=EE

oracle.install.db.DBA_GROUP=dba

oracle.install.db.OPER_GROUP=oinstall

DECLINE_SECURITY_UPDATES=true

oracle.install.db.EEOptionsSelection=false

3、执行静默安装Oracle命令

./runInstaller -silent -noconfig -ignorePrereq -responseFile /oracle11gr2zip/db_install.rsp

RedHat 6 静默安装Oracle 11gR2

4、使用root登录执行脚本

RedHat 6 静默安装Oracle 11gR2


5、执行静默安装监听命令

不需要修改应答文件内容,直接使用介质中的netca.rsp文件

[oracle@rh7 database]$ netca /silent /responseFile /oracle11gr2zip/database/resp

onse/netca.rsp

RedHat 6 静默安装Oracle 11gR2


三、 静默安装Oracle数据库

1、编辑dbca.rsp

更改以下内容,其他不需要改,标橙色的内容需结合自己实际环境修改

RESPONSEFILE_VERSION = "11.2.0"

OPERATION_TYPE = "createDatabase"

GDBNAME = "orcl"

SID = "orcl"

TEMPLATENAME = "General_Purpose.dbc"

SYSPASSWORD = "p@ssw0rd"

SYSTEMPASSWORD = "p@ssw0rd"

EMCONFIGURATION = "LOCAL"

SYSMANPASSWORD = "p@ssw0rd"

DBSNMPPASSWORD = "p@ssw0rd"

STORAGETYPE=FS

CHARACTERSET = "ZHS16GBK"

NATIONALCHARACTERSET= "AL16UTF16"

MEMORYPERCENTAGE = "40"

TOTALMEMORY = "1024"


 2、执行静默安装数据库命令

 $dbca -silent -responseFile /oracle11gr2zip/dbca.rsp

RedHat 6 静默安装Oracle 11gR2

四、安装完成后检查

1、检查监听状态

$ lsnrctl status

RedHat 6 静默安装Oracle 11gR2


2、检查Oracle进程

$ ps -ef |grep ora_ |grep -v grep

RedHat 6 静默安装Oracle 11gR2


3、登录Oracle数据库并执行常见查询命令

RedHat 6 静默安装Oracle 11gR2

RedHat 6 静默安装Oracle 11gR2

RedHat 6 静默安装Oracle 11gR2

RedHat 6 静默安装Oracle 11gR2


4、登录EM

RedHat 6 静默安装Oracle 11gR2


RedHat 6 静默安装Oracle 11gR2

RedHat 6 静默安装Oracle 11gR2


五、配置Oracle开机自动启动

1、以Oracle登录,编辑oratab

vi /etc/oratab,将N改为Y

本文原始出处:江健龙的技术博客 http://jiangjianlong.blog.51cto.com/3735273/1832986

RedHat 6 静默安装Oracle 11gR2


2、 root登录,创建脚本

vi /etc/init.d/oracle,创建oracle文件,内容如下:

#!/bin/sh

# chkconfig: 35 80 10

# description: Oracle auto start-stop script. 

#

# Set ORACLE_HOME to be equivalent to the $ORACLE_HOME

# from which you wish to execute dbstart and dbshut;

#

# Set ORACLE_OWNER to the user id of the owner of the

# Oracle database in ORACLE_HOME.

ORACLE_HOME=/u01/app/oracle/11gr2

ORACLE_OWNER=oracle

if [ ! -f $ORACLE_HOME/bin/dbstart ]

then

 echo "Oracle startup: cannot start"

 exit

fi

case "$1" in

'start')

# Start the Oracle databases:

echo "Starting Oracle Databases ... "

echo "-------------------------------------------------" >> /var/log/oracle

date +" %T %a %D : Starting Oracle Databases as part of system up." >> /var/log/oracle

echo "-------------------------------------------------" >> /var/log/oracle

su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart" >>/var/log/oracle

echo "Done" 

# Start the Listener:

echo "Starting Oracle Listeners ... "

echo "-------------------------------------------------" >> /var/log/oracle

date +" %T %a %D : Starting Oracle Listeners as part of system up." >> /var/log/oracle

echo "-------------------------------------------------" >> /var/log/oracle

su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl start" >>/var/log/oracle

echo "Done."

echo "-------------------------------------------------" >> /var/log/oracle

date +" %T %a %D : Finished." >> /var/log/oracle

echo "-------------------------------------------------" >> /var/log/oracle

touch /var/lock/subsys/oracle

;;

'stop')

# Stop the Oracle Listener:

echo "Stoping Oracle Listeners ... "

echo "-------------------------------------------------" >> /var/log/oracle

date +" %T %a %D : Stoping Oracle Listener as part of system down." >> /var/log/oracle

echo "-------------------------------------------------" >> /var/log/oracle

su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl stop" >>/var/log/oracle

echo "Done."

rm -f /var/lock/subsys/oracle 

# Stop the Oracle Database:

echo "Stoping Oracle Databases ... "

echo "-------------------------------------------------" >> /var/log/oracle

date +" %T %a %D : Stoping Oracle Databases as part of system down." >> /var/log/oracle

echo "-------------------------------------------------" >> /var/log/oracle

su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbshut" >>/var/log/oracle

echo "Done."

echo ""

echo "-------------------------------------------------" >> /var/log/oracle

date +" %T %a %D : Finished." >> /var/log/oracle

echo "-------------------------------------------------" >> /var/log/oracle

;; 

'restart')

$0 stop

$0 start

;;

esac


3、赋予脚本权限

RedHat 6 静默安装Oracle 11gR2


4、设置开机启动

RedHat 6 静默安装Oracle 11gR2


5、测试脚本效果

(1)关闭数据库

RedHat 6 静默安装Oracle 11gR2

(2)使用root登录,执行命令service oracle start

RedHat 6 静默安装Oracle 11gR2

(3)登录数据库检查,数据库已在运行,监听也正常

RedHat 6 静默安装Oracle 11gR2

(4)执行service oracle stop

RedHat 6 静默安装Oracle 11gR2

(5)检查监听和数据库都已关闭

RedHat 6 静默安装Oracle 11gR2


您可能感兴趣的文档:

--结束END--

本文标题: RedHat 6 静默安装Oracle 11gR2

本文链接: https://www.lsjlt.com/news/50434.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • RedHat 6 静默安装Oracle 11gR2
    之前看了网上很多篇Linux静默安装Oracle的文章,但安装测试时老觉得有问题,后来直接找来Oracle官方英文文档并仔细阅读研究rsp文件的内容说明,经过自己在虚拟机中的安装测试,使用RedHat 6....
    99+
    2022-10-18
  • oracle 11gR2静默silent安装
    1、下载oracle 11ghttp://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html 2、系统环境...
    99+
    2022-10-18
  • RedHat 7 静默安装Oracle 12c
    之前在网上看了很多Oracle的静默安装教程,感觉有些乱,经过自己查阅Oracle官网英文手册,结合在虚拟机中安装测试,整理出了这篇RedHat 7 静默安装Oracle 12c。redhat 6静默安装O...
    99+
    2022-10-18
  • oracle 11gR2 安装 在redhat 5.8上的安装
    环境需求:Xmanager Enterprise 4  VMware  11.0.0 build-2305329 Red Hat&nbs...
    99+
    2022-10-18
  • Oracle 静默安装11gr2 已验证过,可以直接安装
    操作系统及Oracle版本linux版本:SUSE Linux Enterprise Server 11 (x86_64)Oracle 版本:Release 11.2.0.3.0  1、检查依赖包...
    99+
    2022-10-18
  • RedHat 7如何静默安装Oracle11g
    这篇文章主要介绍RedHat 7如何静默安装Oracle11g,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完! 安装环境:主机:浪潮NF5270M4 CPU...
    99+
    2022-10-18
  • oracle静默安装
    1.1     解压安装包Oracle11gR2安装为两个安装包,全部解压后,需要将两个安装包的内容合并在一起后进行安装Oracle版本linux64_11...
    99+
    2022-10-18
  • Oracle安装(11g)静默安装
           本博文讲述如何在linux系统下静默安装oracle11g(11.2.4.0)。主要用于图形显示不方便的场景,也适用于脚本化批量部署的需要。系统环境OS...
    99+
    2022-10-18
  • Oracle之静默安装
    服务器采用的是阿里云,具体看下面[root@aliyun_test var]# cat /etc/system-releaseCentOS release 6.5 (Final)[root@aliyun_t...
    99+
    2022-10-18
  • Linux 静默安装 oracle
    1.准备安装包linux.x64_11gR2_database_1of2.ziplinux.x64_11gR2_database_2of2.ziprlwrap-0.30.tar.gz 2.安装依赖关系先建立...
    99+
    2022-10-18
  • Linux静默安装Oracle
    环境准备:1、主机名:vim /etc/sysconfig/network 2、本地域名解释vim /etc/hosts #################必要的依赖####################...
    99+
    2022-10-18
  • Oracle 11g静默安装
    1、检查安装包 安装依赖包 yum -y install gcc make binutils gcc-c++ compat-libstdc++-33 elfutils-libelf-devel elfutils-libelf-...
    99+
    2019-05-24
    Oracle 11g静默安装
  • oracle 10g 静默安装
    #yum -y install autoconf automake binutils-devel bison cpp dos2unix ftp gcc gcc-c++ lrzsz python-devel ...
    99+
    2022-10-18
  • linux7静默安装11GR2 RAC的方法是什么
    这篇文章主要介绍“linux7静默安装11GR2 RAC的方法是什么”,在日常操作中,相信很多人在linux7静默安装11GR2 RAC的方法是什么问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方...
    99+
    2022-10-18
  • 【静默】在RHEL 6.5上静默安装Oracle 18c
    【静默】在RHEL 6.5上静默安装Oracle 18cOracle 18c。18c其实就是12.2.0.2,19c就是12.2.0.3。db_home.zip 安装包大概4.25G,解压后有8.9G,数据...
    99+
    2022-10-18
  • Oracle静默安装(单机)
    linux下静默安装oracle数据库各参数选项作用说明 https://www.imzcy.cn/1631.html 说明: 1. 操作系统版本为 Redhat6.7 , IP...
    99+
    2022-10-18
  • 如何静默安装Oracle
    这篇文章主要介绍了如何静默安装Oracle,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。Oracle Database,又名Oracle R...
    99+
    2022-10-18
  • Oracle静默安装模板
    oracle安装环境配置前提下 1 在安装文件/database/response/*有三个配置文件模板 [oracle@oracledb response]$ ll 总用量 100 -rwxrwxr-x. 1 oracle oinstal...
    99+
    2016-06-06
    Oracle静默安装模板 数据库入门 数据库基础教程 数据库 mysql
  • 静默安装卸载 ORACLE
      静默安装: 使用 dbca.rsp 模板 # 修改第78 行的全局数据库的名字=SID+主机域名 DBNAME="orcl.sczq" # 修改第149行的ORACLE SID SID="orcl" # 修改第415行的数据库编码 CH...
    99+
    2017-03-01
    静默安装卸载 ORACLE 数据库入门 数据库基础教程 数据库 mysql
  • oracle 11G如何静默安装
    这篇文章将为大家详细讲解有关oracle 11G如何静默安装,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。首先上传:上传两个database软件包到/dir 目录下Unz...
    99+
    2022-10-18
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作