LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 992|回复: 0

debian下安装oracle 9204

[复制链接]
发表于 2006-1-9 16:46:18 | 显示全部楼层 |阅读模式
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。参考了 http://www.geekbone.org/~chaos/d ... 上都是抄的*。


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

2 debian安装时选择2.4内核。安装完成后uname -a 的结果如下

  1.     debian24:~# uname -a
  2.     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。

  1.    apt-get install x-window-system-core
  2.    apt-get install kde-core
复制代码

3.3 安装oracle需要的软件包

  1. debian24:~# apt-get install make binutils gcc libstdc++2.10-glibc2.2 libstdc++2.10-dev
  2. Reading Package Lists... Done
  3. Building Dependency Tree... Done
  4. make is already the newest version.
  5. binutils is already the newest version.
  6. gcc is already the newest version.
  7. The following extra packages will be installed:
  8.   cpp-2.95 g++-2.95 gcc-2.95
  9. Suggested packages:
  10.   gcc-2.95-doc task-devel-common stl-manual
  11. The following NEW packages will be installed:
  12.   cpp-2.95 g++-2.95 gcc-2.95 libstdc++2.10-dev libstdc++2.10-glibc2.2
  13. 0 upgraded, 5 newly installed, 0 to remove and 81 not upgraded.
  14. Need to get 2490kB of archives.
  15. After unpacking 7135kB of additional disk space will be used.
  16. Do you want to continue? [Y/n]
  17. Get:1 http://debian.ustc.edu.cn stable/main cpp-2.95 1:2.95.4-22 [114kB]
  18. Get:2 http://debian.ustc.edu.cn stable/main gcc-2.95 1:2.95.4-22 [937kB]
  19. Get:3 http://debian.ustc.edu.cn stable/main libstdc++2.10-glibc2.2 1:2.95.4-22 [127kB]
  20. Get:4 http://debian.ustc.edu.cn stable/main libstdc++2.10-dev 1:2.95.4-22 [295kB]
  21. Get:5 http://debian.ustc.edu.cn stable/main g++-2.95 1:2.95.4-22 [1016kB]
  22. Fetched 2490kB in 2s (1088kB/s)
  23. Selecting previously deselected package cpp-2.95.
  24. (Reading database ... 33512 files and directories currently installed.)
  25. Unpacking cpp-2.95 (from .../cpp-2.95_1%3a2.95.4-22_i386.deb) ...
  26. Selecting previously deselected package gcc-2.95.
  27. Unpacking gcc-2.95 (from .../gcc-2.95_1%3a2.95.4-22_i386.deb) ...
  28. Selecting previously deselected package libstdc++2.10-glibc2.2.
  29. Unpacking libstdc++2.10-glibc2.2 (from .../libstdc++2.10-glibc2.2_1%3a2.95.4-22_i386.deb) ...
  30. Selecting previously deselected package libstdc++2.10-dev.
  31. Unpacking libstdc++2.10-dev (from .../libstdc++2.10-dev_1%3a2.95.4-22_i386.deb) ...
  32. Selecting previously deselected package g++-2.95.
  33. Unpacking g++-2.95 (from .../g++-2.95_1%3a2.95.4-22_i386.deb) ...
  34. Setting up cpp-2.95 (2.95.4-22) ...

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

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

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

  38. Setting up libstdc++2.10-dev (2.95.4-22) ...
复制代码

3.4  设置gcc

  1. debian24:~# gcc -v
  2. Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.5/specs
  3. 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
  4. Thread model: posix
  5. gcc version 3.3.5 (Debian 1:3.3.5-13)
  6. debian24:~# ls -al /usr/bin|grep gcc
  7. lrwxrwxrwx   1 root root          7 2006-01-04 12:43 gcc -> gcc-3.3
  8. -rwxr-xr-x   1 root root      69960 2004-03-10 14:47 gcc-2.95
  9. -rwxr-xr-x   1 root root      85196 2005-05-25 08:03 gcc-3.3
  10. lrwxrwxrwx   1 root root         10 2006-01-04 12:43 gccbug -> gccbug-3.3
  11. -rwxr-xr-x   1 root root      16056 2005-05-25 07:25 gccbug-3.3
  12. lrwxrwxrwx   1 root root          7 2006-01-04 12:43 i386-linux-gcc -> gcc-3.3
  13. lrwxrwxrwx   1 root root          7 2006-01-04 12:43 i386-linux-gcc-3.3 -> gcc-3.3
  14. lrwxrwxrwx   1 root root          7 2006-01-04 12:43 i486-linux-gcc-3.3 -> gcc-3.3
  15. debian24:~# rm /usr/bin/gcc
  16. debian24:~# ln -s /usr/bin/gcc-2.95 /usr/bin/gcc
  17. debian24:~# gcc -v
  18. Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
  19. gcc version 2.95.4 20011002 (Debian prerelease)
复制代码

3.5确认perl,ld的版本

  1. debian24:~# perl -v

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

  3. Copyright 1987-2004, Larry Wall

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

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

  9. debian24:~# ld -v
  10. GNU ld version 2.15
复制代码


3.6 建立oracle需要的连接,由于发行版本的一些问题,debian下和redhat下一些文件的位置并不一样,我们建立这样的连接

  1. debian24:~# ln -s /usr/bin/awk /bin/awk
  2. debian24:~# ln -s /usr/bin/sort /bin/sort
  3. debian24:~# ln -s /usr/bin/basename /bin/basename
复制代码

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

  1. touch /etc/rac_on
复制代码


4 设置内核变量,编辑/etc/sysctl.conf,填加如下内容

  1. kernel.sem="250 32000 100 128"
  2. kernel.shmall=2097152
  3. kernel.shmmax=268435456
  4. kernel.shmmni=4096
  5. fs.file-max=65536
复制代码

然后运行sysctl -p 使这些内核设置生效

  1. debian24:~# sysctl -p
  2. kernel.sem = "250 32000 100 128"
  3. kernel.shmall = 2097152
  4. kernel.shmmax = 268435456
  5. kernel.shmmni = 4096
  6. fs.file-max = 65536
复制代码


5 建立oracle 用户及软件安装目录

  1. debian24:~# groupadd oinstall
  2. debian24:~# groupadd dba
  3. debian24:~# useradd -d /home/oracle -g oinstall -G dba,oinstall -s /bin/bash oracle
  4. debian24:~# mkdir -p /home/oracle
  5. debian24:~# chown -R oracle:oinstall /home/oracle
  6. debian24:~# mkdir -p /u01/app/oracle
  7. debian24:~# chown -R oracle:oinstall /u01/app/oracle
  8. debian24:~# passwd oracle
  9. Enter new UNIX password:
  10. Retype new UNIX password:
  11. passwd: password updated successfully
复制代码

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

  1. export ORACLE_BASE=/home/oracle
  2. export ORACLE_HOME=$ORACLE_BASE/product/9.2.0
  3. export ORACLE_TERM=xterm
  4. export ORACLE_SID=orcl
  5. export PATH=$PATH:$ORACLE_HOME/bin
  6. export THREADS_FLAG=native
复制代码

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

8 agent configuration assistant过程将会失败,如果需要使用oracle 管理服务器则可以打补丁3119415。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表