ubuntu9.04安装oracle10g

ubuntu9.04
10201_database_linux32.zip
下载地址:http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201linuxsoft.html

1、安装必须的包

sudo apt-get install gcc make binutils lesstif2 libc6 libc6-dev rpm libmotif3 libaio1 libstdc++5 alien

2、修改用户文件夹下.bashrc文件例:/home/ubuntu/.bashrc(否则报错Error in invoking target'utilities ctx_on' )

export ORACLE_HOME=/home/ubuntu/oracle(chown -R ubuntu /opt/oracle10g)

#export ORACLE_OWNER=oracle
#export ORACLE_SID=ora1
#export ORACLE_TERM=xterm
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH

3、创建RedHat的版本声明文件
在/etc/redhat-release中添加以下语句,以使安装程序认为正在一个RedHat的系统上安装:
Red Hat Linux release 3.1 (drupal)
sudo touch redhat-release
sudo gedit redhat-release

4、解压:
unzip 10201_database_linux32.zip
5、开始安装
./runInstaller
出现安装界面,但显示中文乱码。这是因为jdk缺少中文字体。
a、用英文安装
  export LANG=en_US
  ./runInstaller
b、解决乱码问题:http://wangrusheng5200.iteye.com/admin/blogs/457969 还是有部分乱码
./runInstaller -jreLoc /usr/java/jdk/jre/(我指定了使用我安装的jdk)

6、设置自启动

创建自启动脚本
创建 oracledb 脚本到/etc/init.d/oracledb,内容如下

#!/bin/bash
#
# /etc/init.d/oracledb
#
# Run-level Startup script for the Oracle Instance, Listener, and
# Web Interface

export ORACLE_HOME=/home/ubuntu/oracle
export ORACLE_SID=orcl
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH

ORA_OWNR="ubuntu"
# 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"
       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

 设置权限,放到启动脚本中去
chmod 755 /etc/init.d/oracledb
update-rc.d oracledb defaults 99
我的 oralce 的安装盘中可能有些问题,所以如果只用上述的脚本是不能启动 listener的,要修改一下:
修改 /opt/ora10/bin/dbstart文件
查找:
# Set this to bring up Oracle Net Listener
ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle
将其改为:
# Set this to bring up Oracle Net Listener
ORACLE_HOME_LISTNER=$ORACLE_HOME

设置后,测试一下

/etc/init.d/./oracledb reload

如果一切正常的话,会关闭一次Oracle又再重新打开。

参考:

在 Ubuntu7.04 上安装 Oracle 10g

http://flexitime.blog.sohu.com/67242747.html

oracle服务之安装指南

http://wiki.ubuntu.org.cn/%E9%A6%96%E9%A1%B5/%E6%95%B0%E6%8D%AE%E5%BA%93%E6%9C%8D%E5%8A%A1/Oracle%E6%9C%8D%E5%8A%A1%E4%B9%8B%E5%AE%89%E8%A3%85%E6%8C%87%E5%8D%97

ubuntu 8.10 安装Oracle 10G 企业版综合指南

http://forum.ubuntu.org.cn/viewtopic.php?f=44&t=170399  

Oracle 10g for ubuntu 安装指南

http://hi.baidu.com/gengjie/blog/item/11053d2a6ac8ae3d5343c194.html

ubuntu 8.10 安装Oracle 10G 企业版综合指南

http://hi.baidu.com/ubuntu2me/blog/item/678236f1bb519fa6a40f528b.html

ubuntu下安装oracle 10g

http://hi.baidu.com/wy975740772/blog/item/285a97d199a61886a1ec9c4a.html

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值