[oracle]cent os 6.4下安装oracle 11gr2笔记

安装环境:

Linux jwg02.jws 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
tigervnc-server-1.1.0-5.el6.x86_64
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

安装日期:2013-08-17

安装过程中以vnc-viewer连接远程主机进行


0.安装依赖包(os dvd介质中全部都有)

binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-common-2.5
glibc-devel-2.5
glibc-headers-2.5
ksh-20060214
libaio-0.3.106
libaio-devel-0.3.106
libgcc-4.1.2
libstdc++-4.1.2
libstdc++-devel 4.1.2
make-3.81
numactl-devel-0.9.8.x86_64
sysstat-7.0.2

1.添加用户和组

groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
以oracle用户创建目录
mkdir /home/oracle/app/
chmod -R 775 /home/oracle/app/
mkdir /home/oracle/app/oracle/

编辑/home/oracle/.bash_profile,文件末尾添加
umask 022

2.修改内核参数,编辑文件/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
执行sysctl -p生效

3.编辑文件/etc/security/limits.conf末尾添加:

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
即时生效

4.root用户执行
# xhost
# xhost +

5.oracle用户执行

ORACLE_BASE=/home/oracle/app/oracle
ORACLE_SID=dbjw
export ORACLE_BASE ORACLE_SID
export LANG=en
unset ORACLE_HOME
unset TNS_ADMIN
然后进入oracle安装文件目录执行./runInstaller进入图形安装界面

安装完之后,修改.bash_profile文件

ORACLE_BASE=/home/oracle/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
ORACLE_SID=dbjw
PATH=$ORACLE_HOME/bin:$HOME/bin:$PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
修改/home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora文件
添加SID_LIST_LISTENER,修改LISTENER的ADDRESS-HOST为真实的IP地址
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = dbjw.jwg02.jws)
      (ORACLE_HOME = /home/oracle/app/oracle/product/11.2.0/dbhome_1)
      (SID_NAME = dbjw)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.126)(PORT = 1521))
    )
  )

6.客户端访问tnsnames.ora

DBJW =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.126)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = dbjw.jwg02.jws)
    )
  )

参考文档:

Oracle® Database Quick Installation Guide 11g Release 2 (11.2) for Linux x86-64 E16768-05 March 2011

你可能感兴趣的:(Linux,ORACLE)