四、Oracle 10g的安装
1.创建和配置用户
#/usr/sbin/groupadd oinstall
#/usr/sbin/groupadd dba
#/usr/sbin/useradd -m -g oinstall -G dba oracle
#id oracle
2、为Oracle用户设置密码:
#passwd oracle
3.创建安装目录
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle
4、开始安装
解压Oracle文件.进入oracle安装程序目录
#unzip 10201_database_linux32.zip
在X下进行安装
#./runInstaller
在这里需要注意的是,因为Oracle 10g不支持在Centos上安装,不过我们可以通过以下两种方法完成安装:
1) 修改/etc/redhat-release为:
redhat-3
2) 在安装时,加上参数IgnoreSysPreReqs跳过操作系统版本检查
#./runInstaller -ignoreSysPreReqs
一直下一步就可以了.然后提升至root用户,运行oracle安装完成后,提示的两个脚本.
五、Oracle完成后的系统设置与调整
1、设置自动运行Oracle
1).在/etc/profile的ORACLE_BASE后面,加上
export ORACLE_HOME=$ORACLE_BASE/oracle/product/10.2.0/db_1
2)、 修改/etc/oratab文件,将orcl那一行的N,设置为Y
3)、 修改$ORACLE_HOME/bin/dbstart, dbshut ,将
ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle/bin/tnslsnr
改为
ORACLE_HOME_LISTNER=$ORACLE_HOME
#!/bin/bash
#
# chkconfig: 345 90 05
# description: Oracle 10g Server
# /etc/init.d/oracle
#
# Run-level Startup script for the Oracle Instance, Listener, and
# Web Interface
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/oracle/product/10.2.0/db_1
export ORACLE_SID=orcl
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
4)、新建一个启动脚本,如下:
# 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"
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"
echo "OK"
;;
reload|restart)
$0 stop
$0 start
;;
*)
echo "Usage: `basename $0` start|stop|restart|reload"
exit 1
esac
exit 0
2、安装相关的补丁
与安装主程序过程一致,不再赘述。
3、重编译无效的PL/SQL模块
$sudo /usr/local/bin/oraenv
ORACLE_SID = [orcl] ?
$sqlplus “/as sysdba”
SQL>@?/rdbms/admin/utlrp.sql
4、生成客户端静态库
$ $ORACLE_HOME/bin/genclntst
六、重启系统与Oracle
$sudo reboot

Oracle VM虚拟机中安
Ubuntu下安装PostgreS
Sybase 11.9.2 For Li
MySQL最新版安装图解
开源DRBD 助力 MySQL
Oracle10g EM出现乱码
Fedora8下安装ORACLE1
MySQL数据库的安装操