Oracle 靜默安裝
Oracle 靜默安裝
一 準備工作
1.1 配置本地YUM ,安裝軟體
[root@chen ~]# cd /etc/yum.repos.d/
[root@chen yum.repos.d]# cp public-yum-ol6.repo yum.repo
[root@chen yum.repos.d]# mv public-yum-ol6.repo /root/
[root@chen yum.repos.d]# vim yum.repo
[chen_cc]
name=Oracle_chen
baseurl=file:///mnt
gpgcheck=0
enabled=1
[root@chen yum.repos.d]# mount /dev/sr1 /mnt
[root@chen yum.repos.d]# yum list
[root@chen yum.repos.d]# yum -y install compat-libstdc++-33-3.2.3 elfutils-libelf gcc gcc-c++* glibc glibc-common glibc-common glibc-devel libaio libaio-devel libgcc libstdc++-* libstdc++-devel make sysstat
1.2 建立使用者,組
[root@chen ~]# groupadd -g 1000 oinstall
[root@chen ~]# groupadd -g 1001 dba
[root@chen ~]# useradd -u 1000 -g oinstall -G dba oracle
[root@chen ~]# mkdir -p /u01/app/oracle
[root@chen ~]# mv p10404530_112030_Linux-x86-64_* /u01/
[root@chen ~]# chown oracle.oinstall -R /u01/
[oracle@chen u01]$ unzip p10404530_112030_Linux-x86-64_1of7.zip
[oracle@chen u01]$ unzip p10404530_112030_Linux-x86-64_2of7.zip
1.3 配置oracle 使用者環境變數
[oracle@chen ~]$ vim .bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0
export ORACLE_SID=orcl
export PATH=$ORACLE_HOME/bin:$PATH
export NLS_LANG='AMERICAN_AMERICA.ZHS16GBK'
~
[oracle@chen ~]$ source .bash_profile
1.4 安全配置
[root@chen ~]# vim /etc/security/limits.conf
# End of file
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
"/etc/security/limits.conf" 56L, 2034C written
[root@chen ~]# vim /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
"/etc/sysctl.conf" 52L, 1461C written
[root@chen ~]# sysctl -p
/*
偽裝作業系統
[root@chen ~]# vim /etc/redhat-release
#Red Hat Enterprise Linux Server release 6.3 (Santiago)
redhat-4
*/
二 靜默安裝資料庫軟體
2.1 建立oraInst.loc 檔案
[root@chen ~]# cd /etc/
[root@chen etc]# touch oraInst.loc
[root@chen etc]# vim oraInst.loc
inventory_loc=/u01/app/oracle/oraInventory
inst_group=oinstall
[root@chen ~]# chown oracle.oinstall /etc/oraInst.loc
[root@chen ~]# chmod 664 /etc/oraInst.loc
2.2 建立響應檔案db_install.rsp
[oracle@chen ~]$ cp /u01/database/response/* /home/oracle/
[oracle@chen ~]$ ls
dbca.rsp db_install.rsp netca.rsp
[oracle@chen ~]$ vim db_install.rsp
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=chen
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oracle/oraInventory
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/u01/app/oracle/product/11.2.0
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.EEOptionsSelection=true
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oinstall
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
oracle.install.db.config.starterdb.globalDBName=orcl
oracle.install.db.config.starterdb.SID=orcl
oracle.install.db.config.starterdb.characterSet=AL32UTF8
oracle.install.db.config.starterdb.memoryOption=true
oracle.install.db.config.starterdb.memoryLimit=
oracle.install.db.config.starterdb.installExampleSchemas=false
oracle.install.db.config.starterdb.enableSecuritySettings=true
oracle.install.db.config.starterdb.password.ALL=oracle
oracle.install.db.config.starterdb.control=DB_CONTROL
oracle.install.db.config.starterdb.automatedBackup.enable=false
oracle.install.db.config.starterdb.storageType=FILE_SYSTEM_STORAGE
oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=/u01/app/oracle/oradata
oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=/u01/app/oracle/recovery_area
DECLINE_SECURITY_UPDATES=true
oracle.installer.autoupdates.option=SKIP_UPDATES
其他 均為預設值;
2.3 靜默安裝oracle 軟體
[oracle@chen database]$ cd /u01/database/
[oracle@chen database]$ ./runInstaller -silent -force -responseFile /home/oracle/db_install.rsp
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 36555 MB Passed
Checking swap space: must be greater than 150 MB. Actual 2047 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-07-23_04-36-10PM. Please wait ...
[WARNING] [INS-13014] Target environment do not meet some optional requirements.
CAUSE: Some of the optional prerequisites are not met. See logs for details. /u01/app/oracle/oraInventory/logs/installActions2015-07-23_04-38-39PM.log
ACTION: Identify the list of failed prerequisite checks from the log: /u01/app/oracle/oraInventory/logs/installActions2015-07-23_04-38-39PM.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:
/u01/app/oracle/oraInventory/logs/installActions2015-07-23_04-38-39PM.log
The installation of Oracle Database 11g was successful.
Please check '/u01/app/oracle/oraInventory/logs/silentInstall2015-07-23_04-38-39PM.log' for more details.
As a root user, execute the following script(s):
1. /u01/app/oracle/product/11.2.0/root.sh
Successf
2.4 執行指令碼
[root@chen 11.2.0]# ./root.sh
Check /u01/app/oracle/product/11.2.0/install/root_chen_2015-07-23_16-50-00.log for the output of root script
[oracle@chen database]$ vim /u01/app/oracle/oraInventory/logs/silentInstall2015-07-23_04-38-39PM.log
silentInstall2015-07-23_04-38-39PM.log
The installation of Oracle Database 11g was successful.
2.5 檢視安裝效果
[oracle@chen dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Thu Jul 23 17:19:54 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
三
靜默安裝資料庫檔案
3.1 準備響應檔案dbca.rsp
/*
[oracle@chen ~]$ cp /u01/database/response/* /home/oracle/
[oracle@chen ~]$ ls
dbca.rsp db_install.rsp netca.rsp
*/
[oracle@chen ~]$ vim dbca.rsp
OPERATION_TYPE = "createDatabase"
GDBNAME = "orcl"
SID = "orcl"
DATAFILEDESTINATION =/u01/app/oracle/oradata
LISTENERS = "listener_chen"
MEMORYPERCENTAGE = "40"
SOURCEDB = "chen:1521:orcl"
其餘 均為預設值;
3.2 靜默安裝資料檔案
10:21---10:23
[oracle@chen ~]$ $ORACLE_HOME/bin/dbca -silent -responseFile /home/oracle/dbca.rsp
Copying database files
1% complete
3% complete
11% complete
18% complete
26% complete
37% complete
Creating and starting Oracle instance
40% complete
45% complete
50% complete
55% complete
56% complete
60% complete
62% complete
Completing Database Creation
66% complete
70% complete
73% complete
85% complete
96% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/orcl/orcl.log" for further details.
3.3 檢視安裝效果
[oracle@chen ~]$ sqlplus
SQL*Plus: Release 11.2.0.3.0 Production on Fri Jul 24 10:24:14 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Enter user-name: /as sysdba
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
-------------------------------- ------------------------
orcl OPEN
SQL> select name from v$dbfile;
NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/orcl/users01.dbf
/u01/app/oracle/oradata/orcl/undotbs01.dbf
/u01/app/oracle/oradata/orcl/sysaux01.dbf
/u01/app/oracle/oradata/orcl/system01.dbf
SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/orcl/control01.ctl
/u01/app/oracle/fast_recovery_area/orcl/control02.ctl
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/orcl/redo03.log
/u01/app/oracle/oradata/orcl/redo02.log
/u01/app/oracle/oradata/orcl/redo01.log
四
靜默安裝網路檔案
4.1 準備響應檔案netca.rsp
/*
[oracle@chen ~]$ cp /u01/database/response/* /home/oracle/
[oracle@chen ~]$ ls
dbca.rsp db_install.rsp netca.rsp
*/
[oracle@chen ~]$ vim netca.rsp
4.2 靜默安裝網路檔案
SHOW_GUI=false
LOG_FILE=""/u01/app/oracle/network/tools/log/netca.log""
NSN_PROTOCOLS={"TCP;chen;1521"}
其它 都為預設值
[oracle@chen ~]$ $ORACLE_HOME/bin/netca -silent -responseFile /home/oracle/netca.rsp
Warning: Failed to create log file:
/u01/app/oracle/network/tools/log/netca.log
Fri Jul 24 10:43:26 CST 2015 Oracle Net Configuration Assistant
Parsing command line arguments:
Parameter "silent" = true
Parameter "responsefile" = /home/oracle/netca.rsp
Parameter "log" = /u01/app/oracle/network/tools/log/netca.log
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
Running Listener Control:
/u01/app/oracle/product/11.2.0/bin/lsnrctl start LISTENER
Listener Control complete.
Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0
4.3 檢視安裝效果
[oracle@chen ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 24-JUL-2015 10:44:13
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date 24-JUL-2015 10:43:27
Uptime 0 days 0 hr. 0 min. 46 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/chen/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=chen)(PORT=1521)))
Services Summary...
Service "orcl" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@chen ~]$ cd $ORACLE_HOME/network/admin
[oracle@chen admin]$ vim listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = chen)(PORT = 1521))
)
)
ADR_BASE_LISTENER = /u01/app/oracle
歡迎關注我的微信公眾號"IT小Chen",共同學習,共同成長!!!
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29785807/viewspace-1749429/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle靜默安裝Oracle
- 靜默安裝ORACLE(文件)Oracle
- oracle靜默安裝raw裝置Oracle
- 靜默安裝oracle時報錯Oracle
- ORACLE 11.2.0.4靜默安裝Oracle
- 靜默安裝oracle軟體Oracle
- Oracle靜默安裝(單機)Oracle
- 靜默安裝ORACLE 軟體Oracle
- Oracle靜默安裝說明Oracle
- Android靜默安裝和靜默解除安裝Android
- oracle 19C 靜默安裝Oracle
- oracle 12c 靜默安裝Oracle
- Oracle 11g 靜默安裝Oracle
- 靜默安裝oracle10gOracle
- oracle10g 靜默安裝Oracle
- Oracle 10g 靜默安裝Oracle 10g
- 【靜默】在RHEL 6.5上靜默安裝Oracle 18cOracle
- 【oracle】靜默安裝 oracle 11gr2Oracle
- rac靜默安裝
- dbca 靜默安裝
- centos 7.4靜默安裝oracle 19.3CentOSOracle
- 使用responseFile進行oracle靜默安裝Oracle
- Oracle 11g Database靜默安裝OracleDatabase
- oracle11g靜默安裝(修正)Oracle
- oracle安裝:使用響應檔案靜默安裝Oracle
- 靜默方式安裝、升級oracle(一): 安裝oracle軟體Oracle
- RHEL5 Oracle 11G R2 RAC 靜默安裝 (二)GI靜默安裝Oracle
- oracle客戶端無人值守安裝 靜默安裝Oracle客戶端
- Android靜默安裝應用和靜默解除安裝應用Android
- PackageInstaller 5.0原始碼分析靜默安裝與靜默解除安裝Package原始碼
- OEL6下靜默安裝Oracle 11g,靜默配置監聽Oracle
- RedHat上靜默安裝Oracle11gRedhatOracle
- CentOS 7.5靜默安裝Oracle 11gCentOSOracle
- CentOS 7.2靜默安裝Oracle11gCentOSOracle
- RedHat 7 靜默安裝Oracle11gRedhatOracle
- Oracle資料庫靜默安裝實踐Oracle資料庫
- centos6.8 靜默安裝 oracle 11.2.0.4CentOSOracle
- oracle 11g rac 靜默解除安裝Oracle