今天在上海上OCM试训课程,好久没搞ORACLE的安装了。而且还是虚拟机,实在不想开图形界面,所以赶紧翻阅了一下ORACLE手册关于静默安装的部分。
稍微写点东西如下.
安装前的工作准备和图形界面安装 ORACLE10G 是一样的。直到运行runInstaller。
安装前简单的配置过程如下:
config /etc/redhat-release
Red Hat Enterprise Linux Server release 4.5 (Tikanga)
config Hostname
digoal.sky-mobi.com.hz
config /etc/sysconfig/network
NETWORKING=yes NETWORKING_IPV6=no HOSTNAME=digoal.sky-mobi.com.hz GATEWAY=192.168.152.2
config /etc/sysconig/network-scripts/ifcfg-ethx
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.152.255
HWADDR=00:0C:29:2D:C8:C8
IPADDR=192.168.152.88
NETMASK=255.255.255.0
NETWORK=192.168.152.0
ONBOOT=yes
config /etc/hosts
127.0.0.1 localhost.localdomain localhost 192.168.152.88 digoal.sky-mobi.com.hz digoal
config /etc/sysctl.conf
kernel.sem = 5010 641280 5010 512
fs.file-max = 357364
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
net.ipv4.tcp_tw_recycle = 1
net.core.netdev_max_backlog = 4096
net.ipv4.tcp_max_syn_backlog = 10000
vm.overcommit_memory = 0
config /etc/security.conf
* soft nofile 131072
* hard nofile 131072
* soft nproc 131072
* hard nproc 131072
* soft core unlimited
* hard core unlimited
* soft memlock 50000000
* hard memlock 50000000
config /etc/pam.d/login
session required /lib/security/pam_limits.so #32位系统
session required pam_limits.so
config swap #确保满足ORACLE需求
total used free shared buffers cached
Mem: 1035108 752512 282596 0 5484 670180
-/+ buffers/cache: 76848 958260
Swap: 1652240 68 1652172
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
passwd oracle
#mkdir -p /opt/oracle
#chown -R oracle:oinstall /opt/oracle
#su - oracle
vi .bash_profile
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32:/usr/local/lib:/usr/lib:/lib
export PATH=$ORACLE_HOME/bin:$PATH
export NLS_LANG=AMERICAN_AMERICA.UTF8
export NLS_DATE_FORMAT="yyyy-mm-dd hh24:mi:ss"
export EDITOR=vi
export ORACLE_SID=digoal
alias rm='rm -i'
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
alias ll='ls -lh'
接下来进入使用responseFile安装数据库软件的过程:
#如果是第一次安装ORACLE软件,必须先创建一个oraInst.loc文件
#vi /etc/oraInst.loc
inventory_loc=/opt/oracle/oraInventory
inst_group=oinstall
#chmod 664 /etc/oraInst.loc
# su - oracle
$ cd $ORACLE_INSTALL_CD
$ 修改配置文件$ORACLE_INSTALLCD/response/custom.rsp
RESPONSEFILE_VERSION=2.2.1.0.0
UNIX_GROUP_NAME="oinstall" #需要修改的配置参数
FROM_LOCATION="/opt/soft_bak/database/stage/products.xml" #需要修改的配置参数
ORACLE_HOME="/opt/oracle/product/10.2.0/db_1" #需要修改的配置参数
ORACLE_HOME_NAME="OraDbHome" #需要修改的配置参数
TOPLEVEL_COMPONENT={"oracle.server","10.2.0.1.0"}
DEINSTALL_LIST={"oracle.server","10.2.0.1.0"}
SHOW_SPLASH_SCREEN=false
SHOW_WELCOME_PAGE=false
SHOW_NODE_SELECTION_PAGE=false
SHOW_SUMMARY_PAGE=false
SHOW_CUSTOM_TREE_PAGE=false
SHOW_INSTALL_PROGRESS_PAGE=false
SHOW_CONFIG_TOOL_PAGE=false
SHOW_XML_PREREQ_PAGE=false
SHOW_ROOTSH_CONFIRMATION=true
SHOW_END_SESSION_PAGE=false
SHOW_EXIT_CONFIRMATION=false
NEXT_SESSION=false #需要修改的配置参数
NEXT_SESSION_ON_FAIL=false #需要修改的配置参数
SHOW_DEINSTALL_CONFIRMATION=false
SHOW_DEINSTALL_PROGRESS=false
RESTART_SYSTEM=false #需要修改的配置参数
RESTART_REMOTE_SYSTEM=false #需要修改的配置参数
REMOVE_HOMES="/opt/oracle/product/10.2.0/db_1" #需要修改的配置参数
ORACLE_HOSTNAME="digoal.sky-mobi.com.hz" #需要修改的配置参数
SHOW_END_OF_INSTALL_MSGS=false
COMPONENT_LANGUAGES={"en"}
INSTALL_TYPE="EE" #需要修改的配置参数
oracle.server:DEPENDENCY_LIST={"oracle.rdbms:10.2.0.1.0","oracle.options:10.2.0.1.0","oracle.network:10.2.0.1.0","oracle.sysman.console.db:10.2.0.1.0","oracle.rdbms.oci:10.2.0.1.0","oracle.precomp:10.2.0.1.0","oracle.xdk:10.2.0.1.0","oracle.sqlplus.isqlplus:10.2.0.1.0","oracle.odbc:10.2.0.1.0"}
oracle.options:DEPENDENCY_LIST={"oracle.network.aso:10.2.0.1.0","oracle.rdbms.partitioning:10.2.0.1.0","oracle.sdo:10.2.0.1.0","oracle.oraolap:10.2.0.1.0","oracle.rdbms.lbac:10.2.0.1.0","oracle.rdbms.dmse:10.2.0.1.0"} #需要修改的配置参数
oracle.network:DEPENDENCY_LIST={"oracle.network.listener:10.2.0.1.0"}
s_nameForDBAGrp="dba" #需要修改的配置参数
varSelect=3 #需要修改的配置参数
还有一些是注释掉的参数.
#开始安装
$ ./runInstaller -silent -responseFile $ORACLE_INSTALLCD/response/custom.rsp
安装完的话监听会默认安装.
【参考】
Oracle? Database Installation Guide 10g Release 2 (10.2) for Linux x86 Universal Installer and OPatch User's Guide for Windows and UNIX ORACLE INSTALL CD/response/custom.rsp |