Home Database Mysql Tutorial Oracle Linux 7.0上静默安装Oracle数据库

Oracle Linux 7.0上静默安装Oracle数据库

Jun 07, 2016 pm 04:40 PM

根据不同操作系统安装不同Oracle数据库版本,配置有略微差别,此处不一一描述,大家根据自身环境进行设置即可。此处以Oracle Lin

静默安装本人使用的也比较少,基本上不需要使用静默安装。就算是文本安装的系统,也使用Xmanager 来重定向图形化。但是万事总有个例外的,比如在MAC 操作系统上,貌似没有Xmananger , 那该上虚拟机如果只装了文本界面就只能静默安装了,,如果再装个图形化那就另一个情况了。 

1.  操作系统环境设置
根据不同操作系统安装不同Oracle数据库版本,配置有略微差别,此处不一一描述,大家根据自身环境进行设置即可。此处以Oracle Linux 7.0上Oracle 12C为例。

1.1    编辑/etc/sysctl.conf
fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmall = 2097152

kernel.shmmax=913516544

kernel.panic_on_oops=1

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

net.ipv4.ip_local_port_range = 900065500

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048586

执行sysctl –p


1.2 创建目录用户

 

groupadd  oinstall

groupadd  dba

groupadd  oper

groupadd  asmadmin

groupadd  asmdba

groupadd  asmoper

useradd -g oinstall -Gdba,asmdba,asmadmin,asmoper grid

useradd -g oinstall -G dba,oper,asmdbaoracle

 

mkdir -p /u01/app/12.1.0/grid

mkdir -p /u01/app/grid

mkdir -p /u01/app/oracle

chown grid:oinstall /u01/app/12.1.0/grid

chown grid:oinstall /u01/app/grid

chown -R oracle:oinstall /u01/app/oracle

chmod -R 775 /u01/

chown -R grid:oinstall /u01

修改用户密码

passwd grid

passwd oracle

 

 


1.3配置/etc/security/limits.conf

 

 

oracle soft nproc    2047
oracle hard nproc    16384

oracle soft nofile  1024

oracle hard nofile  65536

oracle soft stack    10240

grid soft nproc 2047

grid hard nproc 16384

grid soft nofile 1024

grid hard nofile 65536

grid soft stack 10240

 

1.4    设置ORACLE环境变量
export TMP=/tmp;

export TMPDIR=$TMP;

export ORACLE_BASE=/u01/app/oracle;

export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1;

export ORACLE_SID=prod;

export ORACLE_TERM=xterm;

export PATH=/usr/sbin:$PATH;

export PATH=$ORACLE_HOME/bin:$PATH;

exportLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;

exportCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;

export NLS_DATE_FORMAT="yyyy-mm-ddHH24:MI:SS";

export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;

 

 

 

1.5    修改/etc/hosts
增加主机名

2      静默安装
2.1    安装
2.1.1 编辑自动应答文件
ORACE安装本身需要和用户进行一些互动,如果想取消这些互动就必须提前将回复的内容写到一个文件中,这个文件就是自动应答文件,接下去我们开始制作该该文件。

 

oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.1.0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=slave
UNIX_GROUP_NAME=dba
INVENTORY_LOCATION=/u01/app/oraInventory
SELECTED_LANGUAGES=en
ORACLE_HOME=/u01/app/oracle/product/12.1.0/db_1
ORACLE_BASE=/ u01/app/oracle/product/12.1.0
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=dba
oracle.install.db.BACKUPDBA_GROUP=dba
oracle.install.db.DGDBA_GROUP=dba
oracle.install.db.KMDBA_GROUP=dba
oracle.install.db.isRACOneInstall=false
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
oracle.installer.autoupdates.option=SKIP_UPDATES

2.1.2 安装
命令如下:

./runInstaller-silent -noconfig -ignorePrereq -responseFile /home/oracle/database/db.rsp查看安装过程

可以到/opt/app/oraInventory/logs目录下查看安装进度

 最后出现如下:

…………………..

INFO:Completed validating state

INFO:Terminating all background operations

INFO:Terminated all background operations

INFO:Successfully executed the flow in SILENT mode

INFO:Dispose the current Session instance

INFO:Dispose the install area control object

INFO:Update the state machine to STATE_CLEAN

INFO:Finding the most appropriate exit status for the current application

INFO:Exit Status is 0

INFO:Shutdown Oracle Database 12c Release 1 Installer

--------------------------------------------------------------------------------

安装成功提示执行脚本

l7database]$ You can find the log of this install session at:

 /u01/app/oraInventory/logs/installActions2015-01-01_06-09-15PM.log

[oracle@oel7database]$ The installation of Oracle Database 12c was successful.

Pleasecheck '/u01/app/oraInventory/logs/silentInstall2015-01-01_06-09-15PM.log' formore details.

 

As aroot user, execute the following script(s):

        1. /u01/app/oraInventory/orainstRoot.sh

        2./u01/app/oracle/product/12.1.0/db_1/root.sh

SuccessfullySetup Software.

Asinstall user, execute the following script to complete the configuration.

        1./u01/app/oracle/product/12.1.0/db_1/cfgtoollogs/configToolAllCommandsRESPONSE_FILE=

        Note:

        1. This script must be run on the samehost from where installer was run.

        2. This script needs a small passwordproperties file for configuration assistants that require passwords (refer toinstall guide documentation).

 

2.1.3 参数含义
-silent 表示以静默方式安装,不会有任何提示

-force 允许安装到一个非空目录

-noconfig 表示不运行配置助手netca

-responseFile 表示使用哪个响应文件,必需使用绝对路径

oracle.install.responseFileVersion 响应文件模板的版本,该参数不要更改

oracle.install.option 安装选项,本例只安装oracle软件,该参数不要更改

DECLINE_SECURITY_UPDATES 是否需要在线安全更新,设置为false,该参数不要更改

ORACLE_HOSTNAME 安装主机名

UNIX_GROUP_NAME oracle用户用于安装软件的组名

INVENTORY_LOCATION oracle产品清单目录

SELECTED_LANGUAGES oracle运行语言环境,一般包括引文和简繁体中文

ORACLE_HOME Oracle安装目录

ORACLE_BASE oracle基础目录

oracle.install.db.InstallEdition 安装版本类型,一般是企业版

oracle.install.db.isCustomInstall 是否定制安装,默认Partitioning,OLAP,RAT都选上了

oracle.install.db.customComponents 定制安装组件列表:除了以上默认的,可加上Label Security和Database Vault

oracle.install.db.DBA_GROUP oracle用户用于授予OSDBA权限的组名

oracle.install.db.OPER_GROUP oracle用户用于授予OSOPER权限的组名

 

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to solve the problem of mysql cannot open shared library How to solve the problem of mysql cannot open shared library Mar 04, 2025 pm 04:01 PM

This article addresses MySQL's "unable to open shared library" error. The issue stems from MySQL's inability to locate necessary shared libraries (.so/.dll files). Solutions involve verifying library installation via the system's package m

Reduce the use of MySQL memory in Docker Reduce the use of MySQL memory in Docker Mar 04, 2025 pm 03:52 PM

This article explores optimizing MySQL memory usage in Docker. It discusses monitoring techniques (Docker stats, Performance Schema, external tools) and configuration strategies. These include Docker memory limits, swapping, and cgroups, alongside

How do you alter a table in MySQL using the ALTER TABLE statement? How do you alter a table in MySQL using the ALTER TABLE statement? Mar 19, 2025 pm 03:51 PM

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

Run MySQl in Linux (with/without podman container with phpmyadmin) Run MySQl in Linux (with/without podman container with phpmyadmin) Mar 04, 2025 pm 03:54 PM

This article compares installing MySQL on Linux directly versus using Podman containers, with/without phpMyAdmin. It details installation steps for each method, emphasizing Podman's advantages in isolation, portability, and reproducibility, but also

What is SQLite? Comprehensive overview What is SQLite? Comprehensive overview Mar 04, 2025 pm 03:55 PM

This article provides a comprehensive overview of SQLite, a self-contained, serverless relational database. It details SQLite's advantages (simplicity, portability, ease of use) and disadvantages (concurrency limitations, scalability challenges). C

How do I configure SSL/TLS encryption for MySQL connections? How do I configure SSL/TLS encryption for MySQL connections? Mar 18, 2025 pm 12:01 PM

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

Running multiple MySQL versions on MacOS: A step-by-step guide Running multiple MySQL versions on MacOS: A step-by-step guide Mar 04, 2025 pm 03:49 PM

This guide demonstrates installing and managing multiple MySQL versions on macOS using Homebrew. It emphasizes using Homebrew to isolate installations, preventing conflicts. The article details installation, starting/stopping services, and best pra

What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)? What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)? Mar 21, 2025 pm 06:28 PM

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

See all articles