跳至主要内容

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

繁忙的周末

回了杭州,周五跟老爹吃夜宵,周六跟一群人玩,好乐迪9折加对折,然后夜宵,长肉。 跟老妈逛街。。花了我一千大洋,买了2件外套了受不了了。 结果。。唉。。去赶火车结果没坐上,改签,跟老妈发脾气。。让我多睡了10分钟结果拉下了火车。 然后做七点四十七的车,一路出战一路狂奔赶地铁。。 终于赶上了。 真不容易,还是要提早啊

mod

apache安装后,如果想再添加模块,往往不想重新安装一次,再者,我在安装中发现,并不是安装文件中所有的modules都会被默认安装,即使在安装中使用了 ./configure --prefix=/usr/local/apache --enable-so --enable-modules=all --enable-mods-shared=all也是如此。我使用上述方法安装的apache2.2.6就没有安装proxy相关模块。这时,需要手工生成so文件,但会自动的被复制到你的apache安装目录的modules中,然后修改apache的配置文件,加载相关模块,验证apache配置并重启服务即可。以上描述的具体操作步骤如下: 操作系统:linux redhat 4.5 ES apache版本:2.2.6 可自行下载tar包 1. 拷贝安装包到/usr/local,并在目标目录下进行解压。[root@localhost local]# cd /usr/local[root@localhost local]# tar -zxvf httpd-2.2.4.tar.gz2. 配置安装参数,安装的目标目录为/usr/local/apache,建议设置enable-mods-shared=all,不用的module注释掉就行了![root@localhost local]# cd httpd-2.2.4[root@localhost httpd-2.2.4]# ./configure --prefix=/usr/local/apache --enable-so --enable-mods-shared=all3. 编译并安装。[root@localhost httpd-2.2.4]# make[root@localhost httpd-2.2.4]# make install4. 启动Apache,并测试。[root@localhost httpd-2.2.4]# cd /usr/local/apache/bin[root@localhost bin]# ./apachectl start 打开浏览器,并在地址栏中输入主机的IP地址如 http://192.168.1.254/ 如果出现以下画面则说明安装成功。It works! 注意:安装完成后检查系统服务中的HTTPD服务是否已...