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 关系型数据库
Oracle 12c支持哪些数据类型?
【7月更文挑战第20天】Oracle 12c支持哪些数据类型?
480 2
|
SQL Oracle 关系型数据库
Oracle 12c有哪些新特性?
【7月更文挑战第20天】Oracle 12c有哪些新特性?
493 2
|
监控 Oracle 关系型数据库
Oracle 12c的Adaptive执行计划:数据的“聪明导航员”
【4月更文挑战第19天】Oracle 12c的Adaptive执行计划是数据库查询的智能优化工具,能根据实际运行情况动态调整执行策略。它像一个聪明的导航系统,不仅生成初始执行计划,还能实时监控并适应统计信息和资源变化,例如自动切换索引或调整并行度。此外,它支持自适应连接和统计信息收集,提升处理复杂查询和变化数据环境的能力。数据管理员应充分利用这一特性来优化查询性能和用户体验。
|
存储 NoSQL Oracle
Oracle 12c的内存列存储:数据的“闪电侠”
【4月更文挑战第19天】Oracle 12c的内存列存储以超高速度革新数据处理,结合列存储与内存技术,实现快速查询与压缩。它支持向量化查询和并行处理,提升效率,但需合理配置以平衡系统资源。作为数据管理员,应善用此功能,适应业务需求和技术发展。
|
存储 Oracle 关系型数据库
Oracle 12c的多重索引:数据的“多维导航仪”
【4月更文挑战第19天】Oracle 12c的多重索引提升数据查询效率,如同多维导航仪。在同一表上创建针对不同列的多个索引,加速检索过程。虽然过多索引会增加存储和维护成本,但合理选择和使用索引策略,结合位图、函数索引等高级特性,能优化查询,应对复杂场景。数据管理员应善用这些工具,根据需求进行索引管理,支持企业数据分析。
|
存储 Oracle 安全
Oracle 12c的不可见字段:数据的“隐形斗篷”
【4月更文挑战第19天】Oracle 12c引入了不可见字段,这是一种隐藏数据列的特性,用于增强数据安全性和实现业务逻辑。不可见字段在常规查询中不显示,但参与数据操作,适合存储敏感信息或内部元数据。创建时只需在列定义中指定“INVISIBLE”属性。虽然有其限制,如特定查询可能暴露,但正确使用能有效提升数据安全性。了解和利用这一功能对数据管理员至关重要。
|
SQL Oracle 关系型数据库
mysql和oracle 命令行执行sql文件 数据库执行sql文件 执行sql语句
mysql和oracle 命令行执行sql文件 数据库执行sql文件 执行sql语句
535 0
|
SQL Oracle 关系型数据库
Oracle 12c的TOP N语句:数据排名的“快速通道”
【4月更文挑战第19天】Oracle 12c的TOP N语句是用于快速获取数据集排名前N的记录的SQL查询方法,特别适合寻找最具代表性的数据。通过指定排序条件和数量,TOP N能高效筛选出所需信息,例如最高销售额产品或最大访问量网页。在Oracle 12c中,查询优化器对TOP N查询进行了优化,保证快速返回结果,并提供丰富的排序和过滤选项。基本用法如`SELECT ... ORDER BY ... FETCH FIRST N ROWS ONLY`,还可结合`OFFSET`进行分页查询或用`WITH TIES`保持结果完整性。掌握TOP N语句能提升数据分析效率,助力企业决策。
|
存储 Oracle 关系型数据库
Oracle 12c的临时UNDO:数据的“临时保镖”
【4月更文挑战第19天】Oracle 12c引入的临时UNDO为数据安全提供新保障。它为临时操作和特定事务提供独立UNDO空间,避免共享UNDO带来的性能瓶颈和管理复杂性。临时UNDO随事务开始分配,记录修改历史,事务结束后自动释放。优点包括提高性能、简化管理及保证数据一致性。但需注意手动配置、监控和优化,以防长时间占用资源。了解其工作原理和最佳实践是提升数据库性能的关键。
|
存储 Oracle 数据管理
Oracle 12c的自动数据优化(ADO)与热图:数据管理的“瘦身”与“透视”艺术
【4月更文挑战第19天】Oracle 12c的ADO和热图技术革新数据管理。ADO智能清理无用数据,优化存储,提升查询速度,实现数据&quot;瘦身&quot;;热图则以直观的视觉表示展示数据分布和状态,助力识别性能瓶颈,犹如数据的&quot;透视&quot;工具。这两项技术结合,强化数据管理,为企业业务发展保驾护航。