Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2389759
  • 博文数量: 384
  • 博客积分: 10193
  • 博客等级: 上将
  • 技术积分: 3785
  • 用 户 组: 普通用户
  • 注册时间: 2005-06-09 18:02
文章分类

全部博文(384)

文章存档

2011年(10)

2010年(29)

2009年(39)

2008年(36)

2007年(43)

2006年(198)

2005年(29)

分类: Oracle

2006-01-04 15:49:49

 install oracle 9204 on Debian 3.1

作者 blue_stone
E-mail blue_stone@xinhuanet.com

本文记录了在Debian 3.1环境下安装oracle 9204的过程,硬件环境为vmware gsx server 3.1.0 build-9089 on windows 2003,虚拟机内存分配了272m。参考了 ~chaos/debian-ora9i.txt,套用原文的一句话,*基本上都是抄的*。


1 vm建立时选择虚拟机类型为RedHatEnterprise linux 3 ,hd大小为12G

2 debian安装时选择2.4内核。安装完成后uname -a 的结果如下
    debian24:~# uname -a
    Linux debian24 2.4.27-2-386 #1 Mon May 16 16:47:51 JST 2005 i686 GNU/Linux
3 安装需要的软件包。

3.1 删除exim和nvi,安装vim,这一步依照个人习惯,和oracle没有太大的关联。
   apt-get remove --purge exim* nvi
   apt-get install vim

3.2 安装x,因为我打算在本机上使用图形界面安装oracle所以我们安装了x-window-system-core 和kde-core。
   apt-get install x-window-system-core
   apt-get install kde-core

3.3 安装oracle需要的软件包

debian24:~# apt-get install make binutils gcc libstdc++2.10-glibc2.2 libstdc++2.10-dev
Reading Package Lists... Done
Building Dependency Tree... Done
make is already the newest version.
binutils is already the newest version.
gcc is already the newest version.
The following extra packages will be installed:
  cpp-2.95 g++-2.95 gcc-2.95
Suggested packages:
  gcc-2.95-doc task-devel-common stl-manual
The following NEW packages will be installed:
  cpp-2.95 g++-2.95 gcc-2.95 libstdc++2.10-dev libstdc++2.10-glibc2.2
0 upgraded, 5 newly installed, 0 to remove and 81 not upgraded.
Need to get 2490kB of archives.
After unpacking 7135kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 stable/main cpp-2.95 1:2.95.4-22 [114kB]
Get:2 stable/main gcc-2.95 1:2.95.4-22 [937kB]
Get:3 stable/main libstdc++2.10-glibc2.2 1:2.95.4-22 [127kB]
Get:4 stable/main libstdc++2.10-dev 1:2.95.4-22 [295kB]
Get:5 stable/main g++-2.95 1:2.95.4-22 [1016kB]
Fetched 2490kB in 2s (1088kB/s)
Selecting previously deselected package cpp-2.95.
(Reading database ... 33512 files and directories currently installed.)
Unpacking cpp-2.95 (from .../cpp-2.95_1%3a2.95.4-22_i386.deb) ...
Selecting previously deselected package gcc-2.95.
Unpacking gcc-2.95 (from .../gcc-2.95_1%3a2.95.4-22_i386.deb) ...
Selecting previously deselected package libstdc++2.10-glibc2.2.
Unpacking libstdc++2.10-glibc2.2 (from .../libstdc++2.10-glibc2.2_1%3a2.95.4-22_i386.deb) ...
Selecting previously deselected package libstdc++2.10-dev.
Unpacking libstdc++2.10-dev (from .../libstdc++2.10-dev_1%3a2.95.4-22_i386.deb) ...
Selecting previously deselected package g++-2.95.
Unpacking g++-2.95 (from .../g++-2.95_1%3a2.95.4-22_i386.deb) ...
Setting up cpp-2.95 (2.95.4-22) ...

Setting up gcc-2.95 (2.95.4-22) ...

Setting up libstdc++2.10-glibc2.2 (2.95.4-22) ...

Setting up g++-2.95 (2.95.4-22) ...

Setting up libstdc++2.10-dev (2.95.4-22) ...

3.4  设置gcc
debian24:~# gcc -v
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.5/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --enable-__cxa_atexit --with-system-zlib --enable-nls --without-included-gettext --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
Thread model: posix
gcc version 3.3.5 (Debian 1:3.3.5-13)
debian24:~# ls -al /usr/bin|grep gcc
lrwxrwxrwx   1 root root          7 2006-01-04 12:43 gcc -> gcc-3.3
-rwxr-xr-x   1 root root      69960 2004-03-10 14:47 gcc-2.95
-rwxr-xr-x   1 root root      85196 2005-05-25 08:03 gcc-3.3
lrwxrwxrwx   1 root root         10 2006-01-04 12:43 gccbug -> gccbug-3.3
-rwxr-xr-x   1 root root      16056 2005-05-25 07:25 gccbug-3.3
lrwxrwxrwx   1 root root          7 2006-01-04 12:43 i386-linux-gcc -> gcc-3.3
lrwxrwxrwx   1 root root          7 2006-01-04 12:43 i386-linux-gcc-3.3 -> gcc-3.3
lrwxrwxrwx   1 root root          7 2006-01-04 12:43 i486-linux-gcc-3.3 -> gcc-3.3
debian24:~# rm /usr/bin/gcc
debian24:~# ln -s /usr/bin/gcc-2.95 /usr/bin/gcc
debian24:~# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)

3.5确认perl,ld的版本
debian24:~# perl -v

This is perl, v5.8.4 built for i386-linux-thread-multi

Copyright 1987-2004, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl'' or `perldoc perl''.  If you have access to the
Internet, point your browser at the Perl Home Page.

debian24:~# ld -v
GNU ld version 2.15

3.6 建立oracle需要的连接,由于发行版本的一些问题,debian下和redhat下一些文件的位置并不一样,我们建立这样的连接
debian24:~# ln -s /usr/bin/awk /bin/awk
debian24:~# ln -s /usr/bin/sort /bin/sort
debian24:~# ln -s /usr/bin/basename /bin/basename

3.7 建立文件/etc/rac_on,这个文件在dbca执行时被检查,请参考$ORACLE_HOME/bin/dbca脚本118-125行,如果不建立这个文件,安装以后的建库过程将失败,但是单独运行dbca将可以运行。
touch /etc/rac_on

3.8 建立libstdc++-libc6.1-1.so.2的链接,否则oui将提示找不到文件错误

ln -s /usr/lib/libstdc++-libc6.2-1.so.3  /usr/lib/libstdc++-libc6.1-1.so.2

4 设置内核变量,编辑/etc/sysctl.conf,填加如下内容
kernel.sem="250 32000 100 128"
kernel.shmall=2097152
kernel.shmmax=268435456
kernel.shmmni=4096
fs.file-max=65536
然后运行sysctl -p 使这些内核设置生效

debian24:~# sysctl -p
kernel.sem = "250 32000 100 128"
kernel.shmall = 2097152
kernel.shmmax = 268435456
kernel.shmmni = 4096
fs.file-max = 65536


5 建立oracle 用户及软件安装目录
debian24:~# groupadd oinstall
debian24:~# groupadd dba
debian24:~# useradd -d /home/oracle -g oinstall -G dba,oinstall -s /bin/bash oracle
debian24:~# mkdir -p /home/oracle
debian24:~# chown -R oracle:oinstall /home/oracle
debian24:~# mkdir -p /u01/app/oracle
debian24:~# chown -R oracle:oinstall /u01/app/oracle
debian24:~# passwd oracle
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

6 以oracle用户身份的登陆建立文件~/.bash_profile包括如下内容

export ORACLE_BASE=/home/oracle
export ORACLE_HOME=$ORACLE_BASE/product/9.2.0
export ORACLE_TERM=xterm
export ORACLE_SID=orcl
export PATH=$PATH:$ORACLE_HOME/bin
export THREADS_FLAG=native

7 使用source .bash_profile或者重新登陆使环境变量设置生效,然后使用startx启动x,运行光盘下的runInstaller开始安装,安装步骤与其他发行版本相同。

8 agent configuration assistant过程将会失败,如果需要使用oracle 管理服务器则可以打补丁3119415。


9 debian sid中的bash版本为3.1-2,在编译过程中出现停滞的情况,并且在log中出现如下提示

sed: -e expression #1, char 7: unterminated `s' command

则需要降低bash版本,如使用3.1中的bash,版本为2.05b-26

阅读(8815) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~