首页 » ORACLE 9i-23c » RedHat LINUX el 安装UEK内核并安装ORACLE Validated RPM

RedHat LINUX el 安装UEK内核并安装ORACLE Validated RPM

Oracle为Linux推出了坚不可摧的企业级内核Unbreakable Enterprise Kernel, UEK是一个高速的、新式的、可靠的Linux内核,它们自己的Exadata Database Machine就是基于该内核,也是为oracle自己的软、硬个件优化过的内核,也都知道ORACLE和RedHat在linux也搞的不是很愉快,而UEK据说可以在OLTP性能上比Red Hat快50%以上,对SSD访问速度增加一倍多。
出于它的可靠性,对Red Hat Linux升级到UEK不用重装操作系统,也不会影响当前的应用。

下面我升级我的RHEL 5进行安装并安装ORALCE Validated RPM,用它简化ORACLE的安装部署

OEL安装ORACLE Validated 不存在任何问题,并且OEL 5光盘里就有它的安装RPM包,但是Red hat和Centos安装会稍麻烦一些。

Validated可以简化ORACLE安装,比如修改内核参数,查询安装ORACLE RDBMS安装所依赖的包,增加ORACLE用户并修改在OS参数限制用户资源

我的步骤是先升级内核然后安装ORALCE Validated ,出于篇幅原因可能有部分输出被cut。

[root@localhost ~]# lsb_release -a
LSB Version:    :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: RedHatEnterpriseServer
Description:    Red Hat Enterprise Linux Server release 5.5 (Tikanga)
Release:        5.5
Codename:       Tikanga

[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:43 EDT 2010 i686 i686 i386 GNU/Linux

[root@localhost ~]# cd  /etc/yum.repos.d/  
[root@localhost yum.repos.d]# wget http://public-yum.oracle.com/public-yum-el5.repo
--2012-06-05 02:13:23--  http://public-yum.oracle.com/public-yum-el5.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: 3974 (3.9K) [text/plain]
Saving to: `public-yum-el5.repo'

100%[======================================>] 3,974       --.-K/s   in 0.002s  

2012-06-05 02:13:24 (2.09 MB/s) - `public-yum-el5.repo' saved [3974/3974]

[root@localhost ~]# mkdir -p /mnt/cdrom
[root@localhost ~]# mount /dev/cdrom /mnt/cdrom
mount: block device /dev/cdrom is write-protected, mounting read-only
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# vi local_cd.repo

[rhel-cd]
name=rhel 5.5
baseurl=file:///mnt/cdrom/Server/
gpgcheck=0
enabled=1

note:
这是配置本地的安装的yum源,希望有的rpm可以从本地得到,节约网络下载
上面是下载的ORACLE的共享YUM源,里面有OEL5各版本的信息

[root@localhost ~]# yum list
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
el5_latest/primary                                              27% [==============-                                       ]  24 kB/s | 1.8 MB     03:27 ETA 
el5_latest/primary                                              27% [===========el5_latest/primary                                       | 6.6 MB     04:21     
el5_latest                                                            7376/7376
rhel-cd                                                  | 1.3 kB     00:00     
Installed Packages
Deployment_Guide-en-US.noarch               5.2-11                    installed 
GConf2.i386                                 2.14.0-9.el5              installed 
MAKEDEV.i386                                3.23-1.2                  installed 
NetworkManager.i386                         1:0.7.0-10.el5            installed 
NetworkManager-glib.i386                    1:0.7.0-10.el5            installed 
....

[root@localhost ~]# yum -y install kernel-*
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package kernel.i686 0:2.6.18-308.8.1.0.1.el5 set to be installed
---> Package kernel-PAE.i686 0:2.6.18-308.8.1.0.1.el5 set to be installed
---> Package kernel-PAE-devel.i686 0:2.6.18-308.8.1.0.1.el5 set to be installed

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

Total download size: 189 M
Downloading Packages:
(1/27): oraclelinux-release-5-8.0.2.i386.rpm                                                                                          | 2.7 kB     00:00     
(2/27): device-mapper-multipath-0.4.9-46.0.4.el5.i386.rpm                                                                             |  94 kB     00:02     
(3/27): device-mapper-multipath-libs-0.4.9-46.0.4.el5.i386.rpm                                                                        | 152 kB     00:05     
(4/27): ql2xxx-firmware-1.01.01-0.2.el5.noarch.rpm                                                                                    | 442 kB     00:08     
(5/27): kpartx-0.4.9-46.0.4.el5.i386.rpm                                                                                              | 449 kB     00:09     
(6/27): mkinitrd-5.1.19.6-75.0.9.el5.i386.rpm                                                                                         | 482 kB     00:08     
(7/27): kexec-tools-1.102pre-154.0.3.el5.i386.rpm                                                                                     | 582 kB     00:09     
(8/27): iscsi-initiator-utils-6.2.0.872-13.0.1.el5.i386.rpm                                                                           | 1.0 MB     00:20     
(9/27): busybox-1.2.0-13.el5.i386.rpm               


[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:43 EDT 2010 i686 i686 i386 GNU/Linux
[root@localhost ~]# reboot

Broadcast message from root (pts/2) (Tue Jun  5 03:16:50 2012):

The system is going down for reboot NOW!

[root@localhost yum.repos.d]# mount /dev/cdrom /mnt/cdrom
mount: block device /dev/cdrom is write-protected, mounting read-only
[root@localhost yum.repos.d]# cd /mnt/cdrom/Server/
[root@localhost Server]# ls |wc -l
2350
[root@localhost ~]# lsb_release  -a
LSB Version:    :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: RedHatEnterpriseServer
Description:    Red Hat Enterprise Linux Server release 5.5 (Tikanga)
Release:        5.5
Codename:       Tikanga


OK,等了半个小时后内核升级成功

[root@localhost ~]# ls
anaconda-ks.cfg  Desktop  install.log  install.log.syslog  oracle-validated-1.0.0-5.el5.i386.rpm
[root@localhost ~]# yum install oracle-validated-1.0.0-5.el5.i386.rpm 
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
el5_latest                                                                                                                            | 1.1 kB     00:00     
file:///mnt/cdrom/Server/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: '/mnt/cdrom/Server/repodata/repomd.xml'
Trying other mirror.
Setting up Install Process
Examining oracle-validated-1.0.0-5.el5.i386.rpm: oracle-validated-1.0.0-5.el5.i386
Marking oracle-validated-1.0.0-5.el5.i386.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package oracle-validated.i386 0:1.0.0-5.el5 set to be updated
--> Processing Dependency: enterprise-release < 6:6 for package: oracle-validated
--> Processing Dependency: enterprise-release >= 6:5 for package: oracle-validated
--> Processing Dependency: compat-db for package: oracle-validated
--> Processing Dependency: compat-gcc-34 for package: oracle-validated
--> Processing Dependency: compat-gcc-34-c++ for package: oracle-validated
--> Processing Dependency: compat-libstdc++-33 for package: oracle-validated
--> Processing Dependency: elfutils-libelf-devel for package: oracle-validated
--> Processing Dependency: libXp for package: oracle-validated
--> Processing Dependency: libaio-devel for package: oracle-validated
--> Processing Dependency: sysstat for package: oracle-validated
--> Processing Dependency: unixODBC for package: oracle-validated
--> Processing Dependency: unixODBC-devel for package: oracle-validated

Total size: 19 M
Total download size: 19 M
Is this ok [y/N]: y
Downloading Packages:
(1/13): enterprise-release-5-8.0.3.i386.rpm                                                                                           |  29 kB     00:00     
(2/13): sysstat-7.0.2-11.el5.i386.rpm                                                                                                 | 182 kB     00:03     
(3/13): unixODBC-2.2.11-10.el5.i386.rpm                                                                                               | 290 kB     00:04     
(4/13): unixODBC-libs-2.2.11-10.el5.i386.rpm                                                                                          | 551 kB     00:11     
(5/13): unixODBC-devel-2.2.11-10.el5.i386.rpm                                                                                         | 738 kB     00:08     
(6/13): compat-gcc-34-3.4.6-4.1.i386.rpm                                                                                              | 4.0 MB     00:33     
(7/13): compat-gcc-34-c++-3.4.6-4.1.i386.rpm                                                                                          |  11 MB     01:37     

...

Downloading Packages:
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                        267 MB/s | 2.0 MB     00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : unixODBC-libs                                                                                                                        1/15 
  Installing     : unixODBC                                                                                                                             2/15 
  Installing     : compat-gcc-34                                                                                                                        3/15 
  Installing     : compat-gcc-34-c++                                                                                                                    4/15 
  Installing     : libXp                                                                                                                                5/15 
  Installing     : compat-db                                                                                                                            6/15 
  Installing     : compat-libstdc++-33                                                                                                                  7/15 
  Installing     : sysstat                                                                                                                              8/15 
  Installing     : unixODBC-devel                                                                                                                       9/15 
  Installing     : enterprise-release                                                                                                                  10/15 
  Installing     : libaio-devel                                                                                                                        11/15 
  Installing     : elfutils-libelf-devel                                                                                                               12/15 
  Installing     : elfutils-libelf-devel-static                                                                                                        13/15 
  Installing     : oracle-validated                                                                                                                    14/15 
  Erasing        : redhat-release                                                                                                                      15/15 

Installed:
  enterprise-release.i386 6:5-8.0.3                                            oracle-validated.i386 0:1.0.0-5.el5                                           

Dependency Installed:
  compat-db.i386 0:4.2.52-5.1                   compat-gcc-34.i386 0:3.4.6-4.1                     compat-gcc-34-c++.i386 0:3.4.6-4.1                       
  compat-libstdc++-33.i386 0:3.2.3-61           elfutils-libelf-devel.i386 0:0.137-3.el5           elfutils-libelf-devel-static.i386 0:0.137-3.el5          
  libXp.i386 0:1.0.0-8.1.el5                    libaio-devel.i386 0:0.3.106-5                      sysstat.i386 0:7.0.2-11.el5                              
  unixODBC.i386 0:2.2.11-10.el5                 unixODBC-devel.i386 0:2.2.11-10.el5                unixODBC-libs.i386 0:2.2.11-10.el5                       

Replaced:
  redhat-release.i386 0:5Server-5.5.0.2                                                                                                                      

Complete!
[root@localhost ~]# id oracle
uid=501(oracle) gid=501(dba) groups=501(dba),502(oinstall) context=root:system_r:unconfined_t:SystemLow-SystemHigh
[root@localhost ~]# more /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

# 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
kernel.msgmnb = 65536

# 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
fs.file-max=327679
kernel.msgmni=2878
kernel.msgmax=8192
kernel.sem=250 32000 100 142
kernel.shmmni=4096
kernel.shmall=3279547
kernel.sysrq=1
net.core.rmem_default=262144
# For 11g recommended value for net.core.rmem_max is 4194304
net.core.rmem_max=4194304
# For 10g uncomment the following line, comment other entries for this parameter and re-run sysctl -p
# net.core.rmem_max=2097152
net.core.wmem_default=262144
net.core.wmem_max=262144
fs.aio-max-nr=3145728
net.ipv4.ip_local_port_range=1024 65000
kernel.shmmax=1055627264


[root@localhost ~]# vi /etc/security/limits.conf

oracle  soft    nofile  131072
oracle  hard    nofile  131072
oracle  soft    nproc   131072
oracle  hard    nproc   131072
oracle  soft    core    unlimited
oracle  hard    core    unlimited
oracle  soft    memlock 3500000
oracle  hard    memlock 3500000

[root@localhost results]# cd /etc/sysconfig/oracle-validated/results/

[root@localhost results]# ls
hangcheck  kernel_bootparams.org  orakernel.log

ok validated安装成功

note:
修改了内核参数和user限制,内核优化默认是ORACLE11G,原文件会自动备份当前目录下加上.orabackup
也可以查看orakernel.log日志

打赏

目前这篇文章有1条评论(Rss)评论关闭。

  1. admin | #1
    2012-06-07 at 10:08

    1
    1
    1

    ORACLE VALIDATED

    下面我能CENTOS 5.6为例
    [root@aix ~]# 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: CentOS
    Description: CentOS release 5.6 (Final)
    Release: 5.6
    Codename: Final
    [root@aix ~]# uname -a
    Linux aix 2.6.18-238.el5 #1 SMP Thu Jan 13 15:51:15 EST 2011 x86_64 x86_64 x86_64 GNU/Linux

    下载三个包
    [root@aix ~]# wget http://linux-update.oracle.com/rpms/up2date-5.10.1-40.8.el5.x86_64.rpm

    wget http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/0/base/i386/pyOpenSSL-0.6-1.p24.7.2.2.i386.rpm

    [root@aix ~]# wget http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/0/base/i386/rhnlib-2.2.5-1.el5.noarch.rpm
    这三个有依赖关系

    [root@aix ~]# ls
    mnt pyOpenSSL-0.6-1.p24.7.2.2.i386.rpm up2date-5.10.1-40.8.el5.x86_64.rpm zabbix-1.8.6.tar.gz
    oracle-validated-1.0.0-5.el5.i386.rpm rhnlib-2.2.5-1.el5.noarch.rpm zabbix-1.8.6

    把刚下的三个包安装上rpm -ivh

    下载oracle public yum源
    [root@aix ~]# cd /etc/yum.repos.d/
    [root@aix yum.repos.d]# wget http://public-yum.oracle.com/public-yum-el5.repo

    启用所有源
    vi public-yum-el5.repo

    :%s/enabled=0/enabled=1
    :wq

    下载64位validated rpm
    [root@aix ~]# wget http://oss.oracle.com/el5/oracle-validated/oracle-validated-1.1.0-7.el5.x86_64.rpm

    yum安装validated
    [root@aix ~]# yum install oracle-validated-1.1.0-7.el5.x86_64.rpm
    如果提示
    Existing lock /var/run/yum.pid: another copy is running as pid 5575.
    Another app is currently holding the yum lock; waiting for it to exit…
    The other application is: yum-updatesd-he

    [root@aix ~]# ps -ef|grep 5575
    root 5575 2884 1 16:49 ? 00:00:02 /usr/bin/python -tt /usr/libexec/yum-updatesd-helper –check –dbus
    root 5610 5465 0 16:54 pts/0 00:00:00 grep 5575
    [root@aix ~]# kill 5575
    再重试yun install

    然后就是下载安装,如果中途RPM有失败,yun install可以反复试
    直到看到
    Dependency Updated:
    device-mapper-multipath.x86_64 0:0.4.9-46.0.4.el5 irqbalance.x86_64 2:0.55-17.el5 kpartx.x86_64 0:0.4.9-46.0.4.el5 mkinitrd.i386 0:5.1.19.6-75.0.9.el5
    mkinitrd.x86_64 0:5.1.19.6-75.0.9.el5 nash.x86_64 0:5.1.19.6-75.0.9.el5

    Replaced:
    kernel-headers.x86_64 0:2.6.18-238.el5

    Complete!

    OK,安装完成。