码迷,mamicode.com
首页 > 数据库 > 详细

oracle 静默安装

时间:2014-09-04 10:34:09      阅读:261      评论:0      收藏:0      [点我收藏+]

标签:oracle

下载oracle的安装包:

下载地址:

注意下载oracle是需要注册oracle的

http://download.oracle.com/otn/nt/oracle11g


下载两个包:

linux.x64_11gR2_database_1of2.zip  

linux.x64_11gR2_database_2of2.zip

1、上传:到服务器:

mkdir -p /usr/local/oracle

cd /usr/local/oracle

将两个包放在环境中:

unzip linux.x64_11gR2_database_1of2.zip  

unzip linux.x64_11gR2_database_2of2.zip

2、准备oracle的安装目标目录

mkdir –p /opt/oracle

3、创建oracle相关用户和用户组

groupadd dba

groupadd oinstall

useradd -g oinstall -G dba oracle

passwd oracle

输入密码:

修改安装目录权限:

chown –R oracle:oinstall /opt/oracle

4,挂载安装载:

上传安装盘到服务器:

安装盘名称:RHEL_5.6x86_64.iso

挂载目录:/home/os

mkdir -p /home/os

mount -o loop -t iso9660 RHEL_5.6x86_64.iso os

cd os/Server

5,安装所需要基本编译工具:

[root@localhost oracle]#rpm -ivh kernel-headers-
[root@localhost oracle]#rpm -ivh glibc-headers-
[root@localhost oracle]#rpm -ivh glibc-devel-
[root@localhost oracle]#rpm -ivh libgomp-
[root@localhost oracle]#rpm -ivh sysstat-
[root@localhost oracle]#rpm -ivh libaio-devel-
[root@localhost oracle]#rpm -ivh libstdc++-devel-
[root@localhost oracle]#rpm -ivh unixODBC-
[root@localhost oracle]#rpm -ivh unixODBC-devel
[root@localhost oracle]#rpm -ivh gcc-
[root@localhost oracle]#rpm -ivh gcc-c++-
[root@localhost oracle]#rpm -ivh elfutils-libelf-devel- elfutils-libelf-devel-static-

6,设置修改核参数:

打开 /etc/sysctl.conf,在最后加入以下内容

kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576

使其生效:

 sysctl -p

7,修改 /etc/security/limits.conf,oracle 用户登陆的限制参数:在最后加入以下内容

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536


8,修改系统环境变量/etc/profile

修改环境变量/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


9:设置ORACLE环境变量

export ORACLE_SID=orcl
export ORACLE_BASE=/opt/oracle/app
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib

10:修改用户登陆环境变量   .bashrc 

export ORACLE_SID=orcl
export ORACLE_BASE=/opt/oracle/app
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib


11:执行安装

安装第一步:

su - oracle

cd /usr/local/oracle/database

请下载db.rsp  到家目录  /home/oracle下,然后执行

 ./runInstaller -silent -noconfig -ignorePrereq -responseFile     /home/oracle/db.rsp

执行 

查看安装过程

可以到/home/oracle/oraInventory/logs 目录下查看安装进度。

tail -100f installActions2014-09-03_10-36-42AM.log 

3)安装成功提示执行脚本

到最后提示:

/opt/app/oracle/oraInventory/orainstRoot.sh

/opt/app/oracle/product/11.2.0/db_1/root.sh

To execute the configuration scripts:

1. Open a terminal window 

2. Log in as "root" 

3. Run the scripts 

4. Return to this window and hit "Enter" key to continue 

Successfully Setup Software.






oracle 静默安装

标签:oracle

原文地址:http://blog.csdn.net/wangjunji34478/article/details/39048229

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!