Centos7离线无窗口(静默)安装oracle

简单说明:本次安装使用官网推荐的简化配置的方式安装,该方式在官网有说明

官网文档地址 :https://www.oracle.com/linux/technologies/ginnydbinstallonlinux/

以先安装oracle-rdbms-server-11gR2-preinstall 的方式简化配置

#oracle-rdbms-server-11gR2-preinstall包所干的事情
    (1)自动安装oracle所需的RPM包
    (2)自动创建oracle用户和group组
    (3)自动配置/etc/sysctl.conf内核参数
    (4)自动配置/etc/security/limits.conf参数
    (5)关闭NUMA=OFF (关闭非一致内存访问)

该方式帮我们完成了在其他文章说提到的创建用户,修改内核参数等等各项配置,避免了自己手动配置写错,并且解决了安装包互相依赖导致安装失败等问题。

使用这种方式离线安装需要在一个有网的服务器下载所依赖的包,做一个本地源。

简单说明

使用repotrack 命令下载安装包并自动下载所有依赖包 -p 指定下载地址

repotrack <package name>

示例 :repotrack racle-rdbms-server-11gR2-preinstall -p /home/oracle

制作本地yum源,在下载的安装包路径下执行以下命令

createrepo  ./

生成以下文件夹

然后新建本地yum源配置文件

vi /etc/yum.repos.d/local-oracle.repo

插入以下内容

[oracle-install]
name=oracle-install #名称 随意
enable=1#是否使用  1使用 0不启用
gpgcheck=0
baseurl=file:///root/oracle/ #指定刚才使用createrepo 命令的文件夹目录

下载安装包(官网需要账号,可能有账号也下不到,资源自行搜索)

下载地址:http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

以下以11g版本为例

linux.x64_11gR2_database_1of2.zip

linux.x64_11gR2_database_2of2.zip

1.将制作的本地源上传到需要离线安装的服务器上

此次操作示例

 新建配置文件

vi /etc/yum.repos.d/local-oracle.repo

插入以下内容

[oracle-install]
name=oracle-install #名称 随意
enable=1#是否使用  1使用 0不启用
gpgcheck=0
baseurl=file:///root/oracle/ #指定刚才使用createrepo 命令的文件夹目录

执行以下命令更新本地源设置

yum clean all

yum makecache

或者

yum makecache fast

友情提示:如果在安装中报出无法联网等错误信息,可以把原始的yum配置文件都备份更换位置,如果不影响的话直接删除(自行评估)也行。

2.关闭Selinux

vi /etc/selinux/config

设置 SELINUX=disabled

命令临时生效: setenforce 0 (临时生效可以直接用setenforce 0 ) 1 启用 0 告警,不启用

setenforce 0

 3.安装racle-rdbms-server-11gR2-preinstall

yum install oracle-rdbms-server-11gR2-preinstall.x86_64

安装成功

 

4.安装数据库

创建安装目录

mkdir -p /u01/oracle/product/11.2.0/db_1

更改oracle目录的属主

chown oracle:oinstall -R /u01

修改oracle目录权限

chmod 755 -R /u01/oracle/

切换到oracle用户

su oracle

设置oracle环境变量

cd ~ #切换到用户目录下

vi .bash_profile 编辑环境变量

插入以下内容

export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_BASE=/u01/oracle
export ORACLE_HOME=/u01/oracle/product/11.2.0/db_1
export ORACLE_SID=orcl
export ORACLE_TERM=xterm
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export EDITOR=vim
export NLS_LANG=AMERICAN_AMERICA.UTF8
export NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'

退出保存

环境变量生效

source .bash_profile 

将下载的安装包上传到 /u01 路径下

linux.x64_11gR2_database_1of2.zip

linux.x64_11gR2_database_2of2.zip

 切换到该路径下

cd /u01

解压

unzip linux.x64_11gR2_database_1of2.zip

unzip linux.x64_11gR2_database_2of2.zip

这里提示没有安装unzip命令

 

执行以下命令安装(分系统版本,有的自带安装包只是没有安装而已)

yum install unzip

安装完毕继续解压

linux.x64_11gR2_database_1of2.zip

linux.x64_11gR2_database_2of2.zip

解压完后修改静默安装文件(无页面安装)

vi /u01/database/response/db_install.rsp

需要注意几个参数设置

ORACLE_HOSTNAME=sql2  #通过hostname命令获取

oracle.install.db.config.starterdb.SID=orcl #这个sid和在环境变量中设置的一致区分大小写

oracle.install.db.config.starterdb.password.ALL=oracle    #所有用户的密码

完整内容参考以下内容修改

####################################################################
## Copyright(c) Oracle Corporation 1998,2008. 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. 标注响应文件版本,这个版本必须和要安装的数据库版本相同,安装检验无法通过,不能更改
#------------------------------------------------------------------------------
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0

#------------------------------------------------------------------------------
# Specify the installation option.
# It can be one of the following:
# 1. INSTALL_DB_SWONLY
# 2. INSTALL_DB_AND_CONFIG
# 3. UPGRADE_DB
#选择安装类型:1.只装数据库软件 2.安装数据库软件并建库 3.升级数据库
#-------------------------------------------------------------------------------
oracle.install.option=INSTALL_DB_SWONLY

#-------------------------------------------------------------------------------
# Specify the hostname of the system as set during the install. It can be used
# to force the installation to use an alternative hostname rather than using the
# first hostname found on the system. (e.g., for systems with multiple hostnames 
# and network interfaces)指定操作系统主机名,通过hostname命令获得
#-------------------------------------------------------------------------------
ORACLE_HOSTNAME=sql2

#-------------------------------------------------------------------------------
# Specify the Unix group to be set for the inventory directory.  指定oracle inventory目录的所有者,通常会是oinstall或者dba
#-------------------------------------------------------------------------------
UNIX_GROUP_NAME=oinstall

#-------------------------------------------------------------------------------
# Specify the location which holds the inventory files. 指定产品清单oracle inventory目录的路径,如果是Win平台下可以省略
#-------------------------------------------------------------------------------
INVENTORY_LOCATION=/u01/oracle/oraInventory

#-------------------------------------------------------------------------------
# Specify the languages in which the components will be installed.             
#
# en   : English                  ja   : Japanese                  
# fr   : French                   ko   : Korean                    
# ar   : Arabic                   es   : Latin American Spanish    
# bn   : Bengali                  lv   : Latvian                   
# pt_BR: Brazilian Portuguese     lt   : Lithuanian                
# bg   : Bulgarian                ms   : Malay                     
# fr_CA: Canadian French          es_MX: Mexican Spanish           
# ca   : Catalan                  no   : Norwegian                 
# hr   : Croatian                 pl   : Polish                    
# cs   : Czech                    pt   : Portuguese                
# da   : Danish                   ro   : Romanian                  
# nl   : Dutch                    ru   : Russian                   
# ar_EG: Egyptian                 zh_CN: Simplified Chinese        
# en_GB: English (Great Britain)  sk   : Slovak                    
# et   : Estonian                 sl   : Slovenian                 
# fi   : Finnish                  es_ES: Spanish                   
# de   : German                   sv   : Swedish                   
# el   : Greek                    th   : Thai                      
# iw   : Hebrew                   zh_TW: Traditional Chinese       
# hu   : Hungarian                tr   : Turkish                   
# is   : Icelandic                uk   : Ukrainian                 
# in   : Indonesian               vi   : Vietnamese                
# it   : Italian                                                   
#指定数据库语言,可以选择多个,用逗号隔开。选择en, zh_CN(英文和简体中文)
# Example : SELECTED_LANGUAGES=en,fr,ja
#------------------------------------------------------------------------------
SELECTED_LANGUAGES=en,zh_CN

#------------------------------------------------------------------------------
# Specify the complete path of the Oracle Home.设置ORALCE_HOME的路径
#------------------------------------------------------------------------------
ORACLE_HOME=/u01/oracle/product/11.2.0/db_1

#------------------------------------------------------------------------------
# Specify the complete path of the Oracle Base. 设置ORALCE_BASE的路径
#------------------------------------------------------------------------------
ORACLE_BASE=/u01/oracle

#------------------------------------------------------------------------------
# Specify the installation edition of the component.                        
#                                                             
# The value should contain only one of these choices.        
# EE     : Enterprise Edition                                
# SE     : Standard Edition                                  
# SEONE  : Standard Edition One
# PE     : Personal Edition (WINDOWS ONLY)
#选择Oracle安装数据库软件的版本(企业版,标准版,标准版1),不同的版本功能不同
#详细的版本区别参考附录D
#------------------------------------------------------------------------------
oracle.install.db.InstallEdition=EE

#------------------------------------------------------------------------------
# This variable is used to enable or disable custom install.
#
# true  : Components mentioned as part of 'customComponents' property
#         are considered for install.
# false : Value for 'customComponents' is not considered.
#是否自定义Oracle的组件,如果选择false,则会使用默认的组件
#如果选择true否则需要自己在下面一条参数将要安装的组件一一列出。
#安装相应版权后会安装所有的组件,后期如果缺乏某个组件,再次安装会非常的麻烦。
#------------------------------------------------------------------------------
oracle.install.db.isCustomInstall=false

#------------------------------------------------------------------------------
# This variable is considered only if 'IsCustomInstall' is set to true. 
#
# Description: List of Enterprise Edition Options you would like to install.
#
#              The following choices are available. You may specify any
#              combination of these choices.  The components you choose should
#              be specified in the form "internal-component-name:version"
#              Below is a list of components you may specify to install.
#        
#              oracle.rdbms.partitioning:11.2.0.1.0 - Oracle Partitioning
#              oracle.rdbms.dm:11.2.0.1.0 - Oracle Data Mining
#              oracle.rdbms.dv:11.2.0.1.0 - Oracle Database Vault 
#              oracle.rdbms.lbac:11.2.0.1.0 - Oracle Label Security
#              oracle.rdbms.rat:11.2.0.1.0 - Oracle Real Application Testing 
#              oracle.oraolap:11.2.0.1.0 - Oracle OLAP
# oracle.install.db.isCustomInstall=true的话必须手工选择需要安装组件的话
#------------------------------------------------------------------------------
oracle.install.db.customComponents=oracle.server:11.2.0.1.0,oracle.sysman.ccr:10.2.7.0.0,oracle.xdk:11.2.0.1.0,oracle.rdbms.oci:11.2.0.1.0,oracle.network:11.2.0.1.0,oracle.network.listener:11.2.0.1.0,oracle.rdbms:11.2.0.1.0,oracle.options:11.2.0.1.0,oracle.rdbms.partitioning:11.2.0.1.0,oracle.oraolap:11.2.0.1.0,oracle.rdbms.dm:11.2.0.1.0,oracle.rdbms.dv:11.2.0.1.0,orcle.rdbms.lbac:11.2.0.1.0,oracle.rdbms.rat:11.2.0.1.0

###############################################################################
#                                                                             #
# PRIVILEGED OPERATING SYSTEM GROUPS                                            #
# ------------------------------------------                                  #
# Provide values for the OS groups to which OSDBA and OSOPER privileges       #
# needs to be granted. If the install is being performed as a member of the   #        
# group "dba", then that will be used unless specified otherwise below.          #
#                                                                             #
###############################################################################

#------------------------------------------------------------------------------
# The DBA_GROUP is the OS group which is to be granted OSDBA privileges.
#指定拥有OSDBA、OSOPER权限的用户组,通常会是dba组
#------------------------------------------------------------------------------
oracle.install.db.DBA_GROUP=dba

#------------------------------------------------------------------------------
# The OPER_GROUP is the OS group which is to be granted OSOPER privileges.
#------------------------------------------------------------------------------
oracle.install.db.OPER_GROUP=oinstall

#------------------------------------------------------------------------------
# Specify the cluster node names selected during the installation.
#如果是RAC的安装,在这里指定所有的节点
#------------------------------------------------------------------------------
oracle.install.db.CLUSTER_NODES=

#------------------------------------------------------------------------------
# Specify the type of database to create.
# It can be one of the following:
# - GENERAL_PURPOSE/TRANSACTION_PROCESSING          
# - DATA_WAREHOUSE 
#选择数据库的用途,一般用途/事物处理,数据仓库                               
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE

#------------------------------------------------------------------------------
# Specify the Starter Database Global Database Name. 指定GlobalName
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.globalDBName=ora11g

#------------------------------------------------------------------------------
# Specify the Starter Database SID.指定SID
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.SID=orcl

#------------------------------------------------------------------------------
# Specify the Starter Database character set.
#                                              
# It can be one of the following:
# AL32UTF8, WE8ISO8859P15, WE8MSWIN1252, EE8ISO8859P2,
# EE8MSWIN1250, NE8ISO8859P10, NEE8ISO8859P4, BLT8MSWIN1257,
# BLT8ISO8859P13, CL8ISO8859P5, CL8MSWIN1251, AR8ISO8859P6,
# AR8MSWIN1256, EL8ISO8859P7, EL8MSWIN1253, IW8ISO8859P8,
# IW8MSWIN1255, JA16EUC, JA16EUCTILDE, JA16SJIS, JA16SJISTILDE,
# KO16MSWIN949, ZHS16GBK, TH8TISASCII, ZHT32EUC, ZHT16MSWIN950,
# ZHT16HKSCS, WE8ISO8859P9, TR8MSWIN1254, VN8MSWIN1258
#选择字符集。不正确的字符集会给数据显示和存储带来麻烦无数。
#通常中文选择的有ZHS16GBK简体中文库,建议选择unicode的AL32UTF8国际字符集
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.characterSet=AL32UTF8

#------------------------------------------------------------------------------
# This variable should be set to true if Automatic Memory Management 
# in Database is desired.
# If Automatic Memory Management is not desired, and memory allocation
# is to be done manually, then set it to false.
#11g的新特性自动内存管理,也就是SGA_TARGET和PAG_AGGREGATE_TARGET都#不用设置了,Oracle会自动调配两部分大小。
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.memoryOption=true

#------------------------------------------------------------------------------
# Specify the total memory allocation for the database. Value(in MB) should be
# at least 256 MB, and should not exceed the total physical memory available 
# on the system.
# Example: oracle.install.db.config.starterdb.memoryLimit=512
#指定Oracle自动管理内存的大小,最小是256MB
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.memoryLimit=512

#------------------------------------------------------------------------------
# This variable controls whether to load Example Schemas onto the starter
# database or not.是否载入模板示例
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.installExampleSchemas=false

#------------------------------------------------------------------------------
# This variable includes enabling audit settings, configuring password profiles
# and revoking some grants to public. These settings are provided by default. 
# These settings may also be disabled.是否启用安全设置
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.enableSecuritySettings=true

###############################################################################
#                                                                             #
# Passwords can be supplied for the following four schemas in the          #
# starter database:                                    #
#   SYS                                                                       #
#   SYSTEM                                                                    #
#   SYSMAN (used by Enterprise Manager)                                       #
#   DBSNMP (used by Enterprise Manager)                                       #
#                                                                             #
# Same password can be used for all accounts (not recommended)               #
# or different passwords for each account can be provided (recommended)       #
#               设置数据库用户密码                                    #
###############################################################################

#------------------------------------------------------------------------------
# This variable holds the password that is to be used for all schemas in the
# starter database.设定所有数据库用户使用同一个密码,其它数据库用户就不用单独设置了。
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.password.ALL=oracle

#-------------------------------------------------------------------------------
# Specify the SYS password for the starter database.
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.password.SYS=

#-------------------------------------------------------------------------------
# Specify the SYSTEM password for the starter database.
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.password.SYSTEM=

#-------------------------------------------------------------------------------
# Specify the SYSMAN password for the starter database.
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.password.SYSMAN=

#-------------------------------------------------------------------------------
# Specify the DBSNMP password for the starter database.
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.password.DBSNMP=

#-------------------------------------------------------------------------------
# Specify the management option to be selected for the starter database. 
# It can be one of the following:
# 1. GRID_CONTROL
# 2. DB_CONTROL
#数据库本地管理工具DB_CONTROL,远程集中管理工具GRID_CONTROL
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.control=DB_CONTROL

#-------------------------------------------------------------------------------
# Specify the Management Service to use if Grid Control is selected to manage 
# the database. GRID_CONTROL需要设定grid control的远程路径URL
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=

#-------------------------------------------------------------------------------
# This variable indicates whether to receive email notification for critical 
# alerts when using DB control.   是否启用Email通知, 启用后会将告警等信息发送到指定邮箱
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.dbcontrol.enableEmailNotification=false

#-------------------------------------------------------------------------------
# Specify the email address to which the notifications are to be sent.设置通知EMAIL地址
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.dbcontrol.emailAddress=

#-------------------------------------------------------------------------------
# Specify the SMTP server used for email notifications.设置EMAIL邮件服务器
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.dbcontrol.SMTPServer=


###############################################################################
#                                                                             #
# SPECIFY BACKUP AND RECOVERY OPTIONS                                           #
# ------------------------------------                                      #
# Out-of-box backup and recovery options for the database can be mentioned    #
# using the entries below.                              #    
#                                                                             #
###############################################################################

#------------------------------------------------------------------------------
# This variable is to be set to false if automated backup is not required. Else 
# this can be set to true.设置自动备份,和OUI里的自动备份一样。
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.automatedBackup.enable=false

#------------------------------------------------------------------------------
# Regardless of the type of storage that is chosen for backup and recovery, if 
# automated backups are enabled, a job will be scheduled to run daily at
# 2:00 AM to backup the database. This job will run as the operating system 
# user that is specified in this variable.自动备份会启动一个job,指定启动JOB的系统用户ID
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.automatedBackup.osuid=

#-------------------------------------------------------------------------------
# Regardless of the type of storage that is chosen for backup and recovery, if 
# automated backups are enabled, a job will be scheduled to run daily at
# 2:00 AM to backup the database. This job will run as the operating system user
# specified by the above entry. The following entry stores the password for the
# above operating system user.自动备份会开启一个job,需要指定OSUser的密码
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.automatedBackup.ospwd=

#-------------------------------------------------------------------------------
# Specify the type of storage to use for the database.
# It can be one of the following:
# - FILE_SYSTEM_STORAGE
# - ASM_STORAGE自动备份,要求指定使用的文件系统存放数据库文件还是ASM
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.storageType=

#-------------------------------------------------------------------------------
# Specify the database file location which is a directory for datafiles, control
# files, redo logs.         
#
# Applicable only when oracle.install.db.config.starterdb.storage=FILE_SYSTEM 
#使用文件系统存放数据库文件才需要指定数据文件、控制文件、Redo log的存放目录
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=

#-------------------------------------------------------------------------------
# Specify the backup and recovery location.
#
# Applicable only when oracle.install.db.config.starterdb.storage=FILE_SYSTEM 
#使用文件系统存放数据库文件才需要指定备份恢复目录
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=

#-------------------------------------------------------------------------------
# Specify the existing ASM disk groups to be used for storage.
#
# Applicable only when oracle.install.db.config.starterdb.storage=ASM
#使用ASM存放数据库文件才需要指定存放的磁盘组
#-------------------------------------------------------------------------------
oracle.install.db.config.asm.diskGroup=

#-------------------------------------------------------------------------------
# Specify the password for ASMSNMP user of the ASM instance.                  
#
# Applicable only when oracle.install.db.config.starterdb.storage=ASM_SYSTEM 
#使用ASM存放数据库文件才需要指定ASM实例密码
#-------------------------------------------------------------------------------
oracle.install.db.config.asm.ASMSNMPPassword=

#------------------------------------------------------------------------------
# Specify the My Oracle Support Account Username.
#
#  Example   : MYORACLESUPPORT_USERNAME=metalink
#指定metalink账户用户名
#------------------------------------------------------------------------------
MYORACLESUPPORT_USERNAME=

#------------------------------------------------------------------------------
# Specify the My Oracle Support Account Username password.
#
# Example    : MYORACLESUPPORT_PASSWORD=password
# 指定metalink账户密码
#------------------------------------------------------------------------------
MYORACLESUPPORT_PASSWORD=

#------------------------------------------------------------------------------
# Specify whether to enable the user to set the password for
# My Oracle Support credentials. The value can be either true or false.
# If left blank it will be assumed to be false.
#
# Example    : SECURITY_UPDATES_VIA_MYORACLESUPPORT=true
# 用户是否可以设置metalink密码
#------------------------------------------------------------------------------
SECURITY_UPDATES_VIA_MYORACLESUPPORT=

#------------------------------------------------------------------------------
# Specify whether user wants to give any proxy details for connection. 
# The value can be either true or false. If left blank it will be assumed
# to be false.
#
# Example    : DECLINE_SECURITY_UPDATES=false
# False表示不需要设置安全更新,注意,在11.2的静默安装中疑似有一个BUG
# Response File中必须指定为true,否则会提示错误,不管是否正确填写了邮件地址
#------------------------------------------------------------------------------
DECLINE_SECURITY_UPDATES=true

#------------------------------------------------------------------------------
# Specify the Proxy server name. Length should be greater than zero.
#
# Example    : PROXY_HOST=proxy.domain.com 
#代理服务器名
#------------------------------------------------------------------------------
PROXY_HOST=

#------------------------------------------------------------------------------
# Specify the proxy port number. Should be Numeric and atleast 2 chars.
#
# Example    : PROXY_PORT=25 
#代理服务器端口
#------------------------------------------------------------------------------
PROXY_PORT=

#------------------------------------------------------------------------------
# Specify the proxy user name. Leave PROXY_USER and PROXY_PWD 
# blank if your proxy server requires no authentication.
#
# Example    : PROXY_USER=username 
#代理服务器用户名
#------------------------------------------------------------------------------
PROXY_USER=

#------------------------------------------------------------------------------
# Specify the proxy password. Leave PROXY_USER and PROXY_PWD  
# blank if your proxy server requires no authentication.
#
# Example    : PROXY_PWD=password 
#代理服务器密码
#------------------------------------------------------------------------------
PROXY_PWD=

保存退出

执行安装(以下为一条命令)

/u01/database/runInstaller -silent -force -ignorePrereq -responseFile  /u01/database/response/db_install.rsp 

执行后耐心等待

安装完成,切换到管理员用户,按提示执行以下两个脚本

su

/u01/oracle/oraInventory/orainstRoot.sh

/u01/oracle/product/11.2.0/db_1/root.sh

 

 安装完毕,需要远程连接需要配置监听

切换到oracle用户

su oracle

执行

netca /silent /responseFile /u01/database/response/netca.rsp

启动监听

lsnrctl start 

查看监听状态

lsnrctl status 

安装连接工具

修改安装设置

vi /u01/database/response/dbca.rsp

按以下内容修改

GDBNAME = "orcl.YiMing" #78行,全局数据库名字 sid+hostname

SID = "orcl" #149行

CHARACTERSET = "AL32UTF8" #415行,编码,打开注释修改

NATIONALCHARACTERSET= "UTF8" #425行 打开注释修改

开始安装

dbca -silent -responseFile /u01/database/response/dbca.rsp

报错了如下

 在oracle用户下切换目录

su ~

执行更新环境变量命令

source .bash_profile

继续执行安装命令

dbca -silent -responseFile /u01/database/response/dbca.rsp

如图输入配置文件中的密码

 

 等待安装完毕

 安装完毕,使用命令登录

sqlplus / as sysdba

使用navicat远程连接

 

参考地址

https://www.cnblogs.com/wushumin/p/9844564.html?ivk_sa=1024320u

https://blog.youkuaiyun.com/java3344520/article/details/8063785/

https://www.cnblogs.com/dyh004/p/13975275.html

https://man7.org/linux/man-pages/man1/repotrack.1.html

https://jingyan.baidu.com/article/4f34706e1f7b54e386b56d4b.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值