1.检查内存及交换空间
* 物理内存至少1GB
* SWAP:物理<2GB,物理内存的1.5倍
2GB<物理<8GB, 与物理内存相同即可
8GB<物理, 物理内存的0.75倍
2.检查系统磁盘空间
Oracle 11g企业版(32-bit)对磁盘空间的要求:
* 数据库软件:3.47GB
* 数据库:1.6GB
* /tmp:150MB~200MB
3.检查安装Oracle所需的软件包
binutils-2.17.50.0.6-2.el5
compat-libstdc++-33-3.2.3-61
elfutils-libelf-0.125-3.el5
elfutils-libelf-devel-0.125
gcc-4.1.1-52
gcc-c++-4.1.1-52
glibc-2.5-12
glibc-common-2.5-12
glibc-devel-2.5-12
glibc-headers-2.5-12
libaio-0.3.106
libaio-devel-0.3.106
libgcc-4.1.1-52
libstdc++-4.1.1
libstdc++-devel-4.1.1-52.el5
make-3.81-1.1
sysstat-7.0.0
unixODBC-2.2.11
unixODBC-devel-2.2.11
# rpm -q –qf binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc glibc gcc-c++ glibc-common glibc-devel glibc-headers libaio libaio-devel libgcc libstdc libstdc++-devel make sysstat unixODBC unixODBC-devel
# rpm -q –qf ‘%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})n’ binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc glibc gcc-c++ glibc-common glibc-devel glibc-headers libaio libaio-devel libgcc libstdc libstdc++-devel make sysstat unixODBC unixODBC-devel
4.修改linux内核参数
# vi /etc/sysctl.conf
———————————————-
修改这两行参数,若系统默认的比这大,则不需改
kernel.shmall = 2097152 –表示单个共享内存段的最大值,单位为字节,一般为物理内存的一般,或更大
kernel.shmmax = 4294967295 –表示单个共享内存段的最小值
———————————————-
添加以下内容:
fs.file-max = 6553600
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194394
net.core.wmem_default = 262144
net.core.wmem_max = 262144
# sysctl -p –使设置生效
5.创建Oracle用户和组及安装目录
# groupadd oinstall
# groupadd dba
# useradd -g oinstall -G dba oracle
# passwd oracle
6.为Oracle用户设置Shell限制
# vi /etc/security/limits.conf –添加下面内容
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
# vi /etc/pam.d/login –添加
session required /lib/security/pam_limits.so
# vi /etc/profile –添加
if [$USER = “oracle”];then
if [$SHELL = “/bin/ksh”];then
ulimit -p 16384
ulimit -n 65546
else
ulimit -u 16384 -n 65536
fi
fi
7.为Oracle用户设置环境变量
# vi /home/oracle/.bash_profile
ORACLE_SID=ixdba
ORACLE_BASE=/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1
export ORACLE_SID ORACLE_BASE ORACLE_HOME
export ORA_NLS10=$ORACLE_HOME/nls/data
PATH=$PATH:/$ORACLE_HOME/bin:$HOME/bin
export PATH
# source /home/oracle/.bash_profile
8.创建和授权Oracle安装目录
# mkdir -p /app/oracle
# chown -R oracle:oinstall /app
# chown -R oracle:oinstall /app/oracle
9.开始安装Oracle 11g
# su – oracle
$ cd /app
$ ls
linnux_11gR1_database_1013.zip
$ unzip linux_11gR1_database_1013.zip
$ /app/database/runInstaller
OK!开始图形化旅程吧!
10.使用Oracle数据库
$ ps -ef|grep ixdba
$ sqlplus “/as sysdba”
SQL>
11.后话,
编写脚本,系统重启后,自动启动服务
# vi /app/oracle/oraclestart.sh
# !/bin/sh
su – oracle <<eon< span=””>
export ORACLE_SID=ixdba
lsnrctl start
sqlplus /nolog <<eof< span=””>
conn / as sysdba
startup
exit
EOF
exit
EON
:wq
# echo “/app/oracle/oraclestart.sh”>>/etc/rc.local</eof<></eon<>