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安装环境的部署。
直接 回车
检查镜像文件
选择 skip 不检查镜像文件
选择 next
选择语言 English
选择键盘语言 U.S.English
选择 skip
分区方案 选择 create custorm layout
参考网上资料,创建分区
创建所需的分区 分区方案可以参考网上资料
选择 next
网络分配 选择 manual 手动指定ip地址
记住填写网关地址
选择时区
给root用户设置密码
选择定制 customize now
安装的补丁包如下
请选择对应的软件包
重启操作系统
[root@ora11g Server]# grep MemTotal /proc/meminfo
MemTotal: 2058780 kB
[root@ora11g Server]# grep SwapTotal /proc/meminfo
SwapTotal: 0 kB
[root@ora11g Server]# free
total used free shared buffers cached
Mem: 2058780 1995888 62892 0 91824 1572204
-/+ buffers/cache: 331860 1726920
Swap: 0 0 0
[root@ora11g Server]# df -h /dev/shm/
Filesystem Size Used Avail Use% Mounted on
tmpfs 1006M 0 1006M 0% /dev/shm
System Architecture 系统架构
[root@ora11g Server]# uname -m
x86_64 系统为64位
Disk Space Requirements
At least 1 GB of disk space in the /tmp
directory
/tmp 至少 1G
[root@ora11g Server]# df -h /tmp
Filesystem Size Used Avail Use% Mounted on
/dev/sda6 1.2G 34M 1.1G 4% /tmp
Operating System Requirements
[root@ora11g 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 查看内核需求
[root@ora11g 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
|
[root@ora11g Server]# rpm -q elfutils-libelf-0.125 package elfutils-libelf-0.125 is not installed [root@ora11g Server]# rpm -q gcc-4.1.2 package gcc-4.1.2 is not installed [root@ora11g Server]# rpm -q gcc-c++-4.1.2 package gcc-c++-4.1.2 is not installed [root@ora11g Server]# rpm -q glibc-2.5-24 package glibc-2.5-24 is not installed [root@ora11g Server]# rpm -q glibc-common-2.5 glibc-common-2.5-81 [root@ora11g Server]# rpm -q glibc-devel-2.5 package glibc-devel-2.5 is not installed [root@ora11g Server]# rpm -q glibc-headers-2.5 package glibc-headers-2.5 is not installed [root@ora11g Server]# rpm -q ksh-20060214 package ksh-20060214 is not installed [root@ora11g Server]# rpm -q libaio-0.3.106 libaio-0.3.106-5 libaio-0.3.106-5 [root@ora11g Server]# rpm -q libaio-devel-0.3.106 package libaio-devel-0.3.106 is not installed [root@ora11g Server]# rpm -q libgcc-4.1.2 libgcc-4.1.2-52.el5 libgcc-4.1.2-52.el5 [root@ora11g Server]# rpm -q libstdc++-4.1.2 libstdc++-4.1.2-52.el5 libstdc++-4.1.2-52.el5 [root@ora11g Server]# rpm -q libstdc++-devel 4.1.2 package libstdc++-devel is not installed package 4.1.2 is not installed [root@ora11g Server]# rpm -q make-3.81 make-3.81-3.el5 [root@ora11g Server]# rpm -q sysstat-7.0.2 package sysstat-7.0.2 is not installed |
[root@ora11g Server]# yum gcc-4.1.2 [root@ora11g Server]# yum install gcc-c++-4.1.2
[root@ora11g 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
[root@ora11g Server]# yum install glibc-devel-2.5 [root@ora11g Server]# yum install glibc-headers-2.5
[root@ora11g 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
[root@ora11g Server]# yum install libaio-devel-0.3.106 [root@ora11g Server]# yum install libstdc++-devel 4.1.2
|
安装 elfutils-libelf-devel-0.137 和 elfutils-libelf-0.137
[root@ora11g Server]# rpm -q elfutils-libelf-0.137 elfutils-libelf-0.137-3.el5
[root@ora11g Server]# rpm -q elfutils-libelf-devel-0.137 package elfutils-libelf-devel-0.137 is not installed
[root@oracle11g ~]# 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
[root@ora11g ~]# 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
[root@ora11g ~]# sh mk_user.sh |
[root@ora11g ~]# 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
[root@ora11g ~]# sh mk_dir.sh |
Configuring Kernel Parameters 修改内核参数
修改/etc/hosts 增加 ip地址 和 主机名的对应关系
[root@ora11g ~]# 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
|
~
[root@localhost ~]# 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
[root@localhost ~]# 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
[root@ora11g ~]# vi /etc/security/limits.conf
oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 |
[root@ora11g ~]# 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
[oracle@ora11g ~]$ 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
[root@ora11g ~]# tail -f /u01/app/oraInventory/logs/installActions2013-09-15_03-23-17PM.log
动态查看安装过程中的告警日志
这一步填写 email地址 可以忽略
继续点击 Yes 进入下一步
选择 install database software only 只安装 oracle软件
选择单实例 类型 的数据库
语言选择 英文
选择 企业版
查看 Oracle_Base 路径 和 Oracle_home路径 必须和用户的初始化参数文件一致!!!
修改以后 如下:
这个目录有用,但是我不清楚
注意查看 操作系统的用户组 注意 应该是 oinstall
再次查看 osdba 和osoper 对应的用户组
检查系统所依赖的软件包 重新安装缺失的软件包
重新检查 还是缺失 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 这是安装之前的一个疏忽!!!
重新检测
最后一次查看 数据库的情况
久违的安装界面终于出现了 哈哈
以root 用户身份 顺序执行上面的两个脚本
最后 点击 close 大功告成
动态查看安装过程中的日志
<第四部分>
NETCA 创建监听 这个过程简单 一直 next!!!
选择 一般用途的数据库
不启用 OEM 以后配置OEM
使用统一密码 oracle
不需修改 直接next
不启用快速恢复区 不启用归档(以后自己设置)
使用oracle的示例 用户
选择创建示例用户 scott
这一步不需修改 直接 next
看看而已
选择create database 然后点击 finish
最后一步的检查
这是安装进度
Ok 大功告成了!!!