http://download.oracle.com/docs/cd/B28359_01/install.111/b32002/toc.htm
一. 安装相关包
1.1 在RedHat 4 上安装10g 需要如下包:
Required package versions (or later):
binutils-2.15.92.0.2-10.el4
compat-db-4.1.25-9
control-center-2.8.0-12
gcc-3.4.3-9.EL4
gcc-c++-3.4.3-9.el4
glibc-2.3.4-2
glibc-common-2.3.4-2
gnome-libs-1.4.1.2.90-44.1
libstdc++-3.4.3-9.el4
libstdc++-devel-3.4.3-9.EL4
make-3.80-5
pdksh-5.2.14-30
sysstat-5.0.5-1
xscreensaver-4.18-5.rhel4.2
libaio-0.3.96
openmotif21-2.1.30-11.RHEL4.2 (Required only to install Oracle demos. Installation of Oracle demos is not covered by this guide.)
1.2 redhat 5上安装orace 10g 需要
# From RedHat AS5 Disk 1
cd /media/cdrom/Server
rpm -Uvh setarch-2*
rpm -Uvh make-3*
rpm -Uvh glibc-2*
rpm -Uvh libaio-0*
cd /
eject
# From RedHat AS5 Disk 2
cd /media/cdrom/Server
rpm -Uvh compat-libstdc++-33-3*
rpm -Uvh compat-gcc-34-3*
rpm -Uvh compat-gcc-34-c++-3*
rpm -Uvh gcc-4*
rpm -Uvh libXp-1*
cd /
eject
# From RedHat AS5 Disk 3
cd /media/cdrom/Server
rpm -Uvh openmotif-2*
rpm -Uvh compat-db-4*
cd /
eject
我们可以通过下面这个命令来检查, 差那个包就安装哪个包:
rpm -q binutils compat-db control-center gcc gcc-c++ glibc glibc-common /
gnome-libs libstdc++ libstdc++-devel make pdksh sysstat xscreensaver libaio openmotif21
如果少了哪些包,直接在安装盘里找一下,安装上就可以了。
rpm 包安装:
rpm -Uvh *.rpm --force --nodeps
二 下载软件
10G和11G的官网下载地址:
http://www.oracle.com/technology/software/products/database/index.html
三: 设置内核参数(在/etc/sysctl.conf文件中加入下列行)
kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
fs.file-max = 101365
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
net.ipv4.ip_local_port_range = 1024 65000
for 11gR2
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
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
--然后运行下面命令,使上面的设置生效
#/sbin/sysctl -p
参数说明:
kernel.shmmax为物理内存的一半;
fs.file-max为512 乘以 processes (如128个process则为 65536);
net.ipv4.ip_local_port_range/net.core.rmem_default/net.core.rmem_max三个参数设置和官方文档不一样, 这是根据metalink 343431.1 最新要求更改的;
net.ipv4.tcp_rmem/net.ipv4.tcp_wmem两个参数一般情况下无需设置, 除非是在Dataguard/Streams等需很多网络传输情况下;
其它参数根据官方文档要求设置即可.
具体内容参考:
Linux 内核参数及Oracle相关参数调整
4.1 修改/etc/security/limits.conf 文件
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
for Oracle 11gR2:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
4.2 修改/etc/profile
/etc/profile: 此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行.并从/etc/profile.d目录的配置文件中搜集shell的设置.
For the Bourne, Bash, or Korn shell, add the following lines to the /etc/profile file:
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
ulimit -u 16384 -n 65536
fi
fi