系统环境
Linux kernel 2.6.18-8.el5(
系统最小化安装)
hostname
mail.atyu30.com
ip:10.0.0.150
内存:512M

1.开启IPtables
/sbin/service iptables restart

/sbin/chkconfig --level 345 iptables on
2.
关闭SElinux
# vi /etc/selinux/config

SELINUX=disabled

3.
系统环境
所需组件通过 YUM 安装

# rpm -q
binutils
compat-gcc-34
compat-gcc-34-c++
compat-libstdc++-33
control-center
gcc
gcc-c++
gdbm
glibc
glibc-common
glibc-devel
libgcc
libgnome
libstdc++-devel
libXp
make
sysstat
util-linux
# yum install compat-gcc-34/
compat-gcc-34-c++/
compat-libstdc++-33/
gcc/
gcc-c++ /
glibc-devel/
libstdc++-devel sysstat/
libXp


4.
添加中文语系
更改系统字体
# vi /etc/sysconfig/i18n
LANG=
en_US.UTF-8

5.修改版本号/etc/redhat-release
10gr2
出的时候RHEL5还没有诞生

# vi /etc/redhat_release

#Red Hat Enterprise Linux Server release 5 (Tikanga)
Red Hat Enterprise Linux Server release 4 (Tikanga)


7.Oracle的预安装准备工作
7.1/etc/pam.d/login
# vi /etc/pam.d/login  

# Add content for oracle install
session required pam_limits.so

7.2/etc/sysctl.conf
# vi /etc/sysctl.conf   

#Add this line
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144


执行下述命令。导入刚才写入的参数。不执行,oracle在后面安装前的检测会报警。
# /sbin/sysctl -p

7.3/etc/security/limits.conf

# vi /etc/security/limits.conf
行末添加以下内容
#Add this line
* soft nproc 2047
* hard nproc 16384
* soft nofile 4096
* hard nofile 65535


8.Install oracle
8.1
创建oracle用户,和一些安装目录

# groupadd dba
# groupadd oinstall
# useradd -g oinstall -G dba -m oracle
# passwd oracle
# mkdir -p /opt/oracle
# chown -R oracle.oinstall /opt/oracle
# cd /home/oracle/
# unzip oracle_10201_database_linux32.zip



8.2
添加环境变量,定义SID

# su - oracle
$ vi .bash_profile
#--------------------------------------
# Set for Oracle10g Install;
#--------------------------------------
trap " " 0 1 2 3 5 9 15
trap clear 0
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_SID=atyu30
export ORACLE_TERM=xterm
export PATH=$ORACLE_HOME/bin:$PATH
export NLS_LANG="Simplified Chinese_china".UTF8
LC_CTYPE=zh_CN.UTF8
LC_ALL=zh_CN.UTF8
LANG=zh_CN.UTF8



引用环境变量

$ source ~/.bash_profile
8.3
Oracle 用户安装 Oracle

登录系统,xwindows
# login system in oracle
$ vncserver
$ cd /home/oracle/database
$ ./runInstaller

接下来的安装按照步骤就可以了,设定ASMSIDsys口令,等。
需要以root执行2个脚本。

9
安装后的调整dbstart,添加自启动脚本
# vi $ORACLE_HOME/bin/dbstart
#Add
ORACLE_HOME_LISTNER=$ORACLE_HOME


9.1/etc/oratab
# vi /etc/oratab
# Add
atyu30:/opt/oracle/product/10.2.0/db_1:Y
9.2
创建自启动脚本
oracle 10g
在自身的dbstart已经启动了lsnrctl,所以下面的脚本上注释掉了lsnrctl的启动
$ touch  dbora
$ chmod 700 dbora
$ vi dbora

#!/bin/bash
#
# chkconfig: 2345 80 05
# description: Oracle 10g Server
# /etc/init.d/dbora
#
# Run-level Startup script for the Oracle Instance, Listener, and
# Web Interface

export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_SID=atyu30
export PATH=$PATH:$ORACLE_HOME/bin

ORA_OWNR="oracle"

# if the executables do not exist -- display error

if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]
then
     echo "Oracle startup: cannot start"
     exit 1
fi

# depending on parameter -- startup, shutdown, restart
# of the instance and listener or usage display

case "$1" in
start)
     # Oracle listener and instance startup
     echo -n "Starting Oracle: "
#        su $ORA_OWNR -c "$ORACLE_HOME/bin/lsnrctl start"
     su $ORA_OWNR -c $ORACLE_HOME/bin/dbstart
     touch /var/lock/oracle

     su $ORA_OWNR -c "$ORACLE_HOME/bin/emctl start dbconsole"
     su $ORA_OWNR -c "$ORACLE_HOME/bin/isqlplusctl start"
     echo "OK"
     ;;
stop)
     # Oracle listener and instance shutdown
     echo -n "Shutdown Oracle: "
#        su $ORA_OWNR -c "$ORACLE_HOME/bin/lsnrctl stop"
     su $ORA_OWNR -c $ORACLE_HOME/bin/dbshut
     rm -f /var/lock/oracle

     su $ORA_OWNR -c "$ORACLE_HOME/bin/emctl stop dbconsole"
     su $ORA_OWNR -c "$ORACLE_HOME/bin/isqlplusctl stop"
     echo "OK"
     ;;
reload|restart)
     $0 stop
     $0 start
     ;;
*)
     echo "Usage: `basename $0` start|stop|restart|reload"
     exit 1
esac
exit 0


9.3
相关启动项
# cp dbora /etc/rc.d/init.d
# chkconfig --add dbora
10.
管理界面
[url]http://10.0.0.200:1158/em[/url]

[url]http://10.0.0.200:5560/isqlplus/[/url]