分享更有价值
被信任是一种快乐

rhel6/7如何自动安装oracle11g单实例

文章页正文上

小编给大家分享一下rhel6/7如何自动安装oracle11g单实例,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧! 因日常工作,经常需要在rhel6.X,rhel7.X,CentOS6.X,CentOS7.x上安装oracle 11.2.0.4版本单实例数据库(基于文件系统)
故写了自动安装脚本oracle脚本。

全部文件列表如下:

1、其中iso文件是对应的红帽系统的镜像源(根据cat /etc/redhat-release获取红帽版本)
2、其中两个zip安装包,可以从SR上下载(搜索13390677找到对应的文件,注意文件名必须一致)
3、其中三个rsp文件是安装oracle的配置文件,db_install.rsp用于安装数据库软件,dbca.rsp用于创建数据库,netca.rsp用于创建监听。
4、其中sh文件是本人写的脚本,直接使用root用户执行即可(需要chmod u+x auto_install_oracle_server.sh),期间需要用户输入几个信息:字符集、oracle_sid、主机ip地址,memory_target。

因只在红帽6与7的部分版本测试过,可能还有一些问题。可具体修改shell脚本。

操作过程:
1、查看文件是否齐全

点击(此处)折叠或打开
[root@testlihb ~]# cd /tmp
[root@testlihb tmp]# ls -lrt
total 6120464
-rw-r–r– 1 root root 5871 Apr 28 07:00 netca.rsp #监听配置文件
-rwxr–r– 1 root root 17977 Apr 28 07:00 auto_install_oracle_server.sh #主脚本
-rw-r–r– 1 root root 25287 Apr 28 07:00 db_install.rsp #数据库软件配置文件
-rw-r–r– 1 root root 44580 Apr 28 07:00 dbca.rsp #数据库配置文件
-rwxr-xr-x 1 root root 1395582860 Apr 28 07:07 p13390677_112040_Linux-x86-64_1of7.zip #11.2.0.4 安装包1
-rwxr-xr-x 1 root root 1151304589 Apr 28 07:12 p13390677_112040_Linux-x86-64_2of7.zip #11.2.0.4 安装包2
-rw-r–r– 1 root root 3720347648 Jul 24 2018 rhel-server-6.4-x86_64-dvd.iso #操作系统光盘文件
[root@testlihb tmp]# chmod u+x auto_install_oracle_server.sh #root赋予可执行权限 2、配置yum源,如果确认yum源已经配置完毕,可忽略此步骤

点击(此处)折叠或打开
[root@testlihb tmp]# ./auto_install_oracle_server.sh #root直接执行
========>——– seletion————
========>1.install database #安装数据库
========>2.deinstall database #卸载数据库(只可以卸载通过本脚本安装的数据库)
========>3.configure local yum #配置yum源
========>—————————–
========>Your choice:3 #选择配置yum源,如果确认yum源已经配置好了,此处可忽略
========>please input the iso location(eg:/tmp/xxx.iso):/tmp/rhel-server-6.4-x86_64-dvd.iso #输入iso文件的路径
[OK]====>the yum configure
3、安装数据库

点击(此处)折叠或打开
[root@testlihb tmp]# ./auto_install_oracle_server.sh
========>——– seletion————
========>1.install database
========>2.deinstall database
========>3.configure local yum
========>—————————–
========>Your choice:1 #安装数据库
[ok]====>begin install_db
[ok]====>current user is root #检查当前用户是否为root
[OK]====>the yum configure #检查yum源是否正常
[OK]====>the installfile #检查oracle安装包是否存在
[OK]====>the config file #检查配置文件是否存在
========>—-charcaterset seletion—-
========>1.AMERICAN_AMERICA.ZHS16GBK
========>2.AMERICAN_AMERICA.AL32UTF8
========>—————————–
========>Your choice:(default 1):1 #选择数据库字符集,此处只有两个选择
========>please input sid(less than 8 letters):oragbk #输入sid,sid必须少于8个字符
========>please input memory target(MB):4096 #输入内存,其中sga和pga比例为3:1
========>please input ORACLE_BASE(will auto create):/database/oragbk #oracle软件目录(如果目录不存在,会自动创建。如果目录存在,该目录必须为空)
========>please input host IP address:192.168.75.236 #输入本机ip地址
[ok]====>cpu #检查cpu
[ok]====>memory #检查内存
[ok]====>/tmp #检查/tmp目录
[ok]====>swap #检查交换分区
[ok]====>ORACLE_BASE #检查oracle软件目录
[OK]====>the yum configure #检查yum源配置
[ok]====>the yum package has been installed #通过yum安装依赖包
[ok]====>the sysctl.conf has been backup and change #备份和修改sysctl.conf文件
[ok]====>the limits.conf has been backup and change #备份和修改limits.conf文件
[ok]====>the login has been backup and change #备份和修改login文件
[ok]====>the profile has been backup and change #备份和修改profile文件
[ok]====>the oracle user and oinstall,dba group has been created #创建oracle用户,oinstall和dba组
[ok]====>the .bash_profile has been backup and change #备份和修改.bash_profile文件
[ok]====>the dir has been created #检查和创建oracle_base目录
[ok]====>the install file has been unzip #解压oracle安装包
[ok]====>the hosts has been backup and change #备份和修改hosts文件
[ok]====>the db_install.rsp has been backup and change #备份和修改db_install.rsp文件
[ok]====>waiting for software install . . . . . . . . . . #此处在安装oracle软件,需要等较长时间,可查看/tmp/db_install.rsp.log
[ok]====>software has installed #oracle软件安装完成
[ok]====>two script has been run by root #root执行两个shell script文件
[ok]====>netca.rsp has been backup and change #备份和修改netca.rsp文件
[ok]====>waiting for netca install . #此处在创建listener,不需要等待太长时间,可查看/tmp/netca.rsp.log
[ok]====>netca has installed #listener创建完成
[ok]====>dbca.rsp has been backup and change #备份和修改dbca.rsp文件
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/oragbk/cfgtoollogs/dbca/oragbk/oragbk.log” for further details.
[ok]====>dbca has installed #数据库创建完成
[ok]====>the install process success
4、检查数据库是否正常

点击(此处)折叠或打开
[root@testlihb tmp]# ps -ef|grep smon_ |grep -v grep
oracle 12863 1 0 07:34 ? 00:00:00 ora_smon_oragbk #进程存在
[root@testlihb tmp]# su – oracle
[oracle@testlihb ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Sat Apr 28 07:35:09 2018
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 name
NAME TYPE VALUE
———————————— ———– ——————————
cell_offloadgroup_name string
db_file_name_convert string
db_name string oragbk
db_unique_name string oragbk
global_names boolean FALSE
instance_name string oragbk
lock_name_space string
log_file_name_convert string
processor_group_name string
service_names string oragbk
SQL> show parameter memory
NAME TYPE VALUE
———————————— ———– ——————————
hi_shared_memory_address integer 0
memory_max_target big integer 0
memory_target big integer 0
shared_memory_address integer 0
SQL> show parameter sga
NAME TYPE VALUE
———————————— ———– ——————————
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 3G
sga_target big integer 3G
SQL> show parameter pga
NAME TYPE VALUE
———————————— ———– ——————————
pga_aggregate_target big integer 1G
SQL> set lines 150 pages 10000
SQL> select * from nls_database_parameters where PARAMETER=’NLS_CHARACTERSET’;
PARAMETER VALUE
—————————— ——————————————————————————–
NLS_CHARACTERSET ZHS16GBK
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@testlihb ~]$ logout
5、卸载数据库

点击(此处)折叠或打开
[root@testlihb tmp]# ./auto_install_oracle_server.sh
========>——– seletion————
========>1.install database
========>2.deinstall database
========>3.configure local yum
========>—————————–
========>Your choice:2
please use oracle to run $ORACLE_HOME/deinstall/deinstall and use root to run /tmp/del_ora.sh #切到oracle用户执行脚本,然后在切到root用户执行脚本
[root@testlihb tmp]# su – oracle
[oracle@testlihb ~]$ $ORACLE_HOME/deinstall/deinstall
Checking for required files and bootstrapping …
Please wait …
Location of logs /tmp/deinstall2018-04-28_07-36-48AM/logs/
。。。
Specify all Single Instance listeners that are to be de-configured [LISTENER]:
Specify the list of database names that are configured in this Oracle home [oragbk]:
The details of database(s) oragbk have been discovered automatically. Do you still want to modify the details of oragbk database(s)? [n]: y
Specify the type of this database (1.Single Instance Database|2.Oracle Restart Enabled Database) [1]:
Specify the diagnostic destination location of the database [/database/oragbk/diag/rdbms/oragbk]:
Specify the storage type used by the Database ASM|FS [FS]:
Specify the list of directories if any database files exist on a shared file system. If ‘oragbk’ subdirectory is found, then it will be deleted. Otherwise, the specified directory will be deleted. Alternatively, you can specify list of database files with full path [/database/oragbk/oradata/oragbk,/database/oragbk/fast_recovery_area/oragbk]:
Specify the fast recovery area location, if it is configured on the file system. If ‘oragbk’ subdirectory is found, then it will be deleted. [/database/oragbk/fast_recovery_area/ORAGBK]:
Specify the database spfile location [/database/oragbk/product/11.2.0/db_1/dbs/spfileoragbk.ora]:
Do you want to continue (y – yes, n – no)? [n]: y
。。。
[oracle@testlihb ~]$ logout
[root@testlihb tmp]# /tmp/del_ora.sh 6、检查是否已经删除数据库

点击(此处)折叠或打开
[root@testlihb tmp]# ps -ef|grep smon_
root 16003 7948 0 07:45 pts/1 00:00:00 grep smon_
[root@testlihb tmp]# id oracle
id: oracle: No such user

如下是具体的脚本:
auto_install_oracle_server.sh
点击(此处)折叠或打开
#!/bin/bash

HOSTNAME=`hostname`
PWD=”$( cd “$( dirname “$0″ )” && pwd )”
# 102 去掉目录最后的/
change_dir(){
flag=${1##*/}
if [ -z $flag ];then
ORACLE_BASE=${1%?}
fi
}
##change_dir $dir
# 101 检查文件夹是否可以作为ORACLE_BASE目录
check_dir(){
if [ -d $1 ];then
if [ `ls -al $1|wc -l` -gt 3 ];then
echo “[fail]====>the ORACLE_BASE must without any file(s)”
exit 101
fi
else
mkdir -p $1
fi
}
##read -p “input dir:” dir
##check_dir $dir
# 0 检查传入参数是否为空
isnull(){
if [ -z $1 ];then
echo $1
echo “[fail]====>parameter is null”
exit 0
fi
}
##isnull $hah
# 1 检查yum源是否正常
check_yum(){
yum clean all >/dev/null 2>&1
var=`yum repolist|grep repolist|awk -F : ‘{print $2}’|awk -F , ‘{print $1}’`
## echo $var
if [ $var -eq 0 ];then
echo “[fail]====>the yum configure is wrong ,see /etc/yum.repos.d/*.repo”
exit 1
else
echo “[OK]====>the yum configure”
fi
}
##check_yum
# 2 检查数据库安装软件是否已经上传
check_installfile(){
cd $PWD
if [ -f “p13390677_112040_Linux-x86-64_1of7.zip” -a -f “p13390677_112040_Linux-x86-64_2of7.zip” ];then
echo “[OK]====>the installfile”
else
echo “[fail]====>the $PWD does not have p13390677_112040_Linux-* ”
exit 2
fi
if [ -f “dbca.rsp” -a -f “netca.rsp” -a -f “db_install.rsp” ];then
echo “[OK]====>the config file”
else
echo “[fail]====>the $PWD does not have *.rsp”
exit 2
fi
}
##check_installfile
# 3 判断执行用户是否root
isroot(){
if [ $USER != “root” ];then
echo “[fail]====>current user is not root”
exit 3
else
echo “[ok]====>current user is root”
fi
}
##isroot
# 4 获取输入数据库基本信息
get_information(){
echo “========>—-charcaterset seletion—-”
echo “========>1.AMERICAN_AMERICA.ZHS16GBK”
echo “========>2.AMERICAN_AMERICA.AL32UTF8”
echo “========>—————————–”
echo -e “========>Your choice:(default 1):c”
read NLS_LANG
case $NLS_LANG in
1) NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
CHARACTERSET=ZHS16GBK
;;
2) NLS_LANG=AMERICAN_AMERICA.AL32UTF8
CHARACTERSET=AL32UTF8
;;
*) NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
CHARACTERSET=ZHS16GBK
;;
esac
echo -e “========>please input sid(less than 8 letters):c”
read SID
isnull $SID
echo -e “========>please input memory target(MB):c”
read MEMORY
isnull $MEMORY
echo -e “========>please input ORACLE_BASE(will auto create):c”
read ORACLE_BASE
isnull $ORACLE_BASE
check_dir $ORACLE_BASE
change_dir $ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
echo -e “========>please input host IP address:c”
read IP
isnull $IP
}
##get_information
# 5 检查cpu,内存,磁盘空间
check_cpu_mem_disk(){
cpu=`cat /proc/cpuinfo | grep name|wc -l`
## echo $cpu
if [ $cpu -gt 1 ];then
echo “[ok]====>cpu ”
else
echo “[fail]====>cpu must more than 1 cores”
exit 5
fi
mem=`free -m|grep ‘+’|awk ‘{print $4}’`
mem7=`free -m|grep Mem|awk ‘{print $7}’`
## echo $mem
if [[ $mem -gt 2048 || $mem7 -gt 2048 ]];then
echo “[ok]====>memory”
else
echo “[fail]====>the memory must more than 2G available”
exit 5
fi
if [ `df -m /tmp|wc -l` -eq 2 ];then
tmp=`df -m /tmp|tail -1|awk ‘{print $4}’`
else
tmp=`df -m /tmp|tail -1|awk ‘{print $3}’`
fi
if [ $tmp -gt 120 ];then
echo “[ok]====>/tmp”
else
echo “[fail]====>/tmp must more than 120MB”
exit 5
fi
if [ `free -m|grep Swap|awk ‘{print $2}’` -gt 150 ];then
echo “[ok]====>swap”
else
echo “[fail]====>swap must more than 150MB”
exit 5
fi
if [ `df -m $ORACLE_BASE|wc -l` -eq 2 ];then
base=`df -m $ORACLE_BASE|tail -1|awk ‘{print $4}’`
else
base=`df -m $ORACLE_BASE|tail -1|awk ‘{print $3}’`
fi
if [ $base -gt 8000 ];then
echo “[ok]====>ORACLE_BASE”
else
echo “[fail]====>ORACLE_BASE must more than 20g”
exit 5
fi
}
##check_cpu_mem_disk
# 6 安装依赖包
yum_install(){
check_yum
yum install -y binutils >/dev/null
yum install -y compat-libstdc++-33 >/dev/null
yum install -y elfutils-libelf >/dev/null
yum install -y elfutils-libelf-devel >/dev/null
yum install -y gcc >/dev/null
yum install -y gcc-c++ >/dev/null
yum install -y glibc-common >/dev/null
yum install -y glibc-devel >/dev/null
yum install -y glibc-headers >/dev/null
yum install -y libaio >/dev/null
yum install -y libaio-devel >/dev/null
yum install -y libgcc >/dev/null
yum install -y libstdc++ >/dev/null
yum install -y libstdc++-devel >/dev/null
yum install -y make >/dev/null
yum install -y sysstat >/dev/null
yum install -y unzip >/dev/null
echo “[ok]====>the yum package has been installed”
}
##yum_install
# 7 修改/etc/sysctl.conf文件
sysctl_set(){
if [ ! -f /etc/sysctl.conf.lihb_bak ];then
cp /etc/sysctl.conf /etc/sysctl.conf.lihb_bak
echo “kernel.shmmni = 4096” >>/etc/sysctl.conf
echo “kernel.sem = 250 32000 100 128” >>/etc/sysctl.conf
echo “fs.file-max = 6815744” >>/etc/sysctl.conf
echo “net.ipv4.ip_local_port_range = 9000 65500” >>/etc/sysctl.conf
echo “net.core.rmem_default = 1048576” >>/etc/sysctl.conf
echo “net.core.rmem_max = 4194304” >>/etc/sysctl.conf
echo “net.core.wmem_default = 262144” >>/etc/sysctl.conf
echo “net.core.wmem_max = 1048576” >>/etc/sysctl.conf
echo “fs.aio-max-nr = 1048576” >>/etc/sysctl.conf
/sbin/sysctl -p >/dev/null 2>&1
echo “[ok]====>the sysctl.conf has been backup and change”
fi
}
##sysctl_set
# 8 修改/etc/security/limits.conf文件
limits_set(){
if [ ! -f /etc/security/limits.conf.lihb_bak ];then
cp /etc/security/limits.conf /etc/security/limits.conf.lihb_bak
echo “oracle soft nproc 2047” >>/etc/security/limits.conf
echo “oracle hard nproc 16384” >>/etc/security/limits.conf
echo “oracle soft nofile 1024” >>/etc/security/limits.conf
echo “oracle hard nofile 65536” >>/etc/security/limits.conf
echo “[ok]====>the limits.conf has been backup and change”
fi
}
##limits_set
# 9 修改/etc/pam.d/login文件
login_set(){
if [ ! -f /etc/pam.d/login.lihb_bak ];then
cp /etc/pam.d/login /etc/pam.d/login.lihb_bak
echo “session required /lib64/security/pam_limits.so” >>/etc/pam.d/login
echo “[ok]====>the login has been backup and change”
fi
}
##login_set
# 10 修改/etc/profile文件
profile_set(){
if [ ! -f /etc/profile.lihb_bak ];then
cp /etc/profile /etc/profile.lihb_bak
echo ‘if [ “$USER” = “oracle” ];then ‘ >>/etc/profile
echo ‘ if [ “$SHELL” = “/bin/ksh” ];then ‘ >>/etc/profile
echo ‘ ulimit -p 16384’ >>/etc/profile
echo ‘ ulimit -n 65536’ >>/etc/profile
echo ‘ else’ >>/etc/profile
echo ‘ ulimit -u 16384’ >>/etc/profile
echo ‘ ulimit -n 65536’ >>/etc/profile
echo ‘ fi’ >>/etc/profile
echo ‘ umask 022’ >>/etc/profile
echo ‘fi’ >>/etc/profile
echo “[ok]====>the profile has been backup and change”
fi
}
##profile_set
# 11 创建oracle用户和oinstall,dba用户组
user_group_add(){
if [[ `grep “oinstall” /etc/group` = “” ]];then
/usr/sbin/groupadd -g 1100 oinstall >/dev/null 2>&1
fi
if [[ `grep “dba” /etc/group` = “” ]];then
/usr/sbin/groupadd -g 1101 dba >/dev/null 2>&1
fi
if [[ `grep “oracle” /etc/passwd` = “” ]];then
/usr/sbin/useradd -g 1100 -G 1101 -u 1100 -m oracle >/dev/null 2>&1
echo “[ok]====>the oracle user and oinstall,dba group has been created”
else
echo “[fail]====>the oracle user has exist”
exit 11
fi
}
##user_group_add
# 12 修改/home/oracle/.bash_profile文件
bash_profile_set(){
if [ ! -f /home/oracle/.bash_profile.lihb_bak ];then
cp /home/oracle/.bash_profile /home/oracle/.bash_profile.lihb_bak
echo “” >>/home/oracle/.bash_profile
echo “export ORACLE_BASE=$ORACLE_BASE” >>/home/oracle/.bash_profile
echo “export ORACLE_HOME=$ORACLE_HOME” >>/home/oracle/.bash_profile
echo “export ORACLE_SID=$SID” >>/home/oracle/.bash_profile
echo ‘export LD_LIBRARY_PATH=$ORACLE_HOME/lib’ >>/home/oracle/.bash_profile
echo ‘stty erase ^H’ >>/home/oracle/.bash_profile
echo ‘export NLS_LANG10=$ORACLE_HOME/nls/data’ >>/home/oracle/.bash_profile
echo ‘export ORACLE_HOME_LISTNER=$ORACLE_HOME’ >>/home/oracle/.bash_profile
echo ‘export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin’ >>/home/oracle/.bash_profile
echo ‘export TEMP=/tmp’ >>/home/oracle/.bash_profile
echo ‘export TMPDIR=/tmp’ >>/home/oracle/.bash_profile
echo “export NLS_LANG=$NLS_LANG” >>/home/oracle/.bash_profile
echo “export NLS_DATE_FORMAT=’yyyy-mm-dd hh34:mi:ss'” >>/home/oracle/.bash_profile
echo ‘umask 022’ >>/home/oracle/.bash_profile
echo “[ok]====>the .bash_profile has been backup and change”
fi
}
##bash_profile_set
# 13 创建ORACLE_BASE和ORACLE_HOME和数据文件目录并授权
create_dir(){
mkdir -p $ORACLE_HOME
mkdir -p $ORACLE_BASE/oradata
mkdir -p $ORACLE_BASE/oraInventory
mkdir -p $ORACLE_BASE/flash_recovery_area
chown -R oracle:oinstall $ORACLE_BASE
echo “[ok]====>the dir has been created”
}
##create_dir
# 14 解压数据库安装包
免费主机域名 unzip_file(){
cd $PWD
/usr/bin/unzip p13390677_112040_Linux-x86-64_1of7.zip >/dev/null 2>&1
/usr/bin/unzip p13390677_112040_Linux-x86-64_2of7.zip >/dev/null 2>&1
chown -R oracle:oinstall $PWD/database
echo “[ok]====>the install file has been unzip”
}
##unzip_file
# 15 修改/etc/hosts文件
hosts_set(){
if [ ! -f /etc/hosts.lihb_bak ];then
cp /etc/hosts /etc/hosts.lihb_bak
echo “$IP $HOSTNAME” >>/etc/hosts
echo “[ok]====>the hosts has been backup and change”
fi
}
##hosts_set
# 16 修改db_install.rsp 数据库软件安装配置文件
db_install_set(){
cd $PWD
chown oracle:oinstall db_install.rsp
if [ ! -f db_install.rsp.lihb_bak ];then
cp db_install.rsp db_install.rsp.lihb_bak
sed -i “s|lihb_hostname|$HOSTNAME|g” db_install.rsp
sed -i “s|lihb_location|$ORACLE_BASE/oraInventory|g” db_install.rsp
sed -i “s|lihb_home|$ORACLE_HOME|g” db_install.rsp
sed -i “s|lihb_base|$ORACLE_BASE|g” db_install.rsp
sed -i “s|lihb_globaldbname|$SID|g” db_install.rsp
sed -i “s|lihb_sid|$SID|g” db_install.rsp
sed -i “s|lihb_datalocation|$ORACLE_BASE/oradata|g” db_install.rsp
echo “[ok]====>the db_install.rsp has been backup and change”
fi
}
##db_install_set
# 17 开始安装oracle软件
install_software(){
su – oracle -c “$PWD/database/runInstaller -silent -force -ignorePrereq -responseFile $PWD/db_install.rsp” >/tmp/db_install.rsp.log
sleep 10s
echo -e “[ok]====>waiting for software install c”
while [ ! `grep “root.sh” /tmp/db_install.rsp.log |wc -l` -eq 1 ]
do
echo -e “. c”
sleep 2s
done
echo “.”
echo “[ok]====>software has installed”
$ORACLE_BASE/oraInventory/orainstRoot.sh >/dev/null 2>&1
$ORACLE_BASE/product/11.2.0/db_1/root.sh >/dev/null 2>&1
echo “[ok]====>two script has been run by root”
}
##install_software
# 18 修改netca.rsp 监听安装配置文件
netca_set(){
cd $PWD
chown oracle:oinstall netca.rsp
if [ ! -f netca.rsp.lihb_bak ];then
cp netca.rsp netca.rsp.lihb_bak
echo “[ok]====>netca.rsp has been backup and change”
fi
}
##netca_set
# 19 开始安装监听软件
install_netca(){
# ORACLE_HOME=/database/oracle/product/11.2.0/db_1/
chown -R oracle:dba /var/tmp/.oracle >/dev/null 2>&1
chown -R oracle:dba /tmp/.oracle >/dev/null 2>&1
su – oracle -c “$ORACLE_HOME/bin/netca -silent -responseFile $PWD/netca.rsp” >/tmp/netca.rsp.log
sleep 2s
echo -e “[ok]====>waiting for netca install c”
while [ ! `grep “The exit code is” /tmp/netca.rsp.log|wc -l` -eq 1 ]
do
echo -e “. c”
sleep 1s
done
echo “.”
echo “[ok]====>netca has installed”
chown -R oracle:dba /var/tmp/.oracle >/dev/null 2>&1
chown -R oracle:dba /tmp/.oracle >/dev/null 2>&1
}
##install_netca
# 20 修改dbca.rsp 创建数据库配置文件
dbca_set(){
cd $PWD
chown oracle:oinstall dbca.rsp
if [ ! -f dbca.rsp.lihb_bak ];then
cp dbca.rsp dbca.rsp.lihb_bak
# SID=cgkcglxt
# ORACLE_BASE=/database/oracle
# CHARACTERSET=ZHS16GBK
# MEMORY=4096
sed -i “s|lihb_sid|$SID|g” dbca.rsp
sed -i “s|lihb_datafiledestination|$ORACLE_BASE/oradata|g” dbca.rsp
sed -i “s|lihb_recoveryareadestination|$ORACLE_BASE/flash_recovery_area|g” dbca.rsp
sed -i “s|lihb_characterset|$CHARACTERSET|g” dbca.rsp
sed -i “s|lihb_totalmemory|$MEMORY|g” dbca.rsp
sed -i “s|lihb_gdbname|$SID|g” dbca.rsp
echo “[ok]====>dbca.rsp has been backup and change”
fi
}
##dbca_set
# 21 开始创建数据库
install_dbca(){
# ORACLE_HOME=/database/oracle/product/11.2.0/db_1/
su – oracle -c “$ORACLE_HOME/bin/dbca -silent -force -responseFile $PWD/dbca.rsp”
echo “[ok]====>dbca has installed”
}
##install_dbca

# install_db 安装数据库
install_db(){
echo “[ok]====>begin install_db”
# check_dir $dir #检查文件夹是否可以作为ORACLE_BASE目录
# isnull $hah #检查传入参数是否为空
isroot #判断执行用户是否root
check_yum #检查yum源是否正常
check_installfile #检查数据库安装软件是否已经上传
get_information #获取输入数据库基本信息
check_cpu_mem_disk #检查cpu,内存,磁盘空间
yum_install #安装依赖包
sysctl_set #修改/etc/sysctl.conf文件
limits_set #修改/etc/security/limits.conf文件
login_set #修改/etc/pam.d/login文件
profile_set #修改/etc/profile文件
user_group_add #创建oracle用户和oinstall,dba用户组
bash_profile_set #修改/home/oracle/.bash_profile文件
create_dir #创建ORACLE_BASE和ORACLE_HOME和数据文件目录并授权
unzip_file #解压数据库安装包
hosts_set #修改/etc/hosts文件
db_install_set #修改db_install.rsp 数据库软件安装配置文件
install_software #开始安装oracle软件
netca_set #修改netca.rsp 监听安装配置文件
install_netca #开始安装监听软件
dbca_set #修改dbca.rsp 创建数据库配置文件
install_dbca #开始创建数据库
echo “[ok]====>the install process success”
}
##install_db
# deinstall_db 卸载数据库软件
deinstall_db(){
PWD=”$( cd “$( dirname “$0″ )” && pwd )”
touch /tmp/del_ora.sh >/dev/null 2>&1
echo “#!/bin/bash” >/tmp/del_ora.sh
echo “cd $PWD” >>/tmp/del_ora.sh
echo ‘rm -rf database’ >>/tmp/del_ora.sh
echo ‘mv -f db_install.rsp.lihb_bak db_install.rsp >/dev/null 2>&1’ >>/tmp/del_ora.sh
echo ‘mv -f netca.rsp.lihb_bak netca.rsp >/dev/null 2>&1’ >>/tmp/del_ora.sh
echo ‘mv -f dbca.rsp.lihb_bak dbca.rsp >/dev/null 2>&1’ >>/tmp/del_ora.sh
echo ‘mv -f /etc/hosts.lihb_bak /etc/hosts >/dev/null 2>&1’ >>/tmp/del_ora.sh
echo ‘mv -f /etc/profile.lihb_bak /etc/profile >/dev/null 2>&1’ >>/tmp/del_ora.sh
echo ‘mv -f /etc/pam.d/login.lihb_bak /etc/pam.d/login >/dev/null 2>&1’ >>/tmp/del_ora.sh
echo ‘mv -f /etc/security/limits.conf.lihb_bak /etc/security/limits.conf >/dev/null 2>&1’ >>/tmp/del_ora.sh
echo ‘mv -f /etc/sysctl.conf.lihb_bak /etc/sysctl.conf >/dev/null 2>&1’ >>/tmp/del_ora.sh
echo ‘/sbin/sysctl -p >/dev/null 2>&1’ >>/tmp/del_ora.sh
echo ‘rm -rf /opt/tmp/.oracle’ >>/tmp/del_ora.sh
echo ‘rm -rf /tmp/.oracle’ >>/tmp/del_ora.sh
echo ‘rm -rf /opt/ORCLfmap’ >>/tmp/del_ora.sh
echo ‘rm -rf /etc/oraInst.loc’ >>/tmp/del_ora.sh
echo ‘rm -rf /etc/oratab’ >>/tmp/del_ora.sh
echo ‘userdel -r oracle >/dev/null 2>&1’ >>/tmp/del_ora.sh
ORACLE_BASE=`cat /home/oracle/.bash_profile|grep ORACLE_BASE|awk -F = ‘{print $2}’`
echo “rm -rf $ORACLE_BASE” >>/tmp/del_ora.sh
chmod u+x /tmp/del_ora.sh
echo ‘please use oracle to run $ORACLE_HOME/deinstall/deinstall and use root to run /tmp/del_ora.sh’
}
##deinstall_db
# configure_yum 配置yum源
configure_yum(){
echo -e “========>please input the iso location(eg:/tmp/xxx.iso):c”
read ISOLOCATION
mkdir -p /media/lihb_iso
mount -t iso9660 -o loop $ISOLOCATION /media/lihb_iso
mkdir -p /etc/yum.repos.d/lihb_bak
mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/lihb_bak
touch /etc/yum.repos.d/lihb_local.repo
echo “[lihb_local]” >/etc/yum.repos.d/lihb_local.repo
echo “name=lihb_local” >>/etc/yum.repos.d/lihb_local.repo
echo “baseurl=file:///media/lihb_iso” >>/etc/yum.repos.d/lihb_local.repo
echo “gpgcheck=0” >>/etc/yum.repos.d/lihb_local.repo
echo “enabled=1” >>/etc/yum.repos.d/lihb_local.repo
check_yum
}
##configure_yum
# main 程序入口
main(){
echo “========>——– seletion————”
echo “========>1.install database”
echo “========>2.deinstall database”
echo “========>3.configure local yum”
echo “========>—————————–”
echo -e “========>Your choice:c”
read FLAG
case $FLAG in
1) install_db #安装数据库
;;
2) deinstall_db #卸载数据库
;;
3) configure_yum #配置本地yum源
;;
*) exit 200
;;
esac
}
main 如下是db_install.rsp的内容:

点击(此处)折叠或打开
####################################################################
## Copyright(c) Oracle Corporation 1998,2013. All rights reserved.##
## ##
## Specify values for the variables listed below to customize ##
## your installation. ##
## ##
## Each variable is associated with a comment. The comment ##
## can help to populate the variables with the appropriate ##
## values. ##
## ##
## IMPORTANT NOTE: This file contains plain text passwords and ##
## should be secured to have read permission only by oracle user ##
## or db administrator who owns this installation. ##
## ##
####################################################################
#——————————————————————————
# Do not change the following system generated value.
#——————————————————————————
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
#——————————————————————————
# Specify the installation option.
# It can be one of the following:
# – INSTALL_DB_SWONLY
# – INSTALL_DB_AND_CONFIG
# – UPGRADE_DB
#——————————————————————————-
oracle.install.option=INSTALL_DB_SWONLY
#——————————————————————————-
# Specify the hostname of the system as set during the install. It can be used
# to force the installation to use an alternative hostname rather than using the
# first hostname found on the system. (e.g., for systems with multiple hostnames
# and network interfaces)
#——————————————————————————-
ORACLE_HOSTNAME=lihb_hostname
#——————————————————————————-
# Specify the Unix group to be set for the inventory directory.
#——————————————————————————-
UNIX_GROUP_NAME=oinstall
#——————————————————————————-
# Specify the location which holds the inventory files.
# This is an optional parameter if installing on
# Windows based Operating System.
#——————————————————————————-
INVENTORY_LOCATION=lihb_location
#——————————————————————————-
# Specify the languages in which the components will be installed.
#
# en : English ja : Japanese
# fr : French ko : Korean
# ar : Arabic es : Latin American Spanish
# bn : Bengali lv : Latvian
# pt_BR: Brazilian Portuguese lt : Lithuanian
# bg : Bulgarian ms : Malay
# fr_CA: Canadian French es_MX: Mexican Spanish
# ca : Catalan no : Norwegian
# hr : Croatian pl : Polish
# cs : Czech pt : Portuguese
# da : Danish ro : Romanian
# nl : Dutch ru : Russian
# ar_EG: Egyptian zh_CN: Simplified Chinese
# en_GB: English (Great Britain) sk : Slovak
# et : Estonian sl : Slovenian
# fi : Finnish es_ES: Spanish
# de : German sv : Swedish
# el : Greek th : Thai
# iw : Hebrew zh_TW: Traditional Chinese
# hu : Hungarian tr : Turkish
# is : Icelandic uk : Ukrainian
# in : Indonesian vi : Vietnamese
# it : Italian
#
# all_langs : All languages
#
# Specify value as the following to select any of the languages.
# Example : SELECTED_LANGUAGES=en,fr,ja
#
# Specify value as the following to select all the languages.
# Example : SELECTED_LANGUAGES=all_langs
#——————————————————————————
SELECTED_LANGUAGES=en
#——————————————————————————
# Specify the complete path of the Oracle Home.
#——————————————————————————
ORACLE_HOME=lihb_home
#——————————————————————————
# Specify the complete path of the Oracle Base.
#——————————————————————————
ORACLE_BASE=lihb_base
#——————————————————————————
# Specify the installation edition of the component.
#
# The value should contain only one of these choices.
# – EE : Enterprise Edition
# – SE : Standard Edition
# – SEONE : Standard Edition One
# – PE : Personal Edition (WINDOWS ONLY)
#——————————————————————————
oracle.install.db.InstallEdition=EE
#——————————————————————————
# This variable is used to enable or disable custom install and is considered
# only if InstallEdition is EE.
#
# true : Components mentioned as part of ‘optionalComponents’ property
# are considered for install.
# false : Value for ‘optionalComponents’ is not considered.
#——————————————————————————
oracle.install.db.EEOptionsSelection=false
#——————————————————————————
# This variable is considered only if ‘EEOptionsSelection’ is set to true.
#
# Description: List of Enterprise Edition Options you would like to enable.
#
# The following choices are available. You may specify any
# combination of these choices. The components you choose should
# be specified in the form “internal-component-name:version”
# Below is a list of components you may specify to enable.
#
# 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
#——————————————————————————
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.dv:11.2.0.4.0,oracle.rdbms.lbac:11.2.0.4.0,oracle.rdbms.rat:11.2.0.4.0
###############################################################################
# #
# PRIVILEGED OPERATING SYSTEM GROUPS #
# —————————————— #
# Provide values for the OS groups to which OSDBA and OSOPER privileges #
# needs to be granted. If the install is being performed as a member of the #
# group “dba”, then that will be used unless specified otherwise below. #
# #
# The value to be specified for OSDBA and OSOPER group is only for UNIX based #
# Operating System. #
# #
###############################################################################
#——————————————————————————
# The DBA_GROUP is the OS group which is to be granted OSDBA privileges.
#——————————————————————————
oracle.install.db.DBA_GROUP=dba
#——————————————————————————
# The OPER_GROUP is the OS group which is to be granted OSOPER privileges.
# The value to be specified for OSOPER group is optional.
#——————————————————————————
oracle.install.db.OPER_GROUP=oinstall
#——————————————————————————
# Specify the cluster node names selected during the installation.
# Example : oracle.install.db.CLUSTER_NODES=node1,node2
#——————————————————————————
oracle.install.db.CLUSTER_NODES=
#——————————————————————————
# This variable is used to enable or disable RAC One Node install.
#
# – true : Value of RAC One Node service name is used.
# – false : Value of RAC One Node service name is not used.
#
# If left blank, it will be assumed to be false
#——————————————————————————
oracle.install.db.isRACOneInstall=
#——————————————————————————
# Specify the name for RAC One Node Service.
#——————————————————————————
oracle.install.db.racOneServiceName=
#——————————————————————————
# Specify the type of database to create.
# It can be one of the following:
# – GENERAL_PURPOSE/TRANSACTION_PROCESSING
# – DATA_WAREHOUSE
#——————————————————————————
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
#——————————————————————————
# Specify the Starter Database Global Database Name.
#——————————————————————————
oracle.install.db.config.starterdb.globalDBName=lihb_globaldbname
#——————————————————————————
# Specify the Starter Database SID.
#——————————————————————————
oracle.install.db.config.starterdb.SID=lihb_sid
#——————————————————————————
# Specify the Starter Database character set.
#
# It can be one of the following:
# AL32UTF8, WE8ISO8859P15, WE8MSWIN1252, EE8ISO8859P2,
# EE8MSWIN1250, NE8ISO8859P10, NEE8ISO8859P4, BLT8MSWIN1257,
# BLT8ISO8859P13, CL8ISO8859P5, CL8MSWIN1251, AR8ISO8859P6,
# AR8MSWIN1256, EL8ISO8859P7, EL8MSWIN1253, IW8ISO8859P8,
# IW8MSWIN1255, JA16EUC, JA16EUCTILDE, JA16SJIS, JA16SJISTILDE,
# KO16MSWIN949, ZHS16GBK, TH8TISASCII, ZHT32EUC, ZHT16MSWIN950,
# ZHT16HKSCS, WE8ISO8859P9, TR8MSWIN1254, VN8MSWIN1258
#——————————————————————————
oracle.install.db.config.starterdb.characterSet=AL32UTF8
#——————————————————————————
# This variable should be set to true if Automatic Memory Management
# in Database is desired.
# If Automatic Memory Management is not desired, and memory allocation
# is to be done manually, then set it to false.
#——————————————————————————
oracle.install.db.config.starterdb.memoryOption=true
#——————————————————————————
# Specify the total memory allocation for the database. Value(in MB) should be
# at least 256 MB, and should not exceed the total physical memory available
# on the system.
# Example: oracle.install.db.config.starterdb.memoryLimit=512
#——————————————————————————
oracle.install.db.config.starterdb.memoryLimit=
#——————————————————————————
# This variable controls whether to load Example Schemas onto
# the starter database or not.
#——————————————————————————
oracle.install.db.config.starterdb.installExampleSchemas=false
#——————————————————————————
# This variable includes enabling audit settings, configuring password profiles
# and revoking some grants to public. These settings are provided by default.
# These settings may also be disabled.
#——————————————————————————
oracle.install.db.config.starterdb.enableSecuritySettings=true
###############################################################################
# #
# Passwords can be supplied for the following four schemas in the #
# starter database: #
# SYS #
# SYSTEM #
# SYSMAN (used by Enterprise Manager) #
# DBSNMP (used by Enterprise Manager) #
# #
# Same password can be used for all accounts (not recommended) #
# or different passwords for each account can be provided (recommended) #
# #
###############################################################################
#——————————————————————————
# This variable holds the password that is to be used for all schemas in the
# starter database.
#——————————————————————————-
oracle.install.db.config.starterdb.password.ALL=mima_0001
#——————————————————————————-
# Specify the SYS password for the starter database.
#——————————————————————————-
oracle.install.db.config.starterdb.password.SYS=
#——————————————————————————-
# Specify the SYSTEM password for the starter database.
#——————————————————————————-
oracle.install.db.config.starterdb.password.SYSTEM=
#——————————————————————————-
# Specify the SYSMAN password for the starter database.
#——————————————————————————-
oracle.install.db.config.starterdb.password.SYSMAN=
#——————————————————————————-
# Specify the DBSNMP password for the starter database.
#——————————————————————————-
oracle.install.db.config.starterdb.password.DBSNMP=
#——————————————————————————-
# Specify the management option to be selected for the starter database.
# It can be one of the following:
# – GRID_CONTROL
# – DB_CONTROL
#——————————————————————————-
oracle.install.db.config.starterdb.control=DB_CONTROL
#——————————————————————————-
# Specify the Management Service to use if Grid Control is selected to manage
# the database.
#——————————————————————————-
oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=
###############################################################################
# #
# SPECIFY BACKUP AND RECOVERY OPTIONS #
# ———————————— #
# Out-of-box backup and recovery options for the database can be mentioned #
# using the entries below. #
# #
###############################################################################
#—————————————————————————— 免费主机域名
# This variable is to be set to false if automated backup is not required. Else
# this can be set to true.
#——————————————————————————
oracle.install.db.config.starterdb.automatedBackup.enable=false
#——————————————————————————
# Regardless of the type of storage that is chosen for backup and recovery, if
# automated backups are enabled, a job will be scheduled to run daily to backup
# the database. This job will run as the operating system user that is
# specified in this variable.
#——————————————————————————
oracle.install.db.config.starterdb.automatedBackup.osuid=
#——————————————————————————-
# Regardless of the type of storage that is chosen for backup and recovery, if
# automated backups are enabled, a job will be scheduled to run daily to backup
# the database. This job will run as the operating system user specified by the
# above entry. The following entry stores the password for the above operating
# system user.
#——————————————————————————-
oracle.install.db.config.starterdb.automatedBackup.ospwd=
#——————————————————————————-
# Specify the type of storage to use for the database.
# It can be one of the following:
# – FILE_SYSTEM_STORAGE
# – ASM_STORAGE
#——————————————————————————
oracle.install.db.config.starterdb.storageType=FILE_SYSTEM_STORAGE
#——————————————————————————-
# Specify the database file location which is a directory for datafiles, control
# files, redo logs.
#
# Applicable only when oracle.install.db.config.starterdb.storage=FILE_SYSTEM_STORAGE
#——————————————————————————-
oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=lihb_datalocation
#——————————————————————————-
# Specify the backup and recovery location.
#
# Applicable only when oracle.install.db.config.starterdb.storage=FILE_SYSTEM_STORAGE
#——————————————————————————-
oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=
#——————————————————————————-
# Specify the existing ASM disk groups to be used for storage.
#
# Applicable only when oracle.install.db.config.starterdb.storage=ASM_STORAGE
#——————————————————————————-
oracle.install.db.config.asm.diskGroup=
#——————————————————————————-
# Specify the password for ASMSNMP user of the ASM instance.
#
# Applicable only when oracle.install.db.config.starterdb.storage=ASM_STORAGE
#——————————————————————————-
oracle.install.db.config.asm.ASMSNMPPassword=
#——————————————————————————
# Specify the My Oracle Support Account Username.
#
# Example : MYORACLESUPPORT_USERNAME=abc@oracle.com
#——————————————————————————
MYORACLESUPPORT_USERNAME=
#——————————————————————————
# Specify the My Oracle Support Account Username password.
#
# Example : MYORACLESUPPORT_PASSWORD=password
#——————————————————————————
MYORACLESUPPORT_PASSWORD=
#——————————————————————————
# Specify whether to enable the user to set the password for
# My Oracle Support credentials. The value can be either true or false.
# If left blank it will be assumed to be false.
#
# Example : SECURITY_UPDATES_VIA_MYORACLESUPPORT=true
#——————————————————————————
SECURITY_UPDATES_VIA_MYORACLESUPPORT=
#——————————————————————————
# Specify whether user doesn’t want to configure Security Updates.
# The value for this variable should be true if you don’t want to configure
# Security Updates, false otherwise.
#
# The value can be either true or false. If left blank it will be assumed
# to be false.
#
# Example : DECLINE_SECURITY_UPDATES=false
#——————————————————————————
DECLINE_SECURITY_UPDATES=true
#——————————————————————————
# Specify the Proxy server name. Length should be greater than zero.
#
# Example : PROXY_HOST=proxy.domain.com
#——————————————————————————
PROXY_HOST=
#——————————————————————————
# Specify the proxy port number. Should be Numeric and at least 2 chars.
#
# Example : PROXY_PORT=25
#——————————————————————————
PROXY_PORT=
#——————————————————————————
# Specify the proxy user name. Leave PROXY_USER and PROXY_PWD
# blank if your proxy server requires no authentication.
#
# Example : PROXY_USER=username
#——————————————————————————
PROXY_USER=
#——————————————————————————
# Specify the proxy password. Leave PROXY_USER and PROXY_PWD
# blank if your proxy server requires no authentication.
#
# Example : PROXY_PWD=password
#——————————————————————————
PROXY_PWD=
#——————————————————————————
# Specify the proxy realm. This value is used if auto-updates option is selected.
#
# Example : PROXY_REALM=metalink
#——————————————————————————
PROXY_REALM=
#——————————————————————————
# Specify the Oracle Support Hub URL.
#
# Example : COLLECTOR_SUPPORTHUB_URL=https://orasupporthub.company.com:8080/
#——————————————————————————
COLLECTOR_SUPPORTHUB_URL=
#——————————————————————————
# Specify the auto-updates option. It can be one of the following:
# – MYORACLESUPPORT_DOWNLOAD
# – OFFLINE_UPDATES
# – SKIP_UPDATES
#——————————————————————————
oracle.installer.autoupdates.option=
#——————————————————————————
# In case MYORACLESUPPORT_DOWNLOAD option is chosen, specify the location where
# the updates are to be downloaded.
# In case OFFLINE_UPDATES option is chosen, specify the location where the updates
# are present.
#——————————————————————————
oracle.installer.autoupdates.downloadUpdatesLoc=
#——————————————————————————
# Specify the My Oracle Support Account Username which has the patches download privileges
# to be used for software updates.
# Example : AUTOUPDATES_MYORACLESUPPORT_USERNAME=abc@oracle.com
#——————————————————————————
AUTOUPDATES_MYORACLESUPPORT_USERNAME=
#——————————————————————————
# Specify the My Oracle Support Account Username password which has the patches download privileges
# to be used for software updates.
#
# Example : AUTOUPDATES_MYORACLESUPPORT_PASSWORD=password
#——————————————————————————
AUTOUPDATES_MYORACLESUPPORT_PASSWORD=
如下是dbca.rsp的内容:

点击(此处)折叠或打开
##############################################################################
## ##
## DBCA response file ##
## —————— ##
## Copyright 1998, 2013, Oracle Corporation. All Rights Reserved. ##
## ##
## Specify values for the variables listed below to customize Oracle ##
## Database Configuration installation. ##
## ##
## Each variable is associated with a comment. The comment identifies the ##
## variable type. ##
## ##
## Please specify the values in the following format : ##
## Type : Example ##
## String : “” ##
## Boolean : True or False ##
## Number : ##
## StringList : {“”,””} ##
## ##
## Examples : ##
## 1. dbca -progress_only -responseFile ##
## Display a progress bar depicting progress of database creation ##
## process. ##
## ##
## 2. dbca -silent -responseFile ##
## Creates database silently. No user interface is displayed. ##
## ##
## 3. dbca -silent -createDatabase -cloneTemplate ##
## -responseFile ##
## Creates database silently with clone template. The template in ##
## responsefile is a clone template. ##
## ##
## 4. dbca -silent -deleteDatabase -responseFile ##
## Deletes database silently. ##
##############################################################################
#—————————————————————————–
# GENERAL section is required for all types of database creations.
#—————————————————————————–
[GENERAL]
#—————————————————————————–
# Name : RESPONSEFILE_VERSION
# Datatype : String
# Description : Version of the database to create
# Valid values : “11.1.0”
# Default value : None
# Mandatory : Yes
#—————————————————————————–
RESPONSEFILE_VERSION = “11.2.0”
#—————————————————————————–
# Name : OPERATION_TYPE
# Datatype : String
# Description : Type of operation
# Valid values : “createDatabase” “createTemplateFromDB” “createCloneTemplate” “deleteDatabase” “configureDatabase” “addInstance” (RAC-only) “deleteInstance” (RAC-only)
# Default value : None
# Mandatory : Yes
#—————————————————————————–
OPERATION_TYPE = “createDatabase”
#———————–*** End of GENERAL section ***————————
#—————————————————————————–
# CREATEDATABASE section is used when OPERATION_TYPE is defined as “createDatabase”.
#—————————————————————————–
[CREATEDATABASE]
#—————————————————————————–
# Name : GDBNAME
# Datatype : String
# Description : Global database name of the database
# Valid values : . – when database domain isn’t NULL
# – when database domain is NULL
# Default value : None
# Mandatory : Yes
#—————————————————————————–
GDBNAME = “lihb_gdbname”
#—————————————————————————–
# Name : RACONENODE
# Datatype : Boolean
# Description : Set to true for RAC One Node database
# Valid values : TRUEFALSE
# Default value : FALSE
# Mandatory : No
#—————————————————————————–
#RACONENODE = “false”
#—————————————————————————–
# Name : RACONENODESERVICENAME
# Datatype : String
# Description : Service is required by application to connect to RAC One
# Node Database
# Valid values : Service Name
# Default value : None
# Mandatory : No [required in case RACONENODE flag is set to true]
#—————————————————————————–
#RACONENODESERVICENAME =
#—————————————————————————–
# Name : POLICYMANAGED
# Datatype : Boolean
# Description : Set to true if Database is policy managed and
# set to false if Database is admin managed
# Valid values : TRUEFALSE
# Default value : FALSE
# Mandatory : No
#—————————————————————————–
#POLICYMANAGED = “false”
#—————————————————————————–
# Name : CREATESERVERPOOL
# Datatype : Boolean
# Description : Set to true if new server pool need to be created for database
# if this option is specified then the newly created database
# will use this newly created serverpool.
# Multiple serverpoolname can not be specified for database
# Valid values : TRUEFALSE
# Default value : FALSE
# Mandatory : No
#—————————————————————————–
#CREATESERVERPOOL = “false”
#—————————————————————————–
# Name : FORCE
# Datatype : Boolean
# Description : Set to true if new server pool need to be created by force
# if this option is specified then the newly created serverpool
# will be assigned server even if no free servers are available.
# This may affect already running database.
# This flag can be specified for Admin managed as well as policy managed db.
# Valid values : TRUEFALSE
# Default value : FALSE
# Mandatory : No
#—————————————————————————–
#FORCE = “false”
#—————————————————————————–
# Name : SERVERPOOLNAME
# Datatype : String
# Description : Only one serverpool name need to be specified
# if Create Server Pool option is specified.
# Comma-separated list of Serverpool names if db need to use
# multiple Server pool
# Valid values : ServerPool name
# Default value : None
# Mandatory : No [required in case of RAC service centric database]
#—————————————————————————–
#SERVERPOOLNAME =
#—————————————————————————–
# Name : CARDINALITY
# Datatype : Number
# Description : Specify Cardinality for create server pool operation
# Valid values : any positive Integer value
# Default value : Number of qualified nodes on cluster
# Mandatory : No [Required when a new serverpool need to be created]
#—————————————————————————–
#CARDINALITY =
#—————————————————————————–
# Name : SID
# Datatype : String
# Description : System identifier (SID) of the database
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : specified in GDBNAME
# Mandatory : No
#—————————————————————————–
SID = “lihb_sid”
#—————————————————————————–
# Name : NODELIST
# Datatype : String
# Description : Comma-separated list of cluster nodes
# Valid values : Cluster node names
# Default value : None
# Mandatory : No (Yes for RAC database-centric database )
#—————————————————————————–
#NODELIST=
#—————————————————————————–
# Name : TEMPLATENAME
# Datatype : String
# Description : Name of the template
# Valid values : Template file name
# Default value : None
# Mandatory : Yes
#—————————————————————————–
TEMPLATENAME = “General_Purpose.dbc”
#—————————————————————————–
# Name : OBFUSCATEDPASSWORDS
# Datatype : Boolean
# Description : Set to true if passwords are encrypted
# Valid values : TRUEFALSE
# Default value : FALSE
# Mandatory : No
#—————————————————————————–
#OBFUSCATEDPASSWORDS = FALSE

#—————————————————————————–
# Name : SYSPASSWORD
# Datatype : String
# Description : Password for SYS user
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : Yes
#—————————————————————————–
SYSPASSWORD = “mima_0001”
#—————————————————————————–
# Name : SYSTEMPASSWORD
# Datatype : String
# Description : Password for SYSTEM user
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : Yes
#—————————————————————————–
SYSTEMPASSWORD = “mima_0001”
#—————————————————————————–
# Name : EMCONFIGURATION
# Datatype : String
# Description : Enterprise Manager Configuration Type
# Valid values : CENTRAL|LOCAL|ALL|NONE
# Default value : NONE
# Mandatory : No
#—————————————————————————–
#EMCONFIGURATION = “NONE”
#—————————————————————————–
# Name : DISABLESECURITYCONFIGURATION
# Datatype : String
# Description : Database Security Settings
# Valid values : ALL|NONE|AUDIT|PASSWORD_PROFILE
# Default value : NONE
# Mandatory : No
#—————————————————————————–
#DISABLESECURITYCONFIGURATION = “NONE”

#—————————————————————————–
# Name : SYSMANPASSWORD
# Datatype : String
# Description : Password for SYSMAN user
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : Yes, if LOCAL specified for EMCONFIGURATION
#—————————————————————————–
#SYSMANPASSWORD = “password”
#—————————————————————————–
# Name : DBSNMPPASSWORD
# Datatype : String
# Description : Password for DBSNMP user
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : Yes, if EMCONFIGURATION is specified
#—————————————————————————–
#DBSNMPPASSWORD = “password”
#—————————————————————————–
# Name : CENTRALAGENT
# Datatype : String
# Description : Grid Control Central Agent Oracle Home
# Default value : None
# Mandatory : Yes, if CENTRAL is specified for EMCONFIGURATION
#—————————————————————————–
#CENTRALAGENT =
#—————————————————————————–
# Name : HOSTUSERNAME
# Datatype : String
# Description : Host user name for EM backup job
# Default value : None
# Mandatory : Yes, if ALL is specified for EMCONFIGURATION
#—————————————————————————–
#HOSTUSERNAME =
#—————————————————————————–
# Name : HOSTUSERPASSWORD
# Datatype : String
# Description : Host user password for EM backup job
# Default value : None
# Mandatory : Yes, if ALL is specified for EMCONFIGURATION
#—————————————————————————–
#HOSTUSERPASSWORD=
#—————————————————————————–
# Name : BACKUPSCHEDULE
# Datatype : String
# Description : Daily backup schedule in the form of hh:mm
# Default value : 2:00
# Mandatory : Yes, if ALL is specified for EMCONFIGURATION
#—————————————————————————–
#BACKUPSCHEDULE=
#—————————————————————————–
# Name : DVOWNERNAME
# Datatype : String
# Description : DataVault Owner
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : Yes, if DataVault option is chosen
#—————————————————————————–
#DVOWNERNAME = “”
#—————————————————————————–
# Name : DVOWNERPASSWORD
# Datatype : String
# Description : Password for DataVault Owner
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : Yes, if DataVault option is chosen
#—————————————————————————–
#DVOWNERPASSWORD = “”
#—————————————————————————–
# Name : DVACCOUNTMANAGERNAME
# Datatype : String
# Description : DataVault Account Manager
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : No
#—————————————————————————–
#DVACCOUNTMANAGERNAME = “”
#—————————————————————————–
# Name : DVACCOUNTMANAGERPASSWORD
# Datatype : String
# Description : Password for DataVault Account Manager
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : No
#—————————————————————————–
#DVACCOUNTMANAGERPASSWORD = “”

#—————————————————————————–
# Name : DATAFILEJARLOCATION
# Datatype : String
# Description : Location of the data file jar
# Valid values : Directory containing compressed datafile jar
# Default value : None
# Mandatory : No
#—————————————————————————–
#DATAFILEJARLOCATION =
#—————————————————————————–
# Name : DATAFILEDESTINATION
# Datatype : String
# Description : Location of the data file’s
# Valid values : Directory for all the database files
# Default value : $ORACLE_BASE/oradata
# Mandatory : No
#—————————————————————————–
DATAFILEDESTINATION = lihb_datafiledestination
#—————————————————————————–
# Name : RECOVERYAREADESTINATION
# Datatype : String
# Description : Location of the data file’s
# Valid values : Recovery Area location
# Default value : $ORACLE_BASE/flash_recovery_area
# Mandatory : No
#—————————————————————————–
RECOVERYAREADESTINATION= lihb_recoveryareadestination
#—————————————————————————–
# Name : STORAGETYPE
# Datatype : String
# Description : Specifies the storage on which the database is to be created
# Valid values : FS (CFS for RAC), ASM
# Default value : FS
# Mandatory : No
#—————————————————————————–
STORAGETYPE=FS
#—————————————————————————–
# Name : DISKGROUPNAME
# Datatype : String
# Description : Specifies the disk group name for the storage
# Default value : DATA
# Mandatory : No
#—————————————————————————–
#DISKGROUPNAME=DATA
#—————————————————————————–
# Name : ASMSNMP_PASSWORD
# Datatype : String
# Description : Password for ASM Monitoring
# Default value : None
# Mandatory : No
#—————————————————————————–
#ASMSNMP_PASSWORD=””
#—————————————————————————–
# Name : RECOVERYGROUPNAME
# Datatype : String
# Description : Specifies the disk group name for the recovery area
# Default value : RECOVERY
# Mandatory : No
#—————————————————————————–
#RECOVERYGROUPNAME=RECOVERY

#—————————————————————————–
# Name : CHARACTERSET
# Datatype : String
# Description : Character set of the database
# Valid values : Check Oracle11g National Language Support Guide
# Default value : “US7ASCII”
# Mandatory : NO
#—————————————————————————–
CHARACTERSET = “lihb_characterset”
#—————————————————————————–
# Name : NATIONALCHARACTERSET
# Datatype : String
# Description : National Character set of the database
# Valid values : “UTF8” or “AL16UTF16”. For details, check Oracle11g National Language Support Guide
# Default value : “AL16UTF16”
# Mandatory : No
#—————————————————————————–
NATIONALCHARACTERSET= “AL16UTF16”
#—————————————————————————–
# Name : REGISTERWITHDIRSERVICE
# Datatype : Boolean
# Description : Specifies whether to register with Directory Service.
# Valid values : TRUE FALSE
# Default value : FALSE
# Mandatory : No
#—————————————————————————–
#REGISTERWITHDIRSERVICE= TRUE
#—————————————————————————–
# Name : DIRSERVICEUSERNAME
# Datatype : String
# Description : Specifies the name of the directory service user
# Mandatory : YES, if the value of registerWithDirService is TRUE
#—————————————————————————–
#DIRSERVICEUSERNAME= “name”
#—————————————————————————–
# Name : DIRSERVICEPASSWORD
# Datatype : String
# Description : The password of the directory service user.
# You can also specify the password at the command prompt instead of here.
# Mandatory : YES, if the value of registerWithDirService is TRUE
#—————————————————————————–
#DIRSERVICEPASSWORD= “password”
#—————————————————————————–
# Name : WALLETPASSWORD
# Datatype : String
# Description : The password for wallet to created or modified.
# You can also specify the password at the command prompt instead of here.
# Mandatory : YES, if the value of registerWithDirService is TRUE
#—————————————————————————–
#WALLETPASSWORD= “password”
#—————————————————————————–
# Name : LISTENERS
# Datatype : String
# Description : Specifies list of listeners to register the database with.
# By default the database is configured for all the listeners specified in the
# $ORACLE_HOME/network/admin/listener.ora
# Valid values : The list should be space separated names like “listener1 listener2”.
# Mandatory : NO
#—————————————————————————–
LISTENERS = “LISTENER”
#—————————————————————————–
# Name : VARIABLESFILE
# Datatype : String
# Description : Location of the file containing variable value pair
# Valid values : A valid file-system file. The variable value pair format in this file
# is =. Each pair should be in a new line.
# Default value : None
# Mandatory : NO
#—————————————————————————–
#VARIABLESFILE =
#—————————————————————————–
# Name : VARIABLES
# Datatype : String
# Description : comma separated list of name=value pairs. Overrides variables defined in variablefile and templates
# Default value : None
# Mandatory : NO
#—————————————————————————–
#VARIABLES =
#—————————————————————————–
# Name : INITPARAMS
# Datatype : String
# Description : comma separated list of name=value pairs. Overrides initialization parameters defined in templates
# Default value : None
# Mandatory : NO
#—————————————————————————–
#INITPARAMS =
#—————————————————————————–
# Name : SAMPLESCHEMA
# Datatype : Boolean
# Description : Specifies whether or not to add the Sample Schemas to your database
# Valid values : TRUE FALSE
# Default value : FASLE
# Mandatory : No
#—————————————————————————–
#SAMPLESCHEMA=TRUE
#—————————————————————————–
# Name : MEMORYPERCENTAGE
# Datatype : String
# Description : percentage of physical memory for Oracle
# Default value : None
# Mandatory : NO
#—————————————————————————–
#MEMORYPERCENTAGE = “40”
#—————————————————————————–
# Name : DATABASETYPE
# Datatype : String
# Description : used for memory distribution when MEMORYPERCENTAGE specified
# Valid values : MULTIPURPOSE|DATA_WAREHOUSING|OLTP
# Default value : MULTIPURPOSE
# Mandatory : NO
#—————————————————————————–
#DATABASETYPE = “MULTIPURPOSE”
#—————————————————————————–
# Name : AUTOMATICMEMORYMANAGEMENT
# Datatype : Boolean
# Description : flag to indicate Automatic Memory Management is used
# Valid values : TRUE/FALSE
# Default value : TRUE
# Mandatory : NO
#—————————————————————————–
#AUTOMATICMEMORYMANAGEMENT = “TRUE”
#—————————————————————————–
# Name : TOTALMEMORY
# Datatype : String
# Description : total memory in MB to allocate to Oracle
# Valid values :
# Default value :
# Mandatory : NO
#—————————————————————————–
TOTALMEMORY = “lihb_totalmemory”

#———————–*** End of CREATEDATABASE section ***————————
#—————————————————————————–
# createTemplateFromDB section is used when OPERATION_TYPE is defined as “createTemplateFromDB”.
#—————————————————————————–
[createTemplateFromDB]
#—————————————————————————–
# Name : SOURCEDB
# Datatype : String
# Description : The source database from which to create the template
# Valid values : The format is ::
# Default value : none
# Mandatory : YES
#—————————————————————————–
SOURCEDB = “myhost:1521:orcl”
#—————————————————————————–
# Name : SYSDBAUSERNAME
# Datatype : String
# Description : A user with DBA role.
# Default value : none
# Mandatory : YES
#—————————————————————————–
SYSDBAUSERNAME = “system”
#—————————————————————————–
# Name : SYSDBAPASSWORD
# Datatype : String
# Description : The password of the DBA user.
# You can also specify the password at the command prompt instead of here.
# Default value : none
# Mandatory : YES
#—————————————————————————–
#SYSDBAPASSWORD = “password”
#—————————————————————————–
# Name : TEMPLATENAME
# Datatype : String
# Description : Name for the new template.
# Default value : None
# Mandatory : Yes
#—————————————————————————–
TEMPLATENAME = “My Copy TEMPLATE”
#———————–*** End of createTemplateFromDB section ***————————
#—————————————————————————–
# createCloneTemplate section is used when OPERATION_TYPE is defined as “createCloneTemplate”.
#—————————————————————————–
[createCloneTemplate]
#—————————————————————————–
# Name : SOURCEDB
# Datatype : String
# Description : The source database is the SID from which to create the template.
# This database must be local and on the same ORACLE_HOME.
# Default value : none
# Mandatory : YES
#—————————————————————————–
SOURCEDB = “orcl”
#—————————————————————————–
# Name : SYSDBAUSERNAME
# Datatype : String
# Description : A user with DBA role.
# Default value : none
# Mandatory : YES, if no OS authentication
#—————————————————————————–
#SYSDBAUSERNAME = “sys”
#—————————————————————————–
# Name : SYSDBAPASSWORD
# Datatype : String
# Description : The password of the DBA user.
# You can also specify the password at the command prompt instead of here.
# Default value : none
# Mandatory : YES
#—————————————————————————–
#SYSDBAPASSWORD = “password”
#—————————————————————————–
# Name : TEMPLATENAME
# Datatype : String
# Description : Name for the new template.
# Default value : None
# Mandatory : Yes
#—————————————————————————–
TEMPLATENAME = “My Clone TEMPLATE”
#—————————————————————————–
# Name : DATAFILEJARLOCATION
# Datatype : String
# Description : Location of the data file jar
# Valid values : Directory where the new compressed datafile jar will be placed
# Default value : $ORACLE_HOME/assistants/dbca/templates
# Mandatory : NO
#—————————————————————————–
#DATAFILEJARLOCATION =
#———————–*** End of createCloneTemplate section ***————————
#—————————————————————————–
# DELETEDATABASE section is used when DELETE_TYPE is defined as “deleteDatabase”.
#—————————————————————————–
[DELETEDATABASE]
#—————————————————————————–
# Name : SOURCEDB
# Datatype : String
# Description : The source database is the SID
# This database must be local and on the same ORACLE_HOME.
# Default value : none
# Mandatory : YES
#—————————————————————————–
SOURCEDB = “orcl”
#—————————————————————————–
# Name : SYSDBAUSERNAME
# Datatype : String
# Description : A user with DBA role.
# Default value : none
# Mandatory : YES, if no OS authentication
#—————————————————————————–
#SYSDBAUSERNAME = “sys”
#—————————————————————————–
# Name : SYSDBAPASSWORD
# Datatype : String
# Description : The password of the DBA user.
# You can also specify the password at the command prompt instead of here.
# Default value : none
# Mandatory : YES, if no OS authentication
#—————————————————————————–
#SYSDBAPASSWORD = “password”
#———————–*** End of deleteDatabase section ***————————
#—————————————————————————–
# GENERATESCRIPTS section
#—————————————————————————–
[generateScripts]
#—————————————————————————–
# Name : TEMPLATENAME
# Datatype : String
# Description : Name of the template
# Valid values : Template name as seen in DBCA
# Default value : None
# Mandatory : Yes
#—————————————————————————–
TEMPLATENAME = “New Database”
#—————————————————————————–
# Name : GDBNAME
# Datatype : String
# Description : Global database name of the database
# Valid values : . – when database domain isn’t NULL
# – when database domain is NULL
# Default value : None
# Mandatory : Yes
#—————————————————————————–
GDBNAME = “lihb_gdbname”
#—————————————————————————–
# Name : SCRIPTDESTINATION
# Datatype : String
# Description : Location of the scripts
# Valid values : Directory for all the scripts
# Default value : None
# Mandatory : No
#—————————————————————————–
#SCRIPTDESTINATION =
#———————–*** End of deleteDatabase section ***————————
#—————————————————————————–
# CONFIGUREDATABASE section is used when OPERATION_TYPE is defined as “configureDatabase”.
#—————————————————————————–
[CONFIGUREDATABASE]
#—————————————————————————–
# Name : SOURCEDB
# Datatype : String
# Description : The source database is the SID
# This database must be local and on the same ORACLE_HOME.
# Default value : none
# Mandatory : YES
#—————————————————————————–
#SOURCEDB = “orcl”
#—————————————————————————–
# Name : SYSDBAUSERNAME
# Datatype : String
# Description : A user with DBA role.
# Default value : none
# Mandatory : YES, if no OS authentication
#—————————————————————————–
#SYSDBAUSERNAME = “sys”

#—————————————————————————–
# Name : SYSDBAPASSWORD
# Datatype : String
# Description : The password of the DBA user.
# You can also specify the password at the command prompt instead of here.
# Default value : none
# Mandatory : YES, if no OS authentication
#—————————————————————————–
#SYSDBAPASSWORD =
#—————————————————————————–
# Name : REGISTERWITHDIRSERVICE
# Datatype : Boolean
# Description : Specifies whether to register with Directory Service.
# Valid values : TRUE FALSE
# Default value : FALSE
# Mandatory : No
#—————————————————————————–
#REGISTERWITHDIRSERVICE= TRUE
#—————————————————————————–
# Name : UNREGISTERWITHDIRSERVICE
# Datatype : Boolean
# Description : Specifies whether to unregister with Directory Service.
# Valid values : TRUE FALSE
# Default value : FALSE
# Mandatory : No
#—————————————————————————–
#UNREGISTERWITHDIRSERVICE= TRUE
#—————————————————————————–
# Name : REGENERATEDBPASSWORD
# Datatype : Boolean
# Description : Specifies whether regenerate database password in OID/Wallet
# Valid values : TRUE FALSE
# Default value : FALSE
# Mandatory : No
#—————————————————————————–
#REGENERATEDBPASSWORD= TRUE
#—————————————————————————–
# Name : DIRSERVICEUSERNAME
# Datatype : String
# Description : Specifies the name of the directory service user
# Mandatory : YES, if the any of the reg/unreg/regenPasswd options specified
#—————————————————————————–
#DIRSERVICEUSERNAME= “name”
#—————————————————————————–
# Name : DIRSERVICEPASSWORD
# Datatype : String
# Description : The password of the directory service user.
# You can also specify the password at the command prompt instead of here.
# Mandatory : YES, if the any of the reg/unreg/regenPasswd options specified
#—————————————————————————–
#DIRSERVICEPASSWORD= “password”
#—————————————————————————–
# Name : WALLETPASSWORD
# Datatype : String
# Description : The password for wallet to created or modified.
# You can also specify the password at the command prompt instead of here.
# Mandatory : YES, if the any of the reg/unreg/regenPasswd options specified
#—————————————————————————–
#WALLETPASSWORD= “password”
#—————————————————————————–
# Name : DISABLESECURITYCONFIGURATION
# Datatype : String
# Description : Database Security Settings
# Valid values : ALL|NONE|AUDIT|PASSWORD_PROFILE
# Default value : NONE
# Mandatory : No
#—————————————————————————–
#DISABLESECURITYCONFIGURATION = “NONE”

#—————————————————————————–
# Name : ENABLESECURITYCONFIGURATION
# Datatype : String
# Description : Database Security Settings
# Valid values : true|false
# Default value : true
# Mandatory : No
#—————————————————————————–
#ENABLESECURITYCONFIGURATION = “true”

#—————————————————————————–
# Name : EMCONFIGURATION
# Datatype : String
# Description : Enterprise Manager Configuration Type
# Valid values : CENTRAL|LOCAL|ALL|NONE
# Default value : NONE
# Mandatory : No
#—————————————————————————–
#EMCONFIGURATION = “NONE”
#—————————————————————————–
# Name : SYSMANPASSWORD
# Datatype : String
# Description : Password for SYSMAN user
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : Yes, if LOCAL specified for EMCONFIGURATION
#—————————————————————————–
#SYSMANPASSWORD = “password”
#—————————————————————————–
# Name : DBSNMPPASSWORD
# Datatype : String
# Description : Password for DBSNMP user
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : Yes, if EMCONFIGURATION is specified
#—————————————————————————–
#DBSNMPPASSWORD = “password”
#—————————————————————————–
# Name : CENTRALAGENT
# Datatype : String
# Description : Grid Control Central Agent Oracle Home
# Default value : None
# Mandatory : Yes, if CENTRAL is specified for EMCONFIGURATION
#—————————————————————————–
#CENTRALAGENT =
#—————————————————————————–
# Name : HOSTUSERNAME
# Datatype : String
# Description : Host user name for EM backup job
# Default value : None
# Mandatory : Yes, if ALL is specified for EMCONFIGURATION
#—————————————————————————–
#HOSTUSERNAME =
#—————————————————————————–
# Name : HOSTUSERPASSWORD
# Datatype : String
# Description : Host user password for EM backup job
# Default value : None
# Mandatory : Yes, if ALL is specified for EMCONFIGURATION
#—————————————————————————–
#HOSTUSERPASSWORD=
#—————————————————————————–
# Name : BACKUPSCHEDULE
# Datatype : String
# Description : Daily backup schedule in the form of hh:mm
# Default value : 2:00
# Mandatory : Yes, if ALL is specified for EMCONFIGURATION
#—————————————————————————–
#BACKUPSCHEDULE=
#———————–*** End of CONFIGUREDATABASE section ***————————

#—————————————————————————–
# ADDINSTANCE section is used when OPERATION_TYPE is defined as “addInstance”.
#—————————————————————————–
[ADDINSTANCE]
#—————————————————————————–
# Name : DB_UNIQUE_NAME
# Datatype : String
# Description : DB Unique Name of the RAC database
# Valid values :
# Default value : None
# Mandatory : Yes
#—————————————————————————–
DB_UNIQUE_NAME = “orcl11g.us.oracle.com”
#—————————————————————————–
# Name : INSTANCENAME
# Datatype : String
# Description : RAC instance name to be added
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : +
# Mandatory : No
#—————————————————————————–
#INSTANCENAME = “orcl1”
#—————————————————————————–
# Name : NODELIST
# Datatype : String
# Description : Node on which to add new instance
# (in 10gR2, instance addition is supported on 1 node at a time)
# Valid values : Cluster node name
# Default value : None
# Mandatory : Yes
#—————————————————————————–
NODELIST=
#—————————————————————————–
# Name : OBFUSCATEDPASSWORDS
# Datatype : Boolean
# Description : Set to true if passwords are encrypted
# Valid values : TRUEFALSE
# Default value : FALSE
# Mandatory : No
#—————————————————————————–
#OBFUSCATEDPASSWORDS = FALSE
#—————————————————————————–
# Name : SYSDBAUSERNAME
# Datatype : String
# Description : A user with DBA role.
# Default value : none
# Mandatory : YES
#—————————————————————————–
SYSDBAUSERNAME = “sys”
#—————————————————————————–
# Name : SYSDBAPASSWORD
# Datatype : String
# Description : The password of the DBA user.
# Default value : none
# Mandatory : YES
#—————————————————————————–
#SYSDBAPASSWORD = “password”
#———————–*** End of ADDINSTANCE section ***————————

#—————————————————————————–
# DELETEINSTANCE section is used when OPERATION_TYPE is defined as “deleteInstance”.
#—————————————————————————–
[DELETEINSTANCE]
#—————————————————————————–
# Name : DB_UNIQUE_NAME
# Datatype : String
# Description : DB Unique Name of the RAC database
# Valid values :
# Default value : None
# Mandatory : Yes
#—————————————————————————–
DB_UNIQUE_NAME = “orcl11g.us.oracle.com”
#—————————————————————————–
# Name : INSTANCENAME
# Datatype : String
# Description : RAC instance name to be deleted
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : Yes
#—————————————————————————–
INSTANCENAME = “orcl11g”
#—————————————————————————–
# Name : NODELIST
# Datatype : String
# Description : Node on which instance to be deleted (SID) is located
# Valid values : Cluster node name
# Default value : None
# Mandatory : No
#—————————————————————————–
#NODELIST=
#—————————————————————————–
# Name : OBFUSCATEDPASSWORDS
# Datatype : Boolean
# Description : Set to true if passwords are encrypted
# Valid values : TRUEFALSE
# Default value : FALSE
# Mandatory : No
#—————————————————————————–
#OBFUSCATEDPASSWORDS = FALSE
#—————————————————————————–
# Name : SYSDBAUSERNAME
# Datatype : String
# Description : A user with DBA role.
# Default value : none
# Mandatory : YES
#—————————————————————————–
SYSDBAUSERNAME = “sys”
#—————————————————————————–
# Name : SYSDBAPASSWORD
# Datatype : String
# Description : The password of the DBA user.
# Default value : none
# Mandatory : YES
#—————————————————————————–
#SYSDBAPASSWORD = “password”

#———————–*** End of DELETEINSTANCE section ***————————
如下是netca.rsp的具体内容:

点击(此处)折叠或打开
######################################################################
## Copyright(c) 1998, 2011 Oracle Corporation. All rights reserved. ##
## ##
## Specify values for the variables listed below to customize your ##
## installation. ##
## ##
## Each variable is associated with a comment. The comment ##
## identifies the variable type. ##
## ##
## Please specify the values in the following format: ##
## ##
## Type Example ##
## String “Sample Value” ##
## Boolean True or False ##
## Number 1000 ##
## StringList {“String value 1″,”String Value 2”} ##
## ##
######################################################################
## ##
## This sample response file causes the Oracle Net Configuration ##
## Assistant (NetCA) to complete an Oracle Net configuration during ##
## a custom install of the Oracle11g server which is similar to ##
## what would be created by the NetCA during typical Oracle11g ##
## install. It also documents all of the NetCA response file ##
## variables so you can create your own response file to configure ##
## Oracle Net during an install the way you wish. ##
## ##
######################################################################
[GENERAL]
RESPONSEFILE_VERSION=”11.2″
CREATE_TYPE=”CUSTOM”
#——————————————————————————-
# Name : SHOW_GUI
# Datatype : Boolean
# Description: This variable controls appearance/suppression of the NetCA GUI,
# Pre-req : N/A
# Default : TRUE
# Note:
# This must be set to false in order to run NetCA in silent mode.
# This is a substitute of “/silent” flag in the NetCA command line.
# The command line flag has precedence over the one in this response file.
# This feature is present since 10.1.0.3.
#——————————————————————————-
#SHOW_GUI=false
#——————————————————————————-
# Name : LOG_FILE
# Datatype : String
# Description: If present, NetCA will log output to this file in addition to the
# standard out.
# Pre-req : N/A
# Default : NONE
# Note:
# This is a substitute of “/log” in the NetCA command line.
# The command line argument has precedence over the one in this response file.
# This feature is present since 10.1.0.3.
#——————————————————————————-
#LOG_FILE=””/oracle11gHome/network/tools/log/netca.log””
[oracle.net.ca]
#INSTALLED_COMPONENTS;StringList;list of installed components
# The possible values for installed components are:
# “net8″,”server”,”client”,”aso”, “cman”, “javavm”
INSTALLED_COMPONENTS={“server”,”net8″,”javavm”}
#INSTALL_TYPE;String;type of install
# The possible values for install type are:
# “typical”,”minimal” or “custom”
INSTALL_TYPE=””typical””
#LISTENER_NUMBER;Number;Number of Listeners
# A typical install sets one listener
LISTENER_NUMBER=1
#LISTENER_NAMES;StringList;list of listener names
# The values for listener are:
# “LISTENER”,”LISTENER1″,”LISTENER2″,”LISTENER3″, …
# A typical install sets only “LISTENER”
LISTENER_NAMES={“LISTENER”}
#LISTENER_PROTOCOLS;StringList;list of listener addresses (protocols and parameters separated by semicolons)
# The possible values for listener protocols are:
# “TCP;1521″,”TCPS;2484″,”NMP;ORAPIPE”,”IPC;IPCKEY”,”VI;1521″
# A typical install sets only “TCP;1521”
LISTENER_PROTOCOLS={“TCP;1521”}
#LISTENER_START;String;name of the listener to start, in double quotes
LISTENER_START=””LISTENER””
#NAMING_METHODS;StringList;list of naming methods
# The possible values for naming methods are:
# LDAP, TNSNAMES, ONAMES, HOSTNAME, NOVELL, NIS, DCE
# A typical install sets only: “TNSNAMES”,”ONAMES”,”HOSTNAMES”
# or “LDAP”,”TNSNAMES”,”ONAMES”,”HOSTNAMES” for LDAP
NAMING_METHODS={“TNSNAMES”,”ONAMES”,”HOSTNAME”}
#NOVELL_NAMECONTEXT;String;Novell Directory Service name context, in double quotes
# A typical install does not use this variable.
#NOVELL_NAMECONTEXT = “”NAMCONTEXT””
#SUN_METAMAP;String; SUN meta map, in double quotes
# A typical install does not use this variable.
#SUN_METAMAP = “”MAP””
#DCE_CELLNAME;String;DCE cell name, in double quotes
# A typical install does not use this variable.
#DCE_CELLNAME = “”CELL””
#NSN_NUMBER;Number;Number of NetService Names
# A typical install sets one net service name
NSN_NUMBER=1
#NSN_NAMES;StringList;list of Net Service names
# A typical install sets net service name to “EXTPROC_CONNECTION_DATA”
NSN_NAMES={“EXTPROC_CONNECTION_DATA”}
#NSN_SERVICE;StringList;Oracle11g database’s service name
# A typical install sets Oracle11g database’s service name to “PLSExtProc”
NSN_SERVICE={“PLSExtProc”}
#NSN_PROTOCOLS;StringList;list of coma separated strings of Net Service Name protocol parameters
# The possible values for net service name protocol parameters are:
# “TCP;HOSTNAME;1521″,”TCPS;HOSTNAME;2484″,”NMP;COMPUTERNAME;ORAPIPE”,”VI;HOSTNAME;1521″,”IPC;IPCKEY”
# A typical install sets parameters to “IPC;EXTPROC”
NSN_PROTOCOLS={“TCP;HOSTNAME;1521”} 以上是“rhel6/7如何自动安装oracle11g单实例”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注云技术行业资讯频道!

相关推荐: MySQL性能参数的示例分析

这篇文章主要介绍MySQL性能参数的示例分析,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完! max_connect_errors是一个MySQL中与安全有关的计数器值,它负责阻止过多尝试失败的客户端以防止暴力破解密码的情况。max_co…

文章页内容下
赞(0) 打赏
版权声明:本站采用知识共享、学习交流,不允许用于商业用途;文章由发布者自行承担一切责任,与本站无关。
文章页正文下
文章页评论上

云服务器、web空间可免费试用

宝塔面板主机、支持php,mysql等,SSL部署;安全高速企业专供99.999%稳定,另有高防主机、不限制内容等类型,具体可咨询QQ:360163164,Tel同微信:18905205712

主机选购导航云服务器试用

登录

找回密码

注册