database's docs

1.1.0 silent模式安装oracle 11G R2 之 oracle程序安装

1. 安装oracle

1) 编辑db_install.rsp

# database/response中有silent模式安装需要的rsp文件
ls /home/oracle/database/response/
dbca.rsp  db_install.rsp  netca.rsp
# db_install.rsp – used to install oracle binaries, install/upgrade a  database in silent mode
# dbca.rsp – used to install/configure/delete a database in silent mode
# netca.rsp – used to configure simple network for oracle database in silent mode

# 编辑db_install.rsp
cd /home/oracle/database/response/
cp db_install.rsp db_install.rsp.bak
vim db_install.rsp
# --force to install only database software

# --set your hostname

# --set unix group for oracle inventory

# --set directory for oracle inventory

# --set oracle home for binaries

# --set oracle home for binaries

# --set version of binaries to install
# -- EE - enterprise edition

# --specify extra groups for database management

# 数据库类型

# 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.

# Specify whether user wants to give any proxy details for connection.
# The value can be either true or false. If left blank it will be assumed
# to be false.

2) 安装oracle

# 使用root身份,修改目录权限
su -
chown -R oracle:oinstall /u01/

## 切换回oracle,并启动安装程序
su - oracle
./runInstaller -silent -responseFile /home/oracle/database/response/db_install.rsp -ignorePrereq
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 35584 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 3132 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2016-12-20_07-35-46PM. Please wait ...[oracle@oel6 database]$ You can find the log of this install session at:
The following configuration scripts need to be executed as the "root" user.
 #Root scripts to run

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.

## 以root身份登陆新的ssh会话,然后执行以下命令
sh /u01/app/oraInventory/
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.

sh /u01/app/oracle/product/11.2.0/dbhome_1/
Check /u01/app/oracle/product/11.2.0/dbhome_1/install/root_oel6.dbaora.com_2016-12-20_19-40-29.log for the output of root script

## 以root身份执行完以上两个脚本后,回到oracle用户的ssh会话,然后按下enter键

3) 检查oracle状态

## 检测安装成果
sqlplus / as sysdba

SQL*Plus: Release Production on Tue Dec 20 19:47:02 2016

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> exit