1、安装Redhat Enterprise Client 5.3
2、检查系统需求以及环境设置
2.1、软件包检查
3
3.1、创建oracle安装用户组及用户帐号
3.2、建立oracle安装文件夹;以oracle用户身份登录
3.3 、设置oracle用户环境变量
3.4、以oracle身份下载三个文件
4、开始安装oracle
4.1 故障一:运行./runInstaller这个命令时,出现下述错误
Error occurred during initialization of VM
Unable to load native library: /tmp/OraInstall2009-07-30_02-58-15AM/jre/lib/i386/libjava.so: symbol __libc_wait, version GLIBC_2.0 not defined in file libc.s
unzip p3006854_9204_LINUX.zip
# cd 3006854
# sh rhel3_pre_install.sh
成功完成后,切换到oracle用户继续安装,安装界面出现,却是乱码。
4.2、故障二:安装界面乱码
4.3、故障三:以oracle身份运行netca命令时,出现下述错误:
/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open
4.4、故障四:在运行netca配置好监听服务后,运行dbca命令创建数据库时出现下述错误:
/../lib/i686/native_threads/libzip.so: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference (libzip.so)
Unable to initialize threads: cannot find class java/lang/Thread
Could not create Java VM
chmod +x jdk-6u14-linux-i586-rpm.bin
./jdk-6u14-linux-i586-rpm.bin
默认安装到/usr/java/jdk6.0.14这个目录
随后切换到oracle用户,执行下述命令:
cd $ORACLE_HOME/db_1
mv JRE JRE_BAK
ln -s /usr/java/jdk6.0.14 JRE
上述步骤执行完后,执行下述步骤:
切换到root用户
# cd $ORACLE_HOME/db_1/JRE/bin/
# ln -s java jre
所有步骤完成后,这个故障解决,运行dbca这个命令,可以成功建数据库了。
4.5、故障五:安装Oracle SQL Developer 1.5.4后,运行sqldeveloper不成功,GNOME环境中运行无反应
5、配置数据库的自动随系统启动
5.1、修改/etc/oratab文件,此文件在安装oracle时自动创建
5.2、建立/etc/rc.d/init.d/dbora文件,并赋予执行权限,此文件为dbstart和dbshut 脚本的设定文件
# description: Oracle Database Server
# processname: ora_
#
# dbora
This shell script takes care of starting and stopping #
Oracle Database Server.
SUBSYS=/var/lock/subsys/dbora
dbora_init() {
# get ORACLE_HOME from the first entry,
# whose 3rd field is Y, in /etc/oratab.
if [ ! -f /etc/oratab ]
then
echo "auto startup/shutdown of Oracle: /etc/oratab does not exist."
exit 1
fi
ORA_HOME=`awk -F: '/^[^#:]+:.+:[Y]$/ { print $2; exit}' /etc/oratab`
if [ x$ORA_HOME = "x" ]; then
echo "There is not Y entry in /etc/oratab."
exit 1
fi
# get oracle's owner from owner of dbstart.
if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo "auto startup/shutdown of Oracle: Oracle may not be installed" \
"correctly."
exit 1
fi
ORA_OWNER=`ls -l $ORA_HOME/bin/dbstart | awk '{print $3}'` }
case "$1" in
'start')
if [ -f $SUBSYS ]; then
echo $0 already started.
exit 1
fi
dbora_init
# Start the Oracle databases:
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart"
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"
# Start Intelligent Agent and Oracle Management Server
# --- for Oracle9i ---
# su - $ORA_OWNER -c "$ORA_HOME/bin/agentctl start"
# su - $ORA_OWNER -c "$ORA_HOME/bin/oemctl start oms"
# --- for Oracle Database 10g ---
# su - $ORA_OWNER -c "$ORA_HOME/bin/emctl start dbconsole"
# --------------------
# Start the Oracle HTTP Server
# This is a BUG workaround. $ORACLE_HOME/Apache/Jserv/etc
# /jserv.properties needs DISPLAY.
# test -z "$DISPLAY" && export DISPLAY=":60000.0"
# su - $ORA_OWNER -c "$ORA_HOME/Apache/Apache/bin/apachectl start"
# --------------------
touch $SUBSYS
;;
'stop')
if [ ! -f $SUBSYS ]; then
echo $0 already stopped.
exit 1
fi
dbora_init
# Stop Intelligent Agent
# --- for Oracle9i ---
# su - $ORA_OWNER -c "$ORA_HOME/bin/agentctl stop"
# --- for Oracle Database 10g ---
# su - $ORA_OWNER -c "$ORA_HOME/bin/emctl stop dbconsole"
# --------------------
# Stop the Oracle HTTP Server
# su - $ORA_OWNER -c "$ORA_HOME/Apache/Apache/bin/apachectl stop"
# --------------------
# Stop the Oracle databases:
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut"
rm -f $SUBSYS
;;
'restart')
$0 stop
$0 start
;;
'status')
if [ -f $SUBSYS ]; then
echo $0 started.
else
echo $0 stopped.
fi
;; *)
echo "Usage: $0 {start|stop|status}"
exit 1 esac
exit 0
5.3 配置dbora文件的运行级别。
使用chmod命令设置权限为750:
chmod 750 /etc/init.d/dbora
使用下面的命令配合适当的运行级别设置dbora服务自动启动:
chkconfig --level 345 dbora on