Centos6.5 下静默安装oracle11.2.0.4 打PSU补丁步骤

Centos6.5 下静默安装oracle11.2.0.4 打PSU补丁步骤

——–仅供参考———
安装centos6.5操作系统忽略
由于本人在vbox虚拟机安装,新增了一块vdi虚拟磁盘用于存储数据文件
安装过程如下:
操作系统环境:

[root@aixo ~]# cat /etc/issue
CentOS release 6.5 (Final)
Kernel \r on an \m
[root@aixo ~]# uname -a
Linux aixo 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@aixo ~]# df -H
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda5        21G  9.2G   11G  46% /
tmpfs           1.6G  230k  1.6G   1% /dev/shm
/dev/sda1       204M   36M  157M  19% /boot
/dev/sda3       4.3G  143M  3.9G   4% /home

[root@aixo ~]# vi /etc/inittab id:3:initdefault: ~

分区及创建pv vg lv
[root@aixo /]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xc983830b.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').
Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)
Command (m for help): p
Disk /dev/sdb: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc983830b
   Device Boot      Start         End      Blocks   Id  System
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-2610, default 1): 
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-2610, default 2610): 
Using default value 2610
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@aixo /]# ls -la /dev/sd*
brw-rw----. 1 root disk 8,  0 8月   2 10:41 /dev/sda
brw-rw----. 1 root disk 8,  1 8月   2 10:41 /dev/sda1
brw-rw----. 1 root disk 8,  2 8月   2 10:41 /dev/sda2
brw-rw----. 1 root disk 8,  3 8月   2 10:41 /dev/sda3
brw-rw----. 1 root disk 8,  4 8月   2 10:41 /dev/sda4
brw-rw----. 1 root disk 8,  5 8月   2 10:41 /dev/sda5
brw-rw----. 1 root disk 8, 16 8月   2 10:46 /dev/sdb
brw-rw----. 1 root disk 8, 17 8月   2 10:45 /dev/sdb1
[root@aixo /]# pvcreate /dev/sdb1
  Physical volume "/dev/sdb1" successfully created
[root@aixo /]# vgcreate vgdb /dev/sdb1
  Volume group "vgdb" successfully created
[root@aixo /]# lvcreate -L +19G -n lv_database vgdb
  Logical volume "lv_database" created
[root@aixo /]# mkfs.ext4 /dev/vgdb/lv_database 
mke2fs 1.41.12 (17-May-2010)
文件系统标签=
操作系统:Linux
块大小=4096 (log=2)
分块大小=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1245184 inodes, 4980736 blocks
249036 blocks (5.00%) reserved for the super user
第一个数据块=0
Maximum filesystem blocks=4294967296
152 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000
正在写入inode表: 完成                            
Creating journal (32768 blocks): 完成
Writing superblocks and filesystem accounting information: 完成
This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@aixo /]# vi /etc/fstab
新增/dev/vgdb/lv_database   /oradata        ext4    defaults        0 0
[root@aixo /]# df -H
Filesystem                    Size  Used Avail Use% Mounted on
/dev/sda5                      21G  9.2G   11G  46% /
tmpfs                         1.6G     0  1.6G   0% /dev/shm
/dev/sda1                     204M   36M  157M  19% /boot
/dev/sda3                     4.3G  143M  3.9G   4% /home
/dev/mapper/vgdb-lv_database   21G  181M   19G   1% /oradata
[root@aixo /]# free -m
             total       used       free     shared    buffers     cached
Mem:          3038        278       2759          0         26         96
-/+ buffers/cache:        155       2883
Swap:         4095          0       4095
以下是安装oracle前环境准备
1.cat /etc/security/limits.conf 
#####add by Wxq on 20170526
oracle soft nproc 2047 
oracle hard nproc 16384 
oracle soft nofile 1024 
oracle hard nofile 65536 
oracle soft stack 10240
2.[root@nmzhd-db1 ~]# cat /etc/pam.d/login 
#%PAM-1.0
auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
auth       include      system-auth
account    required     pam_nologin.so
account    include      system-auth
password   include      system-auth
# pam_selinux.so close should be the first session rule
session    required     pam_selinux.so close
session    required     pam_loginuid.so
session    optional     pam_console.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session    required     pam_selinux.so open
session    required     pam_namespace.so
session    optional     pam_keyinit.so force revoke
session    include      system-auth
-session   optional     pam_ck_connector.so
#####add by Wxq on 20170526
session    required    /lib/security/pam_limits.so
session    required     pam_limits.so
3.cat /etc/sysctl.conf 
#####add by Wxq on 20170526
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
sysctl -p ---参数生效

4.cat /etc/profile
#####add by Wxq on 20170526
if [ $USER = "oracle" ]; then
        if [ $SHELL = "/bin/ksh" ]; then
              ulimit -p 16384
              ulimit -n 65536
        else
              ulimit -u 16384 -n 65536
        fi
fi
建oracle用户组及用户
[root@aixo ~]# groupadd oinstall
[root@aixo ~]# groupadd dba
[root@aixo ~]# useradd -g oinstall -G dba -m oracle
修改oracle环境变量
Vi.bash_profile
export PATH
export LANG=C
export ORACLE_BASE=/u01/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_SID=testdb
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:/usr/sbin:/sbin:$PATH:$PRODDIR/bin
export LC_ALL="zh_CN.GBK"
umask 022
Chown –R oracle:oinstall /u01
用于静默安装的响应文件
[oracle@aixo ~]$ cat database11g.rsp 
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=aixo
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/oracle/app/oraInventory
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/u01/oracle/product/11.2.0/db_1
ORACLE_BASE=/u01/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=dba
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
oracle.installer.autoupdates.option=SKIP_UPDATES
静默安装
[oracle@aixo database]$  ./runInstaller -silent  -ignorePrereq -ignoreSysPrereqs -responseFile /home/oracle/database11g.rsp -showProgress
正在启动 Oracle Universal Installer...
检查临时空间: 必须大于 120 MB。   实际为 7203 MB    通过
检查交换空间: 必须大于 150 MB。   实际为 4095 MB    通过
准备从以下地址启动 Oracle Universal Installer /tmp/OraInstall2017-08-02_12-45-34PM. 请稍候...
[oracle@aixo database]$ [WARNING] [INS-32055] 主产品清单位于 Oracle 基目录中。
   原因: 主产品清单位于 Oracle 基目录中。
   操作: Oracle 建议将此主产品清单放置在 Oracle 基目录之外的位置中。
可以在以下位置找到本次安装会话的日志:
 /u01/oracle/app/oraInventory/logs/installActions2017-08-02_12-45-34PM.log
准备 正在进行中。
..................................................   9% 完成。
准备成功。
复制文件 正在进行中。
..................................................   14% 完成。
..................................................   20% 完成。
..................................................   26% 完成。
..................................................   31% 完成。
..................................................   36% 完成。
..................................................   41% 完成。
..................................................   47% 完成。
..................................................   52% 完成。
..................................................   57% 完成。
..................................................   63% 完成。
..................................................   68% 完成。
..................................................   73% 完成。
..................................................   78% 完成。
..................................................   83% 完成。
..............................
复制文件成功。
链接二进制文件 正在进行中。
..........
链接二进制文件成功。
安装程序文件 正在进行中。
..................................................   88% 完成。
..................................................   94% 完成。
安装程序文件成功。
Oracle Database 11g 的 安装 已成功。
请查看 '/u01/oracle/app/oraInventory/logs/silentInstall2017-08-02_12-45-34PM.log' 以获取详细资料。
执行 Root 脚本 正在进行中。
以 root 用户的身份执行以下脚本:
        1. /u01/oracle/app/oraInventory/orainstRoot.sh ---*root执行,注意别漏掉执行*
        2. /u01/oracle/product/11.2.0/db_1/root.sh ---*root执行,注意别漏掉执行*
..................................................   100% 完成。
执行 Root 脚本成功。
Successfully Setup Software.

注意:一定要记着root执行那两个脚本重点内容
验证:

[oracle@aixo ~]$ sqlplus -v
SQL*Plus: Release 11.2.0.4.0 Production
补丁文件
unzip  p6880880_112000_Linux-x86-64.zip
[root@aixo oracle]# su - oracle
[oracle@aixo ~]$ mv /u01/oracle/product/11.2.0/db_1/OPatch /u01/oracle/product/11.2.0/db_1/OPatch.bak
[root@aixo oracle]# chown -R oracle:oinstall OPatch/
[root@aixo oracle]# su - oracle
[oracle@aixo ~]$ mv OPatch/ $ORACLE_HOME
Opatch lsinv
unzip p24918228_112040_Linux-x86-64.zip
cd 24918228/
cd 24436338/
cd 24006111/
tree
opatch apply –local
[oracle@aixo 24006111]$ opatch apply -local
Oracle 中间补丁程序安装程序版本 11.2.0.3.15
版权所有 (c) 2017, Oracle Corporation。保留所有权利。
Oracle Home       : /u01/oracle/product/11.2.0/db_1
Central Inventory : /u01/oracle/app/oraInventory
   from           : /u01/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version    : 11.2.0.3.15
OUI version       : 11.2.0.4.0
Log file location : /u01/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2017-08-02_14-59-00下午_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   17478514  18031668  18522509  19121551  19769489  20299013  20760982  21352635  21948347  22502456  23054359  24006111  
是否继续? [y|n]
y
User Responded with: Y
All checks passed.
提供电子邮件地址以用于接收有关安全问题的通知, 安装 Oracle Configuration Manager 并启动它。如果您使用 My Oracle
Support 电子邮件地址/用户名, 操作将更简单。
有关详细信息, 请访问 http://www.oracle.com/support/policies.html。
电子邮件地址/用户名: 
尚未提供电子邮件地址以接收有关安全问题的通知。
是否不希望收到有关安全问题 (是 [Y], 否 [N]) [N] 的通知:  y
请关闭本地系统上在此 ORACLE_HOME 之外运行的 Oracle 实例。
(Oracle 主目录 = '/u01/oracle/product/11.2.0/db_1')
本地系统是否已准备打补丁? [y|n]
y
User Responded with: Y
Backing up files...
Applying sub-patch '17478514' to OH '/u01/oracle/product/11.2.0/db_1'
正在为组件 oracle.rdbms, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.rsf, 11.2.0.4.0 打补丁...
正在为组件 oracle.sdo, 11.2.0.4.0 打补丁...
正在为组件 oracle.sysman.agent, 10.2.0.4.5 打补丁...
正在为组件 oracle.xdk, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.dbscripts, 11.2.0.4.0 打补丁...
正在为组件 oracle.sdo.locator, 11.2.0.4.0 打补丁...
正在为组件 oracle.nlsrtl.rsf, 11.2.0.4.0 打补丁...
正在为组件 oracle.xdk.rsf, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.rman, 11.2.0.4.0 打补丁...
Applying sub-patch '18031668' to OH '/u01/oracle/product/11.2.0/db_1'
正在为组件 oracle.rdbms, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.rsf, 11.2.0.4.0 打补丁...
正在为组件 oracle.ldap.rsf, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.crs, 11.2.0.4.0 打补丁...
正在为组件 oracle.precomp.common, 11.2.0.4.0 打补丁...
正在为组件 oracle.ldap.rsf.ic, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.deconfig, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.dbscripts, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.rman, 11.2.0.4.0 打补丁...
Applying sub-patch '18522509' to OH '/u01/oracle/product/11.2.0/db_1'
正在为组件 oracle.rdbms.rsf, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms, 11.2.0.4.0 打补丁...
正在为组件 oracle.precomp.common, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.rman, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.dbscripts, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.deconfig, 11.2.0.4.0 打补丁...
Applying sub-patch '19121551' to OH '/u01/oracle/product/11.2.0/db_1'
正在为组件 oracle.precomp.common, 11.2.0.4.0 打补丁...
正在为组件 oracle.sysman.console.db, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.rsf, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.rman, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.dbscripts, 11.2.0.4.0 打补丁...
正在为组件 oracle.ordim.client, 11.2.0.4.0 打补丁...
正在为组件 oracle.ordim.jai, 11.2.0.4.0 打补丁...
Applying sub-patch '19769489' to OH '/u01/oracle/product/11.2.0/db_1'
ApplySession: Oracle 主目录中不存在可选组件 [ oracle.sysman.agent, 11.2.0.4.0 ] , 或找到更高版本。
正在为组件 oracle.precomp.common, 11.2.0.4.0 打补丁...
正在为组件 oracle.ovm, 11.2.0.4.0 打补丁...
正在为组件 oracle.xdk, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.util, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.dbscripts, 11.2.0.4.0 打补丁...
正在为组件 oracle.xdk.parser.java, 11.2.0.4.0 打补丁...
正在为组件 oracle.oraolap, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.rsf, 11.2.0.4.0 打补丁...
正在为组件 oracle.xdk.rsf, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.rman, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.deconfig, 11.2.0.4.0 打补丁...
Applying sub-patch '20299013' to OH '/u01/oracle/product/11.2.0/db_1'
正在为组件 oracle.rdbms.dv, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.oci, 11.2.0.4.0 打补丁...
正在为组件 oracle.precomp.common, 11.2.0.4.0 打补丁...
正在为组件 oracle.sysman.agent, 10.2.0.4.5 打补丁...
正在为组件 oracle.xdk, 11.2.0.4.0 打补丁...
正在为组件 oracle.sysman.common, 10.2.0.4.5 打补丁...
正在为组件 oracle.rdbms, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.dbscripts, 11.2.0.4.0 打补丁...
正在为组件 oracle.xdk.parser.java, 11.2.0.4.0 打补丁...
正在为组件 oracle.sysman.console.db, 11.2.0.4.0 打补丁...
正在为组件 oracle.xdk.rsf, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.rsf, 11.2.0.4.0 打补丁...
正在为组件 oracle.sysman.common.core, 10.2.0.4.5 打补丁...
正在为组件 oracle.rdbms.rman, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.deconfig, 11.2.0.4.0 打补丁...
Applying sub-patch '20760982' to OH '/u01/oracle/product/11.2.0/db_1'
正在为组件 oracle.sysman.console.db, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.dbscripts, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.rsf, 11.2.0.4.0 打补丁...
Applying sub-patch '21352635' to OH '/u01/oracle/product/11.2.0/db_1'
正在为组件 oracle.sysman.agent, 10.2.0.4.5 打补丁...
正在为组件 oracle.rdbms.rsf, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.rman, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms, 11.2.0.4.0 打补丁...
Applying sub-patch '21948347' to OH '/u01/oracle/product/11.2.0/db_1'
ApplySession: Oracle 主目录中不存在可选组件 [ oracle.tfa, 11.2.0.4.0 ] , 或找到更高版本。
正在为组件 oracle.sysman.agent, 10.2.0.4.5 打补丁...
正在为组件 oracle.ovm, 11.2.0.4.0 打补丁...
正在为组件 oracle.xdk, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms, 11.2.0.4.0 打补丁...
正在为组件 oracle.nlsrtl.rsf, 11.2.0.4.0 打补丁...
正在为组件 oracle.xdk.parser.java, 11.2.0.4.0 打补丁...
正在为组件 oracle.sysman.console.db, 11.2.0.4.0 打补丁...
正在为组件 oracle.xdk.rsf, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.rsf, 11.2.0.4.0 打补丁...
正在为组件 oracle.sysman.oms.core, 10.2.0.4.5 打补丁...
Applying sub-patch '22502456' to OH '/u01/oracle/product/11.2.0/db_1'
ApplySession: Oracle 主目录中不存在可选组件 [ oracle.tfa, 11.2.0.4.0 ] , 或找到更高版本。
正在为组件 oracle.precomp.common, 11.2.0.4.0 打补丁...
正在为组件 oracle.oraolap.dbscripts, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.olap, 11.2.0.4.0 打补丁...
正在为组件 oracle.oraolap, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.rsf, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.rman, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.dbscripts, 11.2.0.4.0 打补丁...
Applying sub-patch '23054359' to OH '/u01/oracle/product/11.2.0/db_1'
正在为组件 oracle.rdbms.dv, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.dbscripts, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.rsf, 11.2.0.4.0 打补丁...
Applying sub-patch '24006111' to OH '/u01/oracle/product/11.2.0/db_1'
正在为组件 oracle.sqlplus.ic, 11.2.0.4.0 打补丁...
正在为组件 oracle.sqlplus, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.rsf, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.dbscripts, 11.2.0.4.0 打补丁...
Composite patch 24006111 successfully applied.
Log file location: /u01/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2017-08-02_14-59-00下午_1.log
OPatch succeeded.
[oracle@aixo 24006111]$ opatch lsinv
Oracle 中间补丁程序安装程序版本 11.2.0.3.15
版权所有 (c) 2017, Oracle Corporation。保留所有权利。
Oracle Home       : /u01/oracle/product/11.2.0/db_1
Central Inventory : /u01/oracle/app/oraInventory
   from           : /u01/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version    : 11.2.0.3.15
OUI version       : 11.2.0.4.0
Log file location : /u01/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2017-08-02_15-03-17下午_1.log
Lsinventory Output file location : /u01/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2017-08-02_15-03-17下午.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: aixo
ARU platform id: 226
ARU platform description:: Linux x86-64
已安装的顶级产品 (1):
Oracle Database 11g                                                  11.2.0.4.0
此 Oracle 主目录中已安装 1 个产品。
中间补丁程序 (1) :
Patch  24006111     : applied on Wed Aug 02 15:01:52 CST 2017
Unique Patch ID:  20508568
Patch description:  "Database Patch Set Update : 11.2.0.4.161018 (24006111)"
   Created on 26 Aug 2016, 05:54:48 hrs PST8PDT
Sub-patch  23054359; "Database Patch Set Update : 11.2.0.4.160719 (23054359)"
Sub-patch  22502456; "Database Patch Set Update : 11.2.0.4.160419 (22502456)"
Sub-patch  21948347; "Database Patch Set Update : 11.2.0.4.160119 (21948347)"
Sub-patch  21352635; "Database Patch Set Update : 11.2.0.4.8 (21352635)"
Sub-patch  20760982; "Database Patch Set Update : 11.2.0.4.7 (20760982)"
Sub-patch  20299013; "Database Patch Set Update : 11.2.0.4.6 (20299013)"
Sub-patch  19769489; "Database Patch Set Update : 11.2.0.4.5 (19769489)"
Sub-patch  19121551; "Database Patch Set Update : 11.2.0.4.4 (19121551)"
Sub-patch  18522509; "Database Patch Set Update : 11.2.0.4.3 (18522509)"
Sub-patch  18031668; "Database Patch Set Update : 11.2.0.4.2 (18031668)"
Sub-patch  17478514; "Database Patch Set Update : 11.2.0.4.1 (17478514)"
   Bugs fixed:
     17184721, 21538558, 16091637, 18092127, 17381384, 15979965, 18441944
     13837378, 16314254, 16731148, 17835048, 13558557, 17201159, 17853498
     17246576, 18356166, 18440047, 18681862, 16875449, 19788842, 17296856
     21330264, 14010183, 17648596, 17551063, 17025461, 17267114, 22507210
     17912217, 17889583, 18202441, 17040764, 16524926, 17478145, 19358317
     22148226, 18747196, 18641419, 17036973, 17811789, 14285317, 16542886
     18009564, 16618694, 8322815, 16692232, 18247991, 22507234, 17570240
     17848897, 17441661, 14034426, 17465741, 16596890, 17437634, 20506706
     21343897, 21453153, 18339044, 22321741, 17951233, 18430495, 21787056
     22380919, 20506715, 17811429, 19721304, 18230522, 19554106, 19458377
     6599380, 17612828, 22092979, 22321756, 17040527, 17811438, 18641461
     14657740, 13364795, 21387964, 17346671, 17588480, 18235390, 17889549
     19309466, 16472716, 20596234, 18331850, 18641451, 17344412, 21179898
     17546761, 18203835, 18964939, 18203838, 18203837, 17313525, 22195457
     18139690, 22296366, 14106803, 16837842, 17842825, 22657942, 21352646
     20657441, 16360112, 22195441, 17389192, 14565184, 17205719, 14354737
     22195448, 14764829, 13944971, 16571443, 21868720, 17186905, 17080436
     18673342, 17027426, 19972569, 19972568, 19972566, 17282229, 19972564
     16870214, 19615136, 17390431, 18762750, 16613964, 18098207, 17957017
     18471685, 19730508, 21538485, 18264060, 17323222, 17754782, 17600719
     18317531, 17852463, 17596908, 17655634, 20074391, 16228604, 19972570
     18996843, 19854503, 16042673, 17835627, 20334344, 18000422, 20861693
     17393683, 17551709, 20506699, 19006849, 18456514, 18277454, 17258090
     17174582, 17242746, 16399083, 17824637, 17762296, 17397545, 16450169
     12364061, 20067212, 18856999, 19211724, 19463893, 21343775, 19463897
     17853456, 18673304, 20004021, 21668627, 16194160, 17477958, 16538760
     12982566, 20296213, 18293054, 17610798, 19699191, 18135678, 17311728
     16785708, 10136473, 17786518, 18315328, 18334586, 12747740, 19032867
     18096714, 17390160, 17232014, 16422541, 18673325, 18155762, 14015842
     19827973, 22683225, 17726838, 18554871, 23177648, 18051556, 20803583
     18282562, 17922254, 15990359, 21972320, 16855292, 16668584, 21343838
     20299015, 17446237, 18093615, 17694209, 17288409, 17274537, 13955826
     16934803, 17634921, 17501491, 16315398, 22683212, 17006183, 13829543
     18191164, 17655240, 19393542, 18384391, 21538567, 16198143, 21847223
     17892268, 20142975, 19584068, 17165204, 18508861, 21756699, 16901385
     18554763, 18189036, 17443671, 17385178, 17936109, 14829250, 20925795
     17478514, 16850630, 13951456, 16595641, 15861775, 14054676, 16912439
     17299889, 17297939, 18619917, 16833527, 17798953, 17816865, 18607546
     17571306, 21286665, 17341326, 17851160, 20558005, 17586955, 19049453
     21051840, 17587063, 16956380, 18328509, 14133975, 18061914, 21051833
     18522509, 18765602, 18199537, 17332800, 13609098, 18384537, 22502493
     14338435, 17945983, 21067387, 16392068, 17752995, 21051862, 17237521
     16863422, 18244962, 19544839, 24433711, 17156148, 18973907, 17877323
     17449815, 18180390, 17088068, 17037130, 20004087, 19466309, 11733603
     18084625, 21051858, 18674024, 21051852, 18091059, 16306373, 18306996
     19915271, 18193833, 17787259, 20631274, 16344544, 14692762, 18614015
     17346091, 18228645, 17721717, 18436307, 11883252, 21756677, 17891943
     22353199, 16384983, 19121551, 12816846, 17982555, 17761775, 22243719
     17265217, 17071721, 16721594, 21756661, 18262334, 15913355, 17891946
     17672719, 17602269, 17239687, 17042658, 17238511, 17811456, 17284817
     17752121, 17394950, 16579084, 17011832, 22195465, 14602788, 18325460
     24476265, 24476274, 12611721, 16903536, 17006570, 16043574, 18783224
     16494615, 21526048, 19197175, 16069901, 17811447, 17308789, 22195477
     17865671, 19013183, 17343514, 18316692, 17325413, 16180763, 17348614
     14368995, 21983325, 17393915, 16285691, 20331945, 17883081, 24316947
     17705023, 17614227, 22195485, 14084247, 13645875, 16777840, 19727057
     14852021, 18744139, 18674047, 17716305, 18482502, 19289642, 17622427
     22195492, 14458214, 18723434, 17767676, 19258504, 17786278, 17082983
     21351877, 13498382, 18331812, 16065166, 18031668, 22893153, 16943711
     21517440, 17649265, 13866822, 18094246, 24528741, 14245531, 17783588
     17082359, 20448824, 18280813, 23330119, 16268425, 17302277, 18018515
     17215560, 19271443, 17016369, 20777150, 23330124, 20441797, 19769489
     17545847, 18260550, 13853126, 23536835, 17227277, 9756271, 18868646
     17614134, 17546973, 19680952, 18704244, 18828868, 18273830, 17050888
     17360606, 16992075, 17375354, 12905058, 18362222, 17571039, 17468141
     18436647, 17235750, 21168487, 16220077, 16929165
--------------------------------------------------------------------------------
OPatch succeeded.
配置监听
[oracle@aixo response]$ netca -silent -responseFile /home/oracle/database/response/netca.rsp
正在对命令行参数进行语法分析:
参数"silent" = true
参数"responsefile" = /home/oracle/database/response/netca.rsp
完成对命令行参数进行语法分析。
Oracle Net Services 配置:
完成概要文件配置。
Oracle Net 监听程序启动:
    正在运行监听程序控制: 
      /u01/oracle/product/11.2.0/db_1/bin/lsnrctl start LISTENER
    监听程序控制完成。
    监听程序已成功启动。
监听程序配置完成。
成功完成 Oracle Net Services 配置。退出代码是0
监听响应文件
[oracle@aixo ~]$ more /home/oracle/database/response/netca.rsp
###################################################################### 
## Copyright(c) 1998, 2011 Oracle Corporation. All rights reserved. ## 
##                                                                  ## 
## Specify values for the variables listed below to customize your  ## 
## installation.                                                    ## 
##                                                                  ## 
## Each variable is associated with a comment. The comment          ## 
## identifies the variable type.                                    ## 
##                                                                  ## 
## Please specify the values in the following format:               ## 
##                                                                  ## 
##         Type         Example                                     ## 
##         String       "Sample Value"                              ## 
##         Boolean      True or False                               ## 
##         Number       1000                                        ## 
##         StringList   {"String value 1","String Value 2"}         ## 
##                                                                  ## 
######################################################################
##                                                                  ## 
## This sample response file causes the Oracle Net Configuration    ##
## Assistant (NetCA) to complete an Oracle Net configuration during ##
## a custom install of the Oracle11g server which is similar to     ##
## what would be created by the NetCA during typical Oracle11g      ##
## install. It also documents all of the NetCA response file        ##
## variables so you can create your own response file to configure  ##
## Oracle Net during an install the way you wish.                   ##
##                                                                  ## 
###################################################################### 
[GENERAL]
RESPONSEFILE_VERSION="11.2"
CREATE_TYPE="CUSTOM"
#-------------------------------------------------------------------------------
# Name       : SHOW_GUI
# Datatype   : Boolean
# Description: This variable controls appearance/suppression of the NetCA GUI,
# Pre-req    : N/A
# Default    : TRUE
# Note:
# This must be set to false in order to run NetCA in silent mode. 
# This is a substitute of "/silent" flag in the NetCA command line.
# The command line flag has precedence over the one in this response file.
# This feature is present since 10.1.0.3.
#-------------------------------------------------------------------------------
#SHOW_GUI=false
#-------------------------------------------------------------------------------
# Name       : LOG_FILE
# Datatype   : String
# Description: If present, NetCA will log output to this file in addition to the
#              standard out.
# Pre-req    : N/A
# Default    : NONE
# Note:
#       This is a substitute of "/log" in the NetCA command line.
# The command line argument has precedence over the one in this response file.
# This feature is present since 10.1.0.3.
#-------------------------------------------------------------------------------
#LOG_FILE=""/oracle11gHome/network/tools/log/netca.log""
[oracle.net.ca]
#INSTALLED_COMPONENTS;StringList;list of installed components
# The possible values for installed components are:
# "net8","server","client","aso", "cman", "javavm" 
INSTALLED_COMPONENTS={"server","net8","javavm"}
#INSTALL_TYPE;String;type of install
# The possible values for install type are:
# "typical","minimal" or "custom"
INSTALL_TYPE=""typical""
#LISTENER_NUMBER;Number;Number of Listeners
# A typical install sets one listener 
LISTENER_NUMBER=1
#LISTENER_NAMES;StringList;list of listener names
# The values for listener are:
# "LISTENER","LISTENER1","LISTENER2","LISTENER3", ...
# A typical install sets only "LISTENER" 
LISTENER_NAMES={"LISTENER"}
#LISTENER_PROTOCOLS;StringList;list of listener addresses (protocols and parameters separated by semicolons)
# The possible values for listener protocols are:
# "TCP;1521","TCPS;2484","NMP;ORAPIPE","IPC;IPCKEY","VI;1521" 
# A typical install sets only "TCP;1521" 
LISTENER_PROTOCOLS={"TCP;1521"}
#LISTENER_START;String;name of the listener to start, in double quotes
LISTENER_START=""LISTENER""
#NAMING_METHODS;StringList;list of naming methods
# The possible values for naming methods are: 
# LDAP, TNSNAMES, ONAMES, HOSTNAME, NOVELL, NIS, DCE
# A typical install sets only: "TNSNAMES","ONAMES","HOSTNAMES" 
# or "LDAP","TNSNAMES","ONAMES","HOSTNAMES" for LDAP
NAMING_METHODS={"TNSNAMES","ONAMES","HOSTNAME"}
#NOVELL_NAMECONTEXT;String;Novell Directory Service name context, in double quotes
# A typical install does not use this variable. 
#NOVELL_NAMECONTEXT = ""NAMCONTEXT""
#SUN_METAMAP;String; SUN meta map, in double quotes
# A typical install does not use this variable. 
#SUN_METAMAP = ""MAP""
#DCE_CELLNAME;String;DCE cell name, in double quotes
# A typical install does not use this variable. 
#DCE_CELLNAME = ""CELL""
#NSN_NUMBER;Number;Number of NetService Names
# A typical install sets one net service name
NSN_NUMBER=1
#NSN_NAMES;StringList;list of Net Service names
# A typical install sets net service name to "EXTPROC_CONNECTION_DATA"
NSN_NAMES={"EXTPROC_CONNECTION_DATA"}
#NSN_SERVICE;StringList;Oracle11g database's service name
# A typical install sets Oracle11g database's service name to "PLSExtProc"
NSN_SERVICE={"PLSExtProc"}
#NSN_PROTOCOLS;StringList;list of coma separated strings of Net Service Name protocol parameters
# The possible values for net service name protocol parameters are:
# "TCP;HOSTNAME;1521","TCPS;HOSTNAME;2484","NMP;COMPUTERNAME;ORAPIPE","VI;HOSTNAME;1521","IPC;IPCKEY"  
# A typical install sets parameters to "IPC;EXTPROC"
NSN_PROTOCOLS={"TCP;HOSTNAME;1521"}
拷贝建库模板文件到oracle主目录
[oracle@aixo response]$ cp /u01/oracle/product/11.2.0/db_1/assistants/dbca/templates/General_Purpose.dbc .
模板文件可以修改
[oracle@aixo ~]$ more /home/oracle/General_Purpose.dbc
<?xml version = '1.0'?>
<DatabaseTemplate name="General_Purpose" description=" " version="11.2.0.0.0">
   <CommonAttributes>
      <option name="OMS" value="false"/>
      <option name="JSERVER" value="true"/>
      <option name="SPATIAL" value="true"/>
      <option name="IMEDIA" value="true"/>
      <option name="XDB_PROTOCOLS" value="true">
         <tablespace id="SYSAUX"/>
      </option>
      <option name="ORACLE_TEXT" value="true">
         <tablespace id="SYSAUX"/>
      </option>
      <option name="SAMPLE_SCHEMA" value="false"/>
      <option name="CWMLITE" value="true">
         <tablespace id="SYSAUX"/>
      </option>
      <option name="EM_REPOSITORY" value="true">
         <tablespace id="SYSAUX"/>
      </option>
      <option name="APEX" value="true"/>
      <option name="OWB" value="true"/>
      <option name="DV" value="false"/>
   </CommonAttributes>
   <Variables/>
   <CustomScripts Execute="false"/>
   <InitParamAttributes>
      <InitParams>
         <initParam name="db_name" value=""/>
         <initParam name="dispatchers" value="(PROTOCOL=TCP) (SERVICE={SID}XDB)"/>
         <initParam name="audit_file_dest" value="{ORACLE_BASE}/admin/{DB_UNIQUE_NAME}/adump"/>
         <initParam name="compatible" value="11.2.0.4.0"/>
         <initParam name="remote_login_passwordfile" value="EXCLUSIVE"/>
         <initParam name="processes" value="150"/>
         <initParam name="undo_tablespace" value="UNDOTBS1"/>
         <initParam name="control_files" value="(&quot;{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/control01.ctl&quot;, &quot;{ORACLE_BASE}/fast_recovery_area/{DB_UNIQUE_NAME}/control02.ctl&quot
;)"/>
         <initParam name="diagnostic_dest" value="{ORACLE_BASE}"/>
         <initParam name="db_recovery_file_dest" value="{ORACLE_BASE}/fast_recovery_area"/>
         <initParam name="audit_trail" value="db"/>
         <initParam name="memory_target" value="250" unit="MB"/>
         <initParam name="db_block_size" value="8" unit="KB"/>
         <initParam name="open_cursors" value="300"/>
         <initParam name="db_recovery_file_dest_size" value="" unit="MB"/>
      </InitParams>
      <MiscParams>
         <databaseType>MULTIPURPOSE</databaseType>
         <maxUserConn>20</maxUserConn>
         <percentageMemTOSGA>40</percentageMemTOSGA>
         <customSGA>false</customSGA>
         <archiveLogMode>false</archiveLogMode>
         <initParamFileName>{ORACLE_BASE}/admin/{DB_UNIQUE_NAME}/pfile/init.ora</initParamFileName>
      </MiscParams>
      <SPfile useSPFile="true">{ORACLE_HOME}/dbs/spfile{SID}.ora</SPfile>
   </InitParamAttributes>
   <StorageAttributes>
      <DataFiles>
         <Location>{ORACLE_HOME}/assistants/dbca/templates/Seed_Database.dfb</Location>
         <SourceDBName>seeddata</SourceDBName>
         <Name id="1" Tablespace="SYSTEM" Contents="PERMANENT" Size="740" autoextend="true" blocksize="8192">{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/system01.dbf</Name>
         <Name id="2" Tablespace="SYSAUX" Contents="PERMANENT" Size="470" autoextend="true" blocksize="8192">{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/sysaux01.dbf</Name>
         <Name id="3" Tablespace="UNDOTBS1" Contents="UNDO" Size="25" autoextend="true" blocksize="8192">{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/undotbs01.dbf</Name>
         <Name id="4" Tablespace="USERS" Contents="PERMANENT" Size="5" autoextend="true" blocksize="8192">{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/users01.dbf</Name>
      </DataFiles>
      <TempFiles>
         <Name id="1" Tablespace="TEMP" Contents="TEMPORARY" Size="20">{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/temp01.dbf</Name>
      </TempFiles>
      <ControlfileAttributes id="Controlfile">
         <maxDatafiles>100</maxDatafiles>
         <maxLogfiles>16</maxLogfiles>
         <maxLogMembers>3</maxLogMembers>
         <maxLogHistory>1</maxLogHistory>
         <maxInstances>8</maxInstances>
         <image name="control01.ctl" filepath="{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/"/>
         <image name="control02.ctl" filepath="{ORACLE_BASE}/fast_recovery_area/{DB_UNIQUE_NAME}/"/>
      </ControlfileAttributes>
      <RedoLogGroupAttributes id="1">
         <reuse>false</reuse>
         <fileSize unit="KB">51200</fileSize>
         <Thread>1</Thread>
         <member ordinal="0" memberName="redo01.log" filepath="{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/"/>
      </RedoLogGroupAttributes>
      <RedoLogGroupAttributes id="2">
         <reuse>false</reuse>
         <fileSize unit="KB">51200</fileSize>
         <Thread>1</Thread>
         <member ordinal="0" memberName="redo02.log" filepath="{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/"/>
      </RedoLogGroupAttributes>
      <RedoLogGroupAttributes id="3">
         <reuse>false</reuse>
         <fileSize unit="KB">51200</fileSize>
         <Thread>1</Thread>
         <member ordinal="0" memberName="redo03.log" filepath="{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/"/>
      </RedoLogGroupAttributes>
   </StorageAttributes>
</DatabaseTemplate>

静默建库

[oracle@aixo ~]$ dbca -silent -createDatabase \
>      -templateName "/home/oracle/General_Purpose.dbc" \
>      -gdbName "testdb" \
>      -sid "testdb" \
>      -sysPassword "oracle" \
>      -systemPassword "oracle" \
>      -emConfiguration NONE \
>      -datafileDestination "/oradata" \
>      -storageType "FS" \
>      -characterSet "ZHS16GBK" \
>      -nationalCharacterSet "AL16UTF16" \
>      -listeners "LISTENER" \
>      -memoryPercentage 20 \
>      -databaseType "OLTP"
复制数据库文件
1% 已完成
3% 已完成
11% 已完成
18% 已完成
26% 已完成
37% 已完成
正在创建并启动 Oracle 实例
40% 已完成
45% 已完成
50% 已完成
55% 已完成
56% 已完成
60% 已完成
62% 已完成
正在进行数据库创建
66% 已完成
70% 已完成
73% 已完成
74% 已完成
75% 已完成
76% 已完成
77% 已完成
88% 已完成
99% 已完成
100% 已完成
有关详细信息, 请参阅日志文件 "/u01/oracle/cfgtoollogs/dbca/testdb/testdb.log"
[oracle@aixo ~]$ more /u01/oracle/cfgtoollogs/dbca/testdb/testdb.log
复制数据库文件
无法访问文件 "/etc/oratab"DBCA_PROGRESS : 1%
DBCA_PROGRESS : 3%
DBCA_PROGRESS : 11%
DBCA_PROGRESS : 18%
DBCA_PROGRESS : 26%
DBCA_PROGRESS : 37%
正在创建并启动 Oracle 实例
DBCA_PROGRESS : 40%
DBCA_PROGRESS : 45%
DBCA_PROGRESS : 50%
DBCA_PROGRESS : 55%
DBCA_PROGRESS : 56%
DBCA_PROGRESS : 60%
DBCA_PROGRESS : 62%
正在进行数据库创建
DBCA_PROGRESS : 66%
DBCA_PROGRESS : 70%
DBCA_PROGRESS : 73%
DBCA_PROGRESS : 74%
DBCA_PROGRESS : 75%
DBCA_PROGRESS : 76%
DBCA_PROGRESS : 77%
DBCA_PROGRESS : 88%
DBCA_PROGRESS : 99%
DBCA_PROGRESS : 100%
数据库创建完成。有关详细信息, 请查看以下位置的日志文件:
 /u01/oracle/cfgtoollogs/dbca/testdb。
数据库信息:
全局数据库名:testdb
系统标识符 (SID):testdb

以下是数据库安装完毕后,常规修改的一些参数,仅供参考

alter system set "_gby_hash_aggregation_enabled"=FALSE scope=spfile sid='*';
alter system set "_gc_policy_time"=0 scope=spfile sid='*';
alter system set "_gc_undo_affinity"=false scope=spfile sid='*';
alter system set "_high_priority_processes"='VKTM|LMS|LGWR' scope=spfile sid='*';
alter system set "_undo_autotune"=FALSE scope=spfile sid='*';

alter system set "_optim_peek_user_binds"=FALSE scope=spfile sid='*';
alter system set "_optimizer_cartesian_enabled"=FALSE scope=spfile sid='*';
alter system set "_optimizer_adaptive_cursor_sharing"=FALSE scope=spfile sid='*';
alter system set "_optimizer_extended_cursor_sharing"='NONE' scope=spfile sid='*';
alter system set "_optimizer_extended_cursor_sharing_rel"='NONE' scope=spfile sid='*';
alter system set "_optimizer_use_feedback"=FALSE scope=spfile sid='*';
alter system set "_px_use_large_pool"=TRUE scope=spfile sid='*';
alter system set "_use_adaptive_log_file_sync"='FALSE' scope=spfile sid='*';
alter system set "_memory_imm_mode_without_autosga" = false scope=spfile sid='*';  
alter system set event="28401 trace name context forever, level 1:10949 trace name context forever, level 1" scope=spfile sid='*'; 

alter system set parallel_execution_message_size=32768 scope=spfile sid='*';
alter system set parallel_force_local=TRUE scope=spfile sid='*';

alter system set sga_max_size=60g scope=spfile sid='*';
alter system set sga_target=60g scope=spfile sid='*';
alter system set pga_aggregate_target=15g scope=spfile sid='*';
alter system set db_files=1000 scope=spfile sid='*';
alter system set processes=8000 scope=spfile sid='*';
alter system set open_cursors=1000 scope=spfile sid='*';
alter system set session_cached_cursors=500 scope=spfile sid='*';

alter system set deferred_segment_creation=false;
alter system set sec_case_sensitive_logon=false;

alter system set undo_retention=3600;
alter system set remote_login_passwordfile=none scope=spfile;

alter profile default limit password_life_time unlimited;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值