在 Ubuntu 12.04.1 LTS 上安装 Oracle Database 11g Express Edition
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14136713/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Installation of Oracle Database 11g Express Edition on Ubuntu 12.04.1 LTS
提问by Manikandan Kannan
I have been struggling to install Oracle 11g Express Edition on Ubuntu 12.04.1 LTS version.
我一直在努力在 Ubuntu 12.04.1 LTS 版本上安装 Oracle 11g Express Edition。
I have followed these steps:
我已按照以下步骤操作:
Downloaded 11g express edition from Oracle's site
Created a new user 'oracle' under the group dba. Following steps are executed using this.
unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip and then Converted the rpm to the Ubuntu package
sudo alien --scripts -d oracle-xe-11.2.0-1.0.x86_64.rpm
Created
/sbin/chkconfig
file and added the entries as specified hereCreated
/etc/sysctl.d/60-oracle.conf
and added the entries as specified in same link as above.Below steps:
ln -s /usr/bin/awk /bin/awk
mkdir /var/lock/subsys
touch /var/lock/subsys/listener
sudo dpkg --install oracle-xe_11.2.0-2_amd64.deb
(.deb generated in step 3)sudo /etc/init.d/oracle-xe configure
(left the default values as it is)Set the following env variables in
~/.bashrc
fileexport ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe export ORACLE_SID=XE export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh` export ORACLE_BASE=/u01/app/oracle export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH export PATH=$ORACLE_HOME/bin:$PATH
Below steps:
chown -R oracle:dba /var/tmp/.oracle chmod -R 755 /var/tmp/.oracle chown -R oracle:dba /tmp/.oracle chmod -R 755 /tmp/.oracle
sudo service oracle-xe start
(I didn't see any issues in this step)
从 Oracle网站下载 11g 快速版
在 dba 组下创建了一个新用户“oracle”。使用此执行以下步骤。
解压 oracle-xe-11.2.0-1.0.x86_64.rpm.zip 然后将 rpm 转成 Ubuntu 包
sudo alien --scripts -d oracle-xe-11.2.0-1.0.x86_64.rpm
创建
/sbin/chkconfig
文件并添加此处指定的条目创建
/etc/sysctl.d/60-oracle.conf
并添加了上述相同链接中指定的条目。以下步骤:
ln -s /usr/bin/awk /bin/awk
mkdir /var/lock/subsys
touch /var/lock/subsys/listener
sudo dpkg --install oracle-xe_11.2.0-2_amd64.deb
(.deb 在步骤 3 中生成)sudo /etc/init.d/oracle-xe configure
(保持默认值不变)在
~/.bashrc
文件中设置以下环境变量export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe export ORACLE_SID=XE export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh` export ORACLE_BASE=/u01/app/oracle export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH export PATH=$ORACLE_HOME/bin:$PATH
以下步骤:
chown -R oracle:dba /var/tmp/.oracle chmod -R 755 /var/tmp/.oracle chown -R oracle:dba /tmp/.oracle chmod -R 755 /tmp/.oracle
sudo service oracle-xe start
(我在这一步中没有看到任何问题)
12 . sqlplus / as sysdba and got the following
12 . sqlplus / as sysdba 并得到以下内容
SQL*Plus: Release 11.2.0.2.0 Production on Thu Jan 3 09:41:58 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL*Plus:2013 年 1 月 3 日星期四 09:41:58 发布 11.2.0.2.0 生产版
版权所有 (c) 1982, 2011,甲骨文。版权所有。
连接到空闲实例。
Now when exectute any SQL statements on SQLplus, i end up with the following error
现在,当在 SQLplus 上执行任何 SQL 语句时,我最终会出现以下错误
SQL> select * from dual;
select * from dual
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
I have increased the swap memory as specified in here
我增加了此处指定的交换内存
free -m
total used free shared buffers cached
Mem: 1652 1596 56 0 53 1356
-/+ buffers/cache: 186 1466
Swap: 2943 0 2943
Can you guide me here? I am clueless.
你能在这里指导我吗?我一窍不通。
回答by Manikandan Kannan
Finally, after a day long struggle
终于,经过一天的挣扎
These did the trick.
这些成功了。
sudo rm -rf /dev/shm
sudo mkdir /dev/shm
sudo mount -t tmpfs shmfs -o size=2048m /dev/shm
Make sure that these are executed before the database is configured.
确保在配置数据库之前执行这些。
回答by Geek Favour
Please check this [Youtube Video][1]. It has step by step explanation on installation.
请查看此 [Youtube 视频][1]。它有安装的分步说明。