oracle11g 怎么静默安装

Oracle是世界领先的数据库管理系统,其11g版本受到很多企业和个人用户的青睐。然而,Oracle11g的安装过程比较繁琐,如果需要在多台机器上进行安装,则会耗费大量的时间和人力资源。为了提高安装效率,Oracle提供了静默安装的方法,可在不人为干预的情况下完成软件的自动安装。本文将介绍如何进行Oracle11g的静默安装。

一、准备工作
在进行Oracle11g的静默安装之前,需要先准备好以下工作:
1.Oracle11g安装介质,一般为光盘或ISO镜像;
2.Oracle11g安装文件的响应文件(.rsp文件),可以使用Oracle提供的模板文件进行修改;
3.安装计划表(.lst文件),用于记录安装过程和错误信息;
4.管理员权限的命令行界面或终端,以及足够的磁盘空间和内存资源。

二、创建响应文件
响应文件(.rsp文件)是Oracle11g静默安装的关键,其记录了安装过程中需要输入的各种参数信息。Oracle提供了模板文件(如db_install.rsp)可供修改,如果需要自定义安装参数,可以根据实际情况对文件内容进行修改。下面是一个典型的响应文件示例:

The response file for installing Oracle Database 11gR2

This file is generated by the Oracle Universal Installer.

[GENERAL]

Location of the Oracle base directory.

ORACLE_BASE="/u01/app/oracle"

Name of the Oracle inventory directory.

INVENTORY_LOCATION="/u01/app/oraInventory"

The location for your Oracle home.

ORACLE_HOME="/u01/app/oracle/product/11.2.0/dbhome_1"

The name of the database. This is typically a name that

starts with a letter and contains up to 8 characters.

ORACLE_SID="orcl"

Global database name.

GDBNAME="orcl"

Character set of the database.

CHARACTERSET="AL32UTF8"

Specify whether to install the database software or create a

database. Choose "Software Only" for database software

installation.

INSTALL_OPTION="INSTALL_DB_AND_CONFIG"

Specify whether to create a database or upgrade an existing one.

Choose "Create Database" for new database creation.

Choose "Upgrade an Existing Database" to upgrade an

existing database.

CREATE_DATABASE_TYPE="CREATE_DATABASE"

Password for SYS and SYSTEM users.

SYS_PASSWORD="password"
SYSTEM_PASSWORD="password"

Database file location.

DATA_LOCATION="/u01/app/oracle/oradata"

Control file location.

DB_CONTROL_FILES_LOCATION="/u01/app/oracle/oradata"
DB_CONTROL_FILES="ora_control1, ora_control2, ora_control3"

Redo log file location.

DB_RECOVERY_FILE_DEST="/u01/app/oracle/flash_recovery_area"
DB_RECOVERY_FILE_DEST_SIZE=2G

Memory limit for database SGA and PGA.

TOTAL_MEMORY=2048

[LANGUAGE]

Language of the installation.

Valid values are: AMERICAN_AMERICA.WE8ISO8859P1,

AMERICAN_AMERICA.UTF8, or other valid character set names.

You can also supply your own language name.

SELECTED_LANGUAGES="AMERICAN_AMERICA.UTF8"

[INSO]

Installation type.

INSTALL_TYPE="Typical"

[INSTALLUPDATES]

Specify whether to check for product updates.

UPDATES_CHECK=TRUE

[SECURITY]

Activate security options

SECURITY_UPDATES_VIA_MYORACLESUPPORT=FALSE

[SYSTEMCLASS]

Enter the system class, which determines the maximum number

of memory allowed for SGA and PGA.

Valid values are: Desktop, Server, or Custom

If you choose Custom, you must specify the memory size yourself.

The following example is for a server class machine.

oracle.install.db.config.starterdb.memoryLimit=1024

[DATABASE]

Specify the template to use when creating the database.

TEMPLATE_NAME="General_Purpose.dbc"

Global database name for this database.

GDBNAME="orcl"

Password for SYS and SYSTEM users.

SYS_PASSWORD="password"
SYSTEM_PASSWORD="password"

Character set for the database.

CHARACTERSET="AL32UTF8"

National character set for the database.

NATIONAL_CHARACTERSET="UTF8"

Database file location.

DATA_LOCATION="/u01/app/oracle/oradata"

Control file location.

DB_CONTROL_FILES_LOCATION="/u01/app/oracle/oradata"

Redo log file location.

DB_RECOVERY_FILE_DEST="/u01/app/oracle/flash_recovery_area"
DB_RECOVERY_FILE_DEST_SIZE=2G

Perform database backup after installation.

Valid values are: YES or NO

DB_INSTALLATION_SLIM_CONFIG=true

[EMCONFIG]

Enter Y if you want to configure Enterprise Manager.

EM_CONFIGURATION=LOCAL

Enterprise Manager password.

EM_PASSWORD="password"

[REAL_APPLICATION_CLUSTER]

Specify whether this is a Real Application Clusters installation.

CLUSTER_NODES=a1,a2,a3

Specify the VIP name and port.

NODEVIP="orclvip"
NODEVIP_PORT=1521

Specify the SCAN name and port.

CLUSTER_SCAN_NAME="orclscan"
CLUSTER_SCAN_PORT="1521"
CLUSTER_SCAN_PORTS="1522,1523,1524"

Specify the database name and listener port.

DB_NAME="racdb"
DB_UNIQUE_NAME="racdb1"
DB_LISTENER_PORT=1521

Specify the database storage type.

DB_STORAGE_TYPE="ASM"

Configure Automatic Storage Management.

ASM_DISK_STRING="ORCL:*"

以上是响应文件示例的一部分,它包含了常用的安装参数设置,可以根据实际情况进行修改。

三、创建安装计划表
安装计划表(.lst文件)用于记录Oracle11g静默安装过程中产生的日志信息和错误信息。创建安装计划表可以方便排查安装过程中的问题。通常,安装计划表可以在响应文件中进行配置,如下所示:

[GENERIC]

The name and file location of the installer log file.

If you do not specify a log file name or directory, the log

file is created in the /tmp directory. By default, the log

file name is "installActions.log".

Example:

LOGFILE=/u01/app/oracle/installer/log/installation.log

LOG_FILE="oraInstall.log"

The name and location for storing the inventory of installed software.

If you do not specify an inventory location, the software is

installed in the default inventory directory.

Example:

INVENTORY_LOCATION=/tmp/oracleInventory

INVENTORY_LOCATION="/u01/app/oraInventory"

Specify the name and file location for the installation plan file.

The installation plan file provides a record of all the configuration

settings you selected during installation.

Example:

INSTALL_PLAN=/u01/app/oracle/installer/log/planFile.lst

INSTALL_PLAN="ora_install_plan.lst"

Specify the path to the remote shell program, if any.

This setting is required only if you are installing Oracle software

on a remote computer.

Example:

SSH_PATH=/usr/local/bin/ssh

SSH_PATH="/usr/bin/ssh"

以上示例为创建安装计划表的配置文件。

四、执行静默安装
执行静默安装需要使用命令行界面或终端,以管理员权限运行,进入Oracle11g安装介质所在的路径,执行以下命令:

./runInstaller -silent -responseFile /path/to/response/file -ignoreSysPrereqs -ignorePrereq

其中,-responseFile参数指定响应文件的路径和文件名,-silent参数表示以静默模式运行,-ignoreSysPrereqs和-ignorePrereq参数表示忽略系统前提条件和前提条件检查。

安装过程中,可以根据实际情况对参数进行修改,并按照提示进行操作,直到安装完成。安装完成后,会在安装计划表中生成日志信息和错误信息,可以用于排查问题。

总结
本文介绍了Oracle11g静默安装的步骤,包括创建响应文件、创建安装计划表和执行静默安装。静默安装可以显著提高安装效率,尤其在需要在多台机器上进行Oracle11g安装时,更为方便和快捷。希望本文能够帮助正在进行Oracle11g安装的用户,减轻其工作负担。

以上就是oracle11g 怎么静默安装的详细内容,更多请关注www.sxiaw.com其它相关文章!