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

简介:
安装详见
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 
不够可以再加。

后面再讲数据库初始化。
目录
相关文章
|
Oracle 关系型数据库 MySQL
Oracle Linux 8.10 编译安装sysbench
Oracle Linux 8.10 编译安装sysbench
634 34
|
Oracle Cloud Native 关系型数据库
Oracle Linux 10 - Oracle 提供支持 RHEL 兼容发行版
Oracle Linux 10 - Oracle 提供支持 RHEL 兼容发行版
681 11
Oracle Linux 10 - Oracle 提供支持 RHEL 兼容发行版
|
Oracle Cloud Native 关系型数据库
Oracle Linux 9.6 正式版发布 - Oracle 提供支持 RHEL 兼容发行版
Oracle Linux 9.6 正式版发布 - Oracle 提供支持 RHEL 兼容发行版
741 0
Oracle Linux 9.6 正式版发布 - Oracle 提供支持 RHEL 兼容发行版
|
Oracle 关系型数据库 MySQL
Oracle linux 8 二进制安装 MySQL 8.4企业版
Oracle linux 8 二进制安装 MySQL 8.4企业版
756 1
|
Oracle 关系型数据库 Linux
MyEMS开源系统安装之CentOS/RHEL/Rocky/AlmaLinux/Oracle Linux
本指南介绍如何在CentOS/RHEL/Rocky/AlmaLinux/Oracle Linux服务器上部署MyEMS开源能源管理系统。内容涵盖系统准备、数据库配置、多个MyEMS服务(如myems-api、myems-admin、myems-modbus-tcp等)的安装与配置,以及Nginx服务器设置和防火墙规则调整。通过完成所有步骤,您将能够访问MyEMS Admin UI和Web UI,默认端口分别为8001和80,初始登录凭据已提供。
1061 0
|
Oracle 关系型数据库 Linux
【赵渝强老师】Oracle数据库配置助手:DBCA
Oracle数据库配置助手(DBCA)是用于创建和配置Oracle数据库的工具,支持图形界面和静默执行模式。本文介绍了使用DBCA在Linux环境下创建数据库的完整步骤,包括选择数据库操作类型、配置存储与网络选项、设置管理密码等,并提供了界面截图与视频讲解,帮助用户快速掌握数据库创建流程。
1115 93
|
Oracle 关系型数据库 Linux
【赵渝强老师】使用NetManager创建Oracle数据库的监听器
Oracle NetManager是数据库网络配置工具,用于创建监听器、配置服务命名与网络连接,支持多数据库共享监听,确保客户端与服务器通信顺畅。
632 0
|
存储 Oracle 关系型数据库
服务器数据恢复—光纤存储上oracle数据库数据恢复案例
一台光纤服务器存储上有16块FC硬盘,上层部署了Oracle数据库。服务器存储前面板2个硬盘指示灯显示异常,存储映射到linux操作系统上的卷挂载不上,业务中断。 通过storage manager查看存储状态,发现逻辑卷状态失败。再查看物理磁盘状态,发现其中一块盘报告“警告”,硬盘指示灯显示异常的2块盘报告“失败”。 将当前存储的完整日志状态备份下来,解析备份出来的存储日志并获得了关于逻辑卷结构的部分信息。
|
SQL Oracle 关系型数据库
Oracle数据库创建表空间和索引的SQL语法示例
以上SQL语法提供了一种标准方式去组织Oracle数据库内部结构,并且通过合理使用可以显著改善查询速度及整体性能。需要注意,在实际应用过程当中应该根据具体业务需求、系统资源状况以及预期目标去合理规划并调整参数设置以达到最佳效果。
844 8
|
SQL Oracle 关系型数据库
比较MySQL和Oracle数据库系统,特别是在进行分页查询的方法上的不同
两者的性能差异将取决于数据量大小、索引优化、查询设计以及具体版本的数据库服务器。考虑硬件资源、数据库设计和具体需求对于实现优化的分页查询至关重要。开发者和数据库管理员需要根据自身使用的具体数据库系统版本和环境,选择最合适的分页机制,并进行必要的性能调优来满足应用需求。
798 11