澳门威尼斯人登陆VirtualBox下安装RHEL5.5与Oracle 11g步骤

1、操作系统版本:

BKJIA精选】截止到目前,还没有传出Oracle 10g/11g在RHEL
6上认证的消息,也就是说还不建议大家在RHEL 6的生产环境中使用Oracle
10g/11g。不过最近看到有些朋友问在最新发布的CentOS 6上如何安装Oracle
10g,需要做测试用,而且安装过程中出现了一些问题,所以BKJIA编辑决定收集一下这方面的资源,以供参考。

  1. 编辑 hosts 文件:/etc/hosts

公司新配的一个环境,需要在虚拟机环境下安装RHEL(即Red Hat EnterPrise
Linux,下同)5.5 64位及Oracle 11g
64位,为此折腾了整整三天,个中苦痛,唯有亲历者知之。在此,顺手记下过程,希望别人能少走些弯路。

RHEL5.5 64位下安装Oracle 11g 64位安装前置条件(即RPM包)有如下两种方式:

操作系统为红帽公司最新的企业版Red
Hat Enterprise Linux
Server release 5.5 (Tikanga)版本,系统的安装请参阅其他文章。

理论上,CentOS 6上的操作方式应该和RHEL
6一样,软件源方面大家自己想办法解决吧,BKJIA之前也收集过一些RHEL
6的yum源方面的信息,可以做个参考。

首先,在虚拟机的的选择上,可选项:

一、RPM方式:安装Oracle所需的全部运行库(在RHEL光驱的Server目录下)

2、Drbd、Heartbeat 文件版本及简介:

如何在RHEL 6上安装Oracle 10g R2x86)

# hostname loopback address
ip_address    hostname

(1)微软的Hyper-V,好处是微软已经在Win8的企业版中集成了,直接安装即可,但是很郁闷的是对RHEL的支持很弱,连网卡都找不到,虽然可以打补丁,做个“旧网络适配器”等,但总觉得很别扭,用完后,飞速删除,并决定永不录用。

以root登录,执行如下命令:

Cluster-Resource-Agents-agents-1.0.3.tar.bz2

预备工作

  1. 挂载操作系统光盘

(2)大名鼎鼎的VMware-workstation,9.0版已经提供对Win8的完美支持了,安装Red
Hat Enterprise Linux更是超强,自动以Easy
Installer模式一键安装,兼容性也相当好,使用中没有异常关机等。驱动更是非常令人赞赏,与宿主机的双向文本互拷更是让人心旷神怡,惟一的缺点是块头大,有400M。

cd /media/RHEL_5.5\ x86_64\ DVD/Server
rpm -Uvh binutils-2.*
rpm -Uvh compat-libstdc++-33*
rpm -Uvh compat-libstdc++-33*.i386.rpm
rpm -Uvh elfutils-libelf*
rpm -Uvh gcc-4.*
rpm -Uvh gcc-c++-4.*
rpm -Uvh glibc-2.*
rpm -Uvh glibc-common-2.*
rpm -Uvh glibc-devel-2.*
rpm -Uvh glibc-headers-2.*
rpm -Uvh ksh*
rpm -Uvh libaio-0.*
rpm -Uvh libaio-devel-0.*
rpm -Uvh libgomp-4.*
rpm -Uvh libgcc-4.*
rpm -Uvh libstdc++-4.*
rpm -Uvh libstdc++-devel-4.*
rpm -Uvh make-3.*
rpm -Uvh sysstat-7.*
rpm -Uvh unixODBC-2.*
rpm -Uvh unixODBC-devel-2.*
rpm -Uvh numactl-devel-*

Reusable-Cluster-Components-glue-1.0.6.tar.bz2

RHEL 6.0的服务器

(3)Oracle提供的VM VirtualBox
4.2,只有不到100M的大小,文本互拷需要安装完成后单独安装增强组件,即Guest
Additions,另外,驱动兼容性也不是很好,在使用中有时不能正常Shutdown。最后还是选择了它。

二、Yum方式:在线安装

Heartbeat-3-0-STABLE-3.0.3.tar.bz2

类型 描述 版本 文件名称 下载站点
DB Oracle 10g R2 10.2.0.1.0 10201_database_linux32.zip oracle.com
DB Oracle 10g R2 Companion CD 10.2.0.1.0 10201_companion_linux32.zip oracle.com
DB Oracle 10g R2 patch-set 10.2.0.4.0 p6810189_10204_Linux-x86.zip support.oracle.com
TOOLS oraToolKit 1.0.2.1.5 oratoolkit-1.0.2.1.5-1.noarch.rpm sourceforge.net
OS Red Hat Enterprise Linux 6.0 rhel-server-6.0-i386-dvd.iso redhat.com
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom

下载地址(含扩展包):

以root账号登录,输入:

Pacemaker-1-0-Pacemaker-1.0.9.tar.bz2

安装步骤:

如果是 ISO 文件,可采用如下方式挂载:
mount -o loop redhat6.iso /mnt/cdrom

安装过程共分三部分:

cd /etc/yum.repos.d

wget http://public-yum.oracle.com/public-yum-el5.repo

yum install oracle-validated

Pacemaker-Python-GUI-pacemaker-mgmt-2.0.0.tar.bz2

安装Korn Shell和oraToolKit

  1. 编辑 /etc/yum.repo.d/rhel-source.repo 文件,配置本地 YUM 源

(一)VirtualBox安装RHEL5.5

安装过程如下:

以上软件包均为Heartbeat双机软件的功能模块包,主要支持双机Ha的应用及管理功能

# su - root
# mount /dev/cdrom /mnt;
# rpm -ivh /mnt/Server/Packages/ksh-20100621-2.el6.i686.rpm
# cd /var/tmp/oracle
# ls -1 oratool*
oratoolkit-1.0.2.1.5-1.noarch.rpm
# rpm -ivh oratoolkit-1.0.2.1.5-1.noarch.rpm

启动VirtualBox,设置2G内存,20G空间,载入rhel-server-5.5-x86_64-dvd.ISO,即开始安装,安装界面就略过了,只是网卡设置为DHCP,禁用防火墙及SELINUX。

Loaded plugins: product-id, security, subscription-manager
Updating Red Hat repositories.
el5_latest                                               | 1.4 kB     00:00     
el5_latest/primary                                       |  11 MB     21:43     
el5_latest                                                            9613/9613
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package oracle-validated.x86_64 0:1.1.0-15.el5 set to be updated
el5_latest/filelists                                     |  18 MB     14:31     
--> Processing Dependency: irqbalance >= 2:0.55-16 for package: oracle-validated
--> Processing Dependency: kernel-uek >= 2.6.32 for package: oracle-validated
--> Processing Dependency: libXp.so.6 for package: oracle-validated
--> Processing Dependency: /usr/lib/libodbccr.so for package: oracle-validated
--> Processing Dependency: /usr/lib64/libodbccr.so for package: oracle-validated
--> Processing Dependency: unixODBC-devel for package: oracle-validated
--> Processing Dependency: libaio-devel for package: oracle-validated
--> Processing Dependency: /usr/lib64/libaio.so for package: oracle-validated
--> Processing Dependency: /usr/lib/libodbc.so.1 for package: oracle-validated
--> Processing Dependency: sysstat for package: oracle-validated
--> Processing Dependency: /usr/lib/libaio.so for package: oracle-validated
--> Processing Dependency: oraclelinux-release for package: oracle-validated
--> Processing Dependency: libodbc.so.1()(64bit) for package: oracle-validated
--> Running transaction check
---> Package irqbalance.x86_64 2:0.55-17.el5 set to be updated
---> Package kernel-uek.x86_64 0:2.6.32-300.32.3.el5uek set to be updated
--> Processing Dependency: kernel-firmware = 2.6.32-300.32.3.el5uek for package: kernel-uek
--> Processing Dependency: device-mapper-multipath >= 0.4.9-23.0.1.el5 for package: kernel-uek
--> Processing Dependency: mkinitrd >= 5.1.19.6-75.0.5 for package: kernel-uek
--> Processing Dependency: ql2xxx-firmware for package: kernel-uek
---> Package libXp.i386 0:1.0.0-8.1.el5 set to be updated
---> Package libaio-devel.i386 0:0.3.106-5 set to be updated
---> Package libaio-devel.x86_64 0:0.3.106-5 set to be updated
---> Package oraclelinux-release.x86_64 0:5-8.0.2 set to be updated
---> Package sysstat.x86_64 0:7.0.2-11.el5 set to be updated
---> Package unixODBC-devel.i386 0:2.2.11-10.el5 set to be updated
--> Processing Dependency: unixODBC = 2.2.11-10.el5 for package: unixODBC-devel
---> Package unixODBC-devel.x86_64 0:2.2.11-10.el5 set to be updated
---> Package unixODBC-libs.i386 0:2.2.11-10.el5 set to be updated
---> Package unixODBC-libs.x86_64 0:2.2.11-10.el5 set to be updated
--> Running transaction check
---> Package device-mapper-multipath.x86_64 0:0.4.9-46.0.5.el5 set to be updated
--> Processing Dependency: kpartx = 0.4.9-46.0.5.el5 for package: device-mapper-multipath
--> Processing Dependency: device-mapper-multipath-libs = 0.4.9-46.0.5.el5 for package: device-mapper-multipath
--> Processing Dependency: libmultipath.so()(64bit) for package: device-mapper-multipath
---> Package kernel-uek-firmware.noarch 0:2.6.32-300.32.3.el5uek set to be updated
---> Package mkinitrd.i386 0:5.1.19.6-75.0.9.el5 set to be updated
--> Processing Dependency: nash = 5.1.19.6-75.0.9.el5 for package: mkinitrd
---> Package mkinitrd.x86_64 0:5.1.19.6-75.0.9.el5 set to be updated
---> Package ql2xxx-firmware.noarch 0:1.01.01-0.2.el5 set to be updated
---> Package unixODBC.x86_64 0:2.2.11-10.el5 set to be updated
--> Running transaction check
---> Package device-mapper-multipath-libs.x86_64 0:0.4.9-46.0.5.el5 set to be updated
---> Package kpartx.x86_64 0:0.4.9-46.0.5.el5 set to be updated
---> Package nash.x86_64 0:5.1.19.6-75.0.9.el5 set to be updated
--> Processing Conflict: kernel-uek conflicts udev < 095-14.27.0.1.el5_7.1
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package udev.x86_64 0:095-14.27.0.3.el5_7.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                      Arch   Version                   Repository  Size
================================================================================
Installing:
 oracle-validated             x86_64 1.1.0-15.el5              el5_latest  24 k
Updating:
 udev                         x86_64 095-14.27.0.3.el5_7.1     el5_latest 2.4 M
Installing for dependencies:
 device-mapper-multipath-libs x86_64 0.4.9-46.0.5.el5          el5_latest 168 k
 kernel-uek                   x86_64 2.6.32-300.32.3.el5uek    el5_latest  26 M
 kernel-uek-firmware          noarch 2.6.32-300.32.3.el5uek    el5_latest 3.7 M
 libXp                        i386   1.0.0-8.1.el5             el5_latest  22 k
 libaio-devel                 i386   0.3.106-5                 el5_latest  12 k
 libaio-devel                 x86_64 0.3.106-5                 el5_latest  11 k
 oraclelinux-release          x86_64 5-8.0.2                   el5_latest 2.7 k
 ql2xxx-firmware              noarch 1.01.01-0.2.el5           el5_latest 442 k
 sysstat                      x86_64 7.0.2-11.el5              el5_latest 187 k
 unixODBC                     x86_64 2.2.11-10.el5             el5_latest 291 k
 unixODBC-devel               i386   2.2.11-10.el5             el5_latest 738 k
 unixODBC-devel               x86_64 2.2.11-10.el5             el5_latest 793 k
 unixODBC-libs                i386   2.2.11-10.el5             el5_latest 551 k
 unixODBC-libs                x86_64 2.2.11-10.el5             el5_latest 554 k
Updating for dependencies:
 device-mapper-multipath      x86_64 0.4.9-46.0.5.el5          el5_latest  97 k
 irqbalance                   x86_64 2:0.55-17.el5             el5_latest  21 k
 kpartx                       x86_64 0.4.9-46.0.5.el5          el5_latest 465 k
 mkinitrd                     i386   5.1.19.6-75.0.9.el5       el5_latest 482 k
 mkinitrd                     x86_64 5.1.19.6-75.0.9.el5       el5_latest 471 k
 nash                         x86_64 5.1.19.6-75.0.9.el5       el5_latest 1.4 M

Transaction Summary
================================================================================
Install      15 Package(s)
Upgrade       7 Package(s)

Total download size: 38 M
Is this ok [y/N]: y
Downloading Packages:
(1/22): oraclelinux-release-5-8.0.2.x86_64.rpm           | 2.7 kB     00:00     
(2/22): libaio-devel-0.3.106-5.x86_64.rpm                |  11 kB     00:00     
(3/22): libaio-devel-0.3.106-5.i386.rpm                  |  12 kB     00:00     
(4/22): irqbalance-0.55-17.el5.x86_64.rpm                |  21 kB     00:00     
(5/22): libXp-1.0.0-8.1.el5.i386.rpm                     |  22 kB     00:00     
(6/22): oracle-validated-1.1.0-15.el5.x86_64.rpm         |  24 kB     00:00     
(7/22): device-mapper-multipath-0.4.9-46.0.5.el5.x86_64. |  97 kB     00:01     
(8/22): device-mapper-multipath-libs-0.4.9-46.0.5.el5.x8 | 168 kB     00:03     
(9/22): sysstat-7.0.2-11.el5.x86_64.rpm                  | 187 kB     00:04     
(10/22): unixODBC-2.2.11-10.el5.x86_64.rpm               | 291 kB     00:14     
(11/22): ql2xxx-firmware-1.01.01-0.2.el5.noarch.rpm      | 442 kB     00:21     
(12/22): kpartx-0.4.9-46.0.5.el5.x86_64.rpm              | 465 kB     00:10     
(13/22): mkinitrd-5.1.19.6-75.0.9.el5.x86_64.rpm         | 471 kB     00:26     
(14/22): mkinitrd-5.1.19.6-75.0.9.el5.i386.rpm           | 482 kB     00:24     
(15/22): unixODBC-libs-2.2.11-10.el5.i386.rpm            | 551 kB     00:17     
(16/22): unixODBC-libs-2.2.11-10.el5.x86_64.rpm          | 554 kB     00:15     
(17/22): unixODBC-devel-2.2.11-10.el5.i386.rpm           | 738 kB     00:15     
(18/22): unixODBC-devel-2.2.11-10.el5.x86_64.rpm         | 793 kB     00:23     
(19/22): nash-5.1.19.6-75.0.9.el5.x86_64.rpm             | 1.4 MB     00:48     
(20/22): udev-095-14.27.0.3.el5_7.1.x86_64.rpm           | 2.4 MB     00:59     
(21/22): kernel-uek-firmware-2.6.32-300.32.3.el5uek.noar | 3.7 MB     02:36     
(22/22): kernel-uek-2.6.32-300.32.3.el5uek.x86_64.rpm    |  26 MB     09:05     
--------------------------------------------------------------------------------
Total                                            39 kB/s |  38 MB     17:00     
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 1e5e0159
el5_latest/gpgkey                                        | 1.4 kB     00:00     
Importing GPG key 0x1E5E0159 "Oracle OSS group (Open Source Software group) <build@oss.oracle.com>" from http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating       : kpartx                                                  1/29 
  Updating       : udev                                                    2/29 
  Installing     : unixODBC-libs                                           3/29 
  Installing     : unixODBC                                                4/29 
  Installing     : sysstat                                                 5/29 
  Updating       : irqbalance                                              6/29 
  Installing     : device-mapper-multipath-libs                            7/29 
  Updating       : device-mapper-multipath                                 8/29 
  Installing     : unixODBC-libs                                           9/29 
  Installing     : oraclelinux-release                                    10/29 
  Updating       : nash                                                   11/29 
  Updating       : mkinitrd                                               12/29 
  Installing     : unixODBC-devel                                         13/29 
  Installing     : unixODBC-devel                                         14/29 
  Installing     : kernel-uek-firmware                                    15/29 
  Installing     : ql2xxx-firmware                                        16/29 
  Installing     : kernel-uek                                             17/29 
  Installing     : libaio-devel                                           18/29 
  Installing     : libaio-devel                                           19/29 
  Installing     : libXp                                                  20/29 
  Installing     : oracle-validated                                       21/29 
  Updating       : mkinitrd                                               22/29 
  Cleanup        : irqbalance                                             23/29 
  Cleanup        : udev                                                   24/29 
  Cleanup        : mkinitrd                                               25/29 
  Cleanup        : nash                                                   26/29 
  Cleanup        : kpartx                                                 27/29 
  Cleanup        : device-mapper-multipath                                28/29 
  Cleanup        : mkinitrd                                               29/29 
duration: 3968(ms)
Installed products updated.

Installed:
  oracle-validated.x86_64 0:1.1.0-15.el5                                        

Dependency Installed:
  device-mapper-multipath-libs.x86_64 0:0.4.9-46.0.5.el5                        
  kernel-uek.x86_64 0:2.6.32-300.32.3.el5uek                                    
  kernel-uek-firmware.noarch 0:2.6.32-300.32.3.el5uek                           
  libXp.i386 0:1.0.0-8.1.el5                                                    
  libaio-devel.i386 0:0.3.106-5                                                 
  libaio-devel.x86_64 0:0.3.106-5                                               
  oraclelinux-release.x86_64 0:5-8.0.2                                          
  ql2xxx-firmware.noarch 0:1.01.01-0.2.el5                                      
  sysstat.x86_64 0:7.0.2-11.el5                                                 
  unixODBC.x86_64 0:2.2.11-10.el5                                               
  unixODBC-devel.i386 0:2.2.11-10.el5                                           
  unixODBC-devel.x86_64 0:2.2.11-10.el5                                         
  unixODBC-libs.i386 0:2.2.11-10.el5                                            
  unixODBC-libs.x86_64 0:2.2.11-10.el5                                          

Updated:
  udev.x86_64 0:095-14.27.0.3.el5_7.1                                           

Dependency Updated:
  device-mapper-multipath.x86_64 0:0.4.9-46.0.5.el5                             
  irqbalance.x86_64 2:0.55-17.el5                                               
  kpartx.x86_64 0:0.4.9-46.0.5.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                                             

Complete!

drbd-8.3.8.1.tar.gz
DRBD软件包,DRBD实际是一种块设备的实现,主要被用于Linux平台下的高可用方案之中,它是和内核模块和相关程序而组成,通过网络通信来同步镜像整个定义的块设备,确保本地节点与远程节点的数据可以保证实时地同步,并保证IO的一致性,以达到高可用的目的。

澳门威尼斯人登陆 ,设置用户oracle的密码

[local-yum]
name=RHEL6 ISO
baseurl=file:///mnt/cdrom/Server
enabled=1
gpgcheck=0

具体的安装过程看下边的视频:

 

10201_database_linux32.zip
Oracle10G2数据库软件包。

# passwd oracle
  1. 更新本地 YUM 缓存

 

参考:

免费下载地址在

检查安装包依赖性

特别是视频的最后部分,用
Setup命令设置静态IP,尤为重要,毕竟你不想重启一下虚拟机,你的IP就沉大海吧?

用户名与密码都是www.linuxidc.com

# /opt/oracle/otk/current/bin/installManager swReqCheck osSetup10gR2.cfg
yum clean all && yum makecache

本文中的示例是静态IP:10.0.2.15/255.0.0.0,DNS为10.0.2.20(即VirtualBox
Host-Only Ethernet
Adapter对应的静态IP),并在VirtualBox中将默认的NAT方式改为VirtualBox
Host-Only Ethernet Adapter

具体下载目录在
/2011年资料/数据库知识/Oracle教程知识/RHEL5.5+DRBD+Heartbeat+Oracle 10g
R2 双机安装实例/

如果有缺少什么就补上,补完了再运行一次,直到没有警告了再继续下一步。

  1. 安装 oracle 所需的依赖包 yum install ...

启动后应该可以从宿主机Ping通10.0.2.15即可。

澳门威尼斯人登陆 1

下面是从DVD补完依赖性的参考操作:

安装“增强组件”

# cd /mnt/Server/Packages/
# rpm -ivh libstdc++-devel-4.4.4-13.el6.i686.rpm \
           kernel-headers-2.6.32-71.el6.i686.rpm \
           glibc-headers-2.12-1.7.el6.i686.rpm \
           glibc-devel-2.12-1.7.el6.i686.rpm \
           gnome-icon-theme-2.28.0-2.el6.noarch.rpm \
           dmz-cursor-themes-0.4-4.el6.noarch.rpm \
           sgml-common-0.6.3-32.el6.noarch.rpm \
           libaio-devel-0.3.107-10.el6.i686.rpm \
           ncurses-devel-5.7-3.20090208.el6.i686.rpm  \
           elfutils-libelf-devel-0.148-1.el6.i686.rpm \
           compat-gcc-34-3.4.6-19.el6.i686.rpm \
           libXxf86misc-1.0.2-1.el6.i686.rpm \
           libXxf86vm-1.1.0-1.el6.i686.rpm \
           libXt-1.0.7-1.el6.i686.rpm \
           libXmu-1.0.5-1.el6.i686.rpm \
           mpfr-2.4.1-6.el6.i686.rpm \
           cpp-4.4.4-13.el6.i686.rpm \
           xorg-x11-xauth-1.0.2-7.1.el6.i686.rpm \
           compat-gcc-34-c++-3.4.6-19.el6.i686.rpm \
           libdaemon-0.14-1.el6.i686.rpm \
           avahi-0.6.25-8.el6.i686.rpm \
           avahi-glib-0.6.25-8.el6.i686.rpm \
           shared-mime-info-0.70-4.el6.i686.rpm \
           libIDL-0.8.13-2.1.el6.i686.rpm \
           ORBit2-2.14.17-3.1.el6.i686.rpm \
           GConf2-2.28.0-6.el6.i686.rpm \
           gnome-vfs2-2.24.2-6.el6.i686.rpm \
           libbonobo-2.24.2-4.el6.i686.rpm \
           libtool-ltdl-2.2.6-15.5.el6.i686.rpm \
           unixODBC-2.2.14-11.el6.i686.rpm \
           gtk2-engines-2.18.4-5.el6.i686.rpm \
           libmcpp-2.7.2-4.1.el6.i686.rpm \
           mcpp-2.7.2-4.1.el6.i686.rpm \
           xorg-x11-server-utils-7.4-15.el6.i686.rpm \
           libXv-1.0.5-1.el6.i686.rpm \
           ConsoleKit-x11-0.4.1-3.el6.i686.rpm \
           xorg-x11-xinit-1.0.9-13.el6.i686.rpm \
           libXp-1.0.0-15.1.el6.i686.rpm \
           libXxf86dga-1.1.1-1.el6.i686.rpm \
           libdmx-1.1.0-1.el6.i686.rpm \
           xorg-x11-utils-7.4-8.el6.i686.rpm \
           compat-db43-4.3.29-15.el6.i686.rpm \
           compat-db42-4.2.52-15.el6.i686.rpm \
           ppl-0.10.2-11.el6.i686.rpm \
           cloog-ppl-0.15.7-1.2.el6.i686.rpm \
           gcc-4.4.4-13.el6.i686.rpm \
           gcc-c++-4.4.4-13.el6.i686.rpm \
           compat-libstdc++-33-3.2.3-69.el6.i686.rpm \
           compat-db-4.6.21-15.el6.i686.rpm \
           gnome-themes-2.28.1-6.el6.noarch.rpm \
           system-icon-theme-6.0.0-2.el6.noarch.rpm \
           system-gnome-theme-60.0.2-1.el6.noarch.rpm \
           unixODBC-devel-2.2.14-11.el6.i686.rpm \
           readline-devel-6.0-3.el6.i686.rpm \
           libgnome-2.28.0-11.el6.i686.rpm
# cd /; umount /mnt; eject
# /opt/oracle/otk/current/bin/installManager swReqCheck osSetup10gR2.cfg
binutils-2.20.51.0.2-5.11.el6 (x86_64)
compat-libcap1-1.10-1 (x86_64)
compat-libstdc++-33-3.2.3-69.el6 (x86_64)
compat-libstdc++-33-3.2.3-69.el6.i686
gcc-4.4.4-13.el6 (x86_64)
gcc-c++-4.4.4-13.el6 (x86_64)
glibc-2.12-1.7.el6 (i686)
glibc-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6.i686
ksh
libgcc-4.4.4-13.el6 (i686)
libgcc-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6.i686
libstdc++-devel-4.4.4-13.el6 (x86_64)
libstdc++-devel-4.4.4-13.el6.i686
libaio-0.3.107-10.el6 (x86_64)
libaio-0.3.107-10.el6.i686
libaio-devel-0.3.107-10.el6 (x86_64)
libaio-devel-0.3.107-10.el6.i686
make-3.81-19.el6
sysstat-9.0.4-11.el6 (x86_64)
unixODBC-2.2.14-11.el6 (x86_64)
unixODBC-2.2.14-11.el6.i686
unixODBC-devel-2.2.14-11.el6 (x86_64)
unixODBC-devel-2.2.14-11.el6.i686
elfutils-libelf-devel-0.125

澳门威尼斯人登陆 2

如果要使用增强的sql*plus……

  1. 编辑 /etc/security/limits.conf,修改限制 oracle 用户的资源使用

然后在登录后可以看到光驱镜像,输入下列命令:

# cd /opt/oracle/otk/current/tools/rlwrap/
# ./configure
# make
# make install
# /usr/local/bin/rlwrap -v

澳门威尼斯人登陆 3

执行installManager的osSetup

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240

安装完后,Poweroff即可,重启后即可实现虚拟机与宿主机之间粘贴文本

这一步用来设置内核参数、创建路径、文件所有者和其他一些参数设置。如果想进行默认安装那就啥都别动。

  1. 编辑 /etc/sysctl.conf,修改 Linux 内核参数

此时可以做个备份。

# cd /opt/oracle/otk/current/conf/installManager/
# vi osSetup10gR2.cfg
# sdiff -s osSetup10gR2.cfg sample/osSetup10gR2.cfg
# /opt/oracle/otk/current/bin/installManager osSetup osSetup10gR2.cfg

\https”h[^”]*”

将Oracle软件移入软件源

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
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 = 1048576

(二)配置RHEL5.5的基本环境

Oracle软件就是上面你下载下来的那个。

  1. 使修改的参数生效

配置JDK和Oracle用户组等

# cd /var/tmp/oracle
# chown oracle:oinstall *
# mv 10201_database_linux32.zip 10201_companion_linux32.zip p6810189_10204_Linux-x86.zip /var/opt/oracle/repository/

安装Oracle所需的全部运行库(在RHEL光驱的Server目录下)

以oracle身份登录,对PS1变量进行设置

sysctl -p

cd /media/RHEL_5.5\ x86_64\ DVD/Server
rpm -Uvh binutils-2.*
rpm -Uvh compat-libstdc++-33*
rpm -Uvh compat-libstdc++-33*.i386.rpm
rpm -Uvh elfutils-libelf*
rpm -Uvh gcc-4.*
rpm -Uvh gcc-c++-4.*
rpm -Uvh glibc-2.*
rpm -Uvh glibc-common-2.*
rpm -Uvh glibc-devel-2.*
rpm -Uvh glibc-headers-2.*
rpm -Uvh ksh*
rpm -Uvh libaio-0.*
rpm -Uvh libaio-devel-0.*
rpm -Uvh libgomp-4.*
rpm -Uvh libgcc-4.*
rpm -Uvh libstdc++-4.*
rpm -Uvh libstdc++-devel-4.*
rpm -Uvh make-3.*
rpm -Uvh sysstat-7.*
rpm -Uvh unixODBC-2.*
rpm -Uvh unixODBC-devel-2.*
rpm -Uvh numactl-devel-*

# su - oracle

 ------------------------------------------------------
 oraToolKit 1.0 environment variables
 ------------------------------------------------------
 Installation directory :   /opt/oracle/otk
 Release                :   1.0.2.1.5
 $RUN directory         :   /opt/oracle/otk/1.0/bin
 $LOG_BASE directory    :   /var/opt/oracle/otk/1.0/log
 ------------------------------------------------------

<SITE|COMPANY>:[email protected]:sidNotSet$ grep ^SITE .profile.custom.interactive
SITE="<SITE|COMPANY>"
<SITE|COMPANY>:[email protected]:sidNotSet$ vi .profile.custom.interactive
<SITE|COMPANY>:[email protected]:sidNotSet$ grep ^SITE .profile.custom.interactive
SITE="Quist-LU"
<SITE|COMPANY>:[email protected]:sidNotSet$ exit
# su - oracle
Quist-LU:[email protected]:sidNotSet$
  1. 创建安装需要的用户和组

用java
-version命令查看,是否有JDK,有先删除(否则始终会显示第一个安装版本),删除命令:

安装Oracle软件

rpm -qa | grep gcj

不要用OUI安装,否则你要坐在电脑前面点鼠标。使用swlnst让它自动运行吧。

groupadd dba && groupadd oinstall && useradd –g dba –G oinstall oracle && passwd oracle

yum -y remove java-1.4.2-gcj-compat

$ bash
$ cd $INSTALL_CONF
$ cp sample/swInstEeSrv10gR2-Step[123]-linux-x86.cfg .
$ installManager swInst swInstEeSrv10gR2-Step1-linux-x86.cfg
$ su -
# /opt/oracle/eesrv/10.2.0/db1/root.sh
# exit
$ installManager swInst swInstEeSrv10gR2-Step2-linux-x86.cfg
$ installManager swInst swInstEeSrv10gR2-Step3-linux-x86.cfg
$ su -
# /opt/oracle/eesrv/10.2.0/db1/root.sh
# exit
  1. 创建软件安装目录并授权给 oracle 用户

安装新下载的jdk-6u35-linux-i586-rpm.bin,命令为

创建数据库

cd /u01/app/JDK
chmod 755 jdk-6u35-linux-i586-rpm.bin
./jdk-6u35-linux-i586-rpm.bin

使用installManager里面的dbSetup来创建数据库。注意路径。执行命令之前,ORACLE_HOME记得先定义了。

mkdir –p /u01/app/oracle && chown –R oracle:oinstall /u01 && chmod –R 775 /u01

配置JDK环境变量:vi /etc/profile,增加以下内容

$ cd $INSTALL_CONF
$ ls -1 dbSetup*.cfg
dbSetup-dev.cfg
dbSetup-prod.cfg
dbSetup-test.cfg
$ vi dbSetup-prod.cfg
$ sdiff -s dbSetup-prod.cfg sample/dbSetup-prod.cfg
ORACLE_HOME=/opt/oracle/eesrv/10.2.0/db1 | ORACLE_HOME=/opt/oracle/sesrv/11.1.0/db1
$ installManager dbSetup dbSetup-prod.cfg
  1. 编辑 /home/oracle/.bash_profile,配置 oracle 用户的环境变量

#set java environment by tony 2012.10.3
JAVA_HOME=/usr/java/jdk1.6.0_35
export JAVA_HOME
CLASSPATH=.:$JAVA_HOME/lib.tools.jar
export  CLASSPATH
PATH=$JAVA_HOME/bin:$PATH
export  PATH

连接到数据库

创建相应的用户组和文件夹

Oracle数据库到此已经安装完毕,用EZCONNECT或TNS尝试连接一下:

export ORACLE_SID=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export PATH=$ORACLE_HOME/bin:$PATH

groupadd -g 1000 oinstall
groupadd -g 1001 dba
groupadd -g 1002 oper
useradd -u 1000 -g oinstall -G dba,oper oracle
passwd oracle

$ bash
$ sourceProdEnv
$ sqlplus otk/[email protected]//$ORACLE_HOSTNAME:1531/PROD
$ sqlplus otk/[email protected]
  1. 使用 oracle 用户开始安装

mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01
chmod -R 775 /u01

如果你打算在生产环境下使用,那么请继续看下面几个步骤:


此时用新建的用户oracle登录SFTP(
用FileZilla)上传下载的Database目录(由两个ZIP解压得到)到u01/App,此时,万事俱备,只欠东风了,此时可再作个备份。

用appctl管理Oracle

(三)安装Oracle 11g

$ ctl status all
$ ctl stop all
$ ctl start all

用Oracle登录,修改默认的分辨率800*600为1024*768。

设置数据库备份

澳门威尼斯人登陆 4

backupManager的Rman备份

输入:

记得要检查好参数后再执行备份:

cd /u01/app
chmod -R 755 database
cd database
./runInstaller

$ cd $BACKUP_CONF
$ vi prod.cfg
$ sdiff -s prod.cfg sample/prod.cfg
DISK_DEVICE_MOUNT_POINT="/" | DISK_DEVICE_MOUNT_POINT="/backup01"
$ backupManager full prod.cfg

剩下的界面就和Windows下非常类似的,在此略去。

设置cron让它按时备份

澳门威尼斯人登陆 5

手动备份成功后就可以设置夜间自动备份了:

澳门威尼斯人登陆 6

$ crontab -l|head -2
# Example 1: Daily physical database backup
# 0 2 * * * [ -d $HOME/../current ] && (ksh -c '. ./.profile >/dev/null; backupManager full <sid_1>.cfg <sid_2>.cfg <sid_n>.cfg >/dev/null')
$ crontab -e
$ crontab -l|head -2
# Example 1: Daily physical database backup
0 2 * * * [ -d $HOME/../current ] && (ksh -c '. ./.profile >/dev/null; backupManager full prod.cfg >/dev/null')

澳门威尼斯人登陆 7

到此结束。

澳门威尼斯人登陆 8

来源:1 2 3

澳门威尼斯人登陆 9

10g/11g在RHEL 6上认证的消息,也就是说还不建议大家在RHEL
6的生产环境中使用Oracle 10g/11g。不过最近…

澳门威尼斯人登陆 10

澳门威尼斯人登陆 11

澳门威尼斯人登陆 12

澳门威尼斯人登陆 13

澳门威尼斯人登陆 14

澳门威尼斯人登陆 15

澳门威尼斯人登陆 16

安装完成后,测试监听状态

澳门威尼斯人登陆 17

连接数据库

澳门威尼斯人登陆 18

用PL/SQL远程连接测试

澳门威尼斯人登陆 19

澳门威尼斯人登陆 20

本文来源:邀月工作室,博客地址:

Hat EnterPrise Linux,下同)5.5 64位及Oracle 11g
64位,为此折腾了整整三天,个中苦痛…

相关文章