天天看点

Suse Linux Enterprise 11安装Oracle11g(一)

本本上是双系统,Ubuntu12.04+Win7.为了使用两个操作系统 能共享Oracle。故决定用Vmware来安装一个Linux Oracle Server,这样只要两个系统都装上Vmware就可以实现数据库的共享了。

Vmware中我安装了RedHat6.3,Ubuntu Server 12和Suse Linux Enterprise11.

三个系统在Vmware中推荐的内存分别是2G,1G和768M,看来还是Suse需要的内存最小,所以先在Suse上安装Oracle.

以下操作均在root权限下进行。

1.检查硬件要求

内存要求

内存1G以上.

使用如下命令查看当前系统总的物理内存

# grep MemTotal /proc/meminfo
MemTotal:        1020800 kB      
可以看到我的虚拟机刚好满足要求,接下来看Swap空间的需求。下面这个表格描述了物理内存和虚拟内存的关系。      
RAM Swap Space
Between 1 GB and 2 GB 1.5 times the size of RAM
Between 2 GB and 16 GB Equal to the size of RAM
More than 16 GB 16 GB

用如下命令查看当前系统的交换空间大小

#grep SwapTotal /proc/meminfo      
SwapTotal:       1139708 kB
      
如果Swap空间不够,可以手动增加Swap空间的大小。按上面官方建议,我应该拥有1.5G的交换空间,而我的系统现在只拥有约1.1G的空间。下面来添加400M额外的Swap空间。      
#mkdir /swap      
#dd if=/dev/zero of=/swap/swapfile bs=1024 count=409600  --创建swap交换空间      
409600+0 records in
409600+0 records out
419430400 bytes (419 MB) copied, 6.10832 s, 68.7 MB/s
      
#mkswap /swap/swapfile  --指定作为交换空间的文件      
Setting up swapspace version 1, size = 409596 KiB
no label, UUID=3fababb1-04ec-4c38-a604-e0038578a2c4
      
#swapon /swap/swapfile  --激活swap      
# free
             total       used       free     shared    buffers     cached
Mem:       1020800     914760     106040          0      13360     692716
-/+ buffers/cache:     208684     812116
Swap:      1549304          0    1549304
      
运行free命令后,可以看到swap空间已经增加到1.5G大小。      
oracle11g的自动内存管理特性,需要使用到操作系统的共享内存(/dev/shm).在配置oracle PGA和SGA内存时,参数          MEM              ORY_TARGET                 or          MEMORY_MAX_TARGET 不能大于系统的共享内存。可以用如下命令来查看共享内存大小。           
# df -h /dev/shm/
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           499M  1.0M  498M   1% /dev/shm

           
磁盘空间要求      
/tmp目录至少1GB空间      
查看/tmp空间大小      
# uname -m
x86_64
           

这个表格展示了x86_64系统各个版本的安装文件和数据文件所需要磁盘空间大小。

Installation

Type

Requirement for Software Files (GB)

Enterprise

Edition

4.35
Standard Edition 3.73

Installation

Type

Disk Space for Data Files (GB)

Enterprise

Edition

1.68
Standard Edition 1.48
2.检查软件要求      
操作系统要求      
  • Asianux 2.0
  • Asianux 3.0
  • Oracle Enterprise Linux 4.0 Update 7 or later
  • Oracle Enterprise Linux 5.0
  • Red Hat Enterprise Linux 4.0 Update 7 or later
  • Red Hat Enterprise Linux 5.0
  • SUSE Linux Enterprise Server 10.0
  • SUSE Linux Enterprise Server 11.0
#cat /proc/version
Linux version 3.0.13-0.27-default ([email protected]) (gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux) ) #1 SMP Wed Feb 15 13:33:49 UTC 2012 (d73692b)
#lsb_release -id
Distributor ID:	SUSE LINUX
Description:	SUSE Linux Enterprise Server 11 (x86_64)
      
当前系统在官方支持的操作系统里。      
内核要求      
  • On Asianux 2.0, Oracle Enterprise Linux 4.0, and Red Hat Enterprise Linux 4.0:

    2.6.9 or later

  • On Asianux 3.0, Oracle Enterprise Linux 5.0, and Red Hat Enterprise Linux 5.0:

    2.6.18 or later

  • On SUSE Linux Enterprise Server 10:

    2.6.16.21 or later

  • On SUSE Linux Enterprise Server 11:

    2.6.27.19 or later

# uname -r      
3.0.13-0.27-default
      
同样满足要求      
安装包要求      
x86-64

        

SUSE

Linux Enterprise Server 11

The following packages (or later versions) must be installed:
binutils-2.19
gcc-4.3
gcc-32bit-4.3
gcc-c++-4.3
glibc-2.9
glibc-32bit-2.9
glibc-devel-2.9
glibc-devel-32bit-2.9
ksh-93t
libaio-0.3.104
libaio-32bit-0.3.104
libaio-devel-0.3.104
libaio-devel-32bit-0.3.104
libstdc++33-3.3.3
libstdc++33-32bit-3.3.3
libstdc++43-4.3.3_20081022
libstdc++43-32bit-4.3.3_20081022
libstdc++43-devel-4.3.3_20081022
libstdc++43-devel-32bit-4.3.3_20081022
libgcc43-4.3.3_20081022
libstdc++-devel-4.3
make-3.81
sysstat-8.1.5      

使用如下命令查看要求的包有没有安装

# rpm -q package_name      
# rpm -q binutils
      

binutils-2.21.1-0.7.25

表示已经安装了2.21.1版本。当然你也可以一次把所有的包都检查掉。      
#rpm -q binutils gcc gcc-32bit gcc-c++ glibc glibc-32bit glibc-devel glibc-devel-32bit ksh libaio libaio-32bit libaio-devel libaio-devel-32bit libstdc++33 libstdc++33-32bit libstdc++43 libstdc++43-32bit libstdc++43-devel libstdc++43-devel-32bit libgcc43 libstdc++-devel make sysstat

      
如果没有安装,可以点击Computer->Install/Remove Software      
Suse Linux Enterprise 11安装Oracle11g(一)
然后通过关键字搜索,再来选择需要安装哪些包。      
Suse Linux Enterprise 11安装Oracle11g(一)

这样就可以把所有的依赖包都安装好了