Ubuntu: 9.04
Orcale: 11g
1. 安装相关包
sodo apt-get install libaio1
2. 点击“runinstall”程序进行安装
安装过程中提示错误,查看日志,提示"libagtsh.so: undefined reference to 'nnfyboot' "
解决方式如下:
export LD_LIBRARY_PATH=$ORACLE_HOME/lib ln -s /usr/bin/basename /bin/basename ln -s $ORACLE_HOME/lib/libclient10.a $ORACLE_HOME/lib/libagtsh.a $ORACLE_HOME/bin/genagtsh $ORACLE_HOME/lib/libagtsh.so 1.0
解决此问题后安装成功
3. 设置环境变量
在~/.bashrc中加入如下内容
export ORACLE_HOME=/home/test/oracle/product/11.1.0/db_1 export PATH=$PATH:$ORACLE_HOME/bin export ORACLE_SID=mydb ##if not set this variable,'sqlplus / as sydba' can not work
3. 设置oracle开机启动
(1) sudo vi /etc/oratab
SID:ORACLE_HOME:Y
(2) sudo vi /etc/init.d/dbora
#!/bin/sh # # Change the value of ORACLE_HOME to specify the correct Oracle home # directory for your installation. export ORACLE_HOME=oracle_home # # Change the value of ORACLE to the login name of the # oracle owner at your site. # ORACLE_OWNER=oracle_owner PATH=${PATH}:$ORACLE_HOME/bin export ORACLE_HOME PATH case $1 in 'start') su $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME &" ;; 'stop') su $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME &" ;; *) echo "usage: $0 {start|stop}" exit ;; esac # exit
sudo chmod 755 /etc/init.d/dbora
(3) sudo update-rc.d dbora defaults 99
参考文章: http://en.kioskea.net/faq/4405-linux-installing-oracle-11g-on-ubuntu