0 环境说明
本环境搭建主要用于黑马金融数据安全传输平台项目。
0.1 代码仓库
https://github.com/Chufeng-Jiang/OpenSSL_Secure_Data_Transmission_Platform
0.2 视频传送门
金融数据安全传输平台
https://space.bilibili.com/38600195/channel/seriesdetail?sid=3727139&ctype=0
https://www.bilibili.com/video/BV1Uc411f7To/?spm_id_from=333.999.0.0&vd_source=3353f83539e46042d8cf76efb177a8e4
03-虚拟机VM+CentOS7+SSH+Oracle11g+Navicate+OCCI测试
1 Linux Oracle 11g下载地址
https://pan.baidu.com/s/1AT-JjQHprw_lyeLO-TvHEQ#list/path=%2F
提取码:xing
2 安装依赖
版本对上了就是丝滑…
yum -y install binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33*.i686 elfutils-libelf-devel gcc gcc-c++ glibc*.i686 glibc glibc-devel glibc-devel*.i686 ksh libgcc*.i686 libgcc libstdc++ libstdc++*.i686 libstdc++-devel libstdc++-devel*.i686 libaio libaio*.i686 libaio-devel libaio-devel*.i686 make sysstat unixODBC unixODBC*.i686 unixODBC-devel unixODBC-devel*.i686 libXp
Dependencies Resolved
=============================================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================================
Installing:
compat-libstdc++-33 i686 3.2.3-72.el7 ol7_latest 196 k
elfutils-libelf-devel x86_64 0.176-5.el7 ol7_latest 39 k
glibc i686 2.17-326.0.9.el7_9 ol7_latest 4.3 M
glibc-devel i686 2.17-326.0.9.el7_9 ol7_latest 1.1 M
ksh x86_64 20120801-144.0.1.el7_9 ol7_latest 882 k
libXp x86_64 1.0.2-2.1.el7 ol7_latest 29 k
libaio i686 0.3.109-13.el7 ol7_latest 24 k
libaio-devel i686 0.3.109-13.el7 ol7_latest 12 k
libaio-devel x86_64 0.3.109-13.el7 ol7_latest 12 k
libgcc i686 4.8.5-44.0.3.el7 ol7_latest 111 k
libstdc++ i686 4.8.5-44.0.3.el7 ol7_latest 319 k
libstdc++-devel i686 4.8.5-44.0.3.el7 ol7_latest 1.5 M
unixODBC i686 2.3.1-14.0.1.el7 ol7_latest 411 k
unixODBC x86_64 2.3.1-14.0.1.el7 ol7_latest 413 k
unixODBC-devel i686 2.3.1-14.0.1.el7 ol7_latest 54 k
unixODBC-devel x86_64 2.3.1-14.0.1.el7 ol7_latest 54 k
Updating:
binutils x86_64 2.27-44.base.0.3.el7_9.1 ol7_latest 5.4 M
glibc x86_64 2.17-326.0.9.el7_9 ol7_latest 3.6 M
glibc-devel x86_64 2.17-326.0.9.el7_9 ol7_latest 1.1 M
sysstat x86_64 10.1.5-20.0.3.el7_9 ol7_latest 316 k
Installing for dependencies:
libtool-ltdl i686 2.4.2-22.el7_3 ol7_latest 49 k
ncurses-libs i686 5.9-14.20130511.el7_4 ol7_latest 316 k
nss-softokn-freebl i686 3.90.0-6.0.1.el7_9 ol7_latest 327 k
readline i686 6.2-11.el7 ol7_latest 189 k
zlib-devel x86_64 1.2.7-21.el7_9 ol7_latest 50 k
Updating for dependencies:
glibc-common x86_64 2.17-326.0.9.el7_9 ol7_latest 12 M
glibc-headers x86_64 2.17-326.0.9.el7_9 ol7_latest 694 k
nspr x86_64 4.35.0-1.el7_9 ol7_latest 127 k
nss-softokn-freebl x86_64 3.90.0-6.0.1.el7_9 ol7_latest 321 k
nss-util x86_64 3.90.0-1.el7_9 ol7_latest 80 k
zlib x86_64 1.2.7-21.el7_9 ol7_latest 90 k
Transaction Summary
=============================================================================================================================================================================
Install 16 Packages (+5 Dependent packages)
Upgrade 4 Packages (+6 Dependent packages)
- 安装参考
https://blog.csdn.net/kailingr/article/details/128138548
https://blog.csdn.net/kailingr/article/details/128156759?spm=1001.2014.3001.5501
3 配置用户用于使用Oracle
3.1 创建安装Oracle需要的系统组和用户
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba -m oracle
passwd oracle
3.2 创建安装Oracle软件所需要的目录及赋权
mkdir -p /home/oracle_11/app/
chown -R oracle:oinstall /home/oracle_11/app/
chmod -R 775 /home/oracle_11/app/
3.3 配置系统内核参数值
vim /etc/sysctl.conf
在打开的文件底部添加下面内容
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 1911758848
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
使改变的系统内核参数值生效
sysctl -p
3.4 修改limits.conf文件
vim /etc/security/limits.conf
在打开的文件底部添加下面内容
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
使改变的limits.conf文件生效
vim /etc/pam.d/login
在打开的文件底部添加下面内容
session required pam_limits.so
3.5 配置安装oracle的环境
切换至oracle修改
su - oracle
vim /home/oracle/.bash_profile
在打开的文件中添加下面内容
umask 022
export ORACLE_BASE=/home/oracle_11/app #***必须与安装完后目录一致,最好检查下***
export ORACLE_HOME=$ORACLE_BASE/oracle/product/11.2.0/db_1
export ORACLE_SID=orcl # ***Oracle实例名,可修改***
export ORACLE_TERM=xterm
export PATH=$PATH:HOME/bin:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
使环境变量生效
source /home/oracle/.bash_profile
切换至root修改
su - root
vim /etc/profile
在打开的文件中添加下面内容
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
3.6 关闭防火墙等
//SSH配置的时候已经做完了
service iptables stop
setenforce 0
vim /etc/selinux/config
//设置SELINUX=disabled
3.7 解压数据库安装包至同一个目录并修改目录权限
//回到Oracle压缩包所在的位置
cd /home/beza/Desktop
//解压缩
unzip p13390677_112040_Linux-x86-64_1of7.zip
unzip p13390677_112040_Linux-x86-64_2of7.zip
// 改变压缩包的所有者
chown -R oracle:oinstall database
3.8 安装数据库软件
3.8.1 使用Xftp将解压缩的文件由beza用户下复制到oracle用户下的目录。
3.8.2 修改Oracle文件夹的所有者和执行权限
使用root用户进入oracle解压缩文件夹所在的位置
cd /home/oracle/Desktop/database
chown -R oracle:oinstall database
chmod -R 777 database
3.8.3 修改Oracle_11文件夹的所有者和执行权限
root用户在安装路径oracle_11下新建oraInventory文件夹且赋权
cd /home/oracle_11/
mkdir oraInventory
chown -R oracle:oinstall /home/oracle_11/oraInventory
chmod 777 /home/oracle_11/oraInventory
在虚拟机
中打开终端,进入解压缩文件目录,运行runInstall安装脚本,出现oracle安装可视化界面:
./runInstaller
3.8.4 图形化安装界面
3.8.4.1 进度86%会有个报错Error in invoking target ‘agent nmhs’ of makefile
这个错误发生在安装的过程中,所以无法提前修改文件避免
另开一个终端
3.8.4.1.1 查找并修改ins_ctx.mk文件
find / -name ins_ctx.mk
得到文件位置
/home/oracle_11/app/oracle/product/11.2.0/db_1/ctx/lib/ins_ctx.mk
进入到该文件的位置
cd /home/oracle_11/app/oracle/product/11.2.0/db_1/ctx/lib/
备份文件
cp ins_ctx.mk ins_ctx.mk.bak
修改ins_ctx.mk
vim ins_ctx.mk
ctxhx: $(CTXHXOBJ)
$(LINK_CTXHX) $(CTXHXOBJ) $(INSO_LINK)
修改为:
ctxhx: $(CTXHXOBJ)
-static $(LINK_CTXHX) $(CTXHXOBJ) $(INSO_LINK) /usr/lib64/stdc.a
以下是完整的ins_ctx.mk
# Entering /ade/aime_ctx_465828/oracle/ctx/install/cus_ctx.mk
include $(ORACLE_HOME)/ctx/lib/env_ctx.mk
install: setup
ctxload: $(DRZ)
$(LINK) $(DRZ) $(DR_LINK)
ctxhx: $(CTXHXOBJ)
-static $(LINK_CTXHX) $(CTXHXOBJ) $(INSO_LINK) /usr/lib64/stdc.a
ctxlc: $(DRLLC)
$(LINK) $(DRLLC) $(DR_LINK)
ctxkbtc: $(KBTC_OBJS)
$(LINK) $(KBTC_OBJS) $(DR_LINK)
ictxload: ctxload
-mv -f $(ORACLE_HOME)/bin/ctxload $(ORACLE_HOME)/bin/ctxloadO
-mv ctxload $(ORACLE_HOME)/bin/ctxload
-chmod 751 $(ORACLE_HOME)/bin/ctxload
ictxhx: ctxhx
-mv -f $(ORACLE_HOME)/ctx/bin/ctxhx $(ORACLE_HOME)/ctx/bin/ctxhxO
-mv ctxhx $(ORACLE_HOME)/ctx/bin/ctxhx
-chmod 751 $(ORACLE_HOME)/ctx/bin/ctxhx
ictxlc: ctxlc
-mv -f $(ORACLE_HOME)/bin/ctxlc $(ORACLE_HOME)/bin/ctxlcO
-mv ctxlc $(ORACLE_HOME)/bin/ctxlc
-chmod 751 $(ORACLE_HOME)/bin/ctxlc
ictxkbtc: ctxkbtc
-mv -f $(ORACLE_HOME)/bin/ctxkbtc $(ORACLE_HOME)/bin/ctxkbtc0
-mv ctxkbtc $(ORACLE_HOME)/bin/ctxkbtc
-chmod 751 $(ORACLE_HOME)/bin/ctxkbtc
setup: $(INSTALL_TARGS)
# Exiting /ade/aime_ctx_465828/oracle/ctx/install/cus_ctx.mk
# Entering link.mk
$(CTXKBTC):
$(SILENT)$(ECHO)
$(SILENT)$(ECHO) "Linking $@"
$(RMF) $@
$(CTXKBTC_LINKLINE)
$(CHMOD) 755 $@
$(SILENT)$(ECHO) "Linking $@ complete"
$(CTXLOAD):
$(SILENT)$(ECHO)
$(SILENT)$(ECHO) "Linking $@"
$(RMF) $@
$(CTXLOAD_LINKLINE)
$(CHMOD) 755 $@
$(SILENT)$(ECHO) "Linking $@ complete"
$(CTXHX): $(CTXHXOBJ)
$(SILENT)$(ECHO)
$(SILENT)$(ECHO) "Linking $@"
$(RMF) $@
$(CTXHX_LINKLINE)
$(CHMOD) 755 $@
$(SILENT)$(ECHO) "Linking $@ complete"
$(CTXLC):
$(SILENT)$(ECHO)
$(SILENT)$(ECHO) "Linking $@"
$(RMF) $@
$(CTXLC_LINKLINE)
$(CHMOD) 755 $@
$(SILENT)$(ECHO) "Linking $@ complete"
# Exiting link.mk
# Entering /ade/aime_ctx_465828/oracle/ctx/s_link.mk
# Exiting /ade/aime_ctx_465828/oracle/ctx/s_link.mk
3.8.4.1.2 修改ins_emagent.mk
find / -name ins_emagent.mk
得到文件位置
/home/oracle_11/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk
进入该文件的位置
cd /home/oracle_11/app/oracle/product/11.2.0/db_1/sysman/lib
备份文件
cp ins_emagent.mk ins_emagent.mk.bak
修改ins_emagent.mk
vim ins_emagent.mk
$(MK_EMAGENT_NMECTL)修改为:$(MK_EMAGENT_NMECTL) -lnnz11
以下是完整的ins_emagent.mk,直接复制替换会更好
# cus_emagent.mk - makefile to relink Enterprise Manager native executables
#
#
#
# NOTE: ORACLE_HOME must be either:
# . set in the user's environment
# . passed in on the command line
# . defined in a modified version of this makefile
include $(ORACLE_HOME)/sysman/lib/env_emagent.mk
PRODADMIN = $(PRODLIBHOME)
PRODBINHOME = $(ORACLE_HOME)/bin/
# override standard macro to use ld
LDCCOM = $(LINK) $(EXOSFLAGS) $(LINKLDLIBS)
#
# we redefine the order so that .so get picked up before .a
#
LDFLAGS=-o $@ $(LDPATHFLAG)$(LIBHOME) $(LDPATHFLAG)$(PRODLIBHOME) $(LDPATHFLAG)$(LIBHOME)stubs/ $(LDFLAGS_ARCH) $(LDARCH_FLAGS)
MAKEFILE=$(PRODLIBHOME)ins_emagent.mk
INSTALL_TARGS = clean agent tclexec collector
default: agent collector dbfetchlets
INSTALL_SHARED_TARGETS=libnmemso libnmeoci libnmefw \
libnmefos libnmefsql libnmefud libnmefdms libnmefojmx libnmefut libnmefvr libnmefpfa\
libnmevq libnmevsp libnmadbg libnmadm libnmalk libnmastk libnmasf libnmarl libnmefsp\
libnmevc libnmefsqlt libnmefport \
libnmcfhc libnmcfsga
INSTALL_EXE_TARGETS=emagent emdctl nmupm nmei ojmxtool \
emagtm emagtmc nmocat e2eme nmosudo
INSTALL_TCL_TARGET=oratclsh
agent: $(INSTALL_SHARED_TARGETS) $(INSTALL_EXE_TARGETS) iemtgtctl
$(SILENT) $(ECHO) "Enterprise Manager native components relinked"
$(SILENT) $(ECHO) "IMPORTANT NOTE: To complete this Install/upgrade, please login as root and"
$(SILENT) $(ECHO) " execute the root.sh script."
tclexec:$(INSTALL_SHARED_TARGETS) $(INSTALL_TCL_TARGET)
$(SILENT) $(ECHO) "Enterprise Manager tclexec relinked"
collector: $(INSTALL_SHARED_TARGETS)
$(MAKE) -f $(SYSMANLIB)ins_emagent.mk relink_exe EXENAME=nmccollector $(PL_LINK_OVERRIDES)
$(SILENT) $(ECHO) "Enterprise Manager Direct Memory Access Collector relinked"
dbfetchlets: $(INSTALL_SHARED_TARGETS)
$(SILENT) $(ECHO) "Enterprise Manager DB fetchlets relinked"
$(INSTALL_EXE_TARGETS):
$(MAKE) -f $(SYSMANLIB)ins_emagent.mk relink_exe EXENAME=$@ $(PL_LINK_OVERRIDES)
$(INSTALL_TCL_TARGET):
$(MAKE) -f $(SYSMANLIB)ins_emagent.mk relink_exe EXENAME=$@ $(PL_LINK_OVERRIDES)
$(INSTALL_SHARED_TARGETS):
$(MAKE) -f $(SYSMANLIB)ins_emagent.mk relink_sharedobj SHAREDOBJ=$@ $(PL_LINK_OVERRIDES)
relink_exe: $(SYSMANBIN)$(EXENAME)
-mv -f $(BINHOME)$(EXENAME) $(BINHOME)$(EXENAME)0
-mv $(SYSMANBIN)$(EXENAME) $(BINHOME)
relink_sharedobj: $(SYSMANLIB)$(SHAREDOBJ).$(SO_EXT)
-mv -f $(ORACLE_HOME)/$(LIBDIR)/$(SHAREDOBJ).$(SO_EXT) $(ORACLE_HOME)/$(LIBDIR)/$(SHAREDOBJ).$(SO_EXT).0
-mv $(SYSMANLIB)$(SHAREDOBJ).$(SO_EXT) $(ORACLE_HOME)/$(LIBDIR)/$(SHAREDOBJ).$(SO_EXT)
##############################################
#
# targets for relinking executables
#
##############################################
#=================
# emcgtctl
#=================
iemtgtctl:
$(MAKE) -f $(SYSMANLIB)ins_emagent.mk emtgtctl2 $(PL_LINK_OVERRIDES)
-rm -f $(ORACLE_HOME)/bin/emtgtctl2
-mv emtgtctl2 $(ORACLE_HOME)/bin/emtgtctl2
$(CHMOD) 6751 $(ORACLE_HOME)/bin/emtgtctl2
emtgtctl2:
$(MK_EMAGENT_NMETGCTL)
#=================
# oratclsh
#=================
$(SYSMANBIN)oratclsh:
$(MK_EMAGENT_ORATCLSH)
#==================
# nmo
#=================
nmo:
$(MAKE) -f $(SYSMANLIB)ins_emagent.mk relink_exe EXENAME=$@ $(PL_LINK_OVERRIDES)
$(SYSMANBIN)nmo:
$(MK_EMAGENT_NMO)
$(RMF) $(NMO_NONPRIV)
$(CP) $(SYSMANBIN)nmo $(NMO_NONPRIV)
#====================
# nmb
#===================
nmb:
$(MAKE) -f $(SYSMANLIB)ins_emagent.mk relink_exe EXENAME=$@ $(PL_LINK_OVERRIDES)
$(SYSMANBIN)nmb:
$(MK_EMAGENT_NMB)
$(RMF) $(NMB_NONPRIV)
$(CP) $(SYSMANBIN)nmb $(NMB_NONPRIV)
#====================
# nmosudo
#===================
nmosudo:
$(MAKE) -f $(SYSMANLIB)ins_emagent.mk relink_exe EXENAME=$@ $(PL_LINK_OVERRIDES)
$(SYSMANBIN)nmosudo:
$(MK_EMAGENT_NMOSUDO)
#================
# nmupm
#===============
$(SYSMANBIN)nmupm:
$(MK_EMAGENT_NMUPM)
#================
# ojmxtool
#===============
$(SYSMANBIN)ojmxtool:
$(MK_EMAGENT_OJMXTOOL)
#========================
# emagent
#========================
$(SYSMANBIN)emagent:
$(MK_EMAGENT_CEMD)
#========================
# emsubagent
#========================
emsubagent:
$(MAKE) -f $(SYSMANLIB)ins_emagent.mk relink_exe EXENAME=$@ $(PL_LINK_OVERRIDES)
$(SYSMANBIN)emsubagent:
$(MK_EMAGENT_SNMPMGR)
#==========================
# nmei
#==========================
$(SYSMANBIN)nmei:
$(MK_EMAGENT_NMEI)
#==========================
# nmum/emagtm
#=========================
$(SYSMANBIN)nmum $(SYSMANBIN)emagtm:
$(MK_EMAGENT_NMUM)
#==========================
# nmum/emagtmc
#=========================
$(SYSMANBIN)nmumc $(SYSMANBIN)emagtmc:
$(MK_EMAGENT_NMUMC)
#===========================
# emdctl
#===========================
$(SYSMANBIN)emdctl:
#===========================
# nmocat
#===========================
$(MK_EMAGENT_NMECTL) -lnnz11
$(SYSMANBIN)nmocat:
$(MK_EMAGENT_NMOCAT)
#=============================
# agent main shared library
#==============================
$(SYSMANLIB)libnmemso.$(SO_EXT): $(LIBNMEMSO_DEF)
$(MK_EMAGENT_LIBNMEMSO_SHLIB) $(LDLIBS)
#========================
# e2eme :
#========================
# The linking library path order of the e2eme has to be inverted or the code
# is statically linked (ld finds the .a files before the .so ones)
$(SYSMANBIN)e2eme:
$(MK_EMAGENT_E2EME)
#================
# NMHS
#===============
nmhs:
$(MAKE) -f $(SYSMANLIB)ins_emagent.mk relink_exe EXENAME=$@ $(PL_LINK_OVERRIDES)
$(SYSMANBIN)nmhs:
$(MK_EMAGENT_NMHS)
$(RMF) $(NMHS_NONPRIV)
$(CP) $(SYSMANBIN)nmhs $(NMHS_NONPRIV)
#=================
# nmccollector
#=================
$(SYSMANBIN)nmccollector:
$(MK_EMAGENT_COLLECTOR)
######################################################
#
#
preinstall:
-chmod 755 $(ORACLE_HOME)/bin
install: preinstall $(INSTALL_TARGS)
clean:
3.8.4.2 oracle用户下安装结束
用root用户执行orainstRoot.sh 和root.sh两个脚本,点击【OK】,完成数据库软件安装
3.8.5 切换root用户执行脚本
cd /home/oracle_11/oraInventory
./orainstRoot.sh
执行root脚本的时候会提示你输入pathname,直接跳过就可以了,单独的用户文件夹专门用来配置oracle的,所以不用管。
cd /home/oracle_11/app/oracle/product/11.2.0/db_1
./root.sh
控制台显示Finish,回到虚拟机点击继续,结束图形化界面的安装
4 配置监听 - 图形界面成功
使用oracle用户,在虚拟机中,打开控制台,输入命令启动网络配置助手
netca
5 创建数据库 - 图形界面失败
使用oracle用户,在虚拟机中,打开控制台,输入命令开始创建数据库
dbca
卡主了
----图形界面失败-----
6 手动创建监听(如果图形界面失败)
配置数据库监听文件
使用root用户修改监听文件,没有就新建。
6.1 文件应该在的位置
/home/oracle_11/app/oracle/product/11.2.0/db_1/assistants/netca/netca.rsp
6.2 root 用户进入文件夹进行配置文件修改
cd /home/oracle_11/app/oracle/product/11.2.0/db_1/assistants/netca
//备份文件
cp netca.rsp netca.rsp.bk
//开始修改
vim netca.rsp
6.2 可以直接拷贝
######################################################################
## Copyright(c) 1998, 2011 Oracle Corporation. All rights reserved. ##
## ##
## Specify values for the variables listed below to customize your ##
## installation. ##
## ##
## Each variable is associated with a comment. The comment ##
## identifies the variable type. ##
## ##
## Please specify the values in the following format: ##
## ##
## Type Example ##
## String "Sample Value" ##
## Boolean True or False ##
## Number 1000 ##
## StringList {"String value 1","String Value 2"} ##
## ##
######################################################################
## ##
## This sample response file causes the Oracle Net Configuration ##
## Assistant (NetCA) to complete an Oracle Net configuration during ##
## a custom install of the Oracle11g server which is similar to ##
## what would be created by the NetCA during typical Oracle11g ##
## install. It also documents all of the NetCA response file ##
## variables so you can create your own response file to configure ##
## Oracle Net during an install the way you wish. ##
## ##
######################################################################
[GENERAL]
RESPONSEFILE_VERSION="11.2"
CREATE_TYPE="CUSTOM"
#-------------------------------------------------------------------------------
# Name : SHOW_GUI
# Datatype : Boolean
# Description: This variable controls appearance/suppression of the NetCA GUI,
# Pre-req : N/A
# Default : TRUE
# Note:
# This must be set to false in order to run NetCA in silent mode.
# This is a substitute of "/silent" flag in the NetCA command line.
# The command line flag has precedence over the one in this response file.
# This feature is present since 10.1.0.3.
#-------------------------------------------------------------------------------
#SHOW_GUI=false
#-------------------------------------------------------------------------------
# Name : LOG_FILE
# Datatype : String
# Description: If present, NetCA will log output to this file in addition to the
# standard out.
# Pre-req : N/A
# Default : NONE
# Note:
# This is a substitute of "/log" in the NetCA command line.
# The command line argument has precedence over the one in this response file.
# This feature is present since 10.1.0.3.
#-------------------------------------------------------------------------------
#LOG_FILE=""/oracle11gHome/network/tools/log/netca.log""
[oracle.net.ca]
#INSTALLED_COMPONENTS;StringList;list of installed components
# The possible values for installed components are:
# "net8","server","client","aso", "cman", "javavm"
INSTALLED_COMPONENTS={"server","net8","javavm"}
#INSTALL_TYPE;String;type of install
# The possible values for install type are:
# "typical","minimal" or "custom"
INSTALL_TYPE=""typical""
#LISTENER_NUMBER;Number;Number of Listeners
# A typical install sets one listener
LISTENER_NUMBER=1
#LISTENER_NAMES;StringList;list of listener names
# The values for listener are:
# "LISTENER","LISTENER1","LISTENER2","LISTENER3", ...
# A typical install sets only "LISTENER"
LISTENER_NAMES={"LISTENER"}
#LISTENER_PROTOCOLS;StringList;list of listener addresses (protocols and parameters separated by semicolons)
# The possible values for listener protocols are:
# "TCP;1521","TCPS;2484","NMP;ORAPIPE","IPC;IPCKEY","VI;1521"
# A typical install sets only "TCP;1521"
LISTENER_PROTOCOLS={"TCP;1521"}
#LISTENER_START;String;name of the listener to start, in double quotes
LISTENER_START=""LISTENER""
#NAMING_METHODS;StringList;list of naming methods
# The possible values for naming methods are:
# LDAP, TNSNAMES, ONAMES, HOSTNAME, NOVELL, NIS, DCE
# A typical install sets only: "TNSNAMES","ONAMES","HOSTNAMES"
# or "LDAP","TNSNAMES","ONAMES","HOSTNAMES" for LDAP
NAMING_METHODS={"TNSNAMES","ONAMES","HOSTNAME"}
#NOVELL_NAMECONTEXT;String;Novell Directory Service name context, in double quotes
# A typical install does not use this variable.
#NOVELL_NAMECONTEXT = ""NAMCONTEXT""
#SUN_METAMAP;String; SUN meta map, in double quotes
# A typical install does not use this variable.
#SUN_METAMAP = ""MAP""
#DCE_CELLNAME;String;DCE cell name, in double quotes
# A typical install does not use this variable.
#DCE_CELLNAME = ""CELL""
#NSN_NUMBER;Number;Number of NetService Names
# A typical install sets one net service name
NSN_NUMBER=1
#NSN_NAMES;StringList;list of Net Service names
# A typical install sets net service name to "EXTPROC_CONNECTION_DATA"
NSN_NAMES={"EXTPROC_CONNECTION_DATA"}
#NSN_SERVICE;StringList;Oracle11g database's service name
# A typical install sets Oracle11g database's service name to "PLSExtProc"
NSN_SERVICE={"PLSExtProc"}
#NSN_PROTOCOLS;StringList;list of coma separated strings of Net Service Name protocol parameters
# The possible values for net service name protocol parameters are:
# "TCP;HOSTNAME;1521","TCPS;HOSTNAME;2484","NMP;COMPUTERNAME;ORAPIPE","VI;HOSTNAME;1521","IPC;IPCKEY"
# A typical install sets parameters to "IPC;EXTPROC"
NSN_PROTOCOLS={"TCP;HOSTNAME;1521"}
7 手动配置数据库实例
7.1文件应该在的位置
/home/oracle_11/app/oracle/product/11.2.0/db_1/assistants/dbca/dbca.rsp
7.2 root用户进入文件夹进行修改
进入文件夹
cd /home/oracle_11/app/oracle/product/11.2.0/db_1/assistants/dbca
备份文件
cp dbca.rsp dbca.rsp.bk
修改文件信息
vim dbca.rsp
7.2 主要把名字修改为了orcl,有关的密码都设置成了123456
##############################################################################
## ##
## DBCA response file ##
## ------------------ ##
## Copyright 1998, 2013, Oracle Corporation. All Rights Reserved. ##
## ##
## Specify values for the variables listed below to customize Oracle ##
## Database Configuration installation. ##
## ##
## Each variable is associated with a comment. The comment identifies the ##
## variable type. ##
## ##
## Please specify the values in the following format : ##
## Type : Example ##
## String : "<value>" ##
## Boolean : True or False ##
## Number : <numeric value> ##
## StringList : {"<value1>","<value2>"} ##
## ##
## Examples : ##
## 1. dbca -progress_only -responseFile <response file> ##
## Display a progress bar depicting progress of database creation ##
## process. ##
## ##
## 2. dbca -silent -responseFile <response file> ##
## Creates database silently. No user interface is displayed. ##
## ##
## 3. dbca -silent -createDatabase -cloneTemplate ##
## -responseFile <response file> ##
## Creates database silently with clone template. The template in ##
## responsefile is a clone template. ##
## ##
## 4. dbca -silent -deleteDatabase -responseFile <response file> ##
## Deletes database silently. ##
##############################################################################
#-----------------------------------------------------------------------------
# GENERAL section is required for all types of database creations.
#-----------------------------------------------------------------------------
[GENERAL]
#-----------------------------------------------------------------------------
# Name : RESPONSEFILE_VERSION
# Datatype : String
# Description : Version of the database to create
# Valid values : "11.1.0"
# Default value : None
# Mandatory : Yes
#-----------------------------------------------------------------------------
RESPONSEFILE_VERSION = "11.2.0"
#-----------------------------------------------------------------------------
# Name : OPERATION_TYPE
# Datatype : String
# Description : Type of operation
# Valid values : "createDatabase" \ "createTemplateFromDB" \ "createCloneTemplate" \ "deleteDatabase" \ "configureDatabase" \ "addInstance" (RAC-only) \ "deleteInstance" (RAC-only)
# Default value : None
# Mandatory : Yes
#-----------------------------------------------------------------------------
OPERATION_TYPE = "createDatabase"
#-----------------------*** End of GENERAL section ***------------------------
#-----------------------------------------------------------------------------
# CREATEDATABASE section is used when OPERATION_TYPE is defined as "createDatabase".
#-----------------------------------------------------------------------------
[CREATEDATABASE]
#-----------------------------------------------------------------------------
# Name : GDBNAME
# Datatype : String
# Description : Global database name of the database
# Valid values : <db_name>.<db_domain> - when database domain isn't NULL
# <db_name> - when database domain is NULL
# Default value : None
# Mandatory : Yes
#-----------------------------------------------------------------------------
GDBNAME = "orcl"
#-----------------------------------------------------------------------------
# Name : RACONENODE
# Datatype : Boolean
# Description : Set to true for RAC One Node database
# Valid values : TRUE\FALSE
# Default value : FALSE
# Mandatory : No
#-----------------------------------------------------------------------------
#RACONENODE = "false"
#-----------------------------------------------------------------------------
# Name : RACONENODESERVICENAME
# Datatype : String
# Description : Service is required by application to connect to RAC One
# Node Database
# Valid values : Service Name
# Default value : None
# Mandatory : No [required in case RACONENODE flag is set to true]
#-----------------------------------------------------------------------------
#RACONENODESERVICENAME =
#-----------------------------------------------------------------------------
# Name : POLICYMANAGED
# Datatype : Boolean
# Description : Set to true if Database is policy managed and
# set to false if Database is admin managed
# Valid values : TRUE\FALSE
# Default value : FALSE
# Mandatory : No
#-----------------------------------------------------------------------------
#POLICYMANAGED = "false"
#-----------------------------------------------------------------------------
# Name : CREATESERVERPOOL
# Datatype : Boolean
# Description : Set to true if new server pool need to be created for database
# if this option is specified then the newly created database
# will use this newly created serverpool.
# Multiple serverpoolname can not be specified for database
# Valid values : TRUE\FALSE
# Default value : FALSE
# Mandatory : No
#-----------------------------------------------------------------------------
#CREATESERVERPOOL = "false"
#-----------------------------------------------------------------------------
# Name : FORCE
# Datatype : Boolean
# Description : Set to true if new server pool need to be created by force
# if this option is specified then the newly created serverpool
# will be assigned server even if no free servers are available.
# This may affect already running database.
# This flag can be specified for Admin managed as well as policy managed db.
# Valid values : TRUE\FALSE
# Default value : FALSE
# Mandatory : No
#-----------------------------------------------------------------------------
#FORCE = "false"
#-----------------------------------------------------------------------------
# Name : SERVERPOOLNAME
# Datatype : String
# Description : Only one serverpool name need to be specified
# if Create Server Pool option is specified.
# Comma-separated list of Serverpool names if db need to use
# multiple Server pool
# Valid values : ServerPool name
# Default value : None
# Mandatory : No [required in case of RAC service centric database]
#-----------------------------------------------------------------------------
#SERVERPOOLNAME =
#-----------------------------------------------------------------------------
# Name : CARDINALITY
# Datatype : Number
# Description : Specify Cardinality for create server pool operation
# Valid values : any positive Integer value
# Default value : Number of qualified nodes on cluster
# Mandatory : No [Required when a new serverpool need to be created]
#-----------------------------------------------------------------------------
#CARDINALITY =
#-----------------------------------------------------------------------------
# Name : SID
# Datatype : String
# Description : System identifier (SID) of the database
# Valid values : Check Oracle11g Administrator's Guide
# Default value : <db_name> specified in GDBNAME
# Mandatory : No
#-----------------------------------------------------------------------------
SID = "orcl"
#-----------------------------------------------------------------------------
# Name : NODELIST
# Datatype : String
# Description : Comma-separated list of cluster nodes
# Valid values : Cluster node names
# Default value : None
# Mandatory : No (Yes for RAC database-centric database )
#-----------------------------------------------------------------------------
#NODELIST=
#-----------------------------------------------------------------------------
# Name : TEMPLATENAME
# Datatype : String
# Description : Name of the template
# Valid values : Template file name
# Default value : None
# Mandatory : Yes
#-----------------------------------------------------------------------------
TEMPLATENAME = "General_Purpose.dbc"
#-----------------------------------------------------------------------------
# Name : OBFUSCATEDPASSWORDS
# Datatype : Boolean
# Description : Set to true if passwords are encrypted
# Valid values : TRUE\FALSE
# Default value : FALSE
# Mandatory : No
#-----------------------------------------------------------------------------
#OBFUSCATEDPASSWORDS = FALSE
#-----------------------------------------------------------------------------
# Name : SYSPASSWORD
# Datatype : String
# Description : Password for SYS user
# Valid values : Check Oracle11g Administrator's Guide
# Default value : None
# Mandatory : Yes
#-----------------------------------------------------------------------------
SYSPASSWORD = "123456"
#-----------------------------------------------------------------------------
# Name : SYSTEMPASSWORD
# Datatype : String
# Description : Password for SYSTEM user
# Valid values : Check Oracle11g Administrator's Guide
# Default value : None
# Mandatory : Yes
#-----------------------------------------------------------------------------
SYSTEMPASSWORD = "123456"
#-----------------------------------------------------------------------------
# Name : EMCONFIGURATION
# Datatype : String
# Description : Enterprise Manager Configuration Type
# Valid values : CENTRAL|LOCAL|ALL|NONE
# Default value : NONE
# Mandatory : No
#-----------------------------------------------------------------------------
#EMCONFIGURATION = "NONE"
#-----------------------------------------------------------------------------
# Name : DISABLESECURITYCONFIGURATION
# Datatype : String
# Description : Database Security Settings
# Valid values : ALL|NONE|AUDIT|PASSWORD_PROFILE
# Default value : NONE
# Mandatory : No
#-----------------------------------------------------------------------------
#DISABLESECURITYCONFIGURATION = "NONE"
#-----------------------------------------------------------------------------
# Name : SYSMANPASSWORD
# Datatype : String
# Description : Password for SYSMAN user
# Valid values : Check Oracle11g Administrator's Guide
# Default value : None
# Mandatory : Yes, if LOCAL specified for EMCONFIGURATION
#-----------------------------------------------------------------------------
SYSMANPASSWORD = "123456"
#-----------------------------------------------------------------------------
# Name : DBSNMPPASSWORD
# Datatype : String
# Description : Password for DBSNMP user
# Valid values : Check Oracle11g Administrator's Guide
# Default value : None
# Mandatory : Yes, if EMCONFIGURATION is specified
#-----------------------------------------------------------------------------
DBSNMPPASSWORD = "123456"
#-----------------------------------------------------------------------------
# Name : CENTRALAGENT
# Datatype : String
# Description : Grid Control Central Agent Oracle Home
# Default value : None
# Mandatory : Yes, if CENTRAL is specified for EMCONFIGURATION
#-----------------------------------------------------------------------------
#CENTRALAGENT =
#-----------------------------------------------------------------------------
# Name : HOSTUSERNAME
# Datatype : String
# Description : Host user name for EM backup job
# Default value : None
# Mandatory : Yes, if ALL is specified for EMCONFIGURATION
#-----------------------------------------------------------------------------
#HOSTUSERNAME =
#-----------------------------------------------------------------------------
# Name : HOSTUSERPASSWORD
# Datatype : String
# Description : Host user password for EM backup job
# Default value : None
# Mandatory : Yes, if ALL is specified for EMCONFIGURATION
#-----------------------------------------------------------------------------
#HOSTUSERPASSWORD=
#-----------------------------------------------------------------------------
# Name : BACKUPSCHEDULE
# Datatype : String
# Description : Daily backup schedule in the form of hh:mm
# Default value : 2:00
# Mandatory : Yes, if ALL is specified for EMCONFIGURATION
#-----------------------------------------------------------------------------
#BACKUPSCHEDULE=
#-----------------------------------------------------------------------------
# Name : DVOWNERNAME
# Datatype : String
# Description : DataVault Owner
# Valid values : Check Oracle11g Administrator's Guide
# Default value : None
# Mandatory : Yes, if DataVault option is chosen
#-----------------------------------------------------------------------------
#DVOWNERNAME = ""
#-----------------------------------------------------------------------------
# Name : DVOWNERPASSWORD
# Datatype : String
# Description : Password for DataVault Owner
# Valid values : Check Oracle11g Administrator's Guide
# Default value : None
# Mandatory : Yes, if DataVault option is chosen
#-----------------------------------------------------------------------------
#DVOWNERPASSWORD = ""
#-----------------------------------------------------------------------------
# Name : DVACCOUNTMANAGERNAME
# Datatype : String
# Description : DataVault Account Manager
# Valid values : Check Oracle11g Administrator's Guide
# Default value : None
# Mandatory : No
#-----------------------------------------------------------------------------
#DVACCOUNTMANAGERNAME = ""
#-----------------------------------------------------------------------------
# Name : DVACCOUNTMANAGERPASSWORD
# Datatype : String
# Description : Password for DataVault Account Manager
# Valid values : Check Oracle11g Administrator's Guide
# Default value : None
# Mandatory : No
#-----------------------------------------------------------------------------
#DVACCOUNTMANAGERPASSWORD = ""
#-----------------------------------------------------------------------------
# Name : DATAFILEJARLOCATION
# Datatype : String
# Description : Location of the data file jar
# Valid values : Directory containing compressed datafile jar
# Default value : None
# Mandatory : No
#-----------------------------------------------------------------------------
#DATAFILEJARLOCATION =
#-----------------------------------------------------------------------------
# Name : DATAFILEDESTINATION
# Datatype : String
# Description : Location of the data file's
# Valid values : Directory for all the database files
# Default value : $ORACLE_BASE/oradata
# Mandatory : No
#-----------------------------------------------------------------------------
#DATAFILEDESTINATION =
#-----------------------------------------------------------------------------
# Name : RECOVERYAREADESTINATION
# Datatype : String
# Description : Location of the data file's
# Valid values : Recovery Area location
# Default value : $ORACLE_BASE/flash_recovery_area
# Mandatory : No
#-----------------------------------------------------------------------------
#RECOVERYAREADESTINATION=
#-----------------------------------------------------------------------------
# Name : STORAGETYPE
# Datatype : String
# Description : Specifies the storage on which the database is to be created
# Valid values : FS (CFS for RAC), ASM
# Default value : FS
# Mandatory : No
#-----------------------------------------------------------------------------
#STORAGETYPE=FS
#-----------------------------------------------------------------------------
# Name : DISKGROUPNAME
# Datatype : String
# Description : Specifies the disk group name for the storage
# Default value : DATA
# Mandatory : No
#-----------------------------------------------------------------------------
#DISKGROUPNAME=DATA
#-----------------------------------------------------------------------------
# Name : ASMSNMP_PASSWORD
# Datatype : String
# Description : Password for ASM Monitoring
# Default value : None
# Mandatory : No
#-----------------------------------------------------------------------------
#ASMSNMP_PASSWORD=""
#-----------------------------------------------------------------------------
# Name : RECOVERYGROUPNAME
# Datatype : String
# Description : Specifies the disk group name for the recovery area
# Default value : RECOVERY
# Mandatory : No
#-----------------------------------------------------------------------------
#RECOVERYGROUPNAME=RECOVERY
#-----------------------------------------------------------------------------
# Name : CHARACTERSET
# Datatype : String
# Description : Character set of the database
# Valid values : Check Oracle11g National Language Support Guide
# Default value : "US7ASCII"
# Mandatory : NO
#-----------------------------------------------------------------------------
#CHARACTERSET = "US7ASCII"
#-----------------------------------------------------------------------------
# Name : NATIONALCHARACTERSET
# Datatype : String
# Description : National Character set of the database
# Valid values : "UTF8" or "AL16UTF16". For details, check Oracle11g National Language Support Guide
# Default value : "AL16UTF16"
# Mandatory : No
#-----------------------------------------------------------------------------
#NATIONALCHARACTERSET= "UTF8"
#-----------------------------------------------------------------------------
# Name : REGISTERWITHDIRSERVICE
# Datatype : Boolean
# Description : Specifies whether to register with Directory Service.
# Valid values : TRUE \ FALSE
# Default value : FALSE
# Mandatory : No
#-----------------------------------------------------------------------------
#REGISTERWITHDIRSERVICE= TRUE
#-----------------------------------------------------------------------------
# Name : DIRSERVICEUSERNAME
# Datatype : String
# Description : Specifies the name of the directory service user
# Mandatory : YES, if the value of registerWithDirService is TRUE
#-----------------------------------------------------------------------------
#DIRSERVICEUSERNAME= "name"
#-----------------------------------------------------------------------------
# Name : DIRSERVICEPASSWORD
# Datatype : String
# Description : The password of the directory service user.
# You can also specify the password at the command prompt instead of here.
# Mandatory : YES, if the value of registerWithDirService is TRUE
#-----------------------------------------------------------------------------
#DIRSERVICEPASSWORD= "password"
#-----------------------------------------------------------------------------
# Name : WALLETPASSWORD
# Datatype : String
# Description : The password for wallet to created or modified.
# You can also specify the password at the command prompt instead of here.
# Mandatory : YES, if the value of registerWithDirService is TRUE
#-----------------------------------------------------------------------------
#WALLETPASSWORD= "password"
#-----------------------------------------------------------------------------
# Name : LISTENERS
# Datatype : String
# Description : Specifies list of listeners to register the database with.
# By default the database is configured for all the listeners specified in the
# $ORACLE_HOME/network/admin/listener.ora
# Valid values : The list should be space separated names like "listener1 listener2".
# Mandatory : NO
#-----------------------------------------------------------------------------
#LISTENERS = "listener1 listener2"
#-----------------------------------------------------------------------------
# Name : VARIABLESFILE
# Datatype : String
# Description : Location of the file containing variable value pair
# Valid values : A valid file-system file. The variable value pair format in this file
# is <variable>=<value>. Each pair should be in a new line.
# Default value : None
# Mandatory : NO
#-----------------------------------------------------------------------------
#VARIABLESFILE =
#-----------------------------------------------------------------------------
# Name : VARIABLES
# Datatype : String
# Description : comma separated list of name=value pairs. Overrides variables defined in variablefile and templates
# Default value : None
# Mandatory : NO
#-----------------------------------------------------------------------------
#VARIABLES =
#-----------------------------------------------------------------------------
# Name : INITPARAMS
# Datatype : String
# Description : comma separated list of name=value pairs. Overrides initialization parameters defined in templates
# Default value : None
# Mandatory : NO
#-----------------------------------------------------------------------------
#INITPARAMS =
#-----------------------------------------------------------------------------
# Name : SAMPLESCHEMA
# Datatype : Boolean
# Description : Specifies whether or not to add the Sample Schemas to your database
# Valid values : TRUE \ FALSE
# Default value : FASLE
# Mandatory : No
#-----------------------------------------------------------------------------
#SAMPLESCHEMA=TRUE
#-----------------------------------------------------------------------------
# Name : MEMORYPERCENTAGE
# Datatype : String
# Description : percentage of physical memory for Oracle
# Default value : None
# Mandatory : NO
#-----------------------------------------------------------------------------
#MEMORYPERCENTAGE = "40"
#-----------------------------------------------------------------------------
# Name : DATABASETYPE
# Datatype : String
# Description : used for memory distribution when MEMORYPERCENTAGE specified
# Valid values : MULTIPURPOSE|DATA_WAREHOUSING|OLTP
# Default value : MULTIPURPOSE
# Mandatory : NO
#-----------------------------------------------------------------------------
#DATABASETYPE = "MULTIPURPOSE"
#-----------------------------------------------------------------------------
# Name : AUTOMATICMEMORYMANAGEMENT
# Datatype : Boolean
# Description : flag to indicate Automatic Memory Management is used
# Valid values : TRUE/FALSE
# Default value : TRUE
# Mandatory : NO
#-----------------------------------------------------------------------------
#AUTOMATICMEMORYMANAGEMENT = "TRUE"
#-----------------------------------------------------------------------------
# Name : TOTALMEMORY
# Datatype : String
# Description : total memory in MB to allocate to Oracle
# Valid values :
# Default value :
# Mandatory : NO
#-----------------------------------------------------------------------------
#TOTALMEMORY = "800"
#-----------------------*** End of CREATEDATABASE section ***------------------------
#-----------------------------------------------------------------------------
# createTemplateFromDB section is used when OPERATION_TYPE is defined as "createTemplateFromDB".
#-----------------------------------------------------------------------------
[createTemplateFromDB]
#-----------------------------------------------------------------------------
# Name : SOURCEDB
# Datatype : String
# Description : The source database from which to create the template
# Valid values : The format is <host>:<port>:<sid>
# Default value : none
# Mandatory : YES
#-----------------------------------------------------------------------------
SOURCEDB = "myhost:1521:orcl"
#-----------------------------------------------------------------------------
# Name : SYSDBAUSERNAME
# Datatype : String
# Description : A user with DBA role.
# Default value : none
# Mandatory : YES
#-----------------------------------------------------------------------------
SYSDBAUSERNAME = "system"
#-----------------------------------------------------------------------------
# Name : SYSDBAPASSWORD
# Datatype : String
# Description : The password of the DBA user.
# You can also specify the password at the command prompt instead of here.
# Default value : none
# Mandatory : YES
#-----------------------------------------------------------------------------
#SYSDBAPASSWORD = "password"
#-----------------------------------------------------------------------------
# Name : TEMPLATENAME
# Datatype : String
# Description : Name for the new template.
# Default value : None
# Mandatory : Yes
#-----------------------------------------------------------------------------
TEMPLATENAME = "My Copy TEMPLATE"
#-----------------------*** End of createTemplateFromDB section ***------------------------
#-----------------------------------------------------------------------------
# createCloneTemplate section is used when OPERATION_TYPE is defined as "createCloneTemplate".
#-----------------------------------------------------------------------------
[createCloneTemplate]
#-----------------------------------------------------------------------------
# Name : SOURCEDB
# Datatype : String
# Description : The source database is the SID from which to create the template.
# This database must be local and on the same ORACLE_HOME.
# Default value : none
# Mandatory : YES
#-----------------------------------------------------------------------------
SOURCEDB = "orcl"
#-----------------------------------------------------------------------------
# Name : SYSDBAUSERNAME
# Datatype : String
# Description : A user with DBA role.
# Default value : none
# Mandatory : YES, if no OS authentication
#-----------------------------------------------------------------------------
SYSDBAUSERNAME = "sys"
#-----------------------------------------------------------------------------
# Name : SYSDBAPASSWORD
# Datatype : String
# Description : The password of the DBA user.
# You can also specify the password at the command prompt instead of here.
# Default value : none
# Mandatory : YES
#-----------------------------------------------------------------------------
SYSDBAPASSWORD = "123456"
#-----------------------------------------------------------------------------
# Name : TEMPLATENAME
# Datatype : String
# Description : Name for the new template.
# Default value : None
# Mandatory : Yes
#-----------------------------------------------------------------------------
TEMPLATENAME = "My Clone TEMPLATE"
#-----------------------------------------------------------------------------
# Name : DATAFILEJARLOCATION
# Datatype : String
# Description : Location of the data file jar
# Valid values : Directory where the new compressed datafile jar will be placed
# Default value : $ORACLE_HOME/assistants/dbca/templates
# Mandatory : NO
#-----------------------------------------------------------------------------
#DATAFILEJARLOCATION =
#-----------------------*** End of createCloneTemplate section ***------------------------
#-----------------------------------------------------------------------------
# DELETEDATABASE section is used when DELETE_TYPE is defined as "deleteDatabase".
#-----------------------------------------------------------------------------
[DELETEDATABASE]
#-----------------------------------------------------------------------------
# Name : SOURCEDB
# Datatype : String
# Description : The source database is the SID
# This database must be local and on the same ORACLE_HOME.
# Default value : none
# Mandatory : YES
#-----------------------------------------------------------------------------
SOURCEDB = "orcl"
#-----------------------------------------------------------------------------
# Name : SYSDBAUSERNAME
# Datatype : String
# Description : A user with DBA role.
# Default value : none
# Mandatory : YES, if no OS authentication
#-----------------------------------------------------------------------------
SYSDBAUSERNAME = "sys"
#-----------------------------------------------------------------------------
# Name : SYSDBAPASSWORD
# Datatype : String
# Description : The password of the DBA user.
# You can also specify the password at the command prompt instead of here.
# Default value : none
# Mandatory : YES, if no OS authentication
#-----------------------------------------------------------------------------
SYSDBAPASSWORD = "123456"
#-----------------------*** End of deleteDatabase section ***------------------------
#-----------------------------------------------------------------------------
# GENERATESCRIPTS section
#-----------------------------------------------------------------------------
[generateScripts]
#-----------------------------------------------------------------------------
# Name : TEMPLATENAME
# Datatype : String
# Description : Name of the template
# Valid values : Template name as seen in DBCA
# Default value : None
# Mandatory : Yes
#-----------------------------------------------------------------------------
TEMPLATENAME = "New Database"
#-----------------------------------------------------------------------------
# Name : GDBNAME
# Datatype : String
# Description : Global database name of the database
# Valid values : <db_name>.<db_domain> - when database domain isn't NULL
# <db_name> - when database domain is NULL
# Default value : None
# Mandatory : Yes
#-----------------------------------------------------------------------------
GDBNAME = "orcl"
#-----------------------------------------------------------------------------
# Name : SCRIPTDESTINATION
# Datatype : String
# Description : Location of the scripts
# Valid values : Directory for all the scripts
# Default value : None
# Mandatory : No
#-----------------------------------------------------------------------------
#SCRIPTDESTINATION =
#-----------------------*** End of deleteDatabase section ***------------------------
#-----------------------------------------------------------------------------
# CONFIGUREDATABASE section is used when OPERATION_TYPE is defined as "configureDatabase".
#-----------------------------------------------------------------------------
[CONFIGUREDATABASE]
#-----------------------------------------------------------------------------
# Name : SOURCEDB
# Datatype : String
# Description : The source database is the SID
# This database must be local and on the same ORACLE_HOME.
# Default value : none
# Mandatory : YES
#-----------------------------------------------------------------------------
SOURCEDB = "orcl"
#-----------------------------------------------------------------------------
# Name : SYSDBAUSERNAME
# Datatype : String
# Description : A user with DBA role.
# Default value : none
# Mandatory : YES, if no OS authentication
#-----------------------------------------------------------------------------
SYSDBAUSERNAME = "sys"
#-----------------------------------------------------------------------------
# Name : SYSDBAPASSWORD
# Datatype : String
# Description : The password of the DBA user.
# You can also specify the password at the command prompt instead of here.
# Default value : none
# Mandatory : YES, if no OS authentication
#-----------------------------------------------------------------------------
SYSDBAPASSWORD = "123456"
#-----------------------------------------------------------------------------
# Name : REGISTERWITHDIRSERVICE
# Datatype : Boolean
# Description : Specifies whether to register with Directory Service.
# Valid values : TRUE \ FALSE
# Default value : FALSE
# Mandatory : No
#-----------------------------------------------------------------------------
#REGISTERWITHDIRSERVICE= TRUE
#-----------------------------------------------------------------------------
# Name : UNREGISTERWITHDIRSERVICE
# Datatype : Boolean
# Description : Specifies whether to unregister with Directory Service.
# Valid values : TRUE \ FALSE
# Default value : FALSE
# Mandatory : No
#-----------------------------------------------------------------------------
#UNREGISTERWITHDIRSERVICE= TRUE
#-----------------------------------------------------------------------------
# Name : REGENERATEDBPASSWORD
# Datatype : Boolean
# Description : Specifies whether regenerate database password in OID/Wallet
# Valid values : TRUE \ FALSE
# Default value : FALSE
# Mandatory : No
#-----------------------------------------------------------------------------
#REGENERATEDBPASSWORD= TRUE
#-----------------------------------------------------------------------------
# Name : DIRSERVICEUSERNAME
# Datatype : String
# Description : Specifies the name of the directory service user
# Mandatory : YES, if the any of the reg/unreg/regenPasswd options specified
#-----------------------------------------------------------------------------
#DIRSERVICEUSERNAME= "name"
#-----------------------------------------------------------------------------
# Name : DIRSERVICEPASSWORD
# Datatype : String
# Description : The password of the directory service user.
# You can also specify the password at the command prompt instead of here.
# Mandatory : YES, if the any of the reg/unreg/regenPasswd options specified
#-----------------------------------------------------------------------------
#DIRSERVICEPASSWORD= "password"
#-----------------------------------------------------------------------------
# Name : WALLETPASSWORD
# Datatype : String
# Description : The password for wallet to created or modified.
# You can also specify the password at the command prompt instead of here.
# Mandatory : YES, if the any of the reg/unreg/regenPasswd options specified
#-----------------------------------------------------------------------------
#WALLETPASSWORD= "password"
#-----------------------------------------------------------------------------
# Name : DISABLESECURITYCONFIGURATION
# Datatype : String
# Description : Database Security Settings
# Valid values : ALL|NONE|AUDIT|PASSWORD_PROFILE
# Default value : NONE
# Mandatory : No
#-----------------------------------------------------------------------------
#DISABLESECURITYCONFIGURATION = "NONE"
#-----------------------------------------------------------------------------
# Name : ENABLESECURITYCONFIGURATION
# Datatype : String
# Description : Database Security Settings
# Valid values : true|false
# Default value : true
# Mandatory : No
#-----------------------------------------------------------------------------
#ENABLESECURITYCONFIGURATION = "true"
#-----------------------------------------------------------------------------
# Name : EMCONFIGURATION
# Datatype : String
# Description : Enterprise Manager Configuration Type
# Valid values : CENTRAL|LOCAL|ALL|NONE
# Default value : NONE
# Mandatory : No
#-----------------------------------------------------------------------------
#EMCONFIGURATION = "NONE"
#-----------------------------------------------------------------------------
# Name : SYSMANPASSWORD
# Datatype : String
# Description : Password for SYSMAN user
# Valid values : Check Oracle11g Administrator's Guide
# Default value : None
# Mandatory : Yes, if LOCAL specified for EMCONFIGURATION
#-----------------------------------------------------------------------------
#SYSMANPASSWORD = "password"
#-----------------------------------------------------------------------------
# Name : DBSNMPPASSWORD
# Datatype : String
# Description : Password for DBSNMP user
# Valid values : Check Oracle11g Administrator's Guide
# Default value : None
# Mandatory : Yes, if EMCONFIGURATION is specified
#-----------------------------------------------------------------------------
#DBSNMPPASSWORD = "password"
#-----------------------------------------------------------------------------
# Name : CENTRALAGENT
# Datatype : String
# Description : Grid Control Central Agent Oracle Home
# Default value : None
# Mandatory : Yes, if CENTRAL is specified for EMCONFIGURATION
#-----------------------------------------------------------------------------
#CENTRALAGENT =
#-----------------------------------------------------------------------------
# Name : HOSTUSERNAME
# Datatype : String
# Description : Host user name for EM backup job
# Default value : None
# Mandatory : Yes, if ALL is specified for EMCONFIGURATION
#-----------------------------------------------------------------------------
#HOSTUSERNAME =
#-----------------------------------------------------------------------------
# Name : HOSTUSERPASSWORD
# Datatype : String
# Description : Host user password for EM backup job
# Default value : None
# Mandatory : Yes, if ALL is specified for EMCONFIGURATION
#-----------------------------------------------------------------------------
#HOSTUSERPASSWORD=
#-----------------------------------------------------------------------------
# Name : BACKUPSCHEDULE
# Datatype : String
# Description : Daily backup schedule in the form of hh:mm
# Default value : 2:00
# Mandatory : Yes, if ALL is specified for EMCONFIGURATION
#-----------------------------------------------------------------------------
#BACKUPSCHEDULE=
#-----------------------*** End of CONFIGUREDATABASE section ***------------------------
#-----------------------------------------------------------------------------
# ADDINSTANCE section is used when OPERATION_TYPE is defined as "addInstance".
#-----------------------------------------------------------------------------
[ADDINSTANCE]
#-----------------------------------------------------------------------------
# Name : DB_UNIQUE_NAME
# Datatype : String
# Description : DB Unique Name of the RAC database
# Valid values : <db_unique_name>
# Default value : None
# Mandatory : Yes
#-----------------------------------------------------------------------------
DB_UNIQUE_NAME = "orcl"
#-----------------------------------------------------------------------------
# Name : INSTANCENAME
# Datatype : String
# Description : RAC instance name to be added
# Valid values : Check Oracle11g Administrator's Guide
# Default value : <sid_prefix>+<highest_current_thread+1>
# Mandatory : No
#-----------------------------------------------------------------------------
#INSTANCENAME = "orcl1"
#-----------------------------------------------------------------------------
# Name : NODELIST
# Datatype : String
# Description : Node on which to add new instance
# (in 10gR2, instance addition is supported on 1 node at a time)
# Valid values : Cluster node name
# Default value : None
# Mandatory : Yes
#-----------------------------------------------------------------------------
NODELIST=
#-----------------------------------------------------------------------------
# Name : OBFUSCATEDPASSWORDS
# Datatype : Boolean
# Description : Set to true if passwords are encrypted
# Valid values : TRUE\FALSE
# Default value : FALSE
# Mandatory : No
#-----------------------------------------------------------------------------
#OBFUSCATEDPASSWORDS = FALSE
#-----------------------------------------------------------------------------
# Name : SYSDBAUSERNAME
# Datatype : String
# Description : A user with DBA role.
# Default value : none
# Mandatory : YES
#-----------------------------------------------------------------------------
SYSDBAUSERNAME = "sys"
#-----------------------------------------------------------------------------
# Name : SYSDBAPASSWORD
# Datatype : String
# Description : The password of the DBA user.
# Default value : none
# Mandatory : YES
#-----------------------------------------------------------------------------
SYSDBAPASSWORD = "123456"
#-----------------------*** End of ADDINSTANCE section ***------------------------
#-----------------------------------------------------------------------------
# DELETEINSTANCE section is used when OPERATION_TYPE is defined as "deleteInstance".
#-----------------------------------------------------------------------------
[DELETEINSTANCE]
#-----------------------------------------------------------------------------
# Name : DB_UNIQUE_NAME
# Datatype : String
# Description : DB Unique Name of the RAC database
# Valid values : <db_unique_name>
# Default value : None
# Mandatory : Yes
#-----------------------------------------------------------------------------
DB_UNIQUE_NAME = "orcl"
#-----------------------------------------------------------------------------
# Name : INSTANCENAME
# Datatype : String
# Description : RAC instance name to be deleted
# Valid values : Check Oracle11g Administrator's Guide
# Default value : None
# Mandatory : Yes
#-----------------------------------------------------------------------------
INSTANCENAME = "orcl"
#-----------------------------------------------------------------------------
# Name : NODELIST
# Datatype : String
# Description : Node on which instance to be deleted (SID) is located
# Valid values : Cluster node name
# Default value : None
# Mandatory : No
#-----------------------------------------------------------------------------
#NODELIST=
#-----------------------------------------------------------------------------
# Name : OBFUSCATEDPASSWORDS
# Datatype : Boolean
# Description : Set to true if passwords are encrypted
# Valid values : TRUE\FALSE
# Default value : FALSE
# Mandatory : No
#-----------------------------------------------------------------------------
#OBFUSCATEDPASSWORDS = FALSE
#-----------------------------------------------------------------------------
# Name : SYSDBAUSERNAME
# Datatype : String
# Description : A user with DBA role.
# Default value : none
# Mandatory : YES
#-----------------------------------------------------------------------------
SYSDBAUSERNAME = "sys"
#-----------------------------------------------------------------------------
# Name : SYSDBAPASSWORD
# Datatype : String
# Description : The password of the DBA user.
# Default value : none
# Mandatory : YES
#-----------------------------------------------------------------------------
SYSDBAPASSWORD = "123456"
#-----------------------*** End of DELETEINSTANCE section ***------------------------
8 创建数据库实例
dbca -createDatabase -silent -responseFile /home/oracle_11/app/oracle/product/11.2.0/db_1/assistants/dbca/dbca.rsp
显示成功
Navicate测试数据库
- 首先一定要保证centos上oracle用户已经启动了监听
lsnrctl start
- 可以在centos上登录一下
- navicate配置
9 解锁测试scott/tiger示例用户
alter user scott account unlock;
alter user scott identified by tiger;
10 导入黑马数据安全传输平台需要的数据库文件
10.1 在root用户下查找dbf存放路径
su - root
find / -name "*.dbf"
存放路径为
/home/oracle_11/app/oradata/orcl/
10.2 将该路径在sql脚本中全部替换
-- 01 创建表空间
-- 注意表空间的路径 根据实际安装环境进行调整
CREATE TABLESPACE ts_seckey_admin
LOGGING
DATAFILE '/home/oracle_11/app/oradata/orcl/ts_seckeymng_admin.dbf' SIZE 50M
EXTENT MANAGEMENT LOCAL;
CREATE TABLESPACE ts_seckey_op
LOGGING
DATAFILE '/home/oracle_11/app/oradata/orcl/ts_seckeymng_op.dbf' SIZE 200M
EXTENT MANAGEMENT LOCAL;
ALTER DATABASE DATAFILE '/home/oracle_11/app/oradata/orcl/ts_seckeymng_admin.dbf' AUTOEXTEND ON NEXT 50M MAXSIZE UNLIMITED;
ALTER DATABASE DATAFILE '/home/oracle_11/app/oradata/orcl/ts_seckeymng_op.dbf' AUTOEXTEND ON NEXT 200M MAXSIZE UNLIMITED;
commit;
-- 02 创建方案 (创建用户)
CREATE USER SECMNG PROFILE DEFAULT
IDENTIFIED BY SECMNG DEFAULT TABLESPACE USERS
ACCOUNT UNLOCK;
-- 资源和登录权限
GRANT resource TO SECMNG;
GRANT create session TO SECMNG;
-- 创建 网点信息表 --编号 名称 描述 授权码 状态(0可用 1不可用)
CREATE TABLE SECMNG.SECNODE(
id char(4) PRIMARY KEY,
name VARCHAR2(128) NOT NULL,
nodedesc VARCHAR2(512),
createtime date,
authcode NUMBER(12),
state NUMBER(4)
)TABLESPACE ts_seckey_admin;
-- 一个是客户端,一个是服务端,后期json文件需要对应上相关的值
INSERT INTO SECMNG.secnode VALUES('0001', 'Internet Banking Center', 'New York Finance Street', '15-July-2023', 1, 0);
INSERT INTO SECMNG.secnode VALUES('1111', 'California Branch', 'Winema Cmn', '15-July-2023', 1111, 0);
commit;
-- 创建 网点密钥表, 客户端网点 服务器端网点 密钥号 密钥产生时间 密钥状态
CREATE TABLE SECMNG.SECKEYINFO(
clientid char(4) constraint secmng_seckeynode_clientid_fk references SECMNG.SECNODE(id),
serverid char(4) constraint secmng_seckeynode_serverid_fk references SECMNG.SECNODE(id),
keyid NUMBER(9) PRIMARY KEY,
createtime date,
state NUMBER(4),
seckey VARCHAR2(512)
)TABLESPACE ts_seckey_admin;
--创建索引 在新的表空间上
CREATE INDEX SECMNG.IX_SECKEYINFO_clientid ON SECMNG.SECKEYINFO(clientid) TABLESPACE ts_seckey_admin;
commit;
-- keysn序列号
CREATE TABLE SECMNG.KEYSN(
ikeysn number(12) PRIMARY KEY
) TABLESPACE ts_seckey_admin;
INSERT INTO SECMNG.KEYSN(ikeysn) VALUES (1);
commit;
CREATE TABLE SECMNG.SRVCFG(
key VARCHAR2(64),
valude VARCHAR2(128)
)TABLESPACE ts_seckey_admin;
--增加自己虚拟机的ip
INSERT INTO srvcfg VALUES ('secmng_server_ip', '192.168.111.135');
-- 创建 交易信息表 交易者 交易时间 交易事件 交易描述 (什么人 在什么时间 干了什么事)
CREATE TABLE SECMNG.TRAN(
iID Number(12) PRIMARY KEY,
tran_operator NUMBER,
trantime date,
tranid NUMBER(4),
trandesc VARCHAR2(512)
)TABLESPACE ts_seckey_op;
-- 创建索引
CREATE INDEX SECMNG.IX_TRAN_tran_operator ON SECMNG.TRAN(tran_operator) TABLESPACE ts_seckey_op;
-- 创建触发器 自增字段
CREATE SEQUENCE SECMNG.SEQiID INCREMENT BY 1 START WITH 1
MAXVALUE 1.0E28 MINVALUE 1 NOCYCLE
CACHE 20 NOORDER;
CREATE OR REPLACE TRIGGER SECMNG.SEQiID
BEFORE INSERT ON SECMNG.TRAN
for each row
begin
select SECMNG.SEQiID.nextval into :new.iID from dual;
end;
/
INSERT INTO SECMNG.TRAN(tran_operator, trantime, tranid, trandesc) VALUES(1, '15-July-2023', 1, 'Create Centre Node - Test Data');
commit;
------停止-----
-- 04创建新用户方案 通过 SECMNGUSER1 来访问数据库, 让管理终端系统用
CREATE USER "SECMNGADMIN" PROFILE "DEFAULT" IDENTIFIED BY "123456" DEFAULT TABLESPACE "USERS" ACCOUNT UNLOCK;
GRANT "CONNECT" TO "SECMNGADMIN";
GRANT SELECT ANY TABLE TO "SECMNGADMIN";
GRANT resource TO SECMNGADMIN;
GRANT create session TO SECMNGADMIN;
GRANT DELETE ON SECMNG.SRVCFG TO "SECMNGADMIN";
GRANT INSERT ON SECMNG.SRVCFG TO "SECMNGADMIN";
GRANT UPDATE ON SECMNG.SRVCFG TO "SECMNGADMIN";
GRANT DELETE ON SECMNG.SECNODE TO "SECMNGADMIN";
GRANT INSERT ON SECMNG.SECNODE TO "SECMNGADMIN";
GRANT UPDATE ON SECMNG.SECNODE TO "SECMNGADMIN";
GRANT DELETE ON SECMNG.SECKEYINFO TO "SECMNGADMIN";
GRANT INSERT ON SECMNG.SECKEYINFO TO "SECMNGADMIN";
GRANT UPDATE ON SECMNG.SECKEYINFO TO "SECMNGADMIN";
GRANT DELETE ON SECMNG.TRAN TO "SECMNGADMIN";
GRANT INSERT ON SECMNG.TRAN TO "SECMNGADMIN";
GRANT UPDATE ON SECMNG.TRAN TO "SECMNGADMIN";
commit;
-- Insert Into SECMNG.SECKEYINFO(clientid, serverid, keyid, createtime, state, seckey)
-- values ('1111', '0001', 1, to_date('2015-07-14 21:09:09', 'yyyy-mm-dd hh24:mi:ss'), 0, 'zzz') ;
10.3 创建相关数据库
切换成sys用户
挨个执行上述语句,以防出现意外。
文章来源:https://www.toymoban.com/news/detail-813112.html
11 使用QT测试一下
文章来源地址https://www.toymoban.com/news/detail-813112.html
到了这里,关于Centos7-安装Oracle11g-图形化+静默配置监听+DB实例+Navicate远程连接+解锁scott/tiger用户+导入Openssl项目所需要的数据+OCCI测试的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!