CentOS-6 64位安装oracle 11g

一、使用oracle硬件要求

1、内存要求

最小内存1G,推荐2G或2G以上

2、swap大小设定

1GB跟2GB物理内存之间的,设定swap大小为物理内存的1.5倍
2GB跟16GB物理内存之间的,设置swap大小与物理内存相等
16GB物理内存以上的,设置swap大小为16GB

3、共享内存/dev/shm要求

至少比在每个oracle实例中的MEMORY_MAX_TARGET和MEMORY_TARGET要大。

4、/tmp空间大小要求

至少1GB空间

5、硬盘大小要求

存放oracle软件文件和数据文件的空间至少6GB

二、使用oracle软件要求

1、操作系统要求

Asianux Server 3 SP2
Oracle Linux 4 Update 7
Oracle Linux 5 Update 2
Oracle Linux 5 Update 5 (with the Oracle Unbreakable Enterprise Kernel for Linux)
Red Hat Enterprise Linux 4 Update 7
Red Hat Enterprise Linux 5 Update 2
Red Hat Enterprise Linux 5 Update 5 (with the Oracle Unbreakable Enterprise Kernel for Linux)
SUSE Linux Enterprise Server 10 SP2
SUSE Linux Enterprise Server 11

2、软件包要求

下面是64位centos 5或6的软件包要求
binutils compat-libstdc++-33 compat-libstdc++-33.i686 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc.i686 glibc-common glibc-devel glibc-devel.i686 glibc-headers ksh libaio libaio.i686 libaio-devel libaio-devel.i686 libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel make sysstat

三、开始安装oracle

因为本机没有安装桌面环境,所以我们采用静默安装oracle。

1、安装依赖

  1. yum -y install binutils compat-libstdc++-33 compat-libstdc++-33.i686 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc.i686 glibc-common glibc-devel glibc-devel.i686 glibc-headers ksh libaio libaio.i686 libaio-devel libaio-devel.i686 libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel make sysstat

2、添加用户

  1. /usr/sbin/groupadd oinstall
  2. /usr/sbin/groupadd dba
  3. /usr/sbin/useradd -g oinstall -G dba oracle
  4. passwd oracle

3、修改内核参数

  1. vi /etc/sysctl.conf
  1. #######
  2. fs.aio-max-nr = 1048576
  3. fs.file-max = 6815744
  4. kernel.shmall = 2097152
  5. kernel.shmmax =  536870912
  6. kernel.shmmni = 4096
  7. kernel.sem = 250 32000 100 128
  8. net.ipv4.ip_local_port_range = 9000 65500
  9. net.core.rmem_default = 262144
  10. net.core.rmem_max = 4194304
  11. net.core.wmem_default = 262144
  12. net.core.wmem_max = 1048586
  13. #######
  1. /sbin/sysctl -p

4、修改用户资源限制

  1. vi /etc/security/limits.conf
  1. #####
  2. oracle              soft    nproc   2047
  3. oracle              hard    nproc   16384
  4. oracle              soft    nofile  1024
  5. oracle              hard    nofile  65536
  6. oracle              soft    stack   10240
  7. #####

5、目录创建

  1. mkdir -p /usr/local/oracle /usr/local/oraInventory /usr/local/oradata/
  2. chown -R oracle:oinstall /usr/local/oracle /usr/local/oraInventory /usr/local/oradata/
  3. chmod -R 775 /usr/local/oracle /usr/local/oraInventory /usr/local/oradata/

6、设置用户环境

  1. su - oracle
  2. vi .bash_profile
  1. #####
  2. export ORACLE_BASE=/usr/local/oracle
  3. export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
  4. export ORACLE_SID=sales
  5. export ORACLE_OWNER=oracle
  6. export PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin
  7. ####
  1. source .bash_profile

7、下载oracle

切换到root用户

  1. su -

下载oracle 11g到/home/并解压

  1. chmod 777 /home/database
  2. chown -R oracle.oinstall /home/database

8、创建oraInst.loc

  1. vi /etc/oraInst.loc
  1. #####
  2. inventory_loc=/usr/local/oraInventory
  3. inst_group=oinstall
  4. #####
  1. chown oracle:oinstall /etc/oraInst.loc
  2. chmod 664 /etc/oraInst.loc

9、开始安装

  1. su - oracle
  2. /home/database/runInstaller -silent -debug -force \
  3.  FROM_LOCATION=/home/database/stage/products.xml \
  4.  oracle.install.option=INSTALL_DB_SWONLY \
  5.  UNIX_GROUP_NAME=oinstall \
  6.  INVENTORY_LOCATION=/usr/local/oraInventory \
  7.  ORACLE_HOME=/usr/local/oracle/product/11.2.0/db_1 \
  8.  ORACLE_HOME_NAME="Oracle111" \
  9.  ORACLE_BASE=/usr/local/oracle \
  10.  oracle.install.db.InstallEdition=EE \
  11.  oracle.install.db.isCustomInstall=false \
  12.  oracle.install.db.DBA_GROUP=oinstall \
  13.  oracle.install.db.OPER_GROUP=oinstall \
  14.  DECLINE_SECURITY_UPDATES=true
  15. su -
  16.  
  17. /usr/local/oracle/product/11.2.0/db_1/root.sh

安装参考:http://docs.oracle.com/cd/E11882_01/install.112/e24326/toc.htm
错误大全:http://docs.oracle.com/cd/E11882_01/server.112/e17766/toc.htm#BEGIN

标签:Centos 发布于:2019-11-23 19:46:44