ubuntu14.04 安装oracle11g,Ubuntu14.04 安装 Oracle 11g XE

本文档详细记录了在Ubuntu 14.04和12.04上安装Oracle 11g遇到的挑战,包括/dev/shm问题的解决步骤,如创建链接、修改配置文件等。此外,还提到了数据库备份、环境变量设置和错误处理,为顺利安装和运行Oracle数据库提供了指南。
摘要由CSDN通过智能技术生成

There are many, many links, threads, bugs and discussions related to this since oracle 11g installation is no longer breeze at it was the case with oracle 10g, at least on Ubuntu. This is my short, minimal list of things to do to have oracle running on Ubuntu 14.04 12.04.

Last updated 2014-05-01, install on 14.04 Last updated 2013-12-25, install on 12.04.3.

0. backup. If you have a previous oracle install backup your databases with expdp. Warn: move the dumps to a safe location since the apt-get remove –purge could delete them.

1. download the package

2. unzip it

unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip

3. convert it to a deb and install it

cd Disk1

alien --scripts oracle-xe-11.2.0-1.0.x86_64.rpm

apt-get remove --purge oracle-xe-universal #remove 10g if needed

apt-get install libaio1 #oracle needs this

dpkg -i oracle-xe_11.2.0-2_amd64.deb

(you might get a missing chkconfig error which can be ignored) 4. until now everything is simple, now the trouble begins. The main oracle problem is with the missing /dev/shm which, in 12.04 is a link to /run/shm. The fix for this is to remove the link and mount it yourself:

rm /dev/shm

mkdir /dev/shm

mount -t tmpfs shmfs -o size=2048m /dev/shm

sysctl kernel.shmmax=1073741824 #also edit /etc/sysctl.conf and set the same value to persist the change

ln -s /usr/bin/awk /bin/awk #small fix to eliminate some errors It might also be necessary to create /var/lock/subsys if it does not exist (created by another package).

4.1 the above changes can be integrated in /etc/init.d/oracle-xe

change the AWK path

change /var/lock/subsys with /var/lock

add the /dev/shm lines

The diff from the old and new files looks as following:

53c53

< if [ -z "$AWK" ]; then AWK=/usr/bin/awk; fi

---

> if [ -z "$AWK" ]; then AWK=/bin/awk; fi

269c269

< touch /var/lock/listener

---

> touch /var/lock/subsys/listener

321c321

< touch /var/lock/oracle-xe

---

> touch /var/lock/subsys/oracle-xe

555,559d554

< if [ -L /dev/shm ]; then

< rm -rf /dev/shm

< mkdir /dev/shm

< mount -t tmpfs shmfs -o size=2048m /dev/shm

< fi

567c562

< touch /var/lock/listener

---

> touch /var/lock/subsys/listener

582c577

< touch /var/lock/oracle-xe

---

> touch /var/lock/subsys/oracle-xe

606c601

< if [ $RETVAL -eq 0 ] && rm -f /var/lock/listener

---

> if [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/listener

608c603

< rm -f /var/lock/oracle-xe

---

> rm -f /var/lock/subsys/oracle-xe

5. run the configure

/etc/init.d/oracle-xe configure

There will be some errors but the process will succeed finally.

Thats it. Oracle will now run and no more:

ORA-27101: shared memory realm does not exist

Before restarting the machine add the /dev/shm related lines from point 4 to /etc/init.d/oracle-xe in the start function somewhere around line 555.

6. If you are used to apex and don’t know what an workspace is you first need to access: http://localhost:9090/apex/apex_admin and use admin/[password provided to configure script] to login

7. Env vars for oracle are:

export ORACLE_SID=XE

export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe/ #you should know already that the last / is very important

export PATH=$PATH:$ORACLE_HOME/bin

8. If you get an:

UDI-01034: operation generated ORACLE error 1034

ORA-01034: ORACLE not available

ORA-27101: shared memory realm does not exist

Linux-x86_64 Error: 2: No such file or directory

UDI-00003: all allowable logon attempts failed

for impdb note that this is due to the fact that impdp no longer uses the ORACLE_SID variable. To fix just use for instance:

impdp system@XE/blabla

… instead of

impdp system/blabla ...

9. links:

S-ar putea să îţi placă şi:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值