LINUX下ORACLE数据库静默安装文档
一. 环境
操作系统版本:RedHat 6.5
数据库版本:Oracle 11g 11.2.0.3
二. 安装环境配置
1.创建oracle用户和组
#useradd oracle
#passwd oracle
#groupadd dba
#groupadd oinstall
#usermod –g oinstall –G dba oracle
#mkdir /u01
#chown –R oracle:oinstall /u01
#chmod –R 755 /u01
2.修改/etc/hosts添加主机信息
#vi /etc/hosts
**********************
10.3.2.58    localhost. Localhost
**********************
3.关闭防火墙
#chkconfig iptables off
#service iptables stop
4.配置yum
#rpm –q yum
创建修改yum参数文件
#cd /etc/yum. repos.d
#pos
*******************
[reht]
Named=server
baseurl= ftp://10.3.4.90/LinuxOS/rhels-6.5-64/Server
enabled=1
gpgcheck=0
*******************
5.修改/f,加入以下内容:
kernel.shmmax = 4294967295
# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 2097152
kernel.shmmni = 4096
#semaphores:semmsl,semmns,semopm,semmni
kernel.sem = 250 32000 100 128
fs.aio-max-nr = 1048576
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
_default = 4194304
_max = 1048576
wmem_default = 262144
wmem_max = 262144
结束后,执行
/sbin/sysctl  -p
6.修改/etc/f,加入内容
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
7.修改/etc/pam.d/login,加入内容
session required /lib/security/pam_limits.so //对64位系统这条不需要
session required pam_limits.so
8.修改/etc/profile,加入内容
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
linux安装jdk rpm安装
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
9.使用oracle用户登录,修改.bash_profile文件
#su - oracle
$vi .bash_profile加入以下内容
********************
#DISPLAY=localhost:0.0
#export DISPLAY
export ORACLE_SID=center
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0./db_1
export ORA_CRS_HOME=/u01/app/product/crs_1
export ORACLE_ADMIN=$ORACLE_BASE/admin
export ORACLE_HOME_LISTNER=$ORACLE_HOME
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/jlib
export JAVA_HOME=$ORACLE_HOME/jdk
export PATH=$PATH:$ORACLE_HOME/bin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/lib:$JAVA_HOME/bin:$ORA_CRS_HOME/bin:
********************
10.检查组件包的安装
binutils-2.15.92.0.2-18
compat-libstdc++-33.2.3-47.3
elfutils-libelf-0.97-5
elfutils-libelf-devel-0.97-5
glibc-2.3.9.4-2.19
glibc-common-2.3.9.4-2.19
glibc-devel-2.3.9.4-2.19
gcc-3.4.5-2
gcc-c++-3.4.5-2
libaio-devel-0.3.105-2
libaio-0.3.105-2
libgcc-3.4.5
libstdc++-3.4.5-2
libstdc++-devel-3.4.5-2
make-3.80-5
sysstat-5.0.5
unixODBC-2.2.11
unixODBC-devel-2.2.11
也可在后面静默安装检查先决条件时再根据提示安装
三. 配置oracle安装RSP文件
1. 配置软件安装RSP文件
$cd /database/response
$cp db_install.rsp db_install_bak.rsp
$vi db_install.rsp 根据文件中的提示配置参数
*******************
oracle.install.option= INSTALL_DB_SWONLY
ORACLE_HOSTNAME=localhost.localdomain
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/u01/app/oracle/product/11.2.0./db_1
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.EEOptionsSelection=false
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oinstall
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
********************
2. 配置数据库安装RSP文件
$cd /database/response
$cp dbca.rsp dbca_bak.rsp
$vi dbca.rsp根据文件中的提示配置参数
********************
RESPONSEFILE_VERSION = "11.2.0"
OPERATION_TYPE = "createDatabase"
GDBNAME = "orcl"
SID = "orcl"
TEMPLATENAME = "General_Purpose.dbc"
SYSPASSWORD = "Oracle123"
SYSTEMPASSWORD = "Oracle123"
EMCONFIGURATION = "LOCAL"
SYSMANPASSWORD = "oracle"
DBSNMPPASSWORD = "oracle"
CHARACTERSET = "ZHS16GBK"
LISTENERS = "listener"
********************
这里只需要配置createDatabase这一段里面的参数其他的不用管
四. 静默安装ORACLE SOFT
开始安装之前先看下下面第七项注意事项
1. 执行ORACLE静默安装(oracle用户登录)
$cd /u01/database
$./runInstaller -silent -responseFile /u01/database/response/db_install.rsp
2. 根据提示查看日志文件
$cd /tmp/OraInstall2016-03-24_02-57-18PM
$cat installActions2016-03-24_02-57-18PM.log
依据日志中的提示信息处理报错
****************************
………
WARNING: Unable to find the namespace URI. Reason: Start of root element expected.
INFO: Createing properties map - in ExtendedPropertyFileFormat.loadPropertiesMap()
SEVERE: [FATAL] [INS-10105] The given response file /u01/database/db_install.rsp is not valid.
  CAUSE: Syntactically incorrect response file. Either unexpected variables are specified or expected variables are not specified in the response file.

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。