验证安装Ubuntu Oracle 数据库 10g 第 2 版的系统要求

系统 Linux
//创建一些Ubuntu Oracle安装程序需要的工具的连接。 因为Ubuntu Oracle安装程序是为通过Ubuntu Oracle认证的Red Hat、Suse等版本准备的,所以有些工具的位置和Ubuntu不一样。

Ubuntu Oracle对于电脑使用的玩家的常用软件,然后我就学习及深入的研究Ubuntu Oracle,在这里和大家一起探讨Ubuntu Oracle的使用方法,希望对大家有用。Ubuntu9.04安装Oracle10.2本来一开始打算弄个Oracle XE 玩玩也就行了,而且还有Debian版本的下载,在ubuntu安装个肯定也容易,结果试了一下,总时有些问题莫名其妙,所以就干脆搞个真正的企业版安装 下,反正以前也安装成功过,可惜没有完整总结记录下来,这下也正好可以总结一下。

注意:Ubuntu Oracle 安装的Linux版本中,已经通过Ubuntu Oracle认证的有RedHat、Suse、Unbreakable Linux、asianux。如果安装的linux系统是上面linux版本之一,最好去Ubuntu Oracle官方文档去查阅,本文仅仅限于 Ubuntu9.04,不同的版本也会有些许不同。

本文主要参考了Ubuntu论坛上的一篇ubuntu 8.10 安装Ubuntu Oracle10G 企业版综合指南http://forum.ubuntu.org.cn/viewtopic.php?f=44&t=170399&sid=0fcf8acc5269b19e513e2249edacd886&start=0在此表示感谢!

一、验证安装Ubuntu Oracle 数据库 10g 第 2 版的系统要求

按照Ubuntu Oracle官方指南,首先需要验证RAM和交换空间大小要查看可用 RAM 和交换空间大小,运行以下命令:

  1. grep MemTotal /proc/meminfo  
  2. grep SwapTotal /proc/meminfo 

我本机的例子:

  1. dhn@dhn-laptop:~$ grep MemTotal /proc/meminfo  
  2. MemTotal:        2060248 kB  
  3. dhn@dhn-laptop:~$ grep SwapTotal /proc/meminfo  
  4. SwapTotal:       2088408 kB 

根 据Ubuntu Oracle官方网站的安装说明要求:所需最小 RAM 为 1,024MB,而所需最小交换空间为 1GB。对于 RAM 小于或等于 2GB 的系统,交换空间应为 RAM 数量的两倍;对于 RAM 大于 2GB 的系统,交换空间应为 RAM 数量的一到两倍。

Ubuntu Oracle 数据库 10g 第 2 版软件还需要 2.5GB 的可用磁盘空间,而数据库则另需 1.2GB 的可用磁盘空间。/tmp 目录至少需要 400MB 的可用空间。要检查系统上的可用磁盘空间,运行以下命令:df -h

我本机的例子:

  1. dhn@dhn-laptop:~$ df -h  
  2. 文件系统            容量  已用 可用 已用% 挂载点  
  3. /dev/sda7              27G   11G   15G  44% /  
  4. tmpfs                1006M     0 1006M   0% /lib/init/rw  
  5. varrun               1006M  104K 1006M   1% /var/run  
  6. varlock              1006M     0 1006M   0% /var/lock  
  7. udev                 1006M  188K 1006M   1% /dev  
  8. tmpfs                1006M  208K 1006M   1% /dev/shm  
  9. lrm                  1006M  2.4M 1004M   1% /lib/modules/2.6.28-11-generic/volatile 

可以看到根文件系统可用空间为15G,大于必须的(2.5 + 1.2 + 0.4 = 4.1GB)。

此外可能需要事先安装包libaio1,因为一开始安装Ubuntu Oracle XE时,需要安装的当时就安装上了,这个未加验证。而且最好开启root用户,因为Ubuntu默认是关闭root用户的,但是在Ubuntu Oracle的安装过程中,需要root用户来执行两个脚本。

如果需要安装libaio1,可以通过下面来安装

  1. dhn@dhn-laptop:~$ sudo apt-get install libaio1开启root  
  2. dhn@dhn-laptop:~$ sudo passwd root按照提示输入新密码即可。 

二、创建用户

Ubuntu Oracle要用Ubuntu Oracle用户安装,安装好后,同样用Ubuntu Oracle用户启动。

  1. //创建用户组oinstall  
  2. dhn@dhn-laptop:~$ sudo addgroup oinstall   
  3. //创建用户组dba  
  4. dhn@dhn-laptop:~$ sudo addgroup dba  
  5. //创建用户组nobody  
  6. dhn@dhn-laptop:~$ sudo addgroup nobody 

//将用户oracle的初始组设为oinstall,并加入到组dba中,home目录设为/home/oracle.此目录如果不存在则自动创建,shell为bash。
dhn@dhn-laptop:~$ sudo useradd -g oinstall -G dba -d /home/oracle -m -s /bin/bash oracle//查看nobody用户所在的组
dhn@dhn-laptop:~$ id nobodyuid=65534(nobody) gid=65534(nogroup) 组=65534(nogroup)//将nobody用户加入到nobody组里面
dhn@dhn-laptop:~$ sudo usermod -G nobody nobody//核实nobody加入的组里面有组nobody
dhn@dhn-laptop:~$ id nobodyuid=65534(nobody) gid=65534(nogroup) 组=65534(nogroup),1003(nobody)//设置用户oracle密码
dhn@dhn-laptop:~$ sudo passwd oracle

三、创建目录。

//建立oracle_base目录,如果不存在,就创建,oracle安装于此。
dhn@dhn-laptop:~$ sudo mkdir -p /opt/oracle10//将此目录及其下的文件或者目录的所有者改为oinstall组的oracle
dhn@dhn-laptop:~$ sudo chown -R oracle:oinstall /opt/oracle10///将此目录及其下文件权限设为755
dhn@dhn-laptop:~$ sudo chmod -R 775 /opt/oracle10/

四、修改内核参数

dhn@dhn-laptop:~$ sudo gedit /etc/sysctl.conf将以下部分,增加到文件末尾,并保存。

  1. # special setting for oracle XE  
  2.  kernel.shmmax = 536870912 
  3.  kernel.shmmni = 4096 
  4.  kernel.shmall = 2097152 
  5.  kernel.sem = 250 32000 100 128  
  6.  fs.file-max = 65536 
  7.  net.ipv4.ip_local_port_range = 1024 65000  
  8. //使设置生效  
  9. dhn@dhn-laptop:~$ sudo sysctl -p 

dhn@dhn-laptop:~$ sudo gedit /etc/security/limits.conf 在文件末尾最后一行#end 之前加入下面内容。

  1. #setting for oracle 10g  
  2. oracle soft nofile 65536  
  3. oracle hard nofile 65536  
  4. oracle soft nproc 16384  
  5. oracle hard nproc 16384 


五、创建链接及Red Hat release:

//创建一些Ubuntu Oracle安装程序需要的工具的连接。 因为Ubuntu Oracle安装程序是为通过Ubuntu Oracle认证的Red Hat、Suse等版本准备的,所以有些工具的位置和Ubuntu不一样。

  1. dhn@dhn-laptop:~$ sudo ln -s /usr/bin/awk /bin/awk  
  2. dhn@dhn-laptop:~$ sudo ln -s /usr/bin/rpm /bin/rpm  
  3. dhn@dhn-laptop:~$ sudo ln -s /usr/bin/basename /bin/basename 

建立redhat的release因为Ubuntu Oracle默认是不支持Ubuntu的,所以要把Ubuntu伪装成Redhat

  1. dhn@dhn-laptop:/etc$ sudo touch redhat-release  
  2. dhn@dhn-laptop:/etc$ sudo gedit redhat-release  

在文件内增加内容:Red Hat Linux release 4.1

六、//使Java环境可以正常显示中文。这样在安装Ubuntu Oracle时候的界面上的中文就不会出现乱码了。

  1. $ cd $JAVA_HOME/jre/lib/fonts  
  2. $ sudo mkdir fallback  
  3. $ ln -s /usr/share/fonts/truetype/wqy/wqy-zenhei.ttc  
  4. $ sudo  mkfontdir  
  5. $ sudo mkfontscale  

七、用Ubuntu Oracle用户登录X

进入安装文件目录oracle@dhn-laptop:~$ ./runInstaller -jreLoc $JAVA_HOME/jre/注意:此处安装程序后面增加了-jreLoc的参数,因为刚刚我们更改了本地已经安装的jre,使之能够支持中文显示,这里的意思是使用我们修改后的 jre,这样Ubuntu Oracle安装界面中文就可以基本显示正常了。

虽然在安装Database config assistant 时候弹出的界面仍然会出现乱码,但影响不大,我记得好像就2个页面。如果不加此参数,oracle会使用自己的jre,但是这样安装界面中文就出现了乱码,当然也可以通过先执行下export LC_CTYPE=en_US.UTF-8,再运行 runinstaller 进入全英文安装界面。
oracle@dhn-laptop:~$ export LC_CTYPE=en_US.UTF-8

以下为我个人设置产品清单目录完整路径 :/opt/oracle10操作系统组:oinstallORACLE_HOME:/opt/oracle10/product/10.2.0/db_1全局数据库名称:orcl
sid:orcl数据库字符集: ZHS16GBK存储选择 :文件系统数据文件位置:/opt/oracle10/product/10.2.0/oradata/安装会话日志: /opt/oracle10/logs/installActions2009-06-21_08-37-14AM.log

安装过程中还会出现一个警告,详细看日志文件,才发现:信息: gcc: /usr/lib/libstdc++.so.5:没有该文件或目录//查看/usr/lib下libstdc++是否存在
oracle@dhn-laptop:~$ ls /usr/lib | grep c++
libstdc++.so.6
libstdc++.so.6.0.10

发现有两个,而且主要还是使用的是libstdc++.so.6.0.10的,libstdc++.so.6仅仅是一个到libstdc++.so.6.0.10的链接文件,所以我们也可以这么作。建立一个链接文件即可。root@dhn-laptop:~# ln -s /usr/lib/libstdc++.so.6 /usr/lib/libstdc++.so.5然后重试,一切ok。

以下是Ubuntu Oracle的 J2EE 应用程序已经配置完, 并且可用下面列出的 URL 来访问。
iSQL*Plus URL:http://dhn-laptop:5560/isqlplus
iSQL*Plus DBA URL:http://dhn-laptop:5560/isqlplus/dba
Enterprise Manager 10g Database Control URL:http://dhn-laptop:1158/em

【编辑推荐】

  1. Ubuntu oracle10G安装程序建立用户和用户组
  2. Ubuntu Oracle 10g安装/配置与更新硬件信息
  3. Ubuntu oracle基础系统安装程序
  4. 讲述用户Ubuntu oracle安装过程
  5. 叙述讲解UBUNTU Oracle配置安装
责任编辑:佚名 来源: CSDN
相关推荐

2010-02-03 16:16:49

Linux Oracl

2009-11-19 15:57:34

Oracle 10g数

2011-08-09 18:15:24

Oracle 10g查找数据

2010-09-17 09:39:31

Oracle 10g

2010-05-05 15:52:36

Oracle 10G

2011-03-29 09:56:48

Oracle数据库10SQL

2009-01-20 23:13:24

Oracle 10G数据库

2011-03-29 10:09:41

Oracle 10g虚拟数据库

2009-09-07 09:03:47

VMWare安装Ora

2010-04-16 15:57:54

Oracle 10g

2010-02-05 09:06:14

Ubuntu Orac

2011-05-13 11:21:51

linuxoracle 10g安装

2011-08-09 13:14:37

Oracle 10g数据库闪回

2010-04-12 13:34:42

Oracle 10g

2011-08-30 15:57:15

Oracle 10gUNDO_RETENT

2010-04-07 09:39:18

Oracle 10G

2011-08-17 16:28:31

Windows SerOracle 10g

2010-04-13 10:07:19

Oracle 10G

2011-08-17 13:37:27

Windows7卸载Oracle 10

2010-04-14 16:09:51

Oracle 10g归
点赞
收藏

51CTO技术栈公众号