红联Linux门户
Linux帮助
当前位置: 红联Linux门户 > Debian

debian 4上安装oracle database xe

发布时间:2007-08-11 11:24:32来源:红联作者:Winterh
由于兄弟公司的需要帮他们作邮件系统的二次开发,使用的是PHP+ORACLE

这东东都没玩过,系统必须使用Linux,所以没办法只好自己装一个试试。

玩了两天把页面的东西完成了,剩下的就是使用PHP读ORACLE数据库了,客户还没有给定数据表结构,所以还有时间,就抽空装Linux。

以前看人家装过Redhat9,自己试过几次都没成功,后来也就作罢了。这次又有机会玩,于是就想到RH9,去网上DOWN了一个,华硕的机器本本根本就不听话,检测都通不过,上网一查说是华硕与RH不兼容,没办法于是只好找其它的Linux发行版。于是就选择debian 4。

呵呵,上面都是废话,下面继续:

首先没玩过的当然是上网搜索有没有相关的文章(有互联网真方便:) ),找到下面这篇:

http://bbs.chinaunix.net/redirect.php?fid=19&tid=841397&goto=nextnewset

在Debian上安装Oracle Database XE

原作者: redice li

OracleXE 简介

甲骨文2005年宣布向中国市场推出的可免费下载的Oracle Database 10g Express Edition (Oracle Database XE) ,供专业人员在学习及应用开发的起步阶段使用。Oracle Database XE建立在Oracle数据库10g第二版的代码库之上,与Oracle数据库产品系列完全兼容。Oracle Database XE可用于32位Linux和Windows操作系统,在功能上,Oracle Database XE版相当于Oracle Standard Edition One。但由于是免费版本,在硬件上受到了一定的限制,如:

至多使用1个CPU或1个双核CPU的处理能力;

最多可使用1GB内存;

每个服务器只限于一个CPU;

最多存储4GB的用户数据。

安装Oracle XE

测试环境建立于Debian系统上,系统具备4Gb的磁盘空间用于建立数据库,500M以上的空间用于安装数据库。要数据库真正运行起来,那么你最好为你的系统配置1Gb的内存。下一步,我们将配置Debian的sources.list,加入oracle安装包的站点:

root@debian ~# echo "deb http://oss.oracle.com/debian/ unstable main non-free" >> /etc/apt/sources.list

root@debian ~# apt-get update

安装oracle database XE只需要简单的安装两个包即可,安装过程如下:

root@debian ~# apt-get install oracle-xe-client

root@debian ~# apt-get install oracle-xe

完成后,安装过程就完成了。安装过程会更新一些核心的配置参数,可以通过查看/etc/sysctl.conf来查看这些变化,如果你不想重启系统就启动 oracle数据库,那么需要先应用这些配置。下面我们直接应用Oracle database XE的默认配置,如用户账号:

root@debian ~# sh /etc/init.d/oracle-sh configure

Oracle Database XE启动后,将打开服务端口1521,可以通过命令lsof来查看(lsof -n -i TCP:1521),默认安装的情况下,我们还可以通过Web管理接口在本机进行数据库管理(http://127.0.0.1:8080/apex)。我们可以通过 /etc/default/oracle-xe 文件来查看和更新当前 oracle 数据库的配置。

Oracle database XE的运行除了要求有一定数量的物理内存外,对交换空间也有一定的要求。Oracle Database 10g Express Edition 要求系统有1006MB的交换空间。如果不希望重启系统,你可以通过创建一个文件交换来达到这一要求:

root@debian ~# dd if=/dev/zero of=/MY_SWP_FILE bs=1M count=1000

root@debian ~# mkswp /MY_SWP_FILE

root@debian ~# swapon /MY_SWP_FILE

要启用或禁止Oracle database XE在开机时自动启动,可以通过 update-rc.d 工具来完成,或者修改文件/etc/default/oracle-xe文件,将其中 ORACLE_DBENABLED=true改为ORACLE_DBENABLED=false。

对于如何使用Oracle database XE不是本文所涉及的内容,就不多讲了。

不过安装并不顺利,使用apt-get update时,出现如下错误:

W: GPG error: http://oss.oracle.com unstable Release: 由于没有公钥,下列签名无法进行验证: NO_PUBKEY 2E2BCDBCB38A8516

没办法,还是继续到net上找答案,费尽心思才找到解决办法:

http://marc.abramowitz.info/archives/2007/02/28/

fixing-no_pubkey-2e2bcdbcb38a8516-error-from-oracle-debian-repository/

Folks running and Debian, Ubuntu, etc. may be aware that Oracle has a

Debian repository for Oracle Express and other open-source software.

If you weren’t aware of it and wanted to use it, here’s the magic line to

add to /etc/apt/sources.list:

deb http://oss.oracle.com/debian unstable main non-free

Recently, my apt-get updates started printing this warning:

W: GPG error: http://oss.oracle.com unstable Release: The following signatures

couldn't be verified because the public key is not available:

NO_PUBKEY 2E2BCDBCB38A8516

because Oracle is signing their packages with GPG and my system didn’t

have their GPG public key.

First, I tried:

$ gpg --keyserver subkeys.pgp.net --recv 2E2BCDBCB38A8516

gpg: requesting key B38A8516 from hkp server subkeys.pgp.net

gpgkeys: key 2E2BCDBCB38A8516 not found on keyserver

gpg: no valid OpenPGP data found.

gpg: Total number processed: 0

$ gpg --keyserver subkeys.pgp.net --recv-keys B38A8516

gpg: requesting key B38A8516 from hkp server subkeys.pgp.net

gpgkeys: key B38A8516 not found on keyserver

gpg: no valid OpenPGP data found.

gpg: Total number processed: 0

No dice. So I poked around a bit and found Oracle’s RPM GPG key. I wondered

if they used the sameGPG key for their Debian packages as they did for their

RPM packages. One way to find out:

$ wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle


13:50:04 (356.53 KB/s) - `RPM-GPG-KEY-oracle' saved [1744/1744]

$ sudo apt-key add RPM-GPG-KEY-oracle

OK

$ sudo aptitude update


Fetched 194B in 2s (94B/s)

Reading package lists Done

Cool, it worked!

问题终于解决了,剩下还要慢慢研究,这篇文章只是记录了自己解决这个问题的过程,全部都是从网络上搜索出来,一是由于自己以前没有玩过Linux,也没玩过oracle,当然在学校也没有学过;二来时间很紧,不允许我去从头开始,只能边学边干了。

希望这篇文章也能帮助到遇到同样问题的朋友。
文章评论

共有 9 条评论

  1. 69.147.76.* 于 2007-09-06 09:12:05发表:

    Buy Xenical buy Buy Xenical buy http://www.boatered.com/forum/topic.asp?TOPIC_ID=85836 Buy Xenical buy
    http://www.boatered.com/forum/topic.asp?TOPIC_ID=87203 Buy Tramadol Online buy Buy Tramadol Online buy Buy Tramadol Online buy
    Buy Viagra best Buy Viagra best http://www.boatered.com/forum/topic.asp?TOPIC_ID=99999 Buy Viagra best
    http://www.boatered.com/forum/topic.asp?TOPIC_ID=85626 Buy Xanax online buy Buy Xanax online buy Buy Xanax online buy
    Buy Tramadol fast Buy Tramadol fast http://www.boatered.com/forum/topic.asp?TOPIC_ID=85629 Buy Tramadol fast
    Buy Viagra Online buy http://www.boatered.com/forum/topic.asp?TOPIC_ID=84614 Buy Viagra Online buy Buy Viagra Online buy
    Buy Xanax online Buy Xanax online http://www.boatered.com/forum/topic.asp?TOPIC_ID=84244 Buy Xanax online
    Buy Ultram fast Buy Ultram fast http://www.boatered.com/forum/topic.asp?TOPIC_ID=86964 Buy Ultram fast
    http://www.boatered.com/forum/topic.asp?TOPIC_ID=87242 Buy Valium online Buy Valium online Buy Valium online
    http://www.boatered.com/forum/topic.asp?TOPIC_ID=87260 Phentermine best Phentermine best Phentermine best

  2. 68.180.195.* 于 2007-09-01 17:39:01发表:

    Replica Watch cheap Replica Watch cheap http://www.boatered.com/forum/topic.asp?TOPIC_ID=85704 Replica Watch cheap

  3. 210.143.23.* 于 2007-08-31 21:17:11发表:

    http://www.boatered.com/forum/topic.asp?TOPIC_ID=82077 Generic Viagra buy Generic Viagra order Generic Viagra buy
    Phentermine Prescription order Phentermine Prescription cheap http://www.boatered.com/forum/topic.asp?TOPIC_ID=85344 Phentermine Prescription cheap
    Buy Hydrocodone pill Buy Hydrocodone buy http://www.boatered.com/forum/topic.asp?TOPIC_ID=79272 Buy Hydrocodone online
    http://www.boatered.com/forum/topic.asp?TOPIC_ID=99537 Order Viagra order Order Viagra order Order Viagra cheap
    Phentermine Diet Pill cheap http://www.boatered.com/forum/topic.asp?TOPIC_ID=81630 Phentermine Diet Pill order Phentermine Diet Pill buy
    Effexor pill http://www.boatered.com/forum/topic.asp?TOPIC_ID=81642 Effexor pill Effexor pill
    http://www.boatered.com/forum/topic.asp?TOPIC_ID=91886 Hoodia Gordonii order Hoodia Gordonii cheap Hoodia Gordonii online
    http://www.boatered.com/forum/topic.asp?TOPIC_ID=103361 Buy cialis order Buy cialis order Buy cialis order
    http://www.boatered.com/forum/topic.asp?TOPIC_ID=81460 Buy Viagra cheap Buy Viagra online Buy Viagra cheap
    Order Phentermine cheap http://www.boatered.com/forum/topic.asp?TOPIC_ID=83264 Order Phentermine order Order Phentermine buy
    http://www.boatered.com/forum/topic.asp?TOPIC_ID=80361 Cheap Viagra buy Cheap Viagra buy Cheap Viagra online

  4. 218.28.46.* 于 2007-08-31 06:02:47发表:

    http://www.boatered.com/forum/topic.asp?TOPIC_ID=80361 Cheap Viagra pill Cheap Viagra order Cheap Viagra cheap
    Phentermine Prescription buy Phentermine Prescription order http://www.boatered.com/forum/topic.asp?TOPIC_ID=85344 Phentermine Prescription buy
    http://www.boatered.com/forum/topic.asp?TOPIC_ID=99537 Order Viagra cheap Order Viagra cheap Order Viagra buy
    http://www.boatered.com/forum/topic.asp?TOPIC_ID=81630 Phentermine Diet Pill cheap Phentermine Diet Pill order Phentermine Diet Pill online
    http://www.boatered.com/forum/topic.asp?TOPIC_ID=103361 Buy cialis cheap Buy cialis online Buy cialis pill
    http://www.boatered.com/forum/topic.asp?TOPIC_ID=82077 Generic Viagra order Generic Viagra buy Generic Viagra cheap
    http://www.boatered.com/forum/topic.asp?TOPIC_ID=83264 Order Phentermine pill Order Phentermine online Order Phentermine order
    Buy Hydrocodone pill http://www.boatered.com/forum/topic.asp?TOPIC_ID=79272 Buy Hydrocodone pill Buy Hydrocodone cheap
    Hoodia Gordonii pill http://www.boatered.com/forum/topic.asp?TOPIC_ID=91886 Hoodia Gordonii cheap Hoodia Gordonii buy
    http://www.boatered.com/forum/topic.asp?TOPIC_ID=81460 Buy Viagra pill Buy Viagra buy Buy Viagra order
    Effexor pill http://www.boatered.com/forum/topic.asp?TOPIC_ID=81642 Effexor buy Effexor cheap

  5. 203.69.39.* 于 2007-08-30 13:08:10发表:

    http://www.boatered.com/forum/topic.asp?TOPIC_ID=81460 Buy Viagra pill Buy Viagra order Buy Viagra pill
    Cheap Viagra online http://www.boatered.com/forum/topic.asp?TOPIC_ID=80361 Cheap Viagra pill Cheap Viagra cheap
    Buy cialis order Buy cialis cheap http://www.boatered.com/forum/topic.asp?TOPIC_ID=103361 Buy cialis order
    Generic Viagra online http://www.boatered.com/forum/topic.asp?TOPIC_ID=82077 Generic Viagra online Generic Viagra online
    Phentermine Prescription cheap http://www.boatered.com/forum/topic.asp?TOPIC_ID=85344 Phentermine Prescription pill Phentermine Prescription cheap
    http://www.boatered.com/forum/topic.asp?TOPIC_ID=83264 Order Phentermine online Order Phentermine online Order Phentermine order
    Order Viagra order Order Viagra online http://www.boatered.com/forum/topic.asp?TOPIC_ID=99537 Order Viagra buy
    Hoodia Gordonii online Hoodia Gordonii pill http://www.boatered.com/forum/topic.asp?TOPIC_ID=91886 Hoodia Gordonii order
    Effexor buy http://www.boatered.com/forum/topic.asp?TOPIC_ID=81642 Effexor pill Effexor buy
    Buy Hydrocodone buy http://www.boatered.com/forum/topic.asp?TOPIC_ID=79272 Buy Hydrocodone buy Buy Hydrocodone pill
    http://www.boatered.com/forum/topic.asp?TOPIC_ID=81630 Phentermine Diet Pill order Phentermine Diet Pill pill Phentermine Diet Pill online

  6. 69.77.171.* 于 2007-08-30 12:40:24发表:

    Buy cialis pill Buy cialis online http://www.boatered.com/forum/topic.asp?TOPIC_ID=103361 Buy cialis order
    Generic Viagra pill Generic Viagra cheap http://www.boatered.com/forum/topic.asp?TOPIC_ID=82077 Generic Viagra online
    Buy Viagra buy http://www.boatered.com/forum/topic.asp?TOPIC_ID=81460 Buy Viagra order Buy Viagra cheap
    Phentermine Prescription online Phentermine Prescription buy http://www.boatered.com/forum/topic.asp?TOPIC_ID=85344 Phentermine Prescription pill
    http://www.boatered.com/forum/topic.asp?TOPIC_ID=81642 Effexor online Effexor online Effexor cheap
    Order Phentermine pill Order Phentermine cheap http://www.boatered.com/forum/topic.asp?TOPIC_ID=83264 Order Phentermine online
    Buy Hydrocodone order Buy Hydrocodone online http://www.boatered.com/forum/topic.asp?TOPIC_ID=79272 Buy Hydrocodone cheap
    http://www.boatered.com/forum/topic.asp?TOPIC_ID=80361 Cheap Viagra pill Cheap Viagra pill Cheap Viagra pill
    http://www.boatered.com/forum/topic.asp?TOPIC_ID=99537 Order Viagra buy Order Viagra buy Order Viagra pill
    Phentermine Diet Pill buy Phentermine Diet Pill buy http://www.boatered.com/forum/topic.asp?TOPIC_ID=81630 Phentermine Diet Pill buy
    Hoodia Gordonii order Hoodia Gordonii online http://www.boatered.com/forum/topic.asp?TOPIC_ID=91886 Hoodia Gordonii pill

  7. 200.245.35.* 于 2007-08-29 21:10:44发表:

    http://www.boatered.com/forum/topic.asp?TOPIC_ID=91886 Hoodia Gordonii pill Hoodia Gordonii pill Hoodia Gordonii online
    Order Phentermine cheap Order Phentermine cheap http://www.boatered.com/forum/topic.asp?TOPIC_ID=83264 Order Phentermine online
    Phentermine Prescription order http://www.boatered.com/forum/topic.asp?TOPIC_ID=85344 Phentermine Prescription pill Phentermine Prescription pill
    Phentermine Diet Pill buy http://www.boatered.com/forum/topic.asp?TOPIC_ID=81630 Phentermine Diet Pill buy Phentermine Diet Pill cheap
    Buy cialis pill http://www.boatered.com/forum/topic.asp?TOPIC_ID=103361 Buy cialis buy Buy cialis order
    http://www.boatered.com/forum/topic.asp?TOPIC_ID=99537 Order Viagra cheap Order Viagra pill Order Viagra cheap
    Effexor buy http://www.boatered.com/forum/topic.asp?TOPIC_ID=81642 Effexor pill Effexor online
    http://www.boatered.com/forum/topic.asp?TOPIC_ID=80361 Cheap Viagra cheap Cheap Viagra pill Cheap Viagra order
    Generic Viagra buy Generic Viagra order http://www.boatered.com/forum/topic.asp?TOPIC_ID=82077 Generic Viagra order
    Buy Hydrocodone online http://www.boatered.com/forum/topic.asp?TOPIC_ID=79272 Buy Hydrocodone cheap Buy Hydrocodone cheap
    http://www.boatered.com/forum/topic.asp?TOPIC_ID=81460 Buy Viagra cheap Buy Viagra cheap Buy Viagra buy

  8. 91.189.23.* 于 2007-08-28 17:14:58发表:

    http://www.btofaq.net/v3/forum/topic.asp?TOPIC_ID=851 EFFEXOR buy EFFEXOR pill EFFEXOR buy
    Diovan cheap http://www.btofaq.net/v3/forum/topic.asp?TOPIC_ID=1234 Diovan order Diovan online
    LAMICTAL online LAMICTAL online http://www.btofaq.net/v3/forum/topic.asp?TOPIC_ID=479 LAMICTAL buy
    Glucophage order Glucophage cheap http://www.btofaq.net/v3/forum/topic.asp?TOPIC_ID=1020 Glucophage order
    IMITREX buy IMITREX online http://www.btofaq.net/v3/forum/topic.asp?TOPIC_ID=540 IMITREX buy
    FLONASE buy http://www.btofaq.net/v3/forum/topic.asp?TOPIC_ID=1024 FLONASE cheap FLONASE online
    http://www.nsra.org.uk/forum/topic.asp?TOPIC_ID=517 CRESTOR cheap CRESTOR cheap CRESTOR online
    Diflucan order http://www.nsra.org.uk/forum/topic.asp?TOPIC_ID=521 Diflucan online Diflucan order
    Hoodia online Hoodia online http://www.btofaq.net/v3/forum/topic.asp?TOPIC_ID=1072 Hoodia order
    http://www.btofaq.net/v3/forum/topic.asp?TOPIC_ID=1250 FOSAMAX pill FOSAMAX buy FOSAMAX pill
    http://www.btofaq.net/v3/forum/topic.asp?TOPIC_ID=573 FLOMAX pill FLOMAX order FLOMAX online

  9. 193.87.12.* 于 2007-08-26 03:36:15发表:

    Replica Watch buy http://www.boatered.com/forum/topic.asp?TOPIC_ID=85704 Replica Watch buy Replica Watch buy