1.安装 CentOS 5.5 i386,全部默认安装,关闭SELinux,关闭防火墙。2.检查rpm包# rpm -qa --queryformat quot;%{NAME}-%{VERSIO
1.安装 CentOS 5.5 i386,全部默认安装,,关闭SELinux,关闭防火墙。
2.检查rpm包
# rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n"|\
egrep "binutils|compat-libstdc++|elfutils-libelf|gcc|glibc|kernel-headers|ksh|libaio|libgcc|libgomp|libstdc|make|sysstat|unixODBC|pdksh"|sort
安装rpm包,在光盘中放入CentOS55的DVD
执行以下命令(注,如所缺的不止这些包,请另行再安装,所要的包可以参考Oracle的标准安装文档)
mount -r -t iso9660 /dev/cdrom /media
cd /media/CentOS
rpm -ivh compat-libstdc++-33-3.2.3-61.i386.rpm
rpm -ivh elfutils-libelf-devel-0.137-3.el5.i386.rpm elfutils-libelf-devel-static-0.137-3.el5.i386.rpm
rpm -ivh libstdc++-devel-4.1.2-48.el5.i386.rpm
rpm -ivh kernel-headers-2.6.18-194.el5.i386.rpm
rpm -ivh glibc-headers-2.5-49.i386.rpm
rpm -ivh glibc-devel-2.5-49.i386.rpm
rpm -ivh libgomp-4.4.0-6.el5.i386.rpm
rpm -ivh glibc-devel-2.5-49.i386.rpm
rpm -ivh gcc-4.1.2-48.el5.i386.rpm
rpm -ivh gcc-c++-4.1.2-48.el5.i386.rpm
rpm -ivh libaio-devel-0.3.106-5.i386.rpm
rpm -ivh sysstat-7.0.2-3.el5.i386.rpm
rpm -ivh unixODBC-2.2.11-7.1.i386.rpm
rpm -ivh unixODBC-devel-2.2.11-7.1.i386.rpm
rpm -ivh pdksh-5.2.14-36.el5.i386.rpm
3.修改 /etc/inittab(非必要)
gedit /etc/inittab 或 nano /etc/inittab
找到
# Default runlevel. The runlevels used by RHS are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:5:initdefault:
将 5 改成 3,即:
id:3:initdefault:
4.增加组及用户
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba -d /u01/oracle oracle
chown -R oracle:oinstall u01
passwd oracle
检查 nobody 是否存在, id nobody
缺省存在的。如果不存在 # /usr/sbin/useradd -g nobody
5.调整内核参数
nano /etc/sysctl.conf
在最下面加入:
# by flexitime : install oracle 11g
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
-----------------
shmmax 的最少值是 0.5 GB. 但是Oracle推荐的值是 shmmax to 2.0 GB (2147483648) ,这会有更好的性能
6.为 oracle 用户设置 Shell 限制 (全部都是在文件的最下面加入)
nano /etc/security/limits.conf
# by flexitime : install oracle 11g
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
nano /etc/pam.d/login
# by flexitime : install oracle 11g
session required pam_limits.so
nano /etc/profile
# by flexitime : install oracle 11g
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
nano /etc/csh.login
# by flexitime : install oracle 11g
if ( $USER == "oracle" ) then
limit maxproc 16384
limit deors 65536
endif
关闭SELINUX的工作模式(修改这一项后最好重启一下操作系统)
nano /etc/selinux/config
# by flexitime : install oracle 11g
SELINUX=disabled
nano /etc/RedHat-release
将CentOS release 5 (Final) 修改成
Red Hat Enterprise Linux AS release 5 (Taroon)
(因为oracle公司没推出CentOS版本的oracle)
su - oracle
cd ~
nano .bash_profile
# by flexitime : install oracle 11g
ORACLE_BASE=/u01
ORACLE_HOME=$ORACLE_BASE/oracle
ORACLE_SID=orcl
PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
7. 修改安装目录的权限
mv database /u01/
cd /u01
chown -R oracle:oinstall database/
8.使用oracle账号 登陆图形界面 进行安装
运行终端 Terminal
cd /u01/database
./runInstaller