龙空技术网

oracle19c 静默安装 centos7.5

迎风的雨荨 183

前言:

当前你们对“oracle dbca 静默安装数据文件路径”可能比较重视,兄弟们都想要分析一些“oracle dbca 静默安装数据文件路径”的相关内容。那么小编也在网上收集了一些对于“oracle dbca 静默安装数据文件路径””的相关内容,希望朋友们能喜欢,小伙伴们快快来了解一下吧!

1.基础环境配置

关闭防火墙:systemctl disable firewalld关闭selinux:/etc/selinux/config更改主机名:     /ect/hosts  192.168.80.148(写自己的ip) oracle19c
1.2.yum安装oracle需要的依赖包

yum install -y bc

yum install -y compat-libcap1*

yum install -y compat-libcap*

yum install -y binutils

yum install -y compat-libstdc+±33

yum install -y elfutils-libelf

yum install -y elfutils-libelf-devel

yum install -y gcc

yum install -y gcc-c++

yum install -y glibc-2.5

yum install -y glibc-common

yum install -y glibc-devel

yum install -y glibc-headers

yum install -y ksh libaio

yum install -y libaio-devel

yum install -y libgcc

yum install -y libstdc++

yum install -y libstdc+±devel

yum install -y make

yum install -y sysstat

yum install -y unixODBC

yum install -y unixODBC-devel

yum install -y binutils*

yum install -y compat-libstdc*

yum install -y elfutils-libelf*

yum install -y gcc*

yum install -y glibc*

yum install -y ksh*

yum install -y libaio*

yum install -y libgcc*

yum install -y libstdc*

yum install -y make*

yum install -y sysstat*

yum install -y libXp*

yum install -y glibc-kernheaders

yum install -y net-tools-*

1.3.修改linux的内核文件

cat << EOF >> /etc/sysctl.confkernel.shmmax = 277495689510912kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048586fs.file-max = 6815744kernel.shmall = 67747971072net.ipv4.tcp_max_tw_buckets = 6000net.ipv4.ip_local_port_range = 9000 65500net.ipv4.tcp_tw_recycle = 0net.ipv4.tcp_tw_reuse = 1#net.core.somaxconn = 262144net.core.netdev_max_backlog = 262144net.ipv4.tcp_max_orphans = 262144net.ipv4.tcp_max_syn_backlog = 262144net.ipv4.tcp_synack_retries = 2net.ipv4.tcp_syn_retries = 1net.ipv4.tcp_fin_timeout = 1net.ipv4.tcp_keepalive_time = 30net.ipv4.tcp_keepalive_probes = 6net.ipv4.tcp_keepalive_intvl = 5net.ipv4.tcp_timestamps = 0fs.aio-max-nr = 1048576net.ipv4.conf.all.rp_filter = 2net.ipv4.conf.default.rp_filter = 2EOF

sysctl -p 生效

1.4. 修改limits.conf

cat << 'EOF' >> /etc/security/limits.conforacle   soft   nofile    1024oracle   hard   nofile    65536oracle   soft   nproc    16384oracle   hard   nproc    16384oracle   soft   stack    10240oracle   hard   stack    32768oracle   hard   memlock    134217728oracle   soft   memlock    134217728EOF
1.5.添加下列条目到/etc/pam.d/login
cat << 'EOF' >>   /etc/pam.d/loginsession required /lib/security/pam_limits.sosession required pam_limits.soEOF
1.6.在/etc/profil添加下列语句
cat << 'EOF' >>  /etc/profileif [ $USER = "oracle" ]; then   if [ $SHELL = "/bin/ksh" ]; then      ulimit -p 16384      ulimit -n 65536      else      ulimit -u 16384 -n 65536   fifiEOF#使环境变量生效source /etc/profile 
2.创建文件和相应的目录
groupadd dbagroupadd opergroupadd oinstalluseradd -g oinstall -G dba,oper oraclemkdir -p /u01/app/oraclemkdir -p /u01/app/oracle/oradatamkdir -p /u01/oraInventorychown -R oracle.oinstall /u01chown -R oracle:oinstall /u01/app/oraclechmod -R 775 /u01/app/oraclemkdir -p /u01/app/oracle/product/19c/db_1  #ORACLE的HOME目录chown -R oracle:oinstall /u01/app/oracle/product/passwd oracle  #增加密码
2.1配置oracle用户环境变量
su - oraclecat << 'EOF' >> .bash_profileexport EDITOR=vi          #默认的编辑器是viexport TMP=/tmp           #ORACLE默认的临时目录是/tmpexport TMPDIR=$TMP        #临时目录生成export ORACLE_SID=orcl    #ORACLE实例名称是orclexport ORACLE_BASE=/u01/app/oracle   #ORACLE的基本目录 export ORACLE_HOME=$ORACLE_BASE/product/19c/db_1  #ORACLE数据库的HOME目录export INVENTORY_LOCATION=/u01/oraInventory  #ORACLE安装时的inventoryexport TNS_ADMIN=$ORACLE_HOME/network/admin  #ORACLE的网络主目录export LD_LIBRARY_PATH=$ORACLE_HOME/lib  # ORACLE的库文件目录export NLS_LANG="AMERICAN_AMERICA.AL32UTF8"  #ORACLE的字符集 不过我们弃用 因为我们使用UTF8export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"  #ORACLE的日期格式 我们使用会话的方式修改 弃用export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin:$PATH:$HOME/binumask 022EOFsource .bash_profile #使环境变量生效
2.2.上传数据库安装包到$ORACLE_HOME
cd /u01/app/oracle/product/19c/db_1/chown -R oracle:oinstall /u01/app/oracle/product/19c/db_1/LINUX.X64_193000_db_home.zip解压:su - oraclecd /u01/app/oracle/product/19c/db_1/unzip LINUX.X64_193000_db_home.zip
2.3静默安装配置执行这个db_install.rsp脚本文件
su - oraclecd /u01/app/oracle/product/19c/db_1/install/response

vim db_install.rsp

oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v19.0.0oracle.install.option=INSTALL_DB_SWONLYUNIX_GROUP_NAME=oinstallINVENTORY_LOCATION=/u01/app/oraInventoryORACLE_HOME=/u01/app/oracle/product/19c/db_1ORACLE_BASE=/u01/app/oracleoracle.install.db.InstallEdition=EEoracle.install.db.OSDBA_GROUP=dbaoracle.install.db.OSOPER_GROUP=operoracle.install.db.OSBACKUPDBA_GROUP=dbaoracle.install.db.OSDGDBA_GROUP=dbaoracle.install.db.OSKMDBA_GROUP=dbaoracle.install.db.OSRACDBA_GROUP=dbaoracle.install.db.rootconfig.executeRootScript=falseoracle.install.db.rootconfig.configMethod=ROOT

修改完毕之后执行:

cd /u01/app/oracle/product/19c/db_1

./runInstaller -silent -force -noconfig -ignorePrereq -responseFile /u01/app/oracle/product/19c/db_1/install/response/db_install.rsp

注意: 出现两个 orainstRoot.sh 和 root.sh 在开启一个终端进行执行这两个脚本必须在root用户下,直接复制就可以

2.4配置监听netca.rsp

直接执行:

cd /u01/app/oracle/product/19c/db_1/bin

./netca -silent -responsefile /u01/app/oracle/product/19c/db_1/assistants/netca/netca.rsp

lsnrctl start

2.5配置dbca.rsp

################################################################################                                                                          ####                            DBCA response file                            ####                            ------------------                            #### Copyright(c) Oracle Corporation 1998,2019. All rights reserved.          ####                                                                          #### Specify values for the variables listed below to customize               #### your installation.                                                       ####                                                                          #### Each variable is associated with a comment. The comment                  #### can help to populate the variables with the appropriate                  #### values.                                                                  ####                                                                          #### IMPORTANT NOTE: This file contains plain text passwords and              #### should be secured to have read permission only by oracle user            #### or db administrator who owns this installation.                          #################################################################################-------------------------------------------------------------------------------# Do not change the following system generated value. #-------------------------------------------------------------------------------responseFileVersion=/oracle/assistants/rspfmt_dbca_response_schema_v19.0.0#-----------------------------------------------------------------------------# 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          : sid# Datatype      : String# Description   : System identifier (SID) of the database# Valid values  : Check Oracle19c Administrator's Guide# Default value : <db_name> specified in GDBNAME# Mandatory     : No#-----------------------------------------------------------------------------sid=orcl#-----------------------------------------------------------------------------# Name          : databaseConfigType# Datatype      : String# Description   : database conf type as Single Instance, Real Application Cluster or Real Application Cluster One Nodes database# Valid values  : SI\RAC\RACONENODE# Default value : SI# Mandatory     : No#-----------------------------------------------------------------------------databaseConfigType=SItemplateName=General_Purpose.dbc#-----------------------------------------------------------------------------# Name          : createAsContainerDatabase # Datatype      : boolean# Description   : flag to create database as container database # Valid values  : Check Oracle19c Administrator's Guide# Default value : false# Mandatory     : No#-----------------------------------------------------------------------------createAsContainerDatabase=false#-----------------------------------------------------------------------------# Name          : sysPassword# Datatype      : String# Description   : Password for SYS user# Valid values  : Check Oracle19c Administrator's Guide# Default value : None# Mandatory     : Yes#-----------------------------------------------------------------------------sysPassword=oracle#-----------------------------------------------------------------------------# Name          : systemPassword# Datatype      : String# Description   : Password for SYSTEM user# Valid values  : Check Oracle19c Administrator's Guide# Default value : None# Mandatory     : Yes#-----------------------------------------------------------------------------systemPassword=oracle#-----------------------------------------------------------------------------# 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=/u01/app/oracle/oradata#-----------------------------------------------------------------------------# 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          : 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          : 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=FALSE#-----------------------------------------------------------------------------# Name          : totalMemory# Datatype      : String# Description   : total memory in MB to allocate to Oracle# Valid values  : # Default value : # Mandatory     : NO#-----------------------------------------------------------------------------totalMemory=4096

执行

cd /u01/app/oracle/product/19c/db_1/bin

./dbca -silent -createDatabase -responseFile /u01/app/oracle/product/19c/db_1/assistants/dbca/dbca.rsp

3.配置完成

sqlplus / as sysdba

标签: #oracle dbca 静默安装数据文件路径