oracle软件静默安装程序,Oracle 11.2.0.4静默安装软件和创建数据库
在没有图形界面的情况时,安装Oracle数据库软件和创建数据库就只能使用命令行的方式进行。
本文假设安装的前提条件都已经配置好。
一、静默安装数据库软件
1、准备参数文件
这个参数文件是用于安装软件使用的,里边配置了需要安装的版本、语言、ORACLE_HOME等信息。
这个文件的模版在database/response目录下的db_install.rsp,文件中的各个参数作用参考http://docs.oracle.com/cd/E11882_01/em.112/e12255/oui3_response_files.htm#OUICG183
#修改记录如下:
oracle.install.option=INSTALL_DB_SWONLY #只安装软件
UNIX_GROUP_NAME=oinstall #安装的操作系统用户组
INVENTORY_LOCATION=/u01/app/oraInventory/ #Inventory目录路径
SELECTED_LANGUAGES=en #安装语言
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db #Oracle Home路径
ORACLE_BASE=/u01/app/oracle/ #Oracle Base路径
oracle.install.db.InstallEdition=EE #数据库版本 EE企业版
oracle.install.db.DBA_GROUP=dba #DBA组所属的操作系统用户组
oracle.install.db.OPER_GROUP=oinstall #OPER组所属的操作系统用户组
DECLINE_SECURITY_UPDATES=true #必须设置为true,否则需要修改其他信息
#创建Inventory目录
[oracle@rhel6 11.2.0.4_database]$ cd /u01/app/
[oracle@rhel6 app]$ ls
oracle
[oracle@rhel6 app]$ mkdir oraInventory
2、静默安装
[oracle@rhel6 11.2.0.4_database]$ ./runInstaller -silent -force -responseFile /opt/soft/11g/11.2.0.4_database/response/install.rsp
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 34496 MB Passed
Checking swap space: must be greater than 150 MB. Actual 2047 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2016-12-21_05-02-49PM. Please wait ...[oracle@rhel6 11.2.0.4_database]$ [WARNING] [INS-13014] Target environment do not meet some optional requ
irements. CAUSE: Some of the optional prerequisites are not met. See logs for details. /tmp/OraInstall2016-12-21_05-02-49PM/installActions2016-12-21_05-02-49PM.log
ACTION: Identify the list of failed prerequisite checks from the log: /tmp/OraInstall2016-12-21_05-02-49PM/installActions2016-12-21_05-02-49PM.log. Then either from the log file or from installation manual f
ind the appropriate configuration to meet the prerequisites and fix it manually.You can find the log of this install session at:
/u01/app/oraInventory/logs/installActions2016-12-21_05-02-49PM.log
#日志文件:/u01/app/oraInventory/logs/installActions2016-12-21_05-02-49PM.log
[oracle@rhel6 11.2.0.4_database]$ The installation of Oracle Database 11g was successful.
Please check '/u01/app/oraInventory/logs/silentInstall2016-12-21_05-02-49PM.log' for more details.
As a root user, execute the following script(s):
1. /u01/app/oraInventory/orainstRoot.sh
2. /u01/app/oracle/product/11.2.0/db/root.sh
Successfully Setup Software.
3、使用root执行脚本
[root@rhel6 response]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@rhel6 response]# /u01/app/oracle/product/11.2.0/db/root.sh
Check /u01/app/oracle/product/11.2.0/db/install/root_rhel6_2016-12-21_17-12-23.log for the output of root script
[root@rhel6 response]# cat /u01/app/oracle/product/11.2.0/db/install/root_rhel6_2016-12-21_17-12-23.log
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0/db
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.
Finished product-specific root actions.
Finished product-specific root actions.
#测试sqlplus
[oracle@rhel6 11.2.0.4_database]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed Dec 21 17:16:19 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL>
4、手工建库
官方文档:http://docs.oracle.com/cd/E11882_01/server.112/e25494/create.htm#CIAEJDBE
4.1 配置环境变量
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db
export ORACLE_SID=mydb
export PATH=$PATH:$ORACLE_HOME/bin
#创建数据文件存储目录
[oracle@rhel6 oracle]$ cd $ORACLE_BASE
[oracle@rhel6 oracle]$ mkdir -p oradata/mydb
4.2 手工创建pfile
#此处只写必要的几个参数,生产上要按照实际情况写参数
[oracle@rhel6 ~]$ cat mydb.ora
db_name=mydb
control_files=/u01/app/oracle/oradata/mydb/control01.ctl,/u01/app/oracle/oradata/mydb/control02.ctl
4.3 启动实例到NOMOUNT状态
[oracle@rhel6 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed Dec 21 17:26:31 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount pfile=/home/oracle/mydb.ora;
ORACLE instance started.
Total System Global Area 217157632 bytes
Fixed Size 2251816 bytes
Variable Size 159384536 bytes
Database Buffers 50331648 bytes
Redo Buffers 5189632 bytes
4.4 创建spfile并重启到NOMOUNT状态
SQL> create spfile from pfile='/home/oracle/mydb.ora';
File created.
SQL> shutdown immediate;
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 217157632 bytes
Fixed Size 2251816 bytes
Variable Size 159384536 bytes
Database Buffers 50331648 bytes
Redo Buffers 5189632 bytes
4.4 执行CREATE DATABASE语句创建数据库
SQL> CREATE DATABASE mydb
2 USER SYS IDENTIFIED BY oracle
3 USER SYSTEM IDENTIFIED BY oracle
4 LOGFILE GROUP 1 ('/u01/app/oracle/oradata/redo01.log') SIZE 100M BLOCKSIZE 512,
5 GROUP 2 ('/u01/app/oracle/oradata/redo02.log') SIZE 100M BLOCKSIZE 512,
6 GROUP 3 ('/u01/app/oracle/oradata/redo03.log') SIZE 100M BLOCKSIZE 512
7 MAXLOGFILES 5
8 MAXLOGMEMBERS 5
9 MAXLOGHISTORY 1
10 MAXDATAFILES 100
11 CHARACTER SET ZHS16GBK
12 NATIONAL CHARACTER SET AL16UTF16
13 EXTENT MANAGEMENT LOCAL
14 DATAFILE '/u01/app/oracle/oradata/mydb/system01.dbf' SIZE 325M REUSE
15 SYSAUX DATAFILE '/u01/app/oracle/oradata/mydb/sysaux01.dbf' SIZE 325M REUSE
16 DEFAULT TABLESPACE users
17 DATAFILE '/u01/app/oracle/oradata/mydb/users01.dbf'
18 SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
19 DEFAULT TEMPORARY TABLESPACE tempts1
20 TEMPFILE '/u01/app/oracle/oradata/mydb/temp01.dbf'
21 SIZE 20M REUSE
22 UNDO TABLESPACE undotbs
23 DATAFILE '/u01/app/oracle/oradata/mydb/undotbs01.dbf'
24 SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
Database created.
4.5 执行创建数据字典脚本
conn / as sysdba
@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
@?/rdbms/admin/utlrp.sql
conn system/oracle
@?/sqlplus/admin/pupbld.sql
5、创建监听并启动
[oracle@rhel6 mydb]$ cd $ORACLE_HOME/network/admin
[oracle@rhel6 admin]$ ls
samples shrept.lst
[oracle@rhel6 admin]$ vi listener.ora
[oracle@rhel6 admin]$ cat listener.ora
LISTENER=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=rhel6)(PORT=1521))
(ADDRESS=(PROTOCOL=ipc)(KEY=extproc))))
[oracle@rhel6 admin]$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 21-DEC-2016 17:41:13
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Starting /u01/app/oracle/product/11.2.0/db/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/db/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/rhel6/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rhel6)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rhel6)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 21-DEC-2016 17:41:15
Uptime 0 days 0 hr. 0 min. 2 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/db/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/rhel6/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rhel6)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc)))
The listener supports no services
The command completed successfully
6、测试
C:\Users\victor>sqlplus system/oracle@192.168.56.3/mydb
SQL*Plus: Release 12.1.0.1.0 Production on 星期三 12月 21 17:51:05 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
oracle软件静默安装程序,Oracle 11.2.0.4静默安装软件和创建数据库相关推荐
- Oracle Database 11.2.0.1(静默安装)
http://www.cnblogs.com/ylqmf/archive/2012/04/16/2451211.html 本文档是Oracle Database 11.2.0.1 for RHEL5 ...
- oracle 找不到程序,Oracle 找不到监听程序
Oracle服务器文件 app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora SID_LIST_LISTENER ...
- oracle 112040,Oracle 11.2.0.4 For Linux 64bit+32bit 11Gu4数据库介质百度云
天萃荷净 Oracle 11.2.0.4 For Linux 64bit+32bit 官方数据库介质 百度云盘下载 1.Oracle11G 64BIT介质官方链接 适用于Linux 64bit的Ora ...
- [安装程序配置服务器失败]解决SQL Server2000安装失败
[安装程序配置服务器失败]解决SQL Server2000安装失败 在安装SQL2000时,总是在启动服务时失败!提示安装程序配置服务器失败.根据它的提示查看日志文件.提示为:"安装程序配置 ...
- 【Ubuntu系统配置】006Ubuntu20.04安装QQ for Linux v3.0(del文件安装卸载)
[Ubuntu系统配置]006Ubuntu20.04安装QQ for Linux v3.0(del文件安装卸载) 文章目录 [Ubuntu系统配置]006Ubuntu20.04安装QQ for Lin ...
- window10安装STEP7 Micro/Win V4.0 SP9,安装完后每次开机都提示Assertion Program:pniopcac.exe File
安装STEP7 Micro/Win V4.0 SP9,安装完后每次开机都提示Assertion " Program:pniopcac.exe File:-" 我碰到过同样的问题,解 ...
- CentOS下安装Oracle 11.2.0.4(静默安装)
这里不使用图形用户界面安装数据库,使用的是静默安装. 操作系统版本:CentOS release 6.5 (Final) 打算安装一个实例名为orcl的Oracle. 1. 检查硬件要求 1.1 内存 ...
- linux oracle11.2安装 ins-1010,Oracle 11.2.0.2 RAC安装出现INS-35354解决
今天在安装一套Oracle 11.2.0.2 RAC数据库时出现了INS-35354的问题: 因为之前已经成功安装了11.2.0.2的GI,而且Cluster的一切状态都正常,出现这错误都少有点意外: ...
- oracle数据库升级失败,Oracle 11.2.0.1 rac 升级失败后,数据库降级方案(flashback database)...
升级失败后,数据库降级方案(flashback database) 环境:Oracle 11.2.0.1 rac on redhat 5.8 Flashback database 准备工作 查看是否f ...
最新文章
- Windows上通过VLC播放器搭建rtsp流媒体测试地址操作步骤
- 车辆贷款违约预测挑战赛
- 算法-----有序数组的平方
- 通过DBA_SOURCE定位SQL语句属于哪个存储过程
- SpringBoot实战之SpringBoot自动配置原理
- Python函数式编程简介(一)高阶函数
- 函数计算搭建 Serverless Web 应用(二)- 自定义域名
- mysql format 格式化 返回值
- python 集合技巧
- 学习笔记-数据结构与算法之栈与队列
- Hive 求top N
- mybatis--面向接口编程
- python实现艾宾浩斯背单词功能,实现自动提取单词、邮件发送,部署在阿里云服务器,再也不用担心背单词啦!!
- Mac端视频字幕压制:HandBrake/Premute/松果压制
- c语言在线翻译器,command(c语言翻译工具)
- Photoshop CC2018软件
- 互联网时代运维价值的重塑
- 计算机图形学——反走样技术
- mysql duplicated错误码_Mysql常见错误码讲解
- 什么是UI设计,深入了解UI