CentOS7 静默方式安装 Oracle19C

CentOS7 静默方式安装 Oracle19C

操作系统:CentOS7

Oracle: 19C

安装常用工具和依赖

yum -y install vim tar net-tools wget perl python3 readline* deltarpm python-deltarpm \zip unzip bc compat-libcap1* compat-libcap* binutils compat-libstdc++-33 \elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc-2.5 glibc-common glibc-devel \glibc-headers ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat \unixODBC unixODBC-devel binutils* compat-libstdc* elfutils-libelf* \gcc* glibc* ksh* yum libaio* libgcc* libstdc* make* sysstat* libXp* glibc-kernheaders

绑定主机名和IP映射

# 修改主机名
hostnamectl set-hostname oracle
# 绑定主机名和IP映射
vim /etc/hosts

填写以下内容

192.168.126.141	oracle

建议重启服务器

reboot

修改LINUX的内核文件

vim /etc/sysctl.conf

追加以下内容

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

修改后生成系统参数

sysctl -p

优化资源限制

vim /etc/security/limits.conf

追加以下内容

oracle   soft   nofile    1024
oracle   hard   nofile    65536
oracle   soft   nproc    16384
oracle   hard   nproc    16384
oracle   soft   stack    10240
oracle   hard   stack    32768
oracle   hard   memlock    134217728
oracle   soft   memlock    134217728

程序执行前认证设置

vim /etc/pam.d/login

追加以下内容

session required /lib/security/pam_limits.so
session required pam_limits.so

配置系统环境变量设置Oracle用户使用的ksh

vim /etc/profile

追加以下内容

if [ $USER = "oracle" ]; thenif [ $SHELL = "/bin/ksh" ]; thenulimit -p 16384ulimit -n 65536elseulimit -u 16384 -n 65536fi
fi

当前会话全局环境变量生效

source /etc/profile

创建Oracle使用文件目录和相应的用户和密码

groupadd oinstall
groupadd dba
groupadd oper
useradd -g oinstall -G dba,oper oracle
passwd oracle
mkdir -p /u01/app/oracle /u01/oraInventory /u01/app/oracle/product/19c/db_1 
chown -R oracle.oinstall /u01
chmod -R 775 /u01/app/oracle

配置oracle用户的环境变量

先切换到oracle用户

su - oracle

配置用户环境变量

vim .bash_profile

追加以下内容

export EDITOR=vim
export TMP=/tmp  
export TMPDIR=$TMP
export ORACLE_SID=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19c/db_1
export INVENTORY_LOCATION=/u01/oraInventory
export TNS_ADMIN=$ORACLE_HOME/network/admin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export NLS_LANG="AMERICAN_AMERICA.AL32UTF8"
export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin:$PATH:$HOME/bin
umask 022

当前会话用户环境变量生效

source .bash_profile

上传Oracle安装包并解压

Oracle安装包上传至$ORACLE_HOME路径下

上传Oracle19C安装包

如果使用非oracle用户上传,切换到root用户下修改oralce安装包所有者

chown -R oracle:oinstall LINUX.X64_193000_db_home.zip

切换到oracle用户下解压

su - oracle
cd $ORACLE_HOME

或者 使用绝对路径

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

解压

unzip LINUX.X64_193000_db_home.zip

准备静默安装文件

静默安装分为3步:

  1. 安装软件
  2. 创建监听
  3. DBCA创建数据库

以上3步分别需要三个配置文件,创建存放该3个文件的目录

使用oracle用户在用户主目录创建存放静默安装配置文件目录rsp

mkdir /home/oracle/rsp

如果该目录使用非oracle用户创建,切换到root用户下修改oralce安装包所有者

chown -R oracle:oinstall /home/oracle/rsp

安装Oracle软件

使用oracle用户编写软件安装静默配置文件

vim /home/oracle/rsp/db_install.rsp

内容如下:

####################################################################
## 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. 
#------------------------------------------------------------------------------
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v19.0.0#-------------------------------------------------------------------------------
# Specify the installation option.
# It can be one of the following:
#   - INSTALL_DB_SWONLY
#   - INSTALL_DB_AND_CONFIG
#-------------------------------------------------------------------------------
oracle.install.option=INSTALL_DB_SWONLY#-------------------------------------------------------------------------------
# Specify the Unix group to be set for the inventory directory.  
#-------------------------------------------------------------------------------
UNIX_GROUP_NAME=oinstall#-------------------------------------------------------------------------------
# Specify the location which holds the inventory files.
# This is an optional parameter if installing on
# Windows based Operating System.
#-------------------------------------------------------------------------------
INVENTORY_LOCATION=/u01/oraInventory
#-------------------------------------------------------------------------------
# Specify the complete path of the Oracle Home. 
#-------------------------------------------------------------------------------
ORACLE_HOME=/u01/app/oracle/product/19c/db_1#-------------------------------------------------------------------------------
# Specify the complete path of the Oracle Base. 
#-------------------------------------------------------------------------------
ORACLE_BASE=/u01/app/oracle#-------------------------------------------------------------------------------
# Specify the installation edition of the component.                     
#                                                             
# The value should contain only one of these choices.  
#   - EE     : Enterprise Edition 
#   - SE2     : Standard Edition 2#-------------------------------------------------------------------------------oracle.install.db.InstallEdition=EE
###############################################################################
#                                                                             #
# PRIVILEGED OPERATING SYSTEM GROUPS                                          #
# ------------------------------------------                                  #
# Provide values for the OS groups to which SYSDBA and SYSOPER 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 value to be specified for OSDBA and OSOPER group is only for UNIX based #
# Operating System.                                                           #
#                                                                             #
################################################################################------------------------------------------------------------------------------
# The OSDBA_GROUP is the OS group which is to be granted SYSDBA privileges.
#-------------------------------------------------------------------------------
oracle.install.db.OSDBA_GROUP=dba#------------------------------------------------------------------------------
# The OSOPER_GROUP is the OS group which is to be granted SYSOPER privileges.
# The value to be specified for OSOPER group is optional.
#------------------------------------------------------------------------------
oracle.install.db.OSOPER_GROUP=dba#------------------------------------------------------------------------------
# The OSBACKUPDBA_GROUP is the OS group which is to be granted SYSBACKUP privileges.
#------------------------------------------------------------------------------
oracle.install.db.OSBACKUPDBA_GROUP=dba#------------------------------------------------------------------------------
# The OSDGDBA_GROUP is the OS group which is to be granted SYSDG privileges.
#------------------------------------------------------------------------------
oracle.install.db.OSDGDBA_GROUP=dba#------------------------------------------------------------------------------
# The OSKMDBA_GROUP is the OS group which is to be granted SYSKM privileges.
#------------------------------------------------------------------------------
oracle.install.db.OSKMDBA_GROUP=dba#------------------------------------------------------------------------------
# The OSRACDBA_GROUP is the OS group which is to be granted SYSRAC privileges.
#------------------------------------------------------------------------------
oracle.install.db.OSRACDBA_GROUP=dba
################################################################################
#                                                                              #
#                      Root script execution configuration                     #
#                                                                              #
#################################################################################-------------------------------------------------------------------------------------------------------
# Specify the root script execution mode.
#
#   - true  : To execute the root script automatically by using the appropriate configuration methods.
#   - false : To execute the root script manually.
#
# If this option is selected, password should be specified on the console.
#-------------------------------------------------------------------------------------------------------
oracle.install.db.rootconfig.executeRootScript=false

如果该文件使用非oracle用户编写或上传,切换到root用户下修改oralce安装包所有者

chown -R oracle:oinstall /home/oracle/rsp/db_install.rsp

使用oracle用户进入$ORACLE_HOME目录后进行安装

./runInstaller -silent -force -noconfig -ignorePrereq -responseFile /home/oracle/rsp/db_install.rsp

Oracle19C安装

根据提示:

As a root user, execute the following script(s):1. /u01/oraInventory/orainstRoot.sh2. /u01/app/oracle/product/19c/db_1/root.sh

需要使用root用户依次执行以下两个脚本

/u01/oraInventory/orainstRoot.sh

/u01/app/oracle/product/19c/db_1/root.sh

Oracle19C安装

根据提示检查

/u01/app/oracle/product/19c/db_1/install/root_oracle_2023-07-02_20-31-10-709893947.log

文件

more /u01/app/oracle/product/19c/db_1/install/root_oracle_2023-07-02_20-31-10-709893947.log

Oracle19C安装

配置监听

使用oracle用户编写静默配置监听文件

vim /home/oracle/rsp/netca.rsp

内容如下:

###################################################################### 
## Copyright(c) 1998, 2018 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 Oracle12c server which is similar to     ##
## what would be created by the NetCA during typical Oracle12c      ##
## 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="19.0"
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=""$ORACLE_BASE/cfgtoollogs/netca/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" 
# For multiple listeners, separate them with commas ex "TCP;1521","TCPS;2484"
# For multiple protocols in single listener, separate them with "&" ex  "TCP;1521&TCPS;2484"
# 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;Oracle12c database's service name
# A typical install sets Oracle12c 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"}#SERVICEUSERPASSWORD;String;Windows service user password
# If the oracle home is installed as secure user, supply the password
#SERVICEUSERPASSWORD=""svcpassword""

如果该文件使用非oracle用户编写或上传,切换到root用户下修改oralce安装包所有者

chown -R oracle:oinstall /home/oracle/rsp/netca.rsp

使用oracle用户进行静默监听配置

netca -silent -responsefile /home/oracle/rsp/netca.rsp

Oracle19C配置监听

检查监听状态

lsnrctl status

Oracle19C监听状态

静默创建数据库

使用oracle用户编写静默创建数据库文件

vim /home/oracle/rsp/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=OLTP#-----------------------------------------------------------------------------
# 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

如果该文件使用非oracle用户编写或上传,切换到root用户下修改oralce安装包所有者

chown -R oracle:oinstall /home/oracle/rsp/dbca.rsp

使用oracle用户进行静默方式创建数据库

dbca -silent -createDatabase -responseFile /home/oracle/rsp/dbca.rsp

Oracle19C创建数据库

安装完成可以查看/u01/app/oracle/cfgtoollogs/dbca/orcl/orcl.log文件,检查安装细节

Oracle19C创建数据库

安装rlwrap

在Linux下面使用sqlplus很不方便,上下键,退格键都不能用,严重降低生产效率。

为了linux下的sqlplus方便调用历史命令和退格,安装rlwrap

下载源代码使用root用户编译安装

tar -zxvf rlwrap-0.45.2.tar.gz
cd rlwrap-0.45.2
./configure
make -j8
make install

切换到oracle用户配置用户环境变量支持rlwrap

su - oracle
vim /home/oracle/.bash_profile

追加以下内容:

alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
alias lsnrctl='rlwrap lsnrctl'

当前会话用户环境变量生效

source /home/oracle/.bash_profile

sqlplus连接数据库

使用oracle用户操作

sqlplus / as sysdba
conn / as sysdba;
alter user hr account unlock;
alter user hr identified by hr;
conn hr/hr;
set linesize 300;
set pagesize 300;
conn sys/oracle@orcl as sysdba;
conn hr/hr@orcl;
select tname from tab;
# 关闭监听
lsnrctl stop
-- 关闭数据库
shutdown immediate;
-- 开启数据库
startup;
# 关闭监听
lsnrctl start
select status from v$instance;

开发防火墙端口

使用root用户

firewall-cmd --zone=public --add-port=1521/tcp --permanent
firewall-cmd --reload 

–zone #作用域
–add-port=1935/tcp #添加端口,格式为:端口/通讯协议
–permanent #永久生效,没有此参数重启后失效

sqldeveloper连接oracle

使用sys账户连接orcl实例

sqldeveloper连接Oracle
sqldeveloper连接Oracle

使用hr账户连接orcl实例

sqldeveloper连接Oracle

sqldeveloper连接Oracle

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/5245.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

记一次docker-compose的坎坷安装经历

最近公司在做一个kafka项目&#xff0c;所以想用docker来安装kafka集群&#xff0c;所以安装完docker后就准备安装docker-compose&#xff0c;但在安装过程中确碰到了各种问题&#xff0c;搞了两个半天再通过翻墙工具才终于搞定。 首先看了篇文章显示安装前要对应docker版本。 …

【Kafka面试题1】Kafka消费者是pull(拉)还是push(推)模式,这种模式有什么好处?

Kafka消费者是pull(拉)还是push(推)模式&#xff0c;这种模式有什么好处&#xff1f; 一、概述回答 Kafka中的Producer和consumer采用的是push-and-pull模式&#xff0c;即Producer只管向broker push消息&#xff0c;consumer只管从broker pull消息&#xff0c;两者对消息的生…

【UE5 Cesium】06-Cesium for Unreal 从一个地点飞行到另一个地点(上)

UE版本&#xff1a;5.1 介绍 本文以在墨尔本和悉尼这两个城市间为例&#xff0c;介绍如何使用虚幻5引擎和Cesium for Unreal插件在这两个城市间进行飞行移动&#xff0c;其中墨尔本和悉尼城市的倾斜摄影是Cesium官方仓库中自带的资产&#xff0c;我们引入到自己的Cesium账号…

【⑦MySQL】· 一文了解四大子查询

前言 ✨欢迎来到小K的MySQL专栏&#xff0c;本节将为大家带来MySQL标量/单行子查询、列子/表子查询的讲解✨ 目录 前言一、子查询概念二、标量/单行子查询、列子/表子查询三、总结 一、子查询概念 子查询指一个查询语句嵌套在另一个查询语句内部的查询&#xff0c;这个特性从My…

8.用python写网路爬虫,Scrapy

前言 Scrapy 是一个流行的网络爬虫框架&#xff0c;它拥有很多简化网站抓取的高级函数。本章中&#xff0c;我们将学习使用 Scrapy 抓取示例网站&#xff0c;目标任务与第2章相同。然后&#xff0c;我们还会介绍 Portia &#xff0c;这是一个基于 Scrapy 的应用&#xff0c;允许…

MATLAB 之 低层绘图操作和光照及材质处理

这里写目录标题 一、低层绘图操作1. 曲线对象2. 曲面对象3. 文本对象4. 其他核心对象4.1 区域块对象4.2 方框对象 二、光照和材质处理1. 光照处理2. 材质处理2.1 图形对象的反射特性2.2 material 函数 一、低层绘图操作 MATLAB 将曲线、曲面、文本等图形均视为对象&#xff0c…

LangChain大型语言模型(LLM)应用开发(三):Chains

LangChain是一个基于大语言模型&#xff08;如ChatGPT&#xff09;用于构建端到端语言模型应用的 Python 框架。它提供了一套工具、组件和接口&#xff0c;可简化创建由大型语言模型 (LLM) 和聊天模型提供支持的应用程序的过程。LangChain 可以轻松管理与语言模型的交互&#x…

LeetCode 75 —— 70. 爬楼梯

LeetCode 75 —— 70. 爬楼梯 一、题目描述&#xff1a; 假设你正在爬楼梯。需要 n 阶你才能到达楼顶。 每次你可以爬 1 或 2 个台阶。你有多少种不同的方法可以爬到楼顶呢&#xff1f; 示例 1&#xff1a; 输入&#xff1a;n 2 输出&#xff1a;2 解释&#xff1a;有两种方法…

《操作系统》- 操作系统的基本概念

目录 一、操作系统的概念1.1 操作系统的分类1.2 计算机系统的构成1.3 操作系统都做了哪些事 二、操作系统的目标和功能2.1 操作系统的目标2.2 操作系统的功能 三、操作系统的特征3.1 并发3.2 共享3.3 虚拟3.4 异步 一、操作系统的概念 1.1 操作系统的分类 UNIX是非常早期的操作…

uniapp监听手机侧滑返回事件。

这篇文章是应一个粉丝的需求更新的&#xff01;你们看我多宠粉&#xff01; 若在App首页&#xff0c;点击手机物理返回键&#xff0c;此时无返回页面可关闭&#xff0c;uni-app默认会提示“再按一次退出应用”&#xff1b;若想自定义退出信息&#xff0c;如修改为&#xff1a;…

UE4/5动画系列(3.通过后期处理动画蓝图的头部朝向Actor,两种方法:1.通过动画层接口的look at方法。2.通过control rig的方法)

目录 蓝图 点积dot Yaw判断 后期处理动画蓝图 动画层接口 ControlRig: 蓝图 首先我们创建一个actor类&#xff0c;这个actor类是我们要看的东西&#xff0c;actor在哪&#xff0c;我们的动物就要看到哪里&#xff08;同样&#xff0c;这个我们也是做一个父类&#xff0…

第2章 k-近邻算法

文章目录 第2章 k-近邻算法2.1k-近邻算法概述2.1.1准备&#xff1a;使用Python导入数据2.1.2实施kNN分类算法 2.2示例&#xff1a;使用k近邻算法改进约会网站的2.2.2分析数据&#xff1a;使用Matplotlib创建散点图2.2.3准备数据&#xff1a;归一化数值2.2.4测试算法 第2章 k-近…