Heim > Datenbank > MySQL-Tutorial > Hauptteil

Linux平台下安装Oracle 10G曲折经历

WBOY
Freigeben: 2016-06-07 16:52:34
Original
907 Leute haben es durchsucht

在Linux系统下安装oracle是一件令人头疼的事情,其复杂程度远远超过安装Linux操作系统本身。如果能够进行成功的安装oracle,那么同

  在Linux系统下安装Oracle是一件令人头疼的事情,其复杂程度远远超过安装Linux操作系统本身。如果能够进行成功的安装oracle,那么同时也就顺便掌握了Linux一些技术。本文介绍在RedHat Linux下安装oracle 10g 的方法。在这里说明一下,Oracle 10g的g是grid 的缩写,意为网格,目前较为前沿的网络计算技术。

  Oracle 10g 对软硬件的要求都非常的高,所以要玩转的话的花不少银子。首先来看看它对硬件的要求:内存512兆(建议1G),cpu 主频2.0G以上,硬盘转速7200转以上(建议使用scsi硬盘),依此条件,我看买台服务器才行。其次是软件要求:在oracle 官方的文档里,对于x86系列支持的操作系统只有3种(radhat ES/AS 2.1(x86),redhat ES/AS 3(x86),unitedlinux1.0(x86) ),如果只有redhat 9也是可以安装的,不过要麻烦一点点。当然oracle 10g需要更多的软件模块才能进行安装,这些软件模块我将在后面逐一说明。在本例中,使用RedHat ES 3(x86)作为操作平台,并且安装了xwindow。

接下来,我们检查是否符合oracle 10g 的安装要求,以表格的形式列出。首先是硬件情况。以root登录系统,并且启动x-window.如果用下表命令输出的值大于或等于建议值,请

检查项目 命令/方法 建议值

内存 #grep MemTotal /proc/meminfo 512MB

交换分区 #grep SwapTotal /proc/meminfo 1GB

/tmp目录空闲区 #df –k /tmp 400MB

硬盘空闲空间 #df -k 4GB

继续往下,,检查软件需求。对redhat ES 3(x86),需要如下的软件包:

· Gnu gcc package, gcc-3.2.3-2 or 更高

下面的包也必须被安装:· make-3.79· binutils-2.11· openmotif-2.2.2-16· setarch-1.3-1 · compat-db-4.0.14.5· compat-gcc-7.3-2.96.122· compat-gcc-c -7.3-2.96.122· compat-libstdc -7.3-2.96.122· compat-libstdc -devel-7.3-2.96.122

为了保证系统满足需求,执行下面的步骤检查安装的linux版本和安装的套件。

检查项目 命令/方法 建议值

Linux 版本 #cat /etc/issue ES 3

已安装的包 #rpm -q package_name 安装所需包(上表所列)

到这里我们已经全面的检查了安装oracle 10g所要求的软硬件环境,接着我们就要为安装创建组和用户。

下面的组和用户必须存在

The oinstall group (the oracle inventory group)

The dba group (the OSDBA group)

The oracle user (the oracle owner)

如果上面的组和用户不存在,用下面的步骤创建它们。(1)先查看这些组和用户是否存在:

#grep oinstall /etc/group

#grep dba /etc/group

(2)创建安装oracle 所需的组和用户

#groupadd osintall

#groupadd dba

#useradd –g oinstall –G dba oracle 检查一下oracle 是否属于组 oinstall 和 dba (#id oracle) 再给oracle 设置一个用户口令 #passwd oracle 输入两次密码。

创建安装所需的目录 /u01/app/oracle (the oracle base directory), /u02/oradata (an optional default directory ),用下表的命令形式创建它.然后改变它的目录权限。

创建目录 更改权限

#mkdir –p /u01/app/oracle #chown –R oracle:Oinstall /u01/app/oracle /u02/oradata

#mkdir –p /u02/oradata #chmod –R 755 /u01/app/oracle /u02/oradata

配置内核参数,下表是oracle 推荐的内核参数值,请参考。

Parameter Value File

semmslsemmnssemopmsemmni 25032000100128 /proc/sys/kernel/sem

shmall 2097152 /proc/sys/kernel/shmall

shmmax Half the size of physical memory /proc/sys/kernel/shmmax

shmmni 4096 /proc/sys/kernel/shmmni

file-max 65536 /proc/sys/fs/file-max

ip_local_port_range 1024 65000 /proc/sys/net/ipv4/ip_local_port_range

确保当前的参数值大于或等于上表所列。那么怎样查看这些参数值呢?用命令 #/sbin/sysctl –a | grep

,例如查看semmsl,用 #/sbin/sysctl -a | grep sem,余下的与此类似。逐个察看这些参数值,如果参数值不满足要求,就需要修改它们。请完成下面这些步骤

a.用文本编辑器,创建或者编辑/etc/sysctl.conf文件,添加或修改如下的行

kernel.shmall = 2097152

kernel.shmmax = 2147483648

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

fs.file-max = 65536

net.ipv4.ip_local_port_range = 1024 65000

b.改变当前内核参数的值,用命令 #/sbin/sysctl –p 来实现。

为了提高在linux系统上运行软件的性能,必须对oracle用户设置下列shell 限定。

Shell Limit Item in limits.conf Hard Limit

Maximum number of open file descriptors nofile 65536

Maximum number of processes available to a single user nproc 16384

现在创建这些限定:

1. 加入下面的行到文件/etc/security/limits.conf

* soft nproc 2047

* hard nproc 16384

* soft nofile 1024

* hard nofile 65536

2. 加入下面的行到文件/etc/pam.d/login ,假如它不存在的话

session required /lib/security/pam_limits.so

3.根据oracle 用户的默认shell,对默认 shell start-up文件作如下改变,如果是Bourne, Bash, or Korn shell,修改环境变量/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

如果是c shell,则环境变量文件 /etc/csh.login的修改值如下:

if ( $USER == "oracle" ) then

limit maxproc 16384

limit descriptors 65536

endif

linux

Verwandte Etiketten:
Quelle:php.cn
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!