opensuse 13.1 x86_32安装oracle10g r2

目录

一、介绍

二、硬件要求

三、软件要求

四、注意事项

五、前期准备工作

六、oracle安装及相关配置

七、防火墙设置和客户端测试

 

一、介绍

本文以opensuse 13.1 x86_32作为服务器系统,并在opensuse上安装oracle 10g r2。

 

二、硬件要求

系统内存&swap要求:

  • 至少1024M物理内存

  • 下表展示物理内存和swap空间大小要求

    Available RAM Swap Space Required
    Between 1024 MB and 2048 MB 1.5 times the size of RAM
    Between 2049 MB and 8192 MB Equal to the size of RAM
    More than 8192 MB 0.75 times the size of RAM
  • /tmp目录下至少400M磁盘空间

  • 依据oracle安装类型的不同,至少保证1.5G到3.5G的空余磁盘空间

  • 1.2 GB of disk space for a preconfigured database that uses file system storage (optional)

检测swap大小

# grep SwapTotal /proc/meminfo

 

三、软件要求

操作系统:opensuse 13.1 x86_32

openSUSE-13.1-DVD-i586.iso

数据库软件:oracle 10g R2

10201_database_linux32.zip

客户端:sqldeveloper

sqldeveloper-4.0.3.16.84-1.noarch.rpm 

 

四、注意事项

oracle安装需图形界面,请安装gnome、kde、xfce等任意界面,本文中opensuse以xfce作为系统GUI安装。本文不会以root用户操作系统,因此所有的命令都通过sudo来执行。

 

五、前期准备工作

1、安装oracle依赖包 

oracle官方文档要求的依赖包如下:

Packages

The following packages (or later versions) must be installed:

 

SUSE Linux Enterprise Server 9:

 

gcc-3.3.3-43

gcc-c++-3.3.3-43

glibc-2.3.3-98

libaio-0.3.98-18

libaio-devel-0.3.98-18

make-3.80

openmotif-libs-2.2.2-519.1

安装依赖包:

 

 2、创建oracle用户和组

运行以下命令添加oracle用户和组:

(1)创建oinstall组

sudo /usr/sbin/groupadd oinstall

(2)创建dba组

sudo /usr/sbin/groupadd dba

(3)建立oracle用户并加入组

sudo /usr/sbin/useradd -m -g oinstall -G dba oracle

(4)修改账户密码

sudo passwd oracle

 

3、将oracle用户添加到sudoer用户组

编辑/etc/sudoers文件,在root ALL=(ALL) ALL添加一句oracle ALL=(ALL) ALL,并保存

 4、修改系统内核参数

略。(经测试,不修改系统内核参数也能把oracle安装上,对于开发机来说,不修改亦可,对于生产机器,请参考oracle官方文档修改参数)。

5、修改/etc/security/limits.conf

sudo vim /etc/security/limits.conf

添加如下内容:

oracle  soft        nproc   2047
oracle  hard        nproc   16384
oracle  soft        nofile  1024
oracle  hard        nofile  65536

6、修改/etc/pam.d/login

sudo vim /etc/pam.d/login,添加如下内容:

session required /lib/security/pam_limits.so
session required pam_limits.so

 7、修改LINUX版本信息

oracle10g支持的linux版本如下:

Item Requirement
Operating system One of the following operating system versions:
  • Red Hat Enterprise Linux 3.0 (Update 3 or later)

  • Red Hat Enterprise Linux 4.0

  • SUSE Linux Enterprise Server 9.0

  • Asianux 1.0

  • Asianux 2.0

 因此我们需要把opensuse 13.1的版本休息修改为SLES 9的版本,修改/etc/SuSE-release文件。

 

8、修改/etc/profile文件

if [ $USER = "oracle" ]; then
        if [ $SHELL = "/bin/ksh" ]; then
              ulimit -p 16384
              ulimit -n 65536
        else
              ulimit -u 16384 -n 65536
        fi
fi

 

9、创建ORACLE安装文件夹和数据存放文件夹

sudo mkdir /opt/oracle

sudo mkdir /opt/oracle/102

sudo chown -R oracle:dba /opt/oracle

10、修改/etc/hosts文件

修改/etc/hosts文件,查看是否有一条localhost指向127.0.0.1的记录,有则不用修改。

11、修改oracle用户环境变量

编辑~/.bashrc文件,加入:

 

 六、安装并设置oracle

1、修改shell环境变量

如果系统安装的时候选择系统语言为中文,则安装oracle的时候安装程序会乱码,因此修改shell的环境变量使安装环程序以英文安装。

 

运行安装程序./runInstaller

选择dba组,下面也一样选择DBA组

下面步骤如果有不通过的地方,直接选yes进入下一步

进入安装信息汇总后点击intsall

进入安装过程

安装过程中出现如下错误

 

则查看/opt/oracle/oraInventory/logs下的error文件

显示主机解析错误,此时不要退出安装,编辑/etc/hosts文件,将主机加入,指向127.0.0.1,retry即可。

 

 运行脚本

如图

完成安装

 访问em

 至此,安装完成。

 七、防火墙设置和客户端测试

1、防火墙设置

编辑/etc/sysconfig/SuSEfirewall2,找到FW_SERVICES_EXT_TCP和FW_SERVICES_EXT_UDP,将要开放 的端口加入。

保存退出后运行

sudo /sbin/rcSuSEfirewall2 restart

2、客户端访问测试

 

===========================================================

oracle在opensuse下的安装至此结束。

猜你喜欢

转载自xiaomy.iteye.com/blog/2124254