Linux RHEL6 x64 命令行静默安装 Oracle 12c

本文涉及的产品
RDS SQL Server Serverless,2-4RCU 50GB 3个月
推荐场景:
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
简介:
安装详见
http://docs.oracle.com/database/121/LADBI/app_nonint.htm#LADBI7832
http://docs.oracle.com/database/121/LADBI/pre_install.htm#LADBI222

下载软件.
drwxr-xr-x 7 digoal users       4096 Jul  7  2014 database
-rw-r--r-- 1 digoal users 1673544724 Dec 22 17:19 linuxamd64_12102_database_1of2.zip
-rw-r--r-- 1 digoal users 1014530602 Dec 22 17:29 linuxamd64_12102_database_2of2.zip
解压

静默安装分5步
0. 系统配置(预条件)

1. Prepare a response file.

2. Run Oracle Universal Installer in silent or response file mode.

3. Run the root scripts as prompted by Oracle Universal Installer.

4. If you completed a software-only installation, then run Net Configuration Assistant and Database Configuration Assistant in silent or response file mode, if required.

系统配置
yum install -y binutils \
compat-libcap1 \
compat-libstdc* \
gcc \
gcc-c++ \
glibc \
glibc-devel \
ksh \
libgcc \
libstdc++ \
libstdc++-devel \
libaio \
libaio-devel \
libXext \
libXtst \
libX11 \
libXau \
libxcb \
libXi \
make \
sysstat

vi /etc/sysctl.conf
kernel.shmmax=101204146176
net.core.rmem_max = 4194304
net.core.wmem_max = 4194304
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.ipv4.ip_local_port_range = 9000 65535

# sysctl -p

准备模板
cd database/response
ll
-rwxrwxr-x 1 digoal users 74822 Apr  4  2014 dbca.rsp
-rw-rw-r-- 1 digoal users 25036 Jul  7  2014 db_install.rsp
-rwxrwxr-x 1 digoal users  6038 Jan 24  2014 netca.rsp

cd ~
cp oracle/database/response/db_install.rsp ./
vi db_install.rsp 
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.1.0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=digoal_host.sqa.zmf
UNIX_GROUP_NAME=users
INVENTORY_LOCATION=
SELECTED_LANGUAGES=en
ORACLE_HOME=/home/digoal/oracle/product/12.1.0/db_1
ORACLE_BASE=/home/digoal/oracle/product
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=users
oracle.install.db.OPER_GROUP=users
oracle.install.db.BACKUPDBA_GROUP=users
oracle.install.db.DGDBA_GROUP=users
oracle.install.db.KMDBA_GROUP=users
oracle.install.db.rac.configurationType=
oracle.install.db.CLUSTER_NODES=
oracle.install.db.isRACOneInstall=
oracle.install.db.racOneServiceName=
oracle.install.db.rac.serverpoolName=
oracle.install.db.rac.serverpoolCardinality=
oracle.install.db.config.starterdb.type=
oracle.install.db.config.starterdb.globalDBName=
oracle.install.db.config.starterdb.SID=
oracle.install.db.ConfigureAsContainerDB=
oracle.install.db.config.PDBName=
oracle.install.db.config.starterdb.characterSet=AL32UTF8
oracle.install.db.config.starterdb.memoryOption=
oracle.install.db.config.starterdb.memoryLimit=16384
oracle.install.db.config.starterdb.installExampleSchemas=
oracle.install.db.config.starterdb.password.ALL=
oracle.install.db.config.starterdb.password.SYS=
oracle.install.db.config.starterdb.password.SYSTEM=
oracle.install.db.config.starterdb.password.DBSNMP=
oracle.install.db.config.starterdb.password.PDBADMIN=
oracle.install.db.config.starterdb.managementOption=
oracle.install.db.config.starterdb.omsHost=
oracle.install.db.config.starterdb.omsPort=
oracle.install.db.config.starterdb.emAdminUser=
oracle.install.db.config.starterdb.emAdminPassword=
oracle.install.db.config.starterdb.enableRecovery=
oracle.install.db.config.starterdb.storageType=
oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=
oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=
oracle.install.db.config.asm.diskGroup=
oracle.install.db.config.asm.ASMSNMPPassword=
MYORACLESUPPORT_USERNAME=
MYORACLESUPPORT_PASSWORD=
SECURITY_UPDATES_VIA_MYORACLESUPPORT=
DECLINE_SECURITY_UPDATES=
PROXY_HOST=
PROXY_PORT=
PROXY_USER=
PROXY_PWD=
COLLECTOR_SUPPORTHUB_URL=

chmod 700 db_install.rsp

$ mkdir -p /home/digoal/oracle/product/12.1.0/db_1

$cd oracle/database/

创建一个配置文件,包含oraInventory目录位置,最好放在ORACLE_BASE下面
#vi /etc/oraInst.loc
# chown digoal:users /etc/oraInst.loc 
inventory_loc=/home/digoal/oracle/product/oraInventory
inst_group=users

$./runInstaller -silent -responseFile /home/digoal/db_install.rsp 
如果安装遇到错误,比如前提条件未满足,可以通过日志查看,搜索FAIL
例如
INFO: *********************************************
INFO: OS Kernel Parameter: wmem_default: This is a prerequisite condition to test whether the OS kernel parameter "wmem_default" is properly set.
INFO: Severity:IGNORABLE
INFO: OverallStatus:WARNING
INFO: -----------------------------------------------
INFO: Verification Result for Node:digoal_host
INFO: Expected Value:262144
INFO: Actual Value:Current=262144; Configured=unknown
INFO: Error Message:PRVG-1201 : OS kernel parameter "wmem_default" does not have expected configured value on node "digoal_host" [Expected = "262144" ; Current = "262144"; Configured = "unknown"].
INFO: Cause: A check of the configured value for an OS kernel parameter did not find the expected value.
INFO: Action: Modify the kernel parameter configured value to meet the requirement.
INFO: -----------------------------------------------
以上说明对应的OS内核参数需要配置一下。

正常情况下,结束时会输出如下
The installation of Oracle Database 12c was successful.
Please check '/home/digoal/oracle/product/oraInventory/logs/silentInstall2015-12-22_07-49-44PM.log' for more details.

As a root user, execute the following script(s):
        1. /home/digoal/oracle/product/12.1.0/db_1/root.sh

切到root用户下执行
#/home/digoal/oracle/product/12.1.0/db_1/root.sh
Check /home/digoal/oracle/product/12.1.0/db_1/install/root_digoal_host.sqa.zmf_2015-12-22_19-53-04.log for the output of root script

日志
#less /home/digoal/oracle/product/12.1.0/db_1/install/root_digoal_host.sqa.zmf_2015-12-22_19-53-04.log 
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= digoal
    ORACLE_HOME=  /home/digoal/oracle/product/12.1.0/db_1
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.


#cat /etc/oratab
#



# This file is used by ORACLE utilities.  It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.

# A colon, ':', is used as the field terminator.  A new line terminates
# the entry.  Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
#   $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively.  The third field indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#

其他
1. 错误解答
$./runInstaller -silent -responseFile /home/digoal/db_install.rsp 
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 500 MB.   Actual 43700 MB    Passed
Checking swap space: 0 MB available, 150 MB required.    Failed <<<<

Some requirement checks failed. You must fulfill these requirements before

continuing with the installation,


Exiting Oracle Universal Installer, log for this session can be found at /tmp/OraInstall2015-12-22_05-47-47PM/installActions2015-12-22_05-47-47PM.log

处理
#dd if=/dev/zero of=./swap bs=8k count=102400
102400+0 records in
102400+0 records out
838860800 bytes (839 MB) copied, 1.57573 s, 532 MB/s

#mkswap ./swap 
mkswap: ./swap: warning: don't erase bootbits sectors
        on whole disk. Use -f to force.
Setting up swapspace version 1, size = 819196 KiB
no label, UUID=6b67c44e-8239-4451-8c6b-c5d82190b96a

#swapon ./swap 
不够可以再加。

后面再讲数据库初始化。
目录
相关文章
|
11天前
|
监控 Oracle 关系型数据库
Linux平台Oracle开机自启动设置
【11月更文挑战第8天】在 Linux 平台设置 Oracle 开机自启动有多种方法,本文以 CentOS 为例,介绍了两种常见方法:使用 `rc.local` 文件(较简单但不推荐用于生产环境)和使用 `systemd` 服务(推荐)。具体步骤包括编写启动脚本、赋予执行权限、配置 `rc.local` 或创建 `systemd` 服务单元文件,并设置开机自启动。通过 `systemd` 方式可以更好地与系统启动过程集成,更规范和可靠。
|
7天前
|
Oracle Cloud Native 关系型数据库
Oracle Linux 9.5 正式版发布 - Oracle 提供支持 RHEL 兼容发行版
Oracle Linux 9.5 正式版发布 - Oracle 提供支持 RHEL 兼容发行版
42 10
Oracle Linux 9.5 正式版发布 - Oracle 提供支持 RHEL 兼容发行版
|
12天前
|
Oracle Ubuntu 关系型数据库
Linux平台Oracle开机自启动设置
【11月更文挑战第7天】本文介绍了 Linux 系统中服务管理机制,并详细说明了如何在使用 systemd 和 System V 的系统上设置 Oracle 数据库的开机自启动。包括创建服务单元文件、编辑启动脚本、设置开机自启动和启动服务的具体步骤。最后建议重启系统验证设置是否成功。
|
1月前
|
存储 Oracle 关系型数据库
|
6月前
|
运维 Oracle 容灾
Oracle dataguard 容灾技术实战(笔记),教你一种更清晰的Linux运维架构
Oracle dataguard 容灾技术实战(笔记),教你一种更清晰的Linux运维架构
|
4月前
|
Oracle 关系型数据库 Linux
讲解linux下的Qt如何编译oracle的驱动库libqsqloci.so
通过这一连串的步骤,可以专业且有效地在Linux下为Qt编译Oracle驱动库 `libqsqloci.so`,使得Qt应用能够通过OCI与Oracle数据库进行交互。这些步骤适用于具备一定Linux和Qt经验的开发者,并且能够为需要使用Qt开发数据库应用的专业人士提供指导。
150 1
讲解linux下的Qt如何编译oracle的驱动库libqsqloci.so
|
5月前
|
SQL Oracle 关系型数据库
探索 Linux 命令 `db_archive`:Oracle 数据库归档日志的工具
探索 Linux 中的 `db_archive`,实际与 Oracle 数据库归档日志管理相关。在 Oracle 中,归档日志用于恢复,当在线重做日志满时自动归档。管理员可使用 SQL*Plus 查看归档模式,通过 `RMAN` 进行备份和恢复操作。管理归档日志需谨慎,避免数据丢失。了解归档管理对 Oracle 管理员至关重要,确保故障时能快速恢复数据库。
|
5月前
|
Linux Docker Python
【docker】Mac M1 构建 x64 linux镜像
【docker】Mac M1 构建 x64 linux镜像
122 0
|
5月前
|
SQL Oracle 关系型数据库
mysql和oracle 命令行执行sql文件 数据库执行sql文件 执行sql语句
mysql和oracle 命令行执行sql文件 数据库执行sql文件 执行sql语句
74 0
|
7天前
|
监控 Linux
如何检查 Linux 内存使用量是否耗尽?这 5 个命令堪称绝了!
本文介绍了在Linux系统中检查内存使用情况的5个常用命令:`free`、`top`、`vmstat`、`pidstat` 和 `/proc/meminfo` 文件,帮助用户准确监控内存状态,确保系统稳定运行。
67 6
下一篇
无影云桌面