您的位置:首页 > 数据库 > Oracle

Oracle10g快速安装向导(Linux平台…

2014-11-25 18:10 381 查看
Oracle10g快速安装向导(Linux平台)

Oracle Database Quick Installation Guide

10g Release 2 (10.2) for Linux x86

Oracle10g快速安装向导(Linux平台)-上

一:本快速安装向导介绍

(一):本向导将会完成的任务:

1.配置您的系统以便支持数据库的安装

2.将会使用基本的安装选项在一个本地文件系统上安装数据库

3.将会配置一个general-purpose的数据库,这个数据库使用本地文件系统存储数据库文件

(二):成功完成安装后将会达到以下两个目标

1. 在系统上将会成功运行数据库和Oracle Net listener进程

2. 通过web浏览器可以访问Oracle Enterprise Manager Database Control and iSQL*Plus

(三):本向导不用于完成以下任务

1. 不会介绍到如何使用高级选项来安装数据库软件

2. 不会介绍到如何在一个已经存在Oracle软件的操作系统上安装数据库软件

3. 不会介绍到如何安装Oracle Clusterware and Oracle Real Application Clusters (RAC)

4. 不用于开启Enterprise Manager e-mail notifications or automated backups

5. 不会介绍到如何使用可选的存储选项来存储数据库文件,可选的存储选项包括Automatic Storage Management or raw devices等

二:以root身份登录到系统

在你安装数据库软件之前,你必须以root用户的身份完成若干配置任务,

To log in as the root user, complete one of the following procedures:

(一):If you are installing the software from an X Window System workstation or X terminal, then:

1. Start a local terminal session, for example, an X terminal (xterm).
2. If you are not installing the software on the local system, then enter the following command to enable the remote host to display X applications on the local X server:

$ xhost fully_qualified_remote_host_name

For example:

$ xhost somehost.us.acme.com

3. If you are not installing the software on the local system, then use the ssh, rlogin, or telnet command to connect to the system where you want to install the software:

$ telnet fully_qualified_remote_host_name

4. If you are not logged in as the root user, then enter the following command to switch user to root:

$ su – root

password:

#

(二):If you are installing the software from a PC or other system with X server software installed, then:
Note:

If necessary, refer to your X server documentation for more information about completing this procedure. Depending on the X server software that you are using, you may need to complete the tasks in a different order.
1.Start the X server software.

2. Configure the security settings of the X server software to permit remote hosts to display X applications on the local system.

3. Connect to the remote system where you want to install the software, and start a terminal session on that system, for example, an X terminal (xterm).

4. If you are not logged in as the root user on the remote system, then enter the following command to switch user to root:

$ su - root

password:

#

三:检查硬件需求

系统必须满足以下最小的硬件需求

1. 至少1024 MB 的 physical RAM

2. 下表显示了可用的RAM和需要的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
3. /tmp目录下需要400MB的磁盘空间

4. Oracle软件需要1.5 GB 到 3.5 GB 的磁盘空间,具体数额依赖于所使用的安装类型

5. 一个使用文件系统作为存储策略的预配置数据库需要1.2GB的磁盘空间(这是可选的)

为了确保您的系统满足以上硬件需求,请完成以下步骤:

1. 检查physical RAM的大小,输入以下命令:

# grep MemTotal /proc/meminfo

2. 检查swap空间的大小,输入以下命令:

# grep SwapTotal /proc/meminfo

3. 检查可用的RAM 和 swap 空间,输入以下命令:

# free

4. 检查/tmp目录中空闲的磁盘空间,输入以下命令:

# df –k /tmp

如果/tmp目录中的磁盘空间小于400MB,那么可以采取以下方法:

(1)从/tmp目录中删除不必要的文件

(2)在设置oracle user's environment时,设置TEMP和TMPDIR环境变量

(3)扩展包含/tmp目录的文件系统的空间

5. 检查系统中可用的空闲磁盘空间,输入以下命令:

# df –k

6. 检查system architecture是否可以支持软件的运行,输入以下命令:

# grep “model name ” /proc/cpuinfo

这个命令显示处理器的类型。Verify that the processor architecture matches the Oracle software release that you want to install. If you do not see the expected output, then you cannot install the software on this system.

四:检查软件需求

系统必须满足以下最小的软件需求,具体取决于the distribution and version of your operating system:

Note:

Oracle Universal Installer performs checks on your system to verify that it meets the listed requirements. To ensure that these checks pass, verify the requirements before you start Oracle Universal Installer.
(一):操作系统必须是以下其中之一:

o Red Hat Enterprise Linux 3.0 (Update 3 or later)

o Red Hat Enterprise Linux 4.0

o SUSE Linux Enterprise Server 9.0

o Asianux 1.0

o Asianux 2.0

(二):系统必须运行在以下(或之后)的内核版本

o Red Hat Enterprise Linux 3.0 and Asianux 1.0

2.4.21-27.EL

o Red Hat Enterprise Linux 4.0 and Asianux 2.0

2.6.9-5.0.5.EL

o SUSE Linux Enterprise Server 9

2.6.5-7.97

(三):以下packages(或之后)必须被安装

o Red Hat Enterprise Linux 3.0 and 4.0, and Asianux 1.0 and Asianux 2.0

o make-3.79.1

o gcc-3.2.3-34

o glibc-2.3.2-95.20

o compat-db-4.0.14-5

o compat-gcc-7.3-2.96.128

o compat-gcc-c
-7.3-2.96.128

o compat-libstdc
-7.3-2.96.128

o compat-libstdc
-devel-7.3-2.96.128

o openmotif21-2.1.30-8

o setarch-1.3-1

o

o SUSE Linux Enterprise Server 9

o gcc-3.3.3-43

o gcc-c
-3.3.3-43

o glibc-2.3.3-98

o libaio-0.3.98-18

o libaio-devel-0.3.98-18

o make-3.80

o openmotif-libs-2.2.2-519.1

(四):针对你所要安装的Oracle版本,系统必须满足以下需求

· Oracle Messaging Gateway

This product supports the integration of Oracle Streams Advanced Queuing (AQ) with the following software:

o IBM WebSphere MQ V5.3, client and server, with corrective service diskette 5 (CSD05) or later:

o MQSeriesClient

o MQSeriesServer

o MQSeriesRuntime

o

o TIBCO Rendezvous 7.2

· Oracle Spatial

This product requires the following X Window System development packages:

XFree86

XFree86-devel

This software is required only to build the sample programs.

· PL/SQL native compilation, Pro*C/C
, Oracle Call Interface, Oracle C
Call Interface, and Oracle XML Developer's Kit (XDK)

The version of GNU C and C
compilers listed previously for your distribution is supported for use with these products.

Intel C
Compiler v7.1.0.28 or later is also supported. However, it is not required for installation. On Red Hat Enterprise Linux 3, OCCI is supported with both version 2.96-128 and version 3.2 of the GNU C
compiler. However, version 3.2 is the default compiler version. OCCI is also supported with Intel Compiler v8.0 with gcc 3.2.3 standard template libraries. Intel C
Compiler v7 does not support OCCI.

· Oracle JDBC/OCI Drivers

You can use the following version of JDK with the Oracle JDBC/OCI drivers:

Sun JDK 1.4.2_08 with the JNDI extension

However, it is not required for the installation.

JDK 1.4.2_08 is installed with this release.

为了确保您的系统满足以上需求,请运行以下步骤来测试:

1. 检查操作系统是哪一个版本,输入以下命令:

# cat /etc/issue

2. 检查被要求的内核版本是否已经安装,输入以下命令:

# uname –r

下面是在Red Hat Enterprise Linux 3.0 system上运行这个命令后的样例输出:

2. 4.21-15.EL

在这个例子中, 输出显示了 the kernel version (2.4.21) and errata level (15.EL).

3. 检查被要求的packages是否已经安装,输入以下类似的命令:

# rpm –q package_name

4. If you require a CSD for WebSphere MQ, then refer to the following Web site for download and installation information:

http://www.ibm.com/software/integration/mqfamily/support/summary/lin.html

五:创建必需的操作系统组和用户

(一):如果要安装Oracle数据库,那么需要下列本地操作系统组和用户:

· The Oracle Inventory group (oinstall)

· The OSDBA group (dba)

· The Oracle software owner (oracle)

· An unprivileged user (nobody)

(二):检查这些组和用户是否存在,如果需要,则创建它们。对此,请运行步骤:
1. 检查oinstall组是否存在,输入以下命令:
# more /etc/oraInst.loc

如果这个命令的输出显示了oinstall的组名,这说明这个组已经存在。

如果oraInst.loc文件存在,那么这个命令的输出类似以下形式:
Inventory_loc=/u01/app/oracle/oraInventory
Inst_group=oinstall

The inst_group parameter shows the name of the Oracle Inventory group, oinstall.

2. 检查dba组是否存在,输入以下命令:
# grep dba /etc/group

3. 如果必要,输入以下命令创建oinstall和dab组:
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba

4. 检查oracle用户是否存在以及是否属于正确的组,输入以下命令:

# id oracle

如果oracle用户存在,那么这个命令将会显示这个用户属于哪个组的信息,这个输入将会类似于下面这个形式:

uid==440(oracle) gid=200(oinstall) groups=201(dba),202(oper)

上面这个样例显示了oinstall是主组,dba是从组

5. 如果有必要,完成以下一项任务:

A:如果oracle用户存在,但它的主组不是oinstall,或者它不是dba组的一个成员,那么输入输入以下命令:

# /usr/sbin/usermod –g oinstall –G dba oracle

B:如果oracle用户不存在,那么输入以下命令创建它:

# /usr/sbin/useradd –g oinstall –G dba oralce

这个命令将会创建oracle用户,并且指定oinstall组作为主组,dba组作为从组。

6. 输入下面的命令设置oracle用户的密码:

# passwd oracle

7. 检查nobody用户是否存在,输入以下命令:

# id nobody

如果这个命令显示了nobody用户的信息,那么你不必创建这个用户

如果nobody用户不存在,那么输入下面的命令创建它:

# /usr/sbin/useradd nobody

六:配置内核参数

确保下表中所列出的内核参数被设置为等于或高于推荐的值:
Parameter
Value
File
semmsl

semmns

semopm

semmni
250

32000

100

128
/proc/sys/kernel/sem
shmall
2097152
/proc/sys/kernel/shmall
shmmax
Half the size of physical memory (in bytes)
/proc/sys/kernel/shmmax
shmmni
4096
/proc/sys/kernel/shmmni
file-max
65536
/proc/sys/fs/file-max
ip_local_port_range
Minimum: 1024

Maximum: 65000
/proc/sys/net/ipv4/ip_local_port_range
rmem_default
262144
/proc/sys/net/core/rmem_default
rmem_max
262144
/proc/sys/net/core/rmem_max
wmem_default
262144
/proc/sys/net/core/wmem_default
wmem_max
262144
/proc/sys/net/core/wmem_max
注意:如果任一参数的当前值高于表格中列出的值,那么那个参数的值不需要做出改变。

(一):显示这些内核参数的当前值,如果需要则更改它们:

1. 输入以下类似的命令用来显示内核参数的当前值:

Note:

Make a note of the current values and identify any values that you must change.
Parameter
Command
semmsl, semmns, semopm, and semmni
# /sbin/sysctl -a | grep sem

This command displays the value of the semaphore parameters in the order listed.
shmall, shmmax, and shmmni
# /sbin/sysctl -a | grep shm
file-max
# /sbin/sysctl -a | grep file-max
ip_local_port_range
# /sbin/sysctl -a | grep ip_local_port_range
rmem_default
# /sbin/sysctl -a | grep rmem_default
rmem_max
# /sbin/sysctl -a | grep rmem_max
wmem_default
# /sbin/sysctl -a | grep wmem_default
wmem_max
# /sbin/sysctl -a | grep wmem_max
2. 如果任一内核参数的值和推荐的值不相同,那么完成以下任务:

使用任一文本编辑器,创建或编辑/etc/sysctl.conf文件,添加或编辑类似以下的行:

Note:

Include lines only for the kernel parameter values that you want to change. For the semaphore parameters (kernel.sem), you must specify all four values. However, if any of the current values are larger than the recommended value, specify the larger value.
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

rmem_default = 262144

rmem_max = 262144

wmem_default = 262144

wmem_max = 262144

By specifying the values in the /etc/sysctl.conf file, they persist when you restart the system.

仅对于SUSE系统,输入以下命令确保系统启动时可以读取/etc/sysctl.conf

# /sbin/chkconfig boot.sysctl on

(二)Set Shell Limits for the oracle User

为了提高软件的性能,you must increase the following shell limits for the oracle user:

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
To increase the shell limits:

1. Add the following lines in the /etc/security/limits.conf file:

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

2. Add the following line to the /etc/pam.d/login file, if it does not already exist:

session required /lib/security/pam_limits.so

3. Depending on the oracle user's default shell, make the following changes to the default shell startup file:

A:For the Bourne, Bash, or Korn shell, add the following lines in the /etc/profile file (or the /etc/profile.local file on SUSE systems):

if [ $USER = "oracle" ]; then

if [ $SHELL = "/bin/ksh" ]; then

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

fi

B:For the C shell, add the following lines in the /etc/csh.login file (or the /etc/csh.login.local file on SUSE systems):

if ( $USER == "oracle" ) then

limit maxproc 16384

· limit descriptors 65536

· endif
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: