跳至主要内容

Ubuntu安装oracle 9i

原文抄袭,本来是打算安装10G的,但是似乎因为机子本来就有9I所以暂时搁浅了,具体参照10的PDF

安装过程主要参考这篇文章,该文主要是基于kubuntu安装oracle10g的,参考这篇文章可以比较容易的安装10g,但是在安装oracle9204时遇到了很多的障碍,最终安装完成了。安装过程如下:

1.空间要求

/tmp > 512M boot 128M swap 1024M / 2G /home 2GB

2.安装所需要的软件:

gcc, libaio1, libc6, libstdc++5, make, rpm, lesstif2, lesstif2-dev

vufuture@ubuntu:~$ for i in gcc libaio1 libc6 libstic++5 make rpm lesstif2 lesstif2-dev

> do

> sudo apt-get install $i

> done

3.添加需要的用户和组:

root@ubuntu:~# groupadd dba

root@ubuntu:~# useradd -g dba -G dba -d /home/oracle -s /bin/bash oracle

root@ubuntu:~# passwd oracle

Enter new UNIX password:

Retype new UNIX password:

passwd: password updated successfully

4.创建安装目录并赋权限:

root@ubuntu:~# mkdir -p /home/oracle/product/9.2.0

root@ubuntu:~# chown -R oracle:dba /home/oracle

root@ubuntu:~# mkdir /var/opt/oracle

root@ubuntu:~# chown -R oracle:dba /var/opt/oracle

root@ubuntu:~# chmod 755 /var/opt/oracle

5.设置oracle环境变量:

vi /home/oracle/.bash_profile

添加:

export ORACLE_BASE=/home/oracle

export ORACLE_HOME=$ORACLE_BASE/product/9.2.0 export ORACLE_SID=ora9i

export PATH=$PATH:$ORACLE_HOME/bin

export DISPLAY=localhost:0.0

6.修改核心参数:

root@ubuntu:~# vi /etc/sysctl.conf

#kernel.shmall = 2097152

kernel.shmmax = 2147483648

#kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

net.core.rmem_default = 262144

net.core.rmem_max = 262144

net.core.wmem_default = 262144

net.core.wmem_max = 262144

#fs.file-max = 65536

net.ipv4.ip_local_port_range = 1024 65000 7.设置安全限制:

root@ubuntu:~# vi /etc/security/limits.conf 增加如下:

# Security Limits

soft nproc 2407

hard nproc 16384

soft nofile 1024

hard nofile 65536

8.建立符号连接

root@ubuntu:~# ln -s /usr/bin/awk /bin/awk

root@ubuntu:~# ln -s /usr/bin/rpm /bin/rpm

root@ubuntu:~# ln -s /lib/libgcc_s.so.1 /lib/libgcc_s.so

root@ubuntu:~# ln -s /usr/bin/basename /bin/basename


解压安装文件:

root@ubuntu:/home# for i in 1 2 3

> do

> zcat ship_9204_linux_disk$i.cpio.gz | cpio -idmv > done

root@ubuntu:/home# su – oracle

oracle@ubuntu:/home/Disk1$ ./runInstaller

DISPLAY not set!

Please set DISPLAY and try again.

Oracle@ubuntu:/home/Disk1$ export DISPLAY=localhost:0.0 oracle@ubuntu:/home/Disk1$ ./runInstaller

oracle@ubuntu:/home/Disk1$ Initializing Java Virtual Machine from/tmp/OraInstall2007-03-23_12-40-26AM/jre/bin/java.

Please wait.. /tmp/OraInstall2007-03-23_12-40-26AM/jre/bin/i386/native_threads/java: error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory

尝试安装:

root@ubuntu:~# apt-get install libstdc++6-dev无效 安装rpm包:

首先安装Alien,Alien 是一个将rpm, dpkg, stampede slp slackware tgz文件相互转换的工具。

Vufuture@ubuntu$ sudo apt-get install alien

vufuture@ubuntu$ sudo alien -k compat-libstdc++-7.3-2.96.118.i386.rpm

vufuture@ubuntu$ sudo dpkg -i compat-libstdc++_7.3-2.96.118_i386.deb

安装完这个rpm包后执行runInstaller不再报上面的错误,但是安装到Configuration Tools时,报如下错误: /home/oracle/jre/1.1.8/bin/../lib/i686/native_threads/libzip.so: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference (libzip.so) Unable to initialize threads: cannot find class java/lang/Thread Could not create Java VM

据网上好多文章说是由于内核版本问题,在/home/oracle/.bash_profile添加: export LD_ASSUME_KERNEL=2.4.1

继续安装,这样可以正常安装,

但是用dbca建库的时候提示: SIGSEGV 11* segmentation violation

stackbase=0xb2b4b000, stackpointer=0xb2b4ad5c ……Dump information ……

ome/oracle/product/9.2.0/bin/dbca: line 124: 27883 Killed $JRE_DIR/bin/jre -DORACLE_HOME=$OH -DJDBC_PROTOCOL=thin -mx64m -classpath $CLASSPATH oracle.sysman.assistants.dbca.Dbca $ARGUMENTS

.bash_profile增加环境变量:

THREADS_FLAG=native; export THREADS_FLAG

Explanation

The DBCA is looking for the location of the files it is to create and cannot

locate them and also may need to use native threads versus green threads.

From MetaLink

最终./bash_profile内容如下:

export ORACLE_BASE=/home/oracle

export ORACLE_HOME=/home/oracle/product/9.2.0

export ORACLE_SID=ora9i

export PATH=PATH:$ORACLE_HOME/bin:/opt/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/sbin

export DISPLAY=localhost:0.0

export LD_ASSUME_KERNEL=2.4.1

THREADS_FLAG=native; export THREADS_FLAG

在建库的时候仍然有bug2682156--"special operator does not exist"

同时,不知道为什么在安装是没有出来去掉xml DB, intermedia, text等选项的选项卡。

评论

此博客中的热门博文

4 steps to delete account in Gerrit DB

4 steps to delete account in DB. Delete from accounts where preferred_email=’’; delete from account_ssh_keys where account_id=''; delete from account_external_ids where external_id='gerrit:*’; delete from account_external_ids where external_id='username:*’; whatever it was in H2 database and postgres db . H2: ssh -p 24198 localhost gerrit gsql Postgres: psql

Python学习笔记20100117

映射list   Dictionary 是用{}. list 是一那个[]. turple是用() 当你定义过dictionary后,你可以使用d.keys(), d.values(),d.items()将定义后的时候分别显示出来 当然可以将list里的值加减乘除,也可以如一般的定义直接重新复制这个list. 链接与分割字符串的 li=";", join(li) 则显示的就是 分隔符为;的数 如果使用li=li.split(";")则将刚刚;的分隔符删除,而split里也可定义域,如li.split(";",1)   自省 <---这是啥 之前在使用的时候发觉有些书本上的模块不能调用,很多是py脚本定义过的函数。 下载该脚本s,然后上传至指定位置。 >>>import sys >>>sys.path >>>sys.path.append("绝对位置")然后就能调用这些脚本和参数了。 删除 >>>sys.path.pop() 定义一个参数是 def info(test, test1=10.test2=12): info是函数名,test是必备参数,因为没有定义值,test1和test2是可选参数,定义了初始值   以上是外部函数的调用,下面转到内部函数 内部函数有type,str,dir及其他   ---type 返回任意字符的类型,模块也可以。types模块 >>> type(1) <type 'int'> >>> li=[] >>> type(li) <type 'list'> >>> import odbchelper >>> type(odbchelper) <type 'module'> >>> type(sys) <type 'module'> >>> import types ...