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.


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM