您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息
免费发信息

静默方式(silent)安装Oracle软件

2024/4/18 8:11:10发布5次查看
有的时候不方便登陆linux/unix的图形界面安装数据库,且gui方式安装让我们无法知道具体是做了什么操作,我们完全可以采用命令
有的时候不方便登陆linux/unix的图形界面安装数据库,且gui方式安装让我们无法知道具体是做了什么操作,我们完全可以采用命令模式安装和删除oracle软件(代替oui)、建立和删除数据库库(代替dbca)。
平台:rhel4.5,oracle10.2.0.1
1、上传并解压oracle软件,假如放在/home目录下
$ cd /home
$ unzip 10201_database_linux32.zip
2、设置安装oracle软件必须的操作系统信息,,如组、用户、系统内核参数、目录、用户初始化参数等
--增加组和用户
# groupadd oinstall
# groupadd dba
# useradd -g oinstall -g dba oracle
# passwd oracle
--修改系统内核参数
# vi /etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
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
# /sbin/sysctl -p   (修改以后让参数生效)
--为了提升性能增加oracle用户的shell限制
# vi /etc/security/limits.conf
oracle              soft    nproc   2047
oracle              hard    nproc   16384
oracle              soft    nofile 1024
oracle              hard    nofile 65536
# vi /etc/pam.d/login
session    required     /lib/security/pam_limits.so
session    required     pam_limits.so
# vi /etc/profile
if [ $user = oracle ]; then
if [ $shell = /bin/bash ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
# vi /etc/selinux/config   (使安全linux标志失效)
selinux=disabled
--建立oracle_base目录
# mkdir -p /opt/oracle
# chown -r oracle:oinstall /opt/oracle
# chmod -r 775 /opt/oracle
--oracle用户的.bash_profile文件设置
# su - oracle
$ vi ~/.bash_profile
umask 022
export oracle_base=/opt/oracle
export oracle_home=/opt/oracle/product/10.2.0/db_1
export oracle_sid=wending
export path=$oracle_home/bin:$path
$ . ~/.bash_profile
3、建立orainst.loc文件
$ su -
# vi /etc/orainst.loc        (加入或修改以下内容,其中/opt/oracle是oracle_base)
inventory_loc=/opt/oracle/orainventory
inst_group=oinstall
# chmod 664 /etc/orainst.loc
4、建立response文件(在解压后oracle软件的response目录里有各种响应文件的模版)
# su - oracle
$ cd /home/database/response
$ cp enterprise.rsp enterprise_temp.rsp
$ vi enterprise_temp.rsp   (以下参数必需设置)
unix_group_name=oinstall
oracle_home=/opt/oracle/product/10.2.0/db_1
oracle_home_name=oradb10g_home1
s_namefordbagrp=dba
s_namefordbagrp=dba
n_configurationoption=3
5、通过response文件运行oui(-noconfig表示不运行配置助手只装软件)
$ cd /home/database
$ ./runinstaller -silent -noconfig -responsefile /home/database/response/enterprise_temp.rsp
安装结束后,以root用户执行$oracle_home下的root.sh:
$ su -
# /opt/oracle/product/10.2.0/db_1/root.sh
# exit
6、通过response文件运行netca
$ cd /home/database/response
$ cp netca.rsp netca_temp.rsp
$ vi netca_temp.rsp   (如果要修改监听名或端口在此编辑,一般什么都不用修改)
$ $oracle_home/bin/netca /silent /responsefile /home/database/response/netca_temp.rsp
执行完后,监听就已经启动了。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录