在OEL 5.8上安装oracle database 10.2.0.1

安装前要在oracle官方网站查询数据库和操作系统版本是否已经被验证

1 设定主机名:

矫正系统时间

ntpdate X.X.X.X (ntpdate 192.168.2.5)

设定定时矫正时间:设定Linux OEL 5.8时间NTP server同步

设定参考此链接:http://blog.csdn.net/loryliu/article/details/46623833


  [root@sdb2 ~]# cat /etc/sysconfig/network
  NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=sdb2.liteon.com
DOMAINNAME=liteon.com


2 设定IP地址

vi  /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0

BOOTPROTO=none
ONBOOT=yes
IPADDR=10.132.98.185
GATEWAY=10.132.98.1
NETMASK=255.255.255.0

HWADDR=00:50:56:8f:1e:ec

设定完成IP地址后要重新启动network

/etc/init.d/network restart

3 设定DNS 

[root@sdb2 network-scripts]# cat /etc/resolv.conf

search liteon.com liteonit.com
nameserver 10.132.98.129
nameserver 10.132.98.130

 如有必要也可以在如下文件里面设定

root@sdb2 network-scripts]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6

4 设定 X Window System 

5  检查内存至少1G 

/proc/meminfo系统内存信息,grep SwapTotal /proc/meminfo

6  检查硬件swap大小 

 swapon -s或则 free -m

7 /tmp 至少400m

df -h /tmp

8 安装需要的RPM,版本须高于以下版本

binutils-2.17.50.0.6-2 (x86_64)
compat-db-4.2.52-5.1 (x86_64)
compat-libstdc++-296-2.96-138 (i386)
compat-libstdc++-33-3.2.3-61(x86_64)
compat-libstdc++-33-3.2.3-61 (i386)
control-center-2.16.0-14 (x86_64)
gcc-4.1.1-52 (x86_64)
gcc-c++-4.1.1-52 (x86_64)
glibc-2.5-12 (x86_64)
glibc-2.5-12 (i686)
glibc-common-2.5-12 (x86_64)
glibc-devel-2.5-12 (x86_64)
glibc-devel-2.5-12 (i386)
glibc-headers-2.5-12 (x86_64)
ksh-20060214-1.4 (x86_64)
libaio-0.3.106-3.2 (x86_64)
libgcc-4.1.1-52 (i386)
libgcc-4.1.1-52 (x86_64)
libgnome-2.16.0-6 (x86_64)
libgnomeui-2.16.0-5 (x86_64)
libgomp-4.1.1-52 (x86_64)
libstdc++-4.1.1-52 (x86_64)
libstdc++-devel-4.1.1-52 (x86_64)
libXp-1.0.0-8 (i386)
libXtst-1.0.1-3.1(i386)
make-3.81-1.1 (x86_64)
sysstat-7.0.0-3 (x86_64)


9设定 kernel parameter

(不设定hugepage的情况下)

kernel.shmall = physical RAM size / pagesize 参考(Doc ID 301830.1)

kernel.shmmax1/2 of physical RAM 一个shared memory segment 最大的size。一般最优SGA可以放入整个segment

 kernel.shmmni = 4096 maximum number of shared memory segments.

kernel.sem = 250 32000 100 128

kernel.sem = 250 32000 100 128

SEMMSL SEMMNS SEMOPM SEMMNI

SEMMSL:maximum number of semaphores per semaphore set, 10 plus the largest PROCESSES parameter of any Oracle database on the system

SEMMNI: number of semaphore sets for the entire Linux system.

SEMMNS: total number of semaphores (not semaphore sets) for the entire Linux system

系统会取min(SEMMNS ,SEMMSL * SEMMNI )作为系统可用该资源的最大值

SEMOPM:maximum number of semaphore operations that can be performed per it is often recommended to set SEMOPM equal to SEMMSL.


fs.file-max = 512 x processes (for example 65536 for 128 processes)这是对整个系统的限定,在limit.conf里面的 限定是指对某个用户的限制

这里的值是指 整个系统的file descriptors最大值,也就是能打开的文件数。查看现有值及设定可参考:


https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Tuning_and_Optimizing_Red_Hat_Enterprise_Linux_for_Oracle_9i_and_10g_Databases/chap-Oracle_9i_and_10g_Tuning_Guide-Setting_File_Handles.html


fs.file-max = 512 x processes (for example 65536 for 128 processes)


kernel.sem = 250 32000 100 128

net.core.rmem_default = 262144 socket send buffer size default
net.core.rmem_max = 2097152    socket send buffer size max
net.core.wmem_default = 262144  socket receive buffer size default
net.core.wmem_max = 1048576     socket receive buffer size max


net.ipv4.ip_local_port_range = 1024 65000

The new guidance from Oracle development is 9000 65500

10 Create oracle user and group

(1)确定inventory group是否已经存在

  more /etc/oraInst.loc--使用该语句查看此文档是否存在

(2)如不存在则新建inventory group

groupadd oinstall

该群组针对所有的oracle 软件安装

(3)创建OSDBA及OSOPER group

只针对本次ORACLE 软件安装

groupadd dba

groupadd oper

要确保用户和群组id在每个节点是一样的

(4)确定nobody存在

id nobody

如果没有则创建

useradd nobody

(5)创建oracle 软件用户并赋予相应权限

useradd -g oinstall -G dba,oper oracle

passwd oracle

该用户只针对本次oracle 软件安装

创建oracle sfotware文件夹


11 准备放置oracle software的磁盘 

  (1) 分区  fdisk /dev/sdb

                 partprobe

  (2)使用ext3格式化磁盘

     mkfs -t ext3 /dev/sdb1

  (3) 挂载

    修改/etc/fstab文件

    mkdir -p /u01/app/oracle

chown -R oracle:oinstall /u01/app/oracle
    chmod -R 775  /u01/app/oracle

12 设定oracle资源使用限制(resource limit)

编辑/etc/pam.d/login,增加下面这一行:

session required pam_limits.so

修改/etc/security/limits.conf

oracle soft  nproc 2047  程序oracle用户能使用的process数量

oracle hard nproc 16384

oracle soft nofile 1024    --限定能打开的文件数量,与kernel parameter 里面的fs.file-max是限制同一个资源

oracle hard nofile   65536  

oracle soft   memlock   -限定使用hugepage的大小,大于SGA 

oracle hard memlock 

在/etc/pam.d/login里面添加:

session required pam_limits.so


13 设定oracle的环境变量

vi .bash_profile

ORACLE_BASE=/u01/app/oracle
ORACLE_SID=TEST
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin
umask 022

export PATH ORACLE_BASE ORACLE_SID ORACLE_SID


Requirements For Installing Oracle10gR2 On RHEL 5/OEL 5 (x86_64) (Doc ID 421308.1)





[root@www ~]# cpio -ovcB  > [file|device] <==备份
[root@www ~]# cpio -ivcdu < [file|device] <==还原
[root@www ~]# cpio -ivct  < [file|device] <==察看




kernel.sem = 250 32000 100 128



你可能感兴趣的:(oracle,database,install,10g)