读书笔记(一)Oracle数据库的静默安装
如题所示,本文为阅读Oracle相关书籍与文档时的笔记记录。
当前记录的日志内容是关于Oracle数据库安装的。
1.创建OS组和用户
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
[root@ora12c ~]# groupadd oinstall [root@ora12c ~]# groupadd dba [root@ora12c ~]# groupadd oper [root@ora12c ~]# [root@ora12c ~]# tail -n 3 /etc/group oinstall:x:501: dba:x:502: oper:x:503: [root@ora12c ~]# [root@ora12c ~]# useradd -g oinstall -G dba,oper oracle [root@ora12c ~]# [root@ora12c ~]# tail -n 1 /etc/passwd oracle:x:501:501::/home/oracle:/bin/bash [root@ora12c ~]# [root@ora12c ~]# id oracle uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba),503(oper) [root@ora12c ~]# |
2.充分配置OS
内存大小
1 2 3 |
[root@ora12c ~]# grep MemTotal /proc/meminfo MemTotal: 4041576 kB [root@ora12c ~]# |
内存与交换空间大小
1 2 3 4 5 6 7 |
[root@ora12c ~]# free -t total used free shared buffers cached Mem: 4041576 442700 3598876 0 31108 286604 -/+ buffers/cache: 124988 3916588 Swap: 2064344 0 2064344 Total: 6105920 442700 5663220 [root@ora12c ~]# |
临时目录(/tmp)的大小
1 2 3 4 |
[root@ora12c ~]# df -h /tmp Filesystem Size Used Avail Use% Mounted on /dev/sda2 18G 2.5G 14G 16% / [root@ora12c ~]# |
磁盘空间使用率
1 2 3 4 5 6 |
[root@ora12c ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda2 18G 2.5G 14G 16% / /dev/sda1 289M 17M 258M 7% /boot tmpfs 2.0G 0 2.0G 0% /dev/shm [root@ora12c ~]# |
操作系统版本信息
1 2 3 4 5 6 7 8 9 |
[root@ora12c ~]# cat /proc/version Linux version 2.6.18-371.el5 (mockbuild@x86-008.build.bos.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-54)) #1 SMP Thu Sep 5 21:21:44 EDT 2013 [root@ora12c ~]# lsb_release -a LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch Distributor ID: RedHatEnterpriseServer Description: Red Hat Enterprise Linux Server release 5.10 (Tikanga) Release: 5.10 Codename: Tikanga [root@ora12c ~]# |
内核信息
1 2 3 |
[root@ora12c ~]# uname -r 2.6.18-371.el5 [root@ora12c ~]# |
使用脚本执行操作系统预配置:
创建基础目录
1 2 3 4 |
[root@ora12c ~]# mkdir /software [root@ora12c ~]# mkdir /backup [root@ora12c ~]# mkdir /script [root@ora12c ~]# |
确定服务器插入了操作系统的ISO/光盘介质:
参考文档:http://d-prototype.com/archives/1171,运行预配置脚本(按照具体环境需求做适当的调整)。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
[root@ora12c script]# cd / [root@ora12c /]# ls -ld /u01 drwxr-xr-x 3 grid oinstall 4096 Oct 15 20:52 /u01 [root@ora12c /]# chown -R oracle.oinstall /u01 [root@ora12c /]# ls -ld /u01 drwxr-xr-x 3 oracle oinstall 4096 Oct 15 20:52 /u01 [root@ora12c /]# [root@ora12c /]# cd /u01/app/ [root@ora12c app]# ll total 12 drwxr-xr-x 3 oracle oinstall 4096 Oct 15 20:52 11.2.0 drwxr-xr-x 2 oracle oinstall 4096 Oct 15 20:52 grid drwxr-xr-x 3 oracle oinstall 4096 Oct 15 20:52 oracle [root@ora12c app]# cd oracle/ [root@ora12c oracle]# ll total 4 drwxr-xr-x 3 oracle oinstall 4096 Oct 15 20:52 product [root@ora12c oracle]# cd product/ [root@ora12c product]# ll total 4 drwxr-xr-x 3 oracle oinstall 4096 Oct 15 20:52 11.2.0 [root@ora12c product]# mv 11.2.0/ 12.1.0.2 [root@ora12c product]# ll total 4 drwxr-xr-x 3 oracle oinstall 4096 Oct 15 20:52 12.1.0.2 [root@ora12c product]# cd 12.1.0.2/ [root@ora12c 12.1.0.2]# ll total 4 drwxr-xr-x 2 oracle oinstall 4096 Oct 15 20:52 dbhome_1 [root@ora12c 12.1.0.2]# cd dbhome_1/ [root@ora12c dbhome_1]# ll total 0 [root@ora12c dbhome_1]# pwd /u01/app/oracle/product/12.1.0.2/dbhome_1 [root@ora12c dbhome_1]# [root@ora12c dbhome_1]# |
3.获取Oracle安装介质
Oracle的安装介质在其官网可以获得,URL:http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
上传服务器:
解压:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
[root@ora12c ~]# cd /software [root@ora12c software]# ll total 2627652 -rw-r--r-- 1 root root 1673544724 Oct 15 22:28 linuxamd64_12102_database_1of2.zip -rw-r--r-- 1 root root 1014530602 Oct 15 22:26 linuxamd64_12102_database_2of2.zip [root@ora12c software]# chmod -R 777 /software/ [root@ora12c software]# ll total 2627652 -rwxrwxrwx 1 root root 1673544724 Oct 15 22:28 linuxamd64_12102_database_1of2.zip -rwxrwxrwx 1 root root 1014530602 Oct 15 22:26 linuxamd64_12102_database_2of2.zip [root@ora12c software]# [root@ora12c software]# su - oracle [oracle@ora12c ~]$ cd /software [oracle@ora12c software]$ unzip linuxamd64_12102_database_1of2.zip ;unzip linuxamd64_12102_database_2of2.zip (过多的输出...) inflating: database/stage/Components/oracle.rdbms/12.1.0.2.0/1/DataFiles/filegroup81.jar inflating: database/stage/Components/oracle.rdbms/12.1.0.2.0/1/DataFiles/filegroup19.9.1.jar inflating: database/stage/Components/oracle.rdbms/12.1.0.2.0/1/DataFiles/filegroup66.jar inflating: database/stage/Components/oracle.rdbms/12.1.0.2.0/1/DataFiles/filegroup4.jar inflating: database/stage/Components/oracle.rdbms/12.1.0.2.0/1/DataFiles/filegroup19.jar creating: database/stage/Components/oracle.javavm.containers/ creating: database/stage/Components/oracle.javavm.containers/12.1.0.2.0/ creating: database/stage/Components/oracle.javavm.containers/12.1.0.2.0/1/ creating: database/stage/Components/oracle.javavm.containers/12.1.0.2.0/1/DataFiles/ inflating: database/stage/Components/oracle.javavm.containers/12.1.0.2.0/1/DataFiles/filegroup2.jar inflating: database/stage/Components/oracle.javavm.containers/12.1.0.2.0/1/DataFiles/filegroup1.jar inflating: database/install/.oui [oracle@ora12c software]$ |
4.创建oraInst.loc文件
ORACLE_BASE的路径:
1 2 3 4 |
[root@ora12c software]# su - oracle [oracle@ora12c ~]$ env | grep --color ORACLE_BASE ORACLE_BASE=/u01/app/oracle [oracle@ora12c ~]$ |
文件:/etc/oraInst.loc
1 2 3 4 5 6 7 8 9 10 11 12 |
[root@ora12c software]# vi /etc/oraInst.loc [root@ora12c software]# cat /etc/oraInst.loc inventory_loc=/u01/app/oraInventory inst_group=oinstall [root@ora12c software]# ll -d /etc/oraInst.loc -rw-r--r-- 1 root root 56 Oct 15 22:53 /etc/oraInst.loc [root@ora12c software]# chown oracle.oinstall /etc/oraInst.loc [root@ora12c software]# chmod 664 /etc/oraInst.loc [root@ora12c software]# [root@ora12c software]# ll -d /etc/oraInst.loc -rw-rw-r-- 1 oracle oinstall 56 Oct 15 22:53 /etc/oraInst.loc [root@ora12c software]# |
5.配置应答文件
对应答文件的使用是实现Oracle静默安装的基础。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
[oracle@ora12c database]$ cat ~/12c.rsp #################################################################### ## Copyright(c) Oracle Corporation 1998,2014. All rights reserved.## ## ## ## Specify values for the variables listed below to customize ## ## your installation. ## ## ## ## Each variable is associated with a comment. The comment ## ## can help to populate the variables with the appropriate ## ## values. ## ## ## ## IMPORTANT NOTE: This file contains plain text passwords and ## ## should be secured to have read permission only by oracle user ## ## or db administrator who owns this installation. ## ## ## #################################################################### #------------------------------------------------------------------------------- # Do not change the following system generated value. #------------------------------------------------------------------------------- oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.1.0 #------------------------------------------------------------------------------- # Specify the installation option. # It can be one of the following: # - INSTALL_DB_SWONLY # - INSTALL_DB_AND_CONFIG # - UPGRADE_DB #------------------------------------------------------------------------------- oracle.install.option=INSTALL_DB_SWONLY #------------------------------------------------------------------------------- # Specify the hostname of the system as set during the install. It can be used # to force the installation to use an alternative hostname rather than using the # first hostname found on the system. (e.g., for systems with multiple hostnames # and network interfaces) #------------------------------------------------------------------------------- ORACLE_HOSTNAME=ora12c #------------------------------------------------------------------------------- # Specify the Unix group to be set for the inventory directory. #------------------------------------------------------------------------------- UNIX_GROUP_NAME=oinstall #------------------------------------------------------------------------------- # Specify the location which holds the inventory files. # This is an optional parameter if installing on # Windows based Operating System. #------------------------------------------------------------------------------- INVENTORY_LOCATION=/u01/app/oraInventory #------------------------------------------------------------------------------- # Specify the languages in which the components will be installed. # # en : English ja : Japanese # fr : French ko : Korean # ar : Arabic es : Latin American Spanish # bn : Bengali lv : Latvian # pt_BR: Brazilian Portuguese lt : Lithuanian # bg : Bulgarian ms : Malay # fr_CA: Canadian French es_MX: Mexican Spanish # ca : Catalan no : Norwegian # hr : Croatian pl : Polish # cs : Czech pt : Portuguese # da : Danish ro : Romanian # nl : Dutch ru : Russian # ar_EG: Egyptian zh_CN: Simplified Chinese # en_GB: English (Great Britain) sk : Slovak # et : Estonian sl : Slovenian # fi : Finnish es_ES: Spanish # de : German sv : Swedish # el : Greek th : Thai # iw : Hebrew zh_TW: Traditional Chinese # hu : Hungarian tr : Turkish # is : Icelandic uk : Ukrainian # in : Indonesian vi : Vietnamese # it : Italian # # all_langs : All languages # # Specify value as the following to select any of the languages. # Example : SELECTED_LANGUAGES=en,fr,ja # # Specify value as the following to select all the languages. # Example : SELECTED_LANGUAGES=all_langs #------------------------------------------------------------------------------- SELECTED_LANGUAGES=en,zh_CN #------------------------------------------------------------------------------- # Specify the complete path of the Oracle Home. #------------------------------------------------------------------------------- ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/dbhome_1 #------------------------------------------------------------------------------- # Specify the complete path of the Oracle Base. #------------------------------------------------------------------------------- ORACLE_BASE=/u01/app/oracle #------------------------------------------------------------------------------- # Specify the installation edition of the component. # # The value should contain only one of these choices. # - EE : Enterprise Edition #------------------------------------------------------------------------------- oracle.install.db.InstallEdition=EE ############################################################################### # # # PRIVILEGED OPERATING SYSTEM GROUPS # # ------------------------------------------ # # Provide values for the OS groups to which OSDBA and OSOPER privileges # # needs to be granted. If the install is being performed as a member of the # # group "dba", then that will be used unless specified otherwise below. # # # # The value to be specified for OSDBA and OSOPER group is only for UNIX based # # Operating System. # # # ############################################################################### #------------------------------------------------------------------------------ # The DBA_GROUP is the OS group which is to be granted OSDBA privileges. #------------------------------------------------------------------------------- oracle.install.db.DBA_GROUP=dba #------------------------------------------------------------------------------ # The OPER_GROUP is the OS group which is to be granted OSOPER privileges. # The value to be specified for OSOPER group is optional. #------------------------------------------------------------------------------ oracle.install.db.OPER_GROUP=oper #------------------------------------------------------------------------------ # The BACKUPDBA_GROUP is the OS group which is to be granted OSBACKUPDBA privileges. #------------------------------------------------------------------------------ oracle.install.db.BACKUPDBA_GROUP=dba #------------------------------------------------------------------------------ # The DGDBA_GROUP is the OS group which is to be granted OSDGDBA privileges. #------------------------------------------------------------------------------ oracle.install.db.DGDBA_GROUP=dba #------------------------------------------------------------------------------ # The KMDBA_GROUP is the OS group which is to be granted OSKMDBA privileges. #------------------------------------------------------------------------------ oracle.install.db.KMDBA_GROUP=dba #------------------------------------------------------------------------------ # Specify whether user doesn't want to configure Security Updates. # The value for this variable should be true if you don't want to configure # Security Updates, false otherwise. # # The value can be either true or false. If left blank it will be assumed # to be false. # # Example : DECLINE_SECURITY_UPDATES=false #------------------------------------------------------------------------------ DECLINE_SECURITY_UPDATES=true [oracle@ora12c database]$ |
6.静默模式安装Oracle软件程序
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
[oracle@ora12c database]$ pwd /software/database [oracle@ora12c database]$ ll total 64 drwxr-xr-x 4 oracle oinstall 4096 Oct 15 22:50 install -rwxr-xr-x 1 oracle oinstall 25234 Oct 16 00:39 inst.rsp drwxrwxrwx 2 oracle oinstall 4096 Oct 16 00:32 response drwxr-xr-x 2 oracle oinstall 4096 Jul 7 06:14 rpm -rwxr-xr-x 1 oracle oinstall 8533 Jul 7 06:14 runInstaller drwxrwxr-x 2 oracle oinstall 4096 Jul 7 07:18 sshsetup drwxr-xr-x 14 oracle oinstall 4096 Jul 7 07:19 stage -rwxr-xr-x 1 oracle oinstall 500 Feb 6 2013 welcome.html [oracle@ora12c database]$ ./runInstaller -silent -responseFile /home/oracle/12c.rsp Starting Oracle Universal Installer... Checking Temp space: must be greater than 500 MB. Actual 10666 MB Passed Checking swap space: must be greater than 150 MB. Actual 6792 MB Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-10-16_02-11-09AM. Please wait ... [oracle@ora12c database]$ [oracle@ora12c database]$ You can find the log of this install session at: /u01/app/oraInventory/logs/installActions2014-10-16_02-11-09AM.log [oracle@ora12c database]$ |
静默安装开始后,可以查看到相关的后台进程:
1 2 3 4 |
[root@ora12c ~]# ps -ef | grep --color oui oracle 12431 1 19 02:11 pts/3 00:00:51 /tmp/OraInstall2014-10-16_02-11-09AM/jdk/jre/bin/java -Doracle.installer.library_loc=/tmp/OraInstall2014-10-16_02-11-09AM/oui/lib/linux64 -Doracle.installer.oui_loc=/tmp/OraInstall2014-10-16_02-11-09AM/oui -Doracle.installer.bootstrap=TRUE -Doracle.installer.startup_location=/software/database/install -Doracle.installer.jre_loc=/tmp/OraInstall2014-10-16_02-11-09AM/jdk/jre -Doracle.installer.nlsEnabled="TRUE" -Doracle.installer.prereqConfigLoc= -Doracle.installer.unixVersion=2.6.18-371.el5 -Doracle.install.setup.workDir=/software/database -DCVU_OS_SETTINGS=SHELL_NOFILE_SOFT_LIMIT:1024,SHELL_UMASK:0022 -Xms150m -Xmx256m -XX:MaxPermSize=128M -cp /tmp/OraInstall2014-10-16_02-11-09AM::/tmp/OraInstall2014-10-16_02-11-09AM/ext/jlib/OraPrereqChecks.jar:/tmp/OraInstall2014-10-16_02-11-09AM/ext/jlib/emCoreConsole.jar:/tmp/OraInstall2014-10-16_02-11-09AM/ext/jlib/remoteinterfaces.jar:/tmp/OraInstall2014-10-16_02-11-09AM/ext/jlib/emca.jar:/tmp/OraInstall2014-10-16_02-11-09AM/ext/jlib/OraPrereq.jar:/tmp/OraInstall2014-10-16_02-11-09AM/ext/jlib/jmxspi.jar:/tmp/OraInstall2014-10-16_02-11-09AM/ext/jlib/instdb.jar:/tmp/OraInstall2014-10-16_02-11-09AM/ext/jlib/ssh.jar:/tmp/OraInstall2014-10-16_02-11-09AM/ext/jlib/wsclient_extended.jar:/tmp/OraInstall2014-10-16_02-11-09AM/ext/jlib/ojdbc6.jar:/tmp/OraInstall2014-10-16_02-11-09AM/ext/jlib/installcommons_1.0.0b.jar:/tmp/OraInstall2014-10-16_02-11-09AM/ext/jlib/prov_fixup.jar:/tmp/OraInstall2014-10-16_02-11-09AM/ext/jlib/adf-share-ca.jar:/tmp/OraInstall2014-10-16_02-11-09AM/ext/jlib/entityManager_proxy.jar:/tmp/OraInstall2014-10-16_02-11-09AM/ext/jlib/orai18n-utility.jar:/tmp/OraInstall2014-10-16_02-11-09AM/ext/jlib/instcommon.jar:/tmp/OraInstall2014-10-16_02-11-09AM/ext/jlib/javax.security.jacc_1.0.0.0_1-1.jar:/tmp/OraInstall2014-10-16_02-11-09AM/ext/jlib/jsch.jar:/tmp/OraInstall2014-10-16_02-11-09AM/ext/jlib/cvu.jar:/tmp/OraInstall2014-10-16_02-11-09AM/ext/jlib/orai18n-mapping.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/OraInstaller.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/oneclick.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/xmlparserv2.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/share.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/OraInstallerNet.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/emCfg.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/emocmutl.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/OraPrereq.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/jsch.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/ssh.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/remoteinterfaces.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/http_client.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/OraSuiteInstaller.jar:../stage/Components/oracle.swd.opatch/12.1.0.2.0/1/DataFiles/jlib/opatch.jar:../stage/Components/oracle.swd.opatch/12.1.0.2.0/1/DataFiles/jlib/opatchactions.jar:../stage/Components/oracle.swd.opatch/12.1.0.2.0/1/DataFiles/jlib/opatchprereq.jar:../stage/Components/oracle.swd.opatch/12.1.0.2.0/1/DataFiles/jlib/opatchutil.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/OraCheckPoint.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/InstImages.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/InstHelp.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/InstHelp_de.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/InstHelp_es.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/InstHelp_fr.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/InstHelp_it.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/InstHelp_ja.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/InstHelp_ko.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/InstHelp_pt_BR.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/InstHelp_zh_CN.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/InstHelp_zh_TW.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/oracle_ice.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/help-share.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/ohj.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/ewt3.jar:/tmp/OraInstall2014-10-16_02-11-09AM/oui/jlib/ewt3-swinga root 15222 15090 0 02:15 pts/4 00:00:00 grep --color oui [root@ora12c ~]# |
静默安装的过程中可以查看日志,确认安装过程当前的进度状态:
tail -f /u01/app/oraInventory/logs/installActions2014-10-16_02-11-09AM.log
阶段1:
日志会在以下内容停留相当长的一段时间:
1 2 3 4 5 6 7 8 9 10 11 |
[root@ora12c logs]# tail -f /u01/app/oraInventory/logs/installActions2014-10-16_02-11-09AM.log INFO: Installation in progress INFO: Extracting files to '/u01/app/oracle/product/12.1.0.2/dbhome_1'. INFO: Extracting files to '/u01/app/oracle/product/12.1.0.2/dbhome_1'. INFO: Performing fastcopy operations based on the information in the file 'oracle.server_EE_dirs.lst'. INFO: Performing fastcopy operations based on the information in the file 'oracle.server_EE_filemap.jar'. INFO: Performing fastcopy operations based on the information in the file 'racfiles.jar'. INFO: Performing fastcopy operations based on the information in the file 'oracle.server_EE_exp_1.xml'. INFO: Performing fastcopy operations based on the information in the file 'oracle.server_EE_1.xml'. INFO: Performing fastcopy operations based on the information in the file 'setperms1.sh'. INFO: Number of threads for fast copy :1 |
这一阶段,OUI正在向ORACLE_HOME中COPY文件。
该阶段结束的时候ORACLE_HOME的大小扩张到了:4.3GB
1 2 3 |
[oracle@ora12c dbhome_1]$ du -sh /u01/ 4.3G /u01/ [oracle@ora12c dbhome_1]$ |
阶段2:
Copy File阶段完成后,就是Linked File阶段。
在该阶段,你会在日志中看到大量的如下截图所示的信息:
最后,静默安装结束的时候,你会得到如下的反馈信息:
1 2 3 4 5 6 7 8 9 10 11 |
[oracle@ora12c database]$ The installation of Oracle Database 12c was successful. Please check '/u01/app/oraInventory/logs/silentInstall2014-10-16_02-11-09AM.log' for more details. As a root user, execute the following script(s): 1. /u01/app/oracle/product/12.1.0.2/dbhome_1/root.sh Successfully Setup Software. [oracle@ora12c database]$ |
这时候,需要如反馈所示,以root身份执行相关脚本。
事实上,通过查看后台进程的状态,可以确认静默安装已经结束:
1 2 3 |
[oracle@ora12c dbhome_1]$ ps -ef | grep --color oui oracle 18837 6657 0 02:26 pts/1 00:00:00 grep --color oui [oracle@ora12c dbhome_1]$ |
这时候的日志信息如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
[root@ora12c logs]# tail -n 18 /u01/app/oraInventory/logs/installActions2014-10-16_02-11-09AM.log INFO: Completed executing action at state <finish> INFO: Waiting for completion of background operations INFO: Completed background operations INFO: Moved to state <finish> INFO: Waiting for completion of background operations INFO: Completed background operations INFO: Validating state <finish> WARNING: Validation disabled for the state finish INFO: Completed validating state <finish> INFO: Terminating all background operations INFO: Terminated all background operations INFO: Successfully executed the flow in SILENT mode INFO: Dispose the current Session instance INFO: Dispose the install area control object INFO: Update the state machine to STATE_CLEAN INFO: Finding the most appropriate exit status for the current application INFO: Exit Status is 0 INFO: Shutdown Oracle Database 12c Release 1 Installer [root@ora12c logs]# |
以root身份执行脚本:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
[root@ora12c ~]# /u01/app/oracle/product/12.1.0.2/dbhome_1/root.sh Check /u01/app/oracle/product/12.1.0.2/dbhome_1/install/root_ora12c_2014-10-16_02-31-46.log for the output of root script [root@ora12c ~]# cat /u01/app/oracle/product/12.1.0.2/dbhome_1/install/root_ora12c_2014-10-16_02-31-46.log Performing root user operation. The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/12.1.0.2/dbhome_1 Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root script. Now product-specific root actions will be performed. [root@ora12c ~]# |
7.测试
1 2 3 4 5 6 |
[root@ora12c ~]# su - oracle [oracle@ora12c ~]$ sqlplus -v SQL*Plus: Release 12.1.0.2.0 Production [oracle@ora12c ~]$ |
至此,静默安装Oracle数据库软件,已经完成。
——————————————————————————————
Ending。
Oracle database 11g:
静默文件:
[oracle@macqpro-ap01 11.2.0]$ cat ~/client_install.rsp
oracle.install.responseFileVersion=/oracle/install/rspfmt_clientinstall_response_schema_v11_2_0
ORACLE_HOSTNAME=macqpro-ap01
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/home/oracle/app/oraInventory
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/client_1
ORACLE_BASE=/home/oracle/app/oracle
oracle.install.client.installType=Administrator
oracle.install.client.upgrading=false
oracle.install.client.customComponents=”oracle.sqlj:11.2.0.4.0″,”oracle.rdbms.util:11.2.0.4.0″,”oracle.javavm.client:11.2.0.4.0″,”oracle.sqlplus:11.2.0.4.0″,”oracle.dbjava.jdbc:11.2.0.4.0″,”oracle.ldap.client:11.2.0.4.0″,”oracle.rdbms.oci:11.2.0.4.0″,”oracle.precomp:11.2.0.4.0″,”oracle.xdk:11.2.0.4.0″,”oracle.network.aso:11.2.0.4.0″,”oracle.assistants.oemlt:11.2.0.4.0″,”oracle.oraolap.mgmt:11.2.0.4.0″,”oracle.network.client:11.2.0.4.0″,”oracle.network.cman:11.2.0.4.0″,”oracle.network.listener:11.2.0.4.0″,”oracle.ordim.client:11.2.0.4.0″,”oracle.odbc:11.2.0.4.0″,”oracle.has.client:11.2.0.4.0″,”oracle.dbdev:11.2.0.4.0″,”oracle.rdbms.scheduler:11.2.0.4.0″
oracle.install.client.schedulerAgentHostName=
oracle.install.client.schedulerAgentPortNumber=
oracle.installer.autoupdates.option=
oracle.installer.autoupdates.downloadUpdatesLoc=
AUTOUPDATES_MYORACLESUPPORT_USERNAME=
AUTOUPDATES_MYORACLESUPPORT_PASSWORD=
PROXY_HOST=
PROXY_PORT=
PROXY_USER=
PROXY_PWD=
PROXY_REALM=
[oracle@macqpro-ap01 11.2.0]$