Oracle11gR2--静默安装数据库软件

1.安装相关的包(略)

2.建oracle用户 组

  groupadd oinstall --$ORACLE HOME/rdbms/lib/config.c
  groupadd dba
  chattr -i /etc/passwd /etc/shadow
  useradd -g oinstall -G dba oracle
  passwd oracle
  chattr +i /etc/passwd /etc/shadow

3.系统参数调整(略)

[root@localhost oracle]# cat /etc/sysctl.conf
[root@localhost oracle]# cat /etc/security/limits.conf 

4.环境变量设置

 export ORACLE_BASE=/home/oracle/app
 export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
 export ORACLE_SID=orcl
 export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/jdk/bin:$PATH
 export LANG="en_US.UTF-8"
 export NLS_LANG=american_AMERICA.UTF8
 export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"

5.静默安装之编辑response文件(注意:11gR2以后最好是在模板的基础上做)

cd /home/oracle/app/database/response
vi db_install_new.rsp 


oracle.install.option=INSTALL_DB_SWONLY       #只安装数据库软件
UNIX_GROUP_NAME=dba                           #Oracle用户用于安装软件的组名


[oracle@localhost ~]$ cat /etc/oraInst.loc 
INVENTORY_LOCATION=/u01/app/oraInventory

#相关目录
INVENTORY_LOCATION=/home/oracle/oraInventory  #oracle产品清单目录
ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1  #oracle安装目录
ORACLE_BASE=/home/oracle/app                                 #oracle基础目录

#安装版本
oracle.install.db.InstallEdition=EE

#用户组设置
oracle.install.db.DBA_GROUP=dba               #oracle用户用于授权OSDBA权限的组名  
oracle.install.db.OPER_GROUP=oinstall         #oracle用户用于授权OSPRR权限的组名  

#延迟安全检查
DECLINE_SECURITY_UPDATES=true

[oracle@localhost ~]$ cat /etc/oraInst.loc 

6.开始静默安装

[oracle@localhost database]$  ./runInstaller -silent -responseFile /home/oracle/app/database/response/db_install_new.rsp -ignoreSysPrereqs
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 29365 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 4016 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2018-01-29_08-57-06PM. Please wait ...[oracle@localhost database]$ [WARNING] [INS-13014] Target environment do not meet some optional requirements.
   CAUSE: Some of the optional prerequisites are not met. See logs for details. /home/oracle/oraInventory/logs/installActions2018-01-29_08-57-06PM.log
   ACTION: Identify the list of failed prerequisite checks from the log: /home/oracle/oraInventory/logs/installActions2018-01-29_08-57-06PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
You can find the log of this install session at:
 /home/oracle/oraInventory/logs/installActions2018-01-29_08-57-06PM.log
The installation of Oracle Database 11g was successful.
Please check '/home/oracle/oraInventory/logs/silentInstall2018-01-29_08-57-06PM.log' for more details.

As a root user, execute the following script(s):
		1. /home/oracle/app/oracle/product/11.2.0/dbhome_1/root.sh


[root@localhost ~]# /home/oracle/app/oracle/product/11.2.0/dbhome_1/root.sh
Check /home/oracle/app/oracle/product/11.2.0/dbhome_1/install/root_localhost.localdomain_2018-01-30_14-21-01.log for the output of root script


[oracle@localhost database]$ exit
登出
[root@localhost oracle]# /u01/app/oracle/product/12.2.0/dbhome_1/root.sh

7.验证:

[root@localhost ~]# su - oracle
[oracle@localhost ~]$ sqlplus  / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Wed Jan 31 15:01:32 2018

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

Connected to an idle instance.
posted @ 2018-01-31 15:11  chinesern  阅读(1545)  评论(0编辑  收藏  举报