PHP8.1.21版本已发布
vue8.1.21版本已发布
jquery8.1.21版本已发布

Rad Hat Enterprise Linux 5.5上安装Oracle 11g R2

原创
2016-06-07 17:30:47 743浏览

在虚拟机上Red Hat Enterprise Linux 5.5系统下安装Oracle 11g R2版本数据库成功了,在这里把安装的经验和大家分享一下!之前查过

学习的进度有点慢,终于在虚拟机上Red Hat Enterprise Linux 5.5系统下安装Oracle 11g R2版本数据库成功了,在这里把安装的经验和大家分享一下!当然,水平有限,请各路大虾们多包涵,多指教!!

我用的软件版本是linux_11gR2_database_32bit,可以到oracle官网上下载。

之前查过oracle的官方安装文档,上面有介绍,对一些硬件环境和软件包等的要求。这里暂时罗列我这次用到的相关信息。希望对大家有所帮助。

Oracle 11g R2数据库安装硬件配置要求:

最小内存 1 GB of RAM
虚拟内存容量
Available RAM                    Swap SpaceRequired
Between 1 GB and 2 GB          1.5times the size of RAM
Between 2 GB and 16 GB        Equal to the size of RAM
More than 16 GB              16 GB


硬盘空间要求
Installation Type      Requirement for Software Files (GB)
Enterprise Edition    3.95
Standard Edition      3.88


Oracle 11g R2数据库支持的操作系统
Oracle Database 11g Release 2 (11.2) forLinux x86:
Asianux 2.0
Asianux 3.0
Oracle Enterprise Linux 4.0 Update 7 orlater
Oracle Enterprise Linux 5.0
Red Hat Enterprise Linux 4.0 Update 7 orlater
Red Hat Enterprise Linux 5.0
SUSE Linux Enterprise Server 10.0
SUSELinux Enterprise Server 11.0


需要的软件包支持:
这里只列出Asianux 3, Oracle Enterprise Linux 5.0, and Red Hat Enterprise Linux5.0等系统对软件包的要求系统是否安装过这些包。
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
numactl-devel-0.9.8.x86_64
sysstat-7.0.2
unixODBC-2.2.11 (32-bit) or later
unixODBC-devel-2.2.11 (64-bit) or later
unixODBC-2.2.11 (64-bit) or later


下面开始正式的安装过程:
1、安装前准备工作、软件包检查、配置环境变量
将oralce的安装包上传到主机上,推荐一个工具SSH Secure Shell Client,很好用。如下我上传到了root用户的桌面上并解压:
[root@oraclehost ~]# ls
linux_11gR2_database_1of2.zip linux_11gR2_database_2of2.zip
[root@oraclehost ~]# unzip linux_11gR2_database_1of2.zip
[root@oraclehost ~]# unzip linux_11gR2_database_2of2.zip
[root@oraclehost ~]# ls
database linux_11gR2_database_1of2.zip linux_11gR2_database_2of2.zip
1.1 检查所需软件包是否已安装
根据上面所罗列的在rhel5下安装oracle所需的软件包,一一检查是否已安装,命令为:
rpm–qa | grep package_name
如果已安装,命令输出会打印出已安装的软件包的名称;如果没有输出,则证明此包没有安装,可从RedHat的安装盘或者镜像中获取,然后使用如下命令安装:
rpm -ivh package_name
1.2 创建oracle用户
根据oracle官方文档所述,需要创建oinstall、dba、oper(可选)用户组和oralce用户,下面是我的创建过程,不过我并没有创建oper组:
[root@oraclehost ~]#/usr/sbin/groupadd  oinstall
[root@oraclehost ~]#/usr/sbin/groupadd  dba
[root@oraclehost ~]#/usr/sbin/useradd -g oinstall -G dbaoracle
[root@oraclehost ~]#passwd oracle
Changing password for user oracle.
New UNIX password:

BAD PASSWORD: it is too simplistic/systematic
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@oraclehost ~]#
1.3 修改系统相关参数
1.3.1 修改内核参数
修改 /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 = 1048586
配置完后,执行下面命令将参数写入内核应用
[root@oraclehost ~]#/sbin/sysctl -p
1.3.2 修改用户的限制和验证等配置文件

修改 /etc/security/limits.conf文件,加上下面的参数
oracle          soft    nproc  2047
oracle          hard    nproc  16384
oracle          soft    nofile 1024
oracle          hard    nofile 65536
oracle          soft    stack  10240


修改用户验证选项
修改/etc/pam.d/login文件加上如下参数
session    required    pam_limits.so


修改/etc/profile文件加入如下参数:
if [ $USER = "oracle" ]; then
      if [ $SHELL = "/bin/ksh" ]; then
            ulimit -p 16384
            ulimit -n 65536
      else
            ulimit -u 16384 -n 65536
      fi
fi

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。