Oracle Linux 6.5 安装oracle 11.2.0.4(64位)


系统环境 

Oracle Linux Server release 6.5(64位)

Oracle 11.2.0.4(64位)

 

本文档详细介绍Oracle  11.2.0.4在 Oracle linux  6.5 的安装部署 包括安装操作系统 、给操作系统打补丁、创建Oracle用户、用户组和 oracle安装环境的部署。

 

<第一部分>

 

安装操作系统

Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

直接  回车

 

检查镜像文件

Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

选择  skip   不检查镜像文件

 

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

选择 next

设置 系统语言

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

选择语言  English

选择键盘

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

选择键盘语言  U.S.English

 

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

 

选择 skip

系统分区方案

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

分区方案  选择  create custorm  layout

参考网上资料,创建分区

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

创建所需的分区  分区方案可以参考网上资料

 

设置启动项

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

 选择  next

配置网卡

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

网络分配  选择 manual 手动指定ip地址

启用IPV4 不启用IPV6

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

设置IP地址

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

不要忘记填写网关

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

记住填写网关地址

设置时区

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

选择时区 

初次登陆需要给管理员设置密码

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

给root用户设置密码

安装操作系统类型

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

选择定制  customize  now

安装的补丁包如下

 

  • Desktop Environments
    • GNOME Desktop Environment
  • Applications
    • Editors
    • Graphical Internet
    • Text-based Internet
  • Development
    • Development Libraries
    • Development Tools
    • Legacy Software Development
  • Servers
    • Server Configuration Tools
  • Base System
    • Administration Tools
    • Base
    • Java
    • Legacy Software Support
    • System Tools
    • X Window System

 

请选择对应的软件包

久违的安装进度

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

安装完成

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

重启操作系统

Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

<第二部分>

 


检查系统所需软件包

 


硬件环境监测

 

检查物理内存

[[email protected] Server]# grep MemTotal /proc/meminfo

MemTotal:      2058780 kB

 

查看交换分区

[[email protected] Server]# grep SwapTotal /proc/meminfo

SwapTotal:           0 kB

 

查看当前内存使用情况

[[email protected] Server]# free

             total       used       free     shared    buffers     cached

Mem:       2058780    1995888      62892          0      91824    1572204

-/+ buffers/cache:     331860    1726920

Swap:            0          0          0

 

查看当前临时空间

[[email protected] Server]# df -h /dev/shm/

Filesystem            Size  Used Avail Use% Mounted on

tmpfs                1006M     0 1006M   0% /dev/shm

 

System Architecture 系统架构

查看操作系统位数

[[email protected] Server]# uname -m

x86_64                 系统为64位

 


检查磁盘空间(临时分区)

Disk Space Requirements

At least 1 GB of disk space in the /tmp directory   

/tmp  至少  1G   

[[email protected] Server]# df -h /tmp

 

Filesystem            Size  Used Avail Use% Mounted on

/dev/sda6             1.2G   34M  1.1G   4% /tmp


 


软件环境监测

Operating System Requirements

检查操作系统版本号

[[email protected] Server]# cat /proc/version  查看系统版本号

Linux version 2.6.18-308.el5 ([email protected]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)) #1 SMP Fri Jan 27 17:17:51 EST 2012

 


查看内核需求

Kernel Requirements 查看内核需求

[[email protected] Server]# uname  -r

2.6.18-308.el5

 


检查补丁包

Package Requirements  查看补丁包

 

The following or later version of packages for Asianux 3, Oracle Linux 5, and Red Hat Enterprise Linux 5 must be installed:

binutils-2.17.50.0.6

compat-libstdc++-33-3.2.3

compat-libstdc++-33-3.2.3 (32 bit)

elfutils-libelf-0.125

elfutils-libelf-devel-0.125

gcc-4.1.2

gcc-c++-4.1.2

glibc-2.5-24

glibc-2.5-24 (32 bit)

glibc-common-2.5

glibc-devel-2.5

glibc-devel-2.5 (32 bit)

glibc-headers-2.5

ksh-20060214

libaio-0.3.106

libaio-0.3.106 (32 bit)

libaio-devel-0.3.106

libaio-devel-0.3.106 (32 bit)

libgcc-4.1.2

libgcc-4.1.2 (32 bit)

libstdc++-4.1.2

libstdc++-4.1.2 (32 bit)

libstdc++-devel 4.1.2

make-3.81

sysstat-7.0.2

 

 

检测上述软件包 是否安装

[[email protected] Server]# rpm -q elfutils-libelf-0.125

package elfutils-libelf-0.125 is not installed

[[email protected] Server]# rpm -q gcc-4.1.2

package gcc-4.1.2 is not installed

[[email protected] Server]# rpm -q gcc-c++-4.1.2

package gcc-c++-4.1.2 is not installed

[[email protected] Server]# rpm -q glibc-2.5-24

package glibc-2.5-24 is not installed

[[email protected] Server]# rpm -q glibc-common-2.5

glibc-common-2.5-81

[[email protected] Server]# rpm -q glibc-devel-2.5

package glibc-devel-2.5 is not installed

[[email protected] Server]# rpm -q glibc-headers-2.5

package glibc-headers-2.5 is not installed

[[email protected] Server]# rpm -q ksh-20060214

package ksh-20060214 is not installed

[[email protected] Server]# rpm -q libaio-0.3.106

libaio-0.3.106-5

libaio-0.3.106-5

[[email protected] Server]# rpm -q libaio-devel-0.3.106

package libaio-devel-0.3.106 is not installed

[[email protected] Server]# rpm -q libgcc-4.1.2

libgcc-4.1.2-52.el5

libgcc-4.1.2-52.el5

[[email protected] Server]# rpm -q libstdc++-4.1.2

libstdc++-4.1.2-52.el5

libstdc++-4.1.2-52.el5

[[email protected] Server]# rpm -q libstdc++-devel 4.1.2

package libstdc++-devel is not installed

package 4.1.2 is not installed

[[email protected] Server]# rpm -q make-3.81

make-3.81-3.el5

[[email protected] Server]# rpm -q sysstat-7.0.2

package sysstat-7.0.2 is not installed

 

安装缺失的包

[[email protected] Server]# yum gcc-4.1.2

[[email protected] Server]# yum install gcc-c++-4.1.2

 

[[email protected] Server]# yum install glibc-2.5-24 (64位的redhat 应该安装glibc-2.5-81.x86_64.rpm 这个包 )

Loaded plugins: katello, product-id, security, subscription-manager

Updating certificate-based repositories.

Unable to read consumer identity

Setting up Install Process

No package glibc-2.5-24 available.

Nothing to do

 

[[email protected] Server]# yum install glibc-devel-2.5

[[email protected] Server]# yum install glibc-headers-2.5

 

[[email protected] Server]# yum install ksh-20060214

Loaded plugins: katello, product-id, security, subscription-manager

Updating certificate-based repositories.

Unable to read consumer identity

Setting up Install Process

No package ksh-20060214 available.

Nothing to do

 

[[email protected] Server]# yum  install libaio-devel-0.3.106

[[email protected] Server]# yum  install libstdc++-devel 4.1.2

 

 

安装 elfutils-libelf-devel-0.137 和 elfutils-libelf-0.137

[[email protected] Server]# rpm -q elfutils-libelf-0.137

elfutils-libelf-0.137-3.el5

 

[[email protected] Server]# rpm -q elfutils-libelf-devel-0.137

package elfutils-libelf-devel-0.137 is not installed

 

[[email protected] ~]# yum install elfutils-libelf-devel-0.137

Loaded plugins: katello, product-id, security, subscription-manager

Updating certificate-based repositories.

Unable to read consumer identity

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package elfutils-libelf-devel.i386 0:0.137-3.el5 set to be updated

--> Processing Dependency: elfutils-libelf-devel-static-i386 = 0.137-3.el5 for package: elfutils-libelf-devel

--> Processing Dependency: elfutils-libelf-i386 = 0.137-3.el5 for package: elfutils-libelf-devel

--> Processing Dependency: libelf.so.1 for package: elfutils-libelf-devel

---> Package elfutils-libelf-devel.x86_64 0:0.137-3.el5 set to be updated

--> Processing Dependency: elfutils-libelf-devel-static-x86_64 = 0.137-3.el5 for package: elfutils-libelf-devel

--> Running transaction check

---> Package elfutils-libelf.i386 0:0.137-3.el5 set to be updated

---> Package elfutils-libelf-devel-static.i386 0:0.137-3.el5 set to be updated

---> Package elfutils-libelf-devel-static.x86_64 0:0.137-3.el5 set to be updated

--> Finished Dependency Resolution

 

Dependencies Resolved

 

=====================================================================================================================================

 Package                                        Arch                     Version                        Repository              Size

=====================================================================================================================================

Installing:

 elfutils-libelf-devel                          i386                     0.137-3.el5                    base                    25 k

 elfutils-libelf-devel                          x86_64                   0.137-3.el5                    base                    25 k

Installing for dependencies:

 elfutils-libelf                                i386                     0.137-3.el5                    base                    58 k

 elfutils-libelf-devel-static                   i386                     0.137-3.el5                    base                    66 k

 elfutils-libelf-devel-static                   x86_64                   0.137-3.el5                    base                    64 k

 

Transaction Summary

=====================================================================================================================================

Install       5 Package(s)

Upgrade       0 Package(s)

 

Total download size: 237 k

Is this ok [y/N]: y

Downloading Packages:

-------------------------------------------------------------------------------------------------------------------------------------

Total                                                                                                2.5 MB/s | 237 kB     00:00    

Running rpm_check_debug

Running Transaction Test

Finished Transaction Test

Transaction Test Succeeded

Running Transaction

  Installing     : elfutils-libelf                                                                                               1/5

  Installing     : elfutils-libelf-devel                                                                                         2/5

  Installing     : elfutils-libelf-devel-static                                                                                  3/5

  Installing     : elfutils-libelf-devel                                                                                         4/5

  Installing     : elfutils-libelf-devel-static                                                                                  5/5

Installed products updated.

 

Installed:

  elfutils-libelf-devel.i386 0:0.137-3.el5                         elfutils-libelf-devel.x86_64 0:0.137-3.el5                       

 

Dependency Installed:

  elfutils-libelf.i386 0:0.137-3.el5                                 elfutils-libelf-devel-static.i386 0:0.137-3.el5                

  elfutils-libelf-devel-static.x86_64 0:0.137-3.el5                

 

Complete!

 


Creating Required Operating System Groups and Users

创建所需 用户和 组

 

[[email protected] ~]# vi  mk_user.sh

groupadd -g 501 oinstall

groupadd -g 502 dba

groupadd -g 503 oper

useradd  -u 501 -g oinstall  -G  dba,oper   oracle

 

[[email protected] ~]# sh mk_user.sh

 

 

[[email protected] ~]# vi mk_dir.sh

 

mkdir -p /u01/app/oraInventory

chmod -R 775 /u01/app/oraInventory

mkdir -p /u01/app/oracle

mkdir /u01/app/oracle/cfgtoollogs

chown -R oracle:oinstall  /u01

chmod -R 775 /u01/app/oracle

mkdir -p /u01/app/oracle/product/11.2.0/db_1

chown -R oracle:oinstall /u01/app/oracle/product/11.2.0/db_1

chmod -R 775 /u01/app/oracle/product/11.2.0/db_1

 

[[email protected] ~]# sh mk_dir.sh

修改内核参数

Configuring Kernel Parameters  修改内核参数

修改/etc/hosts  增加 ip地址 和 主机名的对应关系

[[email protected] ~]# vi /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1        ora11g

192.168.8.167   ora11g

 

~

 

修改/etc/sysctl.conf 文件

[[email protected] ~]# vi /etc/sysctl.conf

 

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 = 1048576

 

[[email protected] ~]# sysctl –p   使当前修改生效

net.ipv4.ip_forward = 0

net.ipv4.conf.default.rp_filter = 1

net.ipv4.conf.default.accept_source_route = 0

kernel.sysrq = 0

kernel.core_uses_pid = 1

net.ipv4.tcp_syncookies = 1

kernel.msgmnb = 65536

kernel.msgmax = 65536

kernel.shmmax = 68719476736

kernel.shmall = 4294967296

 


Check Resource Limits for the Oracle Software Installation Users

配置oracle用户的资源限制

[[email protected] ~]# vi /etc/security/limits.conf

 

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

 


修改profile文件

[[email protected] ~]# vi /etc/profile

 

if [ $USER = "oracle" ] || [ $USER = "grid" ]; then

if [ $SHELL = "/bin/ksh" ]; then

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

umask 022

fi

 


修改用户环境变量

Configuring the oracle User's Environment 

[[email protected] ~]$ vi .bash_profile

 

#!/bin/bash

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME

ORACLE_SID=prod; export ORACLE_SID

ORACLE_UNQNAME=prod; export ORACLE_UNQNAME

ORACLE_TERM=xterm; export ORACLE_TERM

ORACLE_HOSTNAME=ora11g; export ORACLE_HOSTNAME

PATH=/usr/sbin:$PATH; export PATH

PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;

export CLASSPATH

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<第三部分>

 

 

以下是安装过程

 

 启动安装程序

进入oracle 软件的目录,点击 runInstaller

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

 

 

动态查看安装过程中的日志

[[email protected] ~]# tail -f /u01/app/oraInventory/logs/installActions2013-09-15_03-23-17PM.log

动态查看安装过程中的告警日志

 

 

不需要email地址

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

这一步填写 email地址 可以忽略

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

 

继续点击 Yes  进入下一步

仅安装oracle软件

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

选择  install  database  software  only  只安装 oracle软件

 

单实例的oracle软件

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

 

选择单实例 类型 的数据库

 

选择oracle的语言

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

语言选择 英文

 

选择oracle的类型

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

选择 企业版

 

设置oracle主目录

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

查看 Oracle_Base  路径 和 Oracle_home路径  必须和用户的初始化参数文件一致!!!

修改以后  如下:

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

设置 INVENTORY DIRECTORY

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

 

这个目录有用,但是我不清楚

 

检查oracle用户所属的组

注意查看 操作系统的用户组  注意 应该是 oinstall

Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

再次查看 osdba  和osoper 对应的用户组

 

监测oracle所依赖的软件包

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

检查系统所依赖的软件包 重新安装缺失的软件包

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

重新检查  还是缺失 elfutils-libelf-0.125 和 elfutils-libelf-devel-0.125

 

需要注意的是 操作系统是  Redhat 5.8.19.6  64位  但是 Oracle软件是 11.2.0.1 32位的,所以只需安装 系统包 elfutils-libelf-0.137  和 elfutils-libelf-devel-0.137 这是安装之前的一个疏忽!!!

 

重新检测

 

最后一步监测oracle的情况

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

 

 

最后一次查看 数据库的情况

 

久违的安装界面

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

久违的安装界面终于出现了  哈哈

 

安装完成顺序执行 如下两个脚本

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

以root 用户身份 顺序执行上面的两个脚本

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

最后 点击 close  大功告成

 


动态查看安装过程中的日志

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

<第四部分>

 

NETCA配置监听程序


NETCA 创建监听  这个过程简单  一直 next!!!

 

操作系统上执行 netca

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 


DBCA建库

操作系统上执行 dbca

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

 

 

 

 

 

一般用途的数据库

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

选择  一般用途的数据库

 

设置数据库名

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

不配置EM

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

不启用 OEM  以后配置OEM

 

设置密码

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

使用统一密码   oracle

设置oracle 存储的配置

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

不需修改 直接next

 

配置 oracle恢复选项

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

不启用快速恢复区   不启用归档(以后自己设置)   

 

使用oracle的示例 用户

Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

选择创建示例用户 scott

 

配置oracle的内存

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

这一步不需修改 直接 next

 

检查数据文件、控制文件、日志文件的目录

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

看看而已

 

选择 create database

Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

 

选择create  database   然后点击  finish

 

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

最后一步的检查

 

安装进度

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

这是安装进度

 

安装完成

 Oracle Linux 6.5 安装oracle 11.2.0.4(64位)

 

 

Ok  大功告成了!!!

相关文章: