Oracle RDBMS Server 11gR2 Preinstall RPM For Oracle Linux 6

在之前的文章中我推荐过使用oracle-validated RPM包来简化OEL 5上Oracle DB/RDBMS Server软件的安装准备工作, 而在OEL 6之后的Oracle Linux中一直没有oracle-validated RPM可用,直到最近Oracle Linux官方释出了oracle-rdbms-server-11gR2-preinstall RPM包,该oracle-rdbms-server-11gR2-preinstall package专门为Oracle Linux 6设计,辅助加速Oracle Database软件的安装。

我们可以访问 Unbreakable Linux Network 或者 Oracle public yum repository 获得该preinstall package RPM,这里我们介绍一下public yum的使用方法:

 

 

[root@vrh6 ~]# uname -a
Linux vrh6 2.6.32-300.3.1.el6uek.x86_64 #1 SMP Fri Dec 9 18:57:35 EST 2011 x86_64 x86_64 x86_64 GNU/Linux

[root@vrh6 ~]# cat /etc/issue
Oracle Linux Server release 6.2
Kernel r on an m
www.askmac.cn 

su -  root

[root@vrh6 ~]# cd /etc/yum.repos.d

[root@vrh6 yum.repos.d]# wget http://public-yum.oracle.com/public-yum-ol6.repo


 --2012-04-02 07:52:31--  http://public-yum.oracle.com/public-yum-ol6.repo
Resolving public-yum.oracle.com... 141.146.44.34
Connecting to public-yum.oracle.com|141.146.44.34|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1461 (1.4K) [text/plain]
Saving to: “public-yum-ol6.repo”

100%[==============================================================================================================================>] 1,461       --.-K/s   in 0.003s  

2012-04-02 07:52:32 (536 KB/s) - “public-yum-ol6.repo” saved [1461/1461]

[root@vrh6 yum.repos.d]# cat public-yum-ol6.repo
[ol6_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=1

[ol6_ga_base]
name=Oracle Linux $releasever GA installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/0/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=0

[ol6_u1_base]
name=Oracle Linux $releasever Update 1 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/1/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=0

[ol6_u2_base]
name=Oracle Linux $releasever Update 2 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/2/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=0

[ol6_UEK_latest]
name=Latest Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/UEK/latest/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=0

[ol6_UEK_base]
name=Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/UEK/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=0

[root@vrh6 yum.repos.d]# yum install oracle-rdbms-server-11gR2-preinstall
Loaded plugins: security
ol6_latest                                                                                                                                       | 1.1 kB     00:00     
ol6_latest/primary                                                                                                                               |  15 MB     01:07     
ol6_latest                                                                                                                                                  14723/14723
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package oracle-rdbms-server-11gR2-preinstall.x86_64 0:1.0-3.el6 will be installed
--> Processing Dependency: xorg-x11-utils for package: oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64
--> Processing Dependency: gcc-c++ for package: oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64
--> Processing Dependency: gcc for package: oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64
--> Processing Dependency: libstdc++-devel for package: oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64
--> Processing Dependency: glibc-devel for package: oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64
--> Processing Dependency: compat-libstdc++-33 for package: oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64
--> Processing Dependency: xorg-x11-xauth for package: oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64
--> Processing Dependency: libaio-devel for package: oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64
--> Processing Dependency: ksh for package: oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64
--> Processing Dependency: compat-libcap1 for package: oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64
--> Running transaction check
---> Package compat-libcap1.x86_64 0:1.10-1 will be installed
---> Package compat-libstdc++-33.x86_64 0:3.2.3-69.el6 will be installed
---> Package gcc.x86_64 0:4.4.6-3.el6 will be installed
--> Processing Dependency: cpp = 4.4.6-3.el6 for package: gcc-4.4.6-3.el6.x86_64
--> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.6-3.el6.x86_64
---> Package gcc-c++.x86_64 0:4.4.6-3.el6 will be installed
--> Processing Dependency: libmpfr.so.1()(64bit) for package: gcc-c++-4.4.6-3.el6.x86_64
---> Package glibc-devel.x86_64 0:2.12-1.47.el6_2.9 will be installed
--> Processing Dependency: glibc = 2.12-1.47.el6_2.9 for package: glibc-devel-2.12-1.47.el6_2.9.x86_64
--> Processing Dependency: glibc-headers = 2.12-1.47.el6_2.9 for package: glibc-devel-2.12-1.47.el6_2.9.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.12-1.47.el6_2.9.x86_64
---> Package ksh.x86_64 0:20100621-12.el6_2.1 will be installed
---> Package libaio-devel.x86_64 0:0.3.107-10.el6 will be installed
---> Package libstdc++-devel.x86_64 0:4.4.6-3.el6 will be installed
---> Package xorg-x11-utils.x86_64 0:7.4-8.el6 will be installed
--> Processing Dependency: libXxf86misc.so.1()(64bit) for package: xorg-x11-utils-7.4-8.el6.x86_64
--> Processing Dependency: libdmx.so.1()(64bit) for package: xorg-x11-utils-7.4-8.el6.x86_64
--> Processing Dependency: libXmuu.so.1()(64bit) for package: xorg-x11-utils-7.4-8.el6.x86_64
--> Processing Dependency: libXxf86dga.so.1()(64bit) for package: xorg-x11-utils-7.4-8.el6.x86_64
---> Package xorg-x11-xauth.x86_64 1:1.0.2-7.1.el6 will be installed
--> Running transaction check
---> Package cloog-ppl.x86_64 0:0.15.7-1.2.el6 will be installed
--> Processing Dependency: libppl_c.so.2()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64
--> Processing Dependency: libppl.so.7()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64
---> Package cpp.x86_64 0:4.4.6-3.el6 will be installed
---> Package glibc.x86_64 0:2.12-1.47.el6 will be updated
--> Processing Dependency: glibc = 2.12-1.47.el6 for package: glibc-common-2.12-1.47.el6.x86_64
---> Package glibc.x86_64 0:2.12-1.47.el6_2.9 will be an update
---> Package glibc-headers.x86_64 0:2.12-1.47.el6_2.9 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.12-1.47.el6_2.9.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.12-1.47.el6_2.9.x86_64
---> Package libXmu.x86_64 0:1.0.5-1.el6 will be installed
---> Package libXxf86dga.x86_64 0:1.1.1-1.el6 will be installed
---> Package libXxf86misc.x86_64 0:1.0.2-1.el6 will be installed
---> Package libdmx.x86_64 0:1.1.0-1.el6 will be installed
---> Package mpfr.x86_64 0:2.4.1-6.el6 will be installed
--> Running transaction check
---> Package glibc-common.x86_64 0:2.12-1.47.el6 will be updated
---> Package glibc-common.x86_64 0:2.12-1.47.el6_2.9 will be an update
---> Package kernel-uek-headers.x86_64 0:2.6.32-300.11.1.el6uek will be installed
---> Package ppl.x86_64 0:0.10.2-11.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
 Package                                                  Arch                       Version                                       Repository                      Size
========================================================================================================================================================================
Installing:
 oracle-rdbms-server-11gR2-preinstall                     x86_64                     1.0-3.el6                                     ol6_latest                      15 k
Installing for dependencies:
 cloog-ppl                                                x86_64                     0.15.7-1.2.el6                                ol6_latest                      93 k
 compat-libcap1                                           x86_64                     1.10-1                                        ol6_latest                      17 k
 compat-libstdc++-33                                      x86_64                     3.2.3-69.el6                                  ol6_latest                     183 k
 cpp                                                      x86_64                     4.4.6-3.el6                                   ol6_latest                     3.7 M
 gcc                                                      x86_64                     4.4.6-3.el6                                   ol6_latest                      10 M
 gcc-c++                                                  x86_64                     4.4.6-3.el6                                   ol6_latest                     4.7 M
 glibc-devel                                              x86_64                     2.12-1.47.el6_2.9                             ol6_latest                     966 k
 glibc-headers                                            x86_64                     2.12-1.47.el6_2.9                             ol6_latest                     597 k
 kernel-uek-headers                                       x86_64                     2.6.32-300.11.1.el6uek                        ol6_latest                     702 k
 ksh                                                      x86_64                     20100621-12.el6_2.1                           ol6_latest                     683 k
 libXmu                                                   x86_64                     1.0.5-1.el6                                   ol6_latest                      58 k
 libXxf86dga                                              x86_64                     1.1.1-1.el6                                   ol6_latest                      21 k
 libXxf86misc                                             x86_64                     1.0.2-1.el6                                   ol6_latest                      15 k
 libaio-devel                                             x86_64                     0.3.107-10.el6                                ol6_latest                      13 k
 libdmx                                                   x86_64                     1.1.0-1.el6                                   ol6_latest                      16 k
 libstdc++-devel                                          x86_64                     4.4.6-3.el6                                   ol6_latest                     1.5 M
 mpfr                                                     x86_64                     2.4.1-6.el6                                   ol6_latest                     156 k
 ppl                                                      x86_64                     0.10.2-11.el6                                 ol6_latest                     1.3 M
 xorg-x11-utils                                           x86_64                     7.4-8.el6                                     ol6_latest                      87 k
 xorg-x11-xauth                                           x86_64                     1:1.0.2-7.1.el6                               ol6_latest                      34 k
Updating for dependencies:
 glibc                                                    x86_64                     2.12-1.47.el6_2.9                             ol6_latest                     3.8 M
 glibc-common                                             x86_64                     2.12-1.47.el6_2.9                             ol6_latest                      14 M

Transaction Summary
========================================================================================================================================================================
Install      21 Package(s)
Upgrade       2 Package(s)

Total download size: 43 M
Is this ok [y/N]: y
Downloading Packages:
(1/23): cloog-ppl-0.15.7-1.2.el6.x86_64.rpm                                                                                                      |  93 kB     00:01     
(2/23): compat-libcap1-1.10-1.x86_64.rpm                                                                                                         |  17 kB     00:00     
(3/23): compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm                                                                                              | 183 kB     00:01     
(4/23): cpp-4.4.6-3.el6.x86_64.rpm                                                                                                               | 3.7 MB     00:28     
(5/23): gcc-4.4.6-3.el6.x86_64.rpm                                                                                                               |  10 MB     00:57     
(6/23): gcc-c++-4.4.6-3.el6.x86_64.rpm                                                                                                           | 4.7 MB     00:29     
(7/23): glibc-2.12-1.47.el6_2.9.x86_64.rpm                                                                                                       | 3.8 MB     00:19     
(8/23): glibc-common-2.12-1.47.el6_2.9.x86_64.rpm                                                                                                |  14 MB     01:13     
(9/23): glibc-devel-2.12-1.47.el6_2.9.x86_64.rpm                                                                                                 | 966 kB     00:10     
(10/23): glibc-headers-2.12-1.47.el6_2.9.x86_64.rpm                                                                                              | 597 kB     00:03     
(11/23): kernel-uek-headers-2.6.32-300.11.1.el6uek.x86_64.rpm                                                                                    | 702 kB     00:03     
(12/23): ksh-20100621-12.el6_2.1.x86_64.rpm                                                                                                      | 683 kB     00:03     
(13/23): libXmu-1.0.5-1.el6.x86_64.rpm                                                                                                           |  58 kB     00:00     
(14/23): libXxf86dga-1.1.1-1.el6.x86_64.rpm                                                                                                      |  21 kB     00:00     
(15/23): libXxf86misc-1.0.2-1.el6.x86_64.rpm                                                                                                     |  15 kB     00:00     
(16/23): libaio-devel-0.3.107-10.el6.x86_64.rpm                                                                                                  |  13 kB     00:00     
(17/23): libdmx-1.1.0-1.el6.x86_64.rpm                                                                                                           |  16 kB     00:00     
(18/23): libstdc++-devel-4.4.6-3.el6.x86_64.rpm                                                                                                  | 1.5 MB     00:08     
(19/23): mpfr-2.4.1-6.el6.x86_64.rpm                                                                                                             | 156 kB     00:01     
(20/23): oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64.rpm                                                                               |  15 kB     00:00     
(21/23): ppl-0.10.2-11.el6.x86_64.rpm                                                                                                            | 1.3 MB     00:07     
(22/23): xorg-x11-utils-7.4-8.el6.x86_64.rpm                                                                                                     |  87 kB     00:00     
(23/23): xorg-x11-xauth-1.0.2-7.1.el6.x86_64.rpm                                                                                                 |  34 kB     00:00     
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                   166 kB/s |  43 MB     04:23     
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Retrieving key from http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
Importing GPG key 0xEC551F03:
 Userid: "Oracle OSS group (Open Source Software group) <build@oss.oracle.com>"
 From  : http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : glibc-common-2.12-1.47.el6_2.9.x86_64                                                                                                               1/25
  Updating   : glibc-2.12-1.47.el6_2.9.x86_64                                                                                                                      2/25
  Installing : mpfr-2.4.1-6.el6.x86_64                                                                                                                             3/25
  Installing : libXmu-1.0.5-1.el6.x86_64                                                                                                                           4/25
  Installing : libstdc++-devel-4.4.6-3.el6.x86_64                                                                                                                  5/25
  Installing : 1:xorg-x11-xauth-1.0.2-7.1.el6.x86_64                                                                                                               6/25
  Installing : cpp-4.4.6-3.el6.x86_64                                                                                                                              7/25
  Installing : compat-libcap1-1.10-1.x86_64                                                                                                                        8/25
  Installing : compat-libstdc++-33-3.2.3-69.el6.x86_64                                                                                                             9/25
  Installing : libXxf86dga-1.1.1-1.el6.x86_64                                                                                                                     10/25
  Installing : libXxf86misc-1.0.2-1.el6.x86_64                                                                                                                    11/25
  Installing : libdmx-1.1.0-1.el6.x86_64                                                                                                                          12/25
  Installing : xorg-x11-utils-7.4-8.el6.x86_64                                                                                                                    13/25
  Installing : ppl-0.10.2-11.el6.x86_64                                                                                                                           14/25
  Installing : cloog-ppl-0.15.7-1.2.el6.x86_64                                                                                                                    15/25
  Installing : ksh-20100621-12.el6_2.1.x86_64                                                                                                                     16/25
  Installing : kernel-uek-headers-2.6.32-300.11.1.el6uek.x86_64                                                                                                   17/25
  Installing : glibc-headers-2.12-1.47.el6_2.9.x86_64                                                                                                             18/25
  Installing : glibc-devel-2.12-1.47.el6_2.9.x86_64                                                                                                               19/25
  Installing : gcc-4.4.6-3.el6.x86_64                                                                                                                             20/25
  Installing : gcc-c++-4.4.6-3.el6.x86_64                                                                                                                         21/25
  Installing : libaio-devel-0.3.107-10.el6.x86_64                                                                                                                 22/25
  Installing : oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64                                                                                              23/25
  Cleanup    : glibc-common-2.12-1.47.el6.x86_64                                                                                                                  24/25
  Cleanup    : glibc-2.12-1.47.el6.x86_64                                                                                                                         25/25 

Installed:
  oracle-rdbms-server-11gR2-preinstall.x86_64 0:1.0-3.el6                                                                                                               

Dependency Installed:
  cloog-ppl.x86_64 0:0.15.7-1.2.el6                  compat-libcap1.x86_64 0:1.10-1                       compat-libstdc++-33.x86_64 0:3.2.3-69.el6                     
  cpp.x86_64 0:4.4.6-3.el6                           gcc.x86_64 0:4.4.6-3.el6                             gcc-c++.x86_64 0:4.4.6-3.el6                                  
  glibc-devel.x86_64 0:2.12-1.47.el6_2.9             glibc-headers.x86_64 0:2.12-1.47.el6_2.9             kernel-uek-headers.x86_64 0:2.6.32-300.11.1.el6uek            
  ksh.x86_64 0:20100621-12.el6_2.1                   libXmu.x86_64 0:1.0.5-1.el6                          libXxf86dga.x86_64 0:1.1.1-1.el6                              
  libXxf86misc.x86_64 0:1.0.2-1.el6                  libaio-devel.x86_64 0:0.3.107-10.el6                 libdmx.x86_64 0:1.1.0-1.el6                                   
  libstdc++-devel.x86_64 0:4.4.6-3.el6               mpfr.x86_64 0:2.4.1-6.el6                            ppl.x86_64 0:0.10.2-11.el6                                    
  xorg-x11-utils.x86_64 0:7.4-8.el6                  xorg-x11-xauth.x86_64 1:1.0.2-7.1.el6               

Dependency Updated:
  glibc.x86_64 0:2.12-1.47.el6_2.9                                                glibc-common.x86_64 0:2.12-1.47.el6_2.9                                               

Complete!

 

 

注意该oracle-rdbms-server-11gR2-preinstall目前只有x86-64位的版本,即在x86的Oracle Linux 6上不可用。

与oracle-validated RPM类似,oracle-rdbms-server-11gR2-preinstall会为我们完成以下工作:

1. 从oracle Public YUM上下载并安装多个特定的软件包并保证其为指定的版本(如以上示例),这些软件包software package是安装Oracle DB/RDBMS Server 11gR2数据库软件的先决条件之一

2. 创建 oracle OS用户user,以及 oinstall 和 dba 用户组group

3. 修改/etc/sysctl.conf配置文件中的内核参数,以保证oracle instance实例可以健康运行

安装完成后的 /etc/sysctl.conf 内容如下:

 

 

[root@vrh6 yum.repos.d]# cat /etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 0

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1

# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0

# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1

# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1

# Disable netfilter on bridges.
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0

# Controls the maximum size of a message, in bytes
kernel.msgmnb = 65536

# Controls the default maxmimum size of a mesage queue
kernel.msgmax = 65536

# Controls the maximum shared segment size, in bytes

# Controls the maximum number of shared memory segments, in pages

# oracle-rdbms-server-11gR2-preinstall setting for fs.file-max is 6815744
fs.file-max = 6815744

# oracle-rdbms-server-11gR2-preinstall setting for kernel.sem is '250 32000 100 128'
kernel.sem = 250 32000 100 128

# oracle-rdbms-server-11gR2-preinstall setting for kernel.shmmni is 4096
kernel.shmmni = 4096

# oracle-rdbms-server-11gR2-preinstall setting for kernel.shmall is 1073741824
kernel.shmall = 1073741824

# oracle-rdbms-server-11gR2-preinstall setting for kernel.shmmax is 4398046511104 on x86_64
kernel.shmmax = 4398046511104

# oracle-rdbms-server-11gR2-preinstall setting for net.core.rmem_default is 262144
net.core.rmem_default = 262144

# oracle-rdbms-server-11gR2-preinstall setting for net.core.rmem_max is 4194304
net.core.rmem_max = 4194304

# oracle-rdbms-server-11gR2-preinstall setting for net.core.wmem_default is 262144
net.core.wmem_default = 262144

# oracle-rdbms-server-11gR2-preinstall setting for net.core.wmem_max is 1048576
net.core.wmem_max = 1048576

# oracle-rdbms-server-11gR2-preinstall setting for fs.aio-max-nr is 1048576
fs.aio-max-nr = 1048576

# oracle-rdbms-server-11gR2-preinstall setting for net.ipv4.ip_local_port_range is 9000 65500
net.ipv4.ip_local_port_range = 9000 65500

 

 

4. 修改/etc/security/limits.conf配置文件 保证 oracle用户的shell soft/hard limit,例如nofile、stack等参数足够, 以符合Oracle 11gR2的安装要求
安装完成后的 /etc/security/limits.conf内容如下:

 

 

# oracle-rdbms-server-11gR2-preinstall setting for nofile soft limit is 1024
oracle   soft   nofile    1024

# oracle-rdbms-server-11gR2-preinstall setting for nofile hard limit is 65536
oracle   hard   nofile    65536

# oracle-rdbms-server-11gR2-preinstall setting for nproc soft limit is 2047
oracle   soft   nproc    2047

# oracle-rdbms-server-11gR2-preinstall setting for nproc hard limit is 16384
oracle   hard   nproc    16384

# oracle-rdbms-server-11gR2-preinstall setting for stack soft limit is 10240KB
oracle   soft   stack    10240

# oracle-rdbms-server-11gR2-preinstall setting for stack hard limit is 10240KB
oracle   hard   stack    32768

 

 

5. 为 x86-64的服务器设置kernel boot 内核启动参数numa=off ,关闭numa功能:

 

[root@vrh6 ~]# cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/mapper/vg_vrh6-lv_root
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Oracle Linux Server-uek (2.6.32-300.3.1.el6uek.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-300.3.1.el6uek.x86_64 ro root=/dev/mapper/vg_vrh6-lv_root rd_LVM_LV=vg_vrh6/lv_swap rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb  rd_LVM_LV=vg_vrh6/lv_root  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
numa=off
        initrd /initramfs-2.6.32-300.3.1.el6uek.x86_64.img
title Oracle Linux Server (2.6.32-220.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-220.el6.x86_64 ro root=/dev/mapper/vg_vrh6-lv_root rd_LVM_LV=vg_vrh6/lv_swap rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto rd_LVM_LV=vg_vrh6/lv_root  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM numa=off
        initrd /initramfs-2.6.32-220.el6.x86_64.img

Understand Oracle Validated Configurations

Oracle Validated Configurations致力于为企业提供更简易、更快捷、成本更低的基于Linux和Oracle VM的解决方案。该计划向我们提供经过测试和验证的体系架构,其附带的文档揭示了相关硬件、软件、存储、网络原件的最佳配置实践,以帮助系统提升性能和可收缩性并降低成本。从行业角度来说Oracle Validated Configurations所验证的配置及提供的最佳实践文档受到Oracle合作伙伴的接受和认可,Oracle Validated Configurations提供了推荐使用的软硬件组合的部署方案细节,这些方案已被证明是十分有益的。

Oracle Validated Configurations提供了那些好处?

Oracle Validated Configurations是对系统底层组件在高负载下良好工作的有力保证,同时这些推荐配置也在实践中被证明是易于快速部署的。其有助于:

  1. 实现标准化的、具有可扩展性、高可用的且成本低廉的解决方案
  2. 加速并简化在Linux上部署Oracle软件
  3. 为最终用户降低了测试系统所要花费的昂贵成本
  4. 转嫁了用户的风险

那么Oracle Validated Configurations和最早推出的Oracle Product Certification有什么区别?

传统的Oracle Product Certification在认证某个操作系统平台后,可以确认Oracle的相关产品完全支持该系统平台。而Oracle Validated Configurations则通过测试验证更进一步提供了完整的组件组合信息,这些信息包括针对软硬件、存储的版本、设置、补丁的推荐值,而这些推荐值来源于Oracle及其合作伙伴的Linux测试实验室中高压测试的经验。

我们要如何使用Oracle Validated Configurations?

我们可以通过访问或订阅 <Browse Published Validated Configurations>来了解OVC中已经验证的软硬件组合配置。

此外在Oracle Enterprise Linux中提供了oracle-validated RPM软件包,通过使用OEL DVD介质上的该包我们可以更简单地部署安装Oracle产品所需要的软件包环境,特别是对于Oracle Database的安装来说有了以上特性后显得特别简单。

通过安装DVD介质使用oracle-validate软件包的步骤如下:
1.创建介质装载目录/media/disk: mkdir /media/disk
2.插入OEL DVD光盘
3.装载目录: mount /dev/cdrom /media/disk
4.touch /etc/yum.repos.d/public-yum-el5.repo,并加入以下内容

[oel5]
name = Enterprise Linux 5.5 DVD
baseurl=file:///media/disk/Server/
gpgcheck=0
enabled=1

注意以上name中的OEL版本(指5.5)可能和你手头DVD的版本不一样,这一般不会造成问题,但要保证当前操作系统与安装介质中的完全一致。

5.正式安装oracle-validated软件包环境,使用yum install oracle-validated 命令:

yum install oracle-validated
Loaded plugins: security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package oracle-validated.x86_64 0:1.0.0-22.el5 set to be updated
--> Processing Dependency: /usr/lib/libaio.so for package: oracle-validated
--> Running transaction check
---> Package libaio-devel.i386 0:0.3.106-5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

==========================================================================================
 Package                    Arch             Version                  Repository     Size
==========================================================================================
Installing:
 oracle-validated           x86_64           1.0.0-22.el5             ol5            16 k
Installing for dependencies:
 libaio-devel               i386             0.3.106-5                ol5            12 k

Transaction Summary
==========================================================================================
Install       2 Package(s)
Upgrade       0 Package(s)

Total download size: 27 k
Is this ok [y/N]: y
Downloading Packages:
------------------------------------------------------------------------------------------
Total                                                      12 MB/s |  27 kB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : libaio-devel                                                       1/2
  Installing     : oracle-validated                                                   2/2 

Installed:
  oracle-validated.x86_64 0:1.0.0-22.el5                                                  

Dependency Installed:
  libaio-devel.i386 0:0.3.106-5                                                           

Complete!

完成对oracle-validated的安装后操作系统软件包环境也就水道渠成了,此外该oracle-validated包还会帮助我们设置必要的Linux内核参数,具体来说它会修改/etc/sysctl.conf配置文件中的参数到Oracle推荐的值,以下为完成oracle-validated安装后的sysctl.conf,供参考:

# Kernel sysctl configuration file for Oracle Enterprise Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 0

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1

# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel

# Controls whether core dumps will append the PID to the core filename
# Useful for debugging multi-threaded applications
kernel.core_uses_pid = 1

# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1

# Controls the maximum size of a message, in bytes

# Controls the default maxmimum size of a mesage queue

# Controls the maximum shared segment size, in bytes

# Controls the maximum number of shared memory segments, in pages

# For 11g, Oracle-Validated setting for fs.file-max is 6815744
# For 10g, uncomment 'fs.file-max = 327679', and comment 'fs.file-max = 6553600' entry and re-run sysctl -p
# fs.file-max = 327679
fs.file-max = 6815744

# Oracle-Validated setting for kernel.msgmni is 2878
kernel.msgmni = 2878

# Oracle-Validated setting for kernel.msgmax is 8192
kernel.msgmax = 8192

# Oracle-Validated setting for kernel.msgmnb is 65536
kernel.msgmnb = 65536

# Oracle-Validated setting for kernel.sem is '250 32000 100 142'
kernel.sem = 250 32000 100 142

# Oracle-Validated setting for kernel.shmmni is 4096
kernel.shmmni = 4096

# Oracle-Validated setting for kernel.shmall is 1073741824
kernel.shmall = 1073741824

# Oracle-Validated setting for kernel.shmmax is 4398046511104 on x86_64 and 4294967295 on i386 architecture. Refer Note id 567506.1
kernel.shmmax = 4398046511104

# Oracle-Validated setting for kernel.sysrq is 1
kernel.sysrq = 1

# Oracle-Validated setting for net.core.rmem_default is 262144
net.core.rmem_default = 262144

# For 11g, Oracle-Validated setting for net.core.rmem_max is 4194304
# For 10g, uncomment 'net.core.rmem_max = 2097152', comment 'net.core.rmem_max = 4194304' entry and re-run sysctl -p
# net.core.rmem_max = 2097152
net.core.rmem_max = 4194304

# Oracle-Validated setting for net.core.wmem_default is 262144
net.core.wmem_default = 262144

# For 11g, Oracle-Validated setting for net.core.wmem_max is 1048576
# For 10g, uncomment 'net.core.wmem_max = 262144', comment 'net.core.wmem_max = 1048576' entry for this parameter and re-run sysctl -p
# net.core.wmem_max = 262144
net.core.wmem_max = 1048576

# Oracle-Validated setting for fs.aio-max-nr is 3145728
fs.aio-max-nr = 3145728

# For 11g, Oracle-Validated setting for net.ipv4.ip_local_port_range is 9000 65500
# For 10g, uncomment 'net.ipv4.ip_local_port_range = 1024 65000', comment 'net.ipv4.ip_local_port_range = 9000 65500' entry and re-run sysctl -p
# net.ipv4.ip_local_port_range = 1024 65000
net.ipv4.ip_local_port_range = 9000 65500

# Oracle-Validated setting for vm.min_free_kbytes is 51200 to avoid OOM killer
vm.min_free_kbytes = 51200

oracle-validated包还会帮助我们修改/etc/security/limits.conf配置以获得合理的shell limit:

[oracle@rh2 ~]$ ulimit  -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 31668
max locked memory       (kbytes, -l) 50000000
max memory size         (kbytes, -m) unlimited
open files                      (-n) 131072
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 131072
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

[oracle@rh2 ~]$ cat /etc/security/limits.conf

# Oracle-Validated setting for nofile soft limit is 131072
oracle   soft   nofile    131072

# Oracle-Validated setting for nofile hard limit is 131072
oracle   hard   nofile    131072

# Oracle-Validated setting for nproc soft limit is 131072
oracle   soft   nproc    131072

# Oracle-Validated setting for nproc hard limit is 131072
oracle   hard   nproc    131072

# Oracle-Validated setting for core soft limit is unlimited
oracle   soft   core    unlimited

# Oracle-Validated setting for core hard limit is unlimited
oracle   hard   core    unlimited

# Oracle-Validated setting for memlock soft limit is 50000000
oracle   soft   memlock    50000000

# Oracle-Validated setting for memlock hard limit is 50000000
oracle   hard   memlock    50000000

Oracle database 11g r2最新安装体验

安装软体分成2个zip包,需要全部解压后方能安装,解压后生成目录database,

linux.x64_11gR2_database_1of2.zip

linux.x64_11gR2_database_2of2.zip

最明显的当然是安装界面风格,整体偏于纯白了,跟r1的蓝白风格有所不同;

11g1

metalink协助在r2中显得更加重要,安全补丁更新已与metalink账号绑定起来;

11g2

我们选择仅安装单实例的软件,不创建数据库。

多出了产品语言的选择界面,但着不同与数据库字符集的选择,主要决定了帮助信息的语言集合。

一般来说不管是开发测试都因该使用enterprise edition,为了统一环境避免麻烦。

选择安装目录,默认是安装在变量ORACLE_BASE目录下:

11g4

安装预检查的内容有不少改动:

11g5

内存安装要求由10g的512M上升到1g,swap需求与当前主机的物理内存大小一致,tmp目录大小要求为1g,

Shell 中hard limit:max open files的要求上升到65536,这要求我们修改/etc/security/limits.conf中oracle的设置。

内核参数fs.file-max的要求上升到6815744,端口限制参数net.ipv4.ip_local_port_range由2000 65000变成9000 65500,net.core.rmem_default参数上升至 262144等。且在10g基础上多出了2个rpm包的安装要求,分别为elfutil-libelf-devel-0.97,该包的具体用途如下:

The elfutils-libelf-devel package contains the libraries to create
applications for handling compiled objects. libelf allows you to
access the internals of the ELF object file format, so you can see the
different sections of an ELF file.

下载地址:elf包

另一个是 unixodbc-devel-2.2.11,描述为:

The unixODBC package can be used to access databases through ODBC
drivers. If you want to develop programs that will access data through
ODBC, you need to install this package.

下载地址为:unixodbc

另安装程序目前会自动生成修改参数的脚本了,点击fix & check again,它会提示你在/tmp/CVU_11.2.0.1.0_oracle目录下的runfixup.sh文件可以帮助修改相关参数,这使安装步骤简便许多。

修改后的sysctl.conf文件内容如下:

net.ipv4.ip_forward = 0

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1

# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0

# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1

kernel.shmall = 2097152
kernel.shmmax = 4589934592
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
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 = 1048576

fs.aio-max-nr = 1048576

上述的2个rpm即使不安装,Oracle软件也可以安装成功,虽然我们不提倡使用ignore选项。

在当前的安装程序中可以保存response file了,这为今后的静默安装提供了方便。

11g6

最后点击 finish,去喝一杯咖啡吧,11g 的安装时间要比10g 长很多,因为相关组件更丰富了,这在之后将介绍。

安装进度条界面:

11g7

安装完成,使用root用户执行root.sh,关闭安装界面。

对比10g与11g的目录,可以发现11g目录下多出了deinstall,dc_ocm,apex,sqldeveloper等子目录。

apex 为Oracle application express 目前已经整合到11g的server端中。

deinstall目录下的deinstall脚本将帮助删除当前Oracle软件并清除oraInventory中的信息。

sqldeveloper为图形界面的sqlplus开发管理工具,大约占用80M空间,一般不会使用到。

转载请注明源地址: https://www.askmac.cn

沪ICP备14014813号-2

沪公网安备 31010802001379号