跳至主要内容

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

vmware esxi 安装

需求来自于save cost. 开始有用户需求部署vmware esxi为架构的虚拟机, 由于目前没有server来测试,用户自己找的pavilion的家用机系列也跑不了。只得从onsite那里借来一台xw4400. 这机器吧,挺好,xw4400开跑的64位虚拟支持的话,先得在Blos上设置下, 因为没有这方面经验,以为机器都能直接判断,但是从安装实录上里讲,需要在blos里这是,对于xw4400的设置是,security-os security- enable virtualization. 然后重启。顺便丢入光盘。   iso其实很小大概只有200多M,是一个linux kernel的东西。里面从个人观点来看,带有web接口。和管理接口。 安装程序会自动检测你机器的配置是否符合安装要求,家用额pavilion就没检测过,看网上资料,初步认定是网卡没有不办法兼容。 一路按照提示点F2和enter就成。由于是基于网络的,请注意ip的分配。 安装完成之后请拿出光盘,因为我之前就是这样犯了个错误,导致重复安装一次:(   重启之后,会有一个界面告诉你这个管理的 http://ip 是啥, 然后你可以通过windows client段去下载客户端管理工具,ci. 里面按f2是管理配置界面,可以配置root密码,ip地址等等,详细可以参考 文章 .   点击后的下载ci客户端,点击,输入控制端ip/用户名/密码。 然后就是如vmware的配置一般。 有一点奇怪的是,他竟然没有办法认出host上的光驱。好在有网络以后,他可以mount本机和网络上的盘,当然我指的是client上的物理光驱以及网络上的虚拟iso. 选择client的话,然后用物理光驱要选emulate cd. 安装非常的方便。 然后装完两个32bit and 64bit的suse. 用户开始test -- Alex Tu ----------------------------------------------------------- ShangHai,China