openvpn搭建访问路由器摄像头

news2024/9/28 5:33:14

openvpn搭建
技术博客 http://idea.coderyj.com/

1.环境

华为云服务器 操作系统 centos7

2.安装部署

  • 1.安装 openvpn 和 easy-rsa(该包用来制作 ca 证书)
# 安装 epel 源
yum install epel-release -y
 
# 安装
yum install openvpn easy-rsa
  • 2、配置 /etc/openvpn/easy-rsa 目录
mkdir -p /etc/openvpn/easy-rsa
 
cp -r /usr/share/easy-rsa/3.0.7/* /etc/openvpn/easy-rsa/
 
# 拷贝 证书配置文件
cp /usr/share/doc/easy-rsa-3.0.7/vars.example /etc/openvpn/easy-rsa/vars
 
# 拷贝 openvpn 模版配置文件
cp /usr/share/doc/openvpn-2.4.8/sample/sample-config-files/server.conf /etc/openvpn/
  • 3、编辑 vars
vim /etc/openvpn/easy-rsa/vars
 
# 修改内容
set_var EASYRSA_REQ_COUNTRY     "CN"
set_var EASYRSA_REQ_PROVINCE    "GuangDong"
set_var EASYRSA_REQ_CITY        "Guangzhou"
set_var EASYRSA_REQ_ORG         "coderyj"
set_var EASYRSA_REQ_EMAIL       "997745354@qq.com"
set_var EASYRSA_REQ_OU          "IT"

三、创建 根、服务器端 证书 和 key

  • 1、初始化
cd /etc/openvpn/easy-rsa/
 
# 初始化,成功后出现 pki 目录
./easyrsa init-pki
  • 2、创建 根 证书
./easyrsa build-ca
 # 输入密码,这里输入 123456
Enter New CA Key Passphrase:
 ………
 # 输入名称,这里输入 vpn-ca
Common Name (eg: your user, host, or server name) [Easy-RSA CA]:vpn-ca
 # 成功后显示
CA creation complete and you may now import and sign cert requests.
Your new CA certificate file for publishing is at:
/etc/openvpn/easy-rsa/pki/ca.crt
# ca.crt 证书文件
# private 目录里面放的是所有密钥文件,ca.key 后面的 server.key 也会在这里
  • 3、创建 服务器端 证书
./easyrsa build-server-full server nopass
 
 
# 输入前面定义的 ca 密码 123456
Enter pass phrase for /etc/openvpn/easy-rsa/pki/private/ca.key:123456
 
....
Signature ok
The Subject's Distinguished Name is as follows
commonName            :ASN.1 12:'server'
Certificate is to be certified until Jan 15 03:05:13 2025 GMT (825 days)
Write out database with 1 new entries
Data Base Updated
  • 4、创建Diffie-Hellman,确保key穿越不安全网络的命令
./easyrsa gen-dh
  • 5、生成 ta 密钥文件
openvpn --genkey --secret ta.key

四、创建 客户端 证书 和 key

  • 在 ccd下面创建客户端证书和路由器证书 /etc/openvpn/ccd
cd ccd
touch client01
  • 客户端证书配置
# 客户端的路由表 代表可以访问哪个网段开头的地址
push "route 172.0.0.0 255.0.0.0"
  • 路由器证书配置 10.8.0.101 指定了ip地址
ifconfig-push 10.8.0.101 255.255.0.0
#iroute 172.16.100.0 255.255.255.0
iroute 172.0.0.0 255.0.0.0

每个客户端要创建一个证书 证书名字要不能重复 client01证书的名称
在这里插入图片描述
client01 client02 client03 client04 是客户端证书
client100 client101 client102 是路由器证书

创建客户端证书命令

cd easy-rsa/  
./easyrsa build-client-full client01 nopass

输入服务端的证书密码 123456 即可生成
生成好的证书在/etc/openvpn/easy-rsa/pki/issued目录下
密钥在/etc/openvpn/easy-rsa/pki/private目录下
ca在/etc/openvpn/easy-rsa/pki/目录下

五 配置服务器

  • 1、拷贝文件
# 拷贝根与服务器端的相关证书
cp pki/ca.crt /etc/openvpn/server
cp pki/private/server.key /etc/openvpn/server
cp pki/issued/server.crt /etc/openvpn/server
cp pki/dh.pem /etc/openvpn/server
cp /etc/openvpn/easy-rsa/ta.key /etc/openvpn/server
  • 2 修改 server.conf 配置文件
local 0.0.0.0
port 1194

# TCP or UDP server?
;proto tcp
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key  # This file should be kept secret
dh dh.pem
topology subnet
server 10.8.0.0 255.255.0.0
ifconfig-pool-persist ipp.txt
client-config-dir ccd
route 172.0.0.0 255.0.0.0
client-to-client
keepalive 10 120
cipher AES-256-CBC
;comp-lzo
max-clients 100
persist-key
persist-tun
status openvpn-status.log
log        /var/log/openvpn.log
verb 3
explicit-exit-notify 1
  • 3、说明
# 监听地址
local 0.0.0.0  
 
# 监听端口
port 1194  
 
# 监听协议
proto tcp  
 
# 采用路由隧道模式
dev tun  
 
# ca证书路径
ca /etc/openvpn/ca.crt  
 
# 服务器证书
cert /etc/openvpn/server.crt  
 
# This file should be kept secret 服务器秘钥
key /etc/openvpn/server.key  
 
# 密钥交换协议文件
dh /etc/openvpn/dh.pem  
 
# VPN服务端为自己和客户端分配IP的地址池,服务端自己获取网段的第一个地址(这里为10.8.0.1),后为客户端分配其他的可用地址。以后客户端就可以和10.8.0.1进行通信。注意:该网段地址池不要和已有网段冲突或重复
server 10.8.0.0 255.255.255.0  
 
#使用一个文件记录已分配虚拟IP的客户端和虚拟IP的对应关系,以后openvpn重启时,将可以按照此文件继续为对应的客户端分配此前相同的IP。也就是自动续借IP的意思
ifconfig-pool-persist ipp.txt 
 
# 客户端所有流量都通过 openvpn 转发,类似于代理
push "redirect-gateway def1 bypass-dhcp"
 
# 注意:客户端配置,当服务端开启上面一条流量转发后,客户端需要配置如下2条,客户端只有访问192.168.0.0/24的地址才会走vpn隧道,也就是会使用vpn服务端的IP地址,访问其他地址还是会走本地网络
route-nopull
route 172.16.0.0 255.255.0.0 vpn_gateway
 
# 将服务器端的内网地址推给客户端,添加到客户端的路由表中,可以添加多条
push "route 172.16.0.0 255.255.0.0" 
 
# 服务端推送客户端dhcp分配dns
push "dhcp-option DNS 8.8.8.8"  
 
# 客户端之间互相通信
client-to-client
 
# 存活时间,10秒ping一次,120 如未收到响应则视为断线
keepalive 10 120 
 
# openvpn 2.4版本的vpn才能设置此选项。表示服务端启用lz4的压缩功能,传输数据给客户端时会压缩数据包。Push后在客户端也配置启用lz4的压缩功能,向服务端发数据时也会压缩。如果是2.4版本以下的老版本,则使用用comp-lzo指令
compress lz4-v2
push "compress lz4-v2"
 
# 启用lzo数据压缩格式。此指令用于低于2.4版本的老版本。且如果服务端配置了该指令,客户端也必须要配置
comp-lzo
 
# 最多允许 100 客户端连接
max-clients 100  
 
# 用户
user openvpn  
 
# 用户组  
group openvpn  
 
# 参数 0 可以省略,如果不省略,那么客户端配置相应的参数该配成 1;如果省略,那么客户端不需要 tls-auth 配置
tls-auth /etc/openvpn/server/ta.key 0  
  • 4.最终我的服务器配置文件
#################################################
# Sample OpenVPN 2.0 config file for            #
# multi-client server.                          #
#                                               #
# This file is for the server side              #
# of a many-clients <-> one-server              #
# OpenVPN configuration.                        #
#                                               #
# OpenVPN also supports                         #
# single-machine <-> single-machine             #
# configurations (See the Examples page         #
# on the web site for more info).               #
#                                               #
# This config should work on Windows            #
# or Linux/BSD systems.  Remember on            #
# Windows to quote pathnames and use            #
# double backslashes, e.g.:                     #
# "C:\\Program Files\\OpenVPN\\config\\foo.key" #
#                                               #
# Comments are preceded with '#' or ';'         #
#################################################

# Which local IP address should OpenVPN
# listen on? (optional)
local 0.0.0.0

# Which TCP/UDP port should OpenVPN listen on?
# If you want to run multiple OpenVPN instances
# on the same machine, use a different port
# number for each one.  You will need to
# open up this port on your firewall.
port 1194

# TCP or UDP server?
;proto tcp
proto udp

# "dev tun" will create a routed IP tunnel,
# "dev tap" will create an ethernet tunnel.
# Use "dev tap0" if you are ethernet bridging
# and have precreated a tap0 virtual interface
# and bridged it with your ethernet interface.
# If you want to control access policies
# over the VPN, you must create firewall
# rules for the the TUN/TAP interface.
# On non-Windows systems, you can give
# an explicit unit number, such as tun0.
# On Windows, use "dev-node" for this.
# On most systems, the VPN will not function
# unless you partially or fully disable
# the firewall for the TUN/TAP interface.
;dev tap
dev tun

# Windows needs the TAP-Win32 adapter name
# from the Network Connections panel if you
# have more than one.  On XP SP2 or higher,
# you may need to selectively disable the
# Windows firewall for the TAP adapter.
# Non-Windows systems usually don't need this.
;dev-node MyTap

# SSL/TLS root certificate (ca), certificate
# (cert), and private key (key).  Each client
# and the server must have their own cert and
# key file.  The server and all clients will
# use the same ca file.
#
# See the "easy-rsa" directory for a series
# of scripts for generating RSA certificates
# and private keys.  Remember to use
# a unique Common Name for the server
# and each of the client certificates.
#
# Any X509 key management system can be used.
# OpenVPN can also use a PKCS #12 formatted key file
# (see "pkcs12" directive in man page).
ca ca.crt
cert server.crt
key server.key  # This file should be kept secret

# Diffie hellman parameters.
# Generate your own with:
#   openssl dhparam -out dh2048.pem 2048
dh dh.pem

# Network topology
# Should be subnet (addressing via IP)
# unless Windows clients v2.0.9 and lower have to
# be supported (then net30, i.e. a /30 per client)
# Defaults to net30 (not recommended)
topology subnet

# Configure server mode and supply a VPN subnet
# for OpenVPN to draw client addresses from.
# The server will take 10.8.0.1 for itself,
# the rest will be made available to clients.
# Each client will be able to reach the server
# on 10.8.0.1. Comment this line out if you are
# ethernet bridging. See the man page for more info.
server 10.8.0.0 255.255.0.0

# Maintain a record of client <-> virtual IP address
# associations in this file.  If OpenVPN goes down or
# is restarted, reconnecting clients can be assigned
# the same virtual IP address from the pool that was
# previously assigned.
ifconfig-pool-persist ipp.txt

# Configure server mode for ethernet bridging.
# You must first use your OS's bridging capability
# to bridge the TAP interface with the ethernet
# NIC interface.  Then you must manually set the
# IP/netmask on the bridge interface, here we
# assume 10.8.0.4/255.255.255.0.  Finally we
# must set aside an IP range in this subnet
# (start=10.8.0.50 end=10.8.0.100) to allocate
# to connecting clients.  Leave this line commented
# out unless you are ethernet bridging.
;server-bridge 10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100

# Configure server mode for ethernet bridging
# using a DHCP-proxy, where clients talk
# to the OpenVPN server-side DHCP server
# to receive their IP address allocation
# and DNS server addresses.  You must first use
# your OS's bridging capability to bridge the TAP
# interface with the ethernet NIC interface.
# Note: this mode only works on clients (such as
# Windows), where the client-side TAP adapter is
# bound to a DHCP client.
;server-bridge

# Push routes to the client to allow it
# to reach other private subnets behind
# the server.  Remember that these
# private subnets will also need
# to know to route the OpenVPN client
# address pool (10.8.0.0/255.255.255.0)
# back to the OpenVPN server.
;push "route 192.168.10.0 255.255.255.0"
;push "route 192.168.20.0 255.255.255.0"

# To assign specific IP addresses to specific
# clients or if a connecting client has a private
# subnet behind it that should also have VPN access,
# use the subdirectory "ccd" for client-specific
# configuration files (see man page for more info).

# EXAMPLE: Suppose the client
# having the certificate common name "Thelonious"
# also has a small subnet behind his connecting
# machine, such as 192.168.40.128/255.255.255.248.
# First, uncomment out these lines:
client-config-dir ccd
route 172.0.0.0 255.0.0.0
;push "route 172.16.100.0 255.255.255.0"
# Then create a file ccd/Thelonious with this line:
#   iroute 192.168.40.128 255.255.255.248
# This will allow Thelonious' private subnet to
# access the VPN.  This example will only work
# if you are routing, not bridging, i.e. you are
# using "dev tun" and "server" directives.

# EXAMPLE: Suppose you want to give
# Thelonious a fixed VPN IP address of 10.9.0.1.
# First uncomment out these lines:
;client-config-dir ccd
;route 10.9.0.0 255.255.255.252
# Then add this line to ccd/Thelonious:
#   ifconfig-push 10.9.0.1 10.9.0.2

# Suppose that you want to enable different
# firewall access policies for different groups
# of clients.  There are two methods:
# (1) Run multiple OpenVPN daemons, one for each
#     group, and firewall the TUN/TAP interface
#     for each group/daemon appropriately.
# (2) (Advanced) Create a script to dynamically
#     modify the firewall in response to access
#     from different clients.  See man
#     page for more info on learn-address script.
;learn-address ./script

# If enabled, this directive will configure
# all clients to redirect their default
# network gateway through the VPN, causing
# all IP traffic such as web browsing and
# and DNS lookups to go through the VPN
# (The OpenVPN server machine may need to NAT
# or bridge the TUN/TAP interface to the internet
# in order for this to work properly).
;push "redirect-gateway def1 bypass-dhcp"

# Certain Windows-specific network settings
# can be pushed to clients, such as DNS
# or WINS server addresses.  CAVEAT:
# http://openvpn.net/faq.html#dhcpcaveats
# The addresses below refer to the public
# DNS servers provided by opendns.com.
;push "dhcp-option DNS 208.67.222.222"
;push "dhcp-option DNS 8.8.8.8"

# Uncomment this directive to allow different
# clients to be able to "see" each other.
# By default, clients will only see the server.
# To force clients to only see the server, you
# will also need to appropriately firewall the
# server's TUN/TAP interface.
client-to-client

# Uncomment this directive if multiple clients
# might connect with the same certificate/key
# files or common names.  This is recommended
# only for testing purposes.  For production use,
# each client should have its own certificate/key
# pair.
#
# IF YOU HAVE NOT GENERATED INDIVIDUAL
# CERTIFICATE/KEY PAIRS FOR EACH CLIENT,
# EACH HAVING ITS OWN UNIQUE "COMMON NAME",
# UNCOMMENT THIS LINE OUT.
;duplicate-cn

# The keepalive directive causes ping-like
# messages to be sent back and forth over
# the link so that each side knows when
# the other side has gone down.
# Ping every 10 seconds, assume that remote
# peer is down if no ping received during
# a 120 second time period.
keepalive 10 120

# For extra security beyond that provided
# by SSL/TLS, create an "HMAC firewall"
# to help block DoS attacks and UDP port flooding.
#
# Generate with:
#   openvpn --genkey --secret ta.key
#
# The server and each client must have
# a copy of this key.
# The second parameter should be '0'
# on the server and '1' on the clients.
;tls-auth ta.key 0 # This file is secret

# Select a cryptographic cipher.
# This config item must be copied to
# the client config file as well.
# Note that v2.4 client/server will automatically
# negotiate AES-256-GCM in TLS mode.
# See also the ncp-cipher option in the manpage
cipher AES-256-CBC

# Enable compression on the VPN link and push the
# option to the client (v2.4+ only, for earlier
# versions see below)
;compress lz4-v2
;push "compress lz4-v2"

# For compression compatible with older clients use comp-lzo
# If you enable it here, you must also
# enable it in the client config file.
;comp-lzo

# The maximum number of concurrently connected
# clients we want to allow.
max-clients 100

# It's a good idea to reduce the OpenVPN
# daemon's privileges after initialization.
#
# You can uncomment this out on
# non-Windows systems.
;user openvpn
;group openvpn

# The persist options will try to avoid
# accessing certain resources on restart
# that may no longer be accessible because
# of the privilege downgrade.
persist-key
persist-tun

# Output a short status file showing
# current connections, truncated
# and rewritten every minute.
status openvpn-status.log

# By default, log messages will go to the syslog (or
# on Windows, if running as a service, they will go to
# the "\Program Files\OpenVPN\log" directory).
# Use log or log-append to override this default.
# "log" will truncate the log file on OpenVPN startup,
# while "log-append" will append to it.  Use one
# or the other (but not both).
log        /var/log/openvpn.log
;log-append  openvpn.log

# Set the appropriate level of log
# file verbosity.
#
# 0 is silent, except for fatal errors
# 4 is reasonable for general usage
# 5 and 6 can help to debug connection problems
# 9 is extremely verbose
verb 3

# Silence repeating messages.  At most 20
# sequential messages of the same message
# category will be output to the log.
;mute 20

# Notify the client that when the server restarts so it
# can automatically reconnect.
explicit-exit-notify 1

  • 5、创建日志目录
mkdir -p /var/log/openvpn/

六、设置 路由

# 如果不设置,连上 VPN 后将无法正常上网
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j MASQUERADE
 
service iptables save
 
vim /etc/sysctl.conf
net.ipv4.ip_forward = 1
 
# 生效
sysctl -p

七、启动

systemctl start openvpn@server.service  
或 /usr/sbin/openvpn --cd /etc/openvpn/ --config server.conf&
停止
killall openvpn
# 查看
netstat -lntp | grep 1194
tcp        0      0 0.0.0.0:1194       0.0.0.0:*     LISTEN      1470/openvpn

八、客户端连接

  • 下载地址 2.5.8 版本
    • 官方地址 https://openvpn.net/community-downloads/
    • github地址 https://github.com/OpenVPN/openvpn
  • 2、在安装目录 config下 创建 client.ovpn 文件
client
dev tun
proto tcp
remote 192.168.1.71 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert tomma.crt
key tomma.key
remote-cert-tls server
tls-auth ta.key 1
cipher AES-256-GCM
compress lz4-v2
verb 3
auth-nocache
  • 3、拷贝服务器客户端上的相关文件

生成好的证书在/etc/openvpn/easy-rsa/pki/issued目录下
密钥在/etc/openvpn/easy-rsa/pki/private目录下
ca在/etc/openvpn/easy-rsa/pki/目录下

在这里插入图片描述

  • 4.安装openvpn 自行安装
    在这里插入图片描述
  • 5.打开文件目录退出程序找到config目录 把刚刚拷贝的证书文件可以client.ovpn放进来 证书名字更改一下
    在这里插入图片描述
  • 6.打开openvpn进行连接 有ip地址证明成功
    在这里插入图片描述

九 配置路由器 以四信路由器为例

在这里插入图片描述

  • 配置证书
    在这里插入图片描述
  • 设置路由器ip 设置 自动对时
    在这里插入图片描述
  • 查看到路由器 openvpn有地址就代表成功了
    在这里插入图片描述
  • 访问路由器 在浏览器输入 10.8.0.100 能出来页面代表成功

十配置摄像头 将摄像头与路由器链接 配置摄像头ip 网关等

在这里插入图片描述

  • 在浏览器访问 输入地址 172.16.100.115 出现摄像机管理页面代表成功
    在这里插入图片描述
  • 至此openvpn搭建完成 可以访问路由器和摄像头了

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

如何全面评价一个低代码平台?

&#x1f431; 个人主页&#xff1a;不叫猫先生&#xff0c;公众号&#xff1a;前端舵手 &#x1f64b;‍♂️ 作者简介&#xff1a;2022年度博客之星前端领域TOP 2&#xff0c;前端领域优质作者、阿里云专家博主&#xff0c;专注于前端各领域技术&#xff0c;共同学习共同进步…

Goby 漏洞发布|WordPress Extensive VC Addons 插件 options[template] 文件包含漏洞

漏洞名称&#xff1a;WordPress Extensive VC Addons 插件 options[template] 文件包含漏洞 English Name&#xff1a;WordPress Plugin Extensive VC Addons File Inclusion Vulnerability CVSS core: 9.8 影响资产数&#xff1a;2583 漏洞描述&#xff1a; Extensive VC…

Netty核心技术七--Google Protobuf

1.编码和解码的基本介绍 编写网络应用程序时&#xff0c;因为数据在网络中传输的都是二进制字节码数据&#xff0c;在发送数据时就需要编码&#xff0c;接收数据时就需要解码 codec(编解码器) 的组成部分有两个&#xff1a;decoder(解码器)和encoder(编码器)。encoder 负责把…

【干货】Android系统定制基础篇:第十六部分(双屏异触、定时开关机与看门狗)

一、Android双屏异触-指定触摸为副屏触摸 在双屏异显产品中&#xff0c;有时候主副屏都带有触摸屏&#xff0c;并且要求主副屏触摸各自操作互不干扰。 Android 现有框架中已经支持副输入设备的逻辑&#xff0c;只是默认将所有的外部热插拔设备统一指定为副输入设备&#xff0…

XILINX 7系列FPGA封装之芯片常见封装技术详解

&#x1f3e1;《Xilinx FPGA开发指南》 目录 1&#xff0c;概述2&#xff0c;常用封装技术2.1&#xff0c;Wire-bond chip-scale2.2&#xff0c;Wire-bond fine-pitch2.3&#xff0c;Flip-chip lidless2.4&#xff0c;Ruggedized flip-chip2.5&#xff0c; Flip-chip fine-pitc…

【算法设计与分析】期末复习

文章目录 复习大纲第一章算法概述1.1算法与程序1.2 算法复杂性分析 第二章递归与分治策略分治法的基本思想递归与分治的关系&#xff1a;用分治法解决的问题的几个特征&#xff1a;例题&#xff1a; 第三章动态规划动态规划的基本思想&#xff1a;分治与动态规划算法的异同&…

mine vpn

client remote ‘whvpn.deepin.com’ 1194 auth-user-pass dev tun proto tcp nobind auth-nocache script-security 2 persist-key persist-tun user nm-openvpn group nm-openvpn -----BEGIN CERTIFICATE----- MIIDPDCCAiSgAwIBAgIUUTvTCz6BndUDTIVTBxpKL19mEMkwDQYJKoZIhvcN…

JAVA开发(spring RestFull风格Feign使用总结)

现在大多数的springboot都是使用RestFull风格的接口&#xff0c;是Feign进行远程调用。 一、Feign介绍&#xff1a; Feign是Spring Cloud Netflix组件中的一个轻量级RESTFULL的http服务客户端&#xff0c;实现了负载均衡和Rest调用的开源框架&#xff0c;封装了Ribbon和RestTe…

使用谷歌 Chrome 浏览器禁用网页 JavaScript

使用谷歌 Chrome 浏览器禁用网页 JavaScript 文章目录 使用谷歌 Chrome 浏览器禁用网页 JavaScriptI - 概述1.1 - JavaScript 的功能1.2 - 为何要禁用 JavaScript II - 禁用 JavaScript 的方式2.1 - Chrome 调试工具2.2 - Chrome 黑名单 I - 概述 1.1 - JavaScript 的功能 Web…

Fegin 中统一处理调用的结果

背景 项目中&#xff0c;微服务环境下&#xff0c;有很多时候&#xff0c;都需要调用其他服务&#xff0c;而且其他服务基本上都有一个骨架类(如下图)&#xff0c;为了不用每次调用都去判断是否成功&#xff0c;所以需要统一处理接口返回的结果 思考 跟踪代码发现&#xff0c;…

Seata Saga 模式理论学习、生产级使用示例搭建及注意事项(二) | Spring Cloud58

一、前言 通过以下系列章节&#xff1a; docker-compose 实现Seata Server高可用部署 | Spring Cloud 51 Seata AT 模式理论学习、事务隔离及部分源码解析 | Spring Cloud 52 Spring Boot集成Seata利用AT模式分布式事务示例 | Spring Cloud 53 Seata XA 模式理论学习、使用…

Dubbo服务发现原理

一、Dubbo服务发现设计 Dubbo提供的是一种Client-Based的服务发现机制&#xff0c;依赖第三方注册中心组件来协调服务发现过程&#xff0c;支持常用的注册中心如Nacos、Connsul、Zookeeper等 Dubbo服务发现机制的基本工作原理图&#xff1a; 服务发现包含提供者、消费者和注册…

MySQL 被 PG 干翻了。。

出品 | OSC开源社区&#xff08;ID&#xff1a;oschina2013) Stack Overflow 发布了 2023 年开发者调查报告&#xff0c;据称共计超过 9 万名开发者参与了此次调查。 完整报告包含了受访开发者画像&#xff0c;以及关于开发技术、AI、职业、社区等方面的内容。本文主要介绍关于…

ICC2: 工具是如何控制局部利用率的?

分析congestion map时不难发现,route congestion高的地方局部利用率往往要比周围低,这时疑问就来了,既然standard cell的分布不是均匀的,那局部再降一降彻底解决congestion问题不好嘛?工具是如何控制这种congestion driven的行为的呢? 在place_opt以及clock_opt的log里都…

Apache Atlas高级搜索语法示例

from hive_table;hive_table from hive_table where name xxx or name yyy from hive_table where name ["xxx", "yyy"] from hive_table where name LIKE *_xxx hive_db where name like "???dm?*" hive_column where table.name …

Dcat Admin 2 集成富文本编辑器 wangEditor 5

由于默认的 TinyMCE 个人不是很喜欢&#xff0c;所以替换成国产的富文本编辑器 wangEditor Dcat Admin 文档示例&#xff1a;集成富文本编辑器 wangEditor 但是官方的示例是针对 wangEditor 4 编写的&#xff0c;这里仅指出对版本 5 的差异部分 获取文件 将以下三个文件保存…

快码住! 结构体内存对齐(计算结构体大小) 干货满满!

文章目录 结构体内存对齐规则结构体大小计算为什么存在内存对齐&#xff1f;设计结构体的技巧如何修改默认对齐数&#xff1f; 结构体内存对齐规则 我们知道&#xff0c;整型变量有自己的大小&#xff0c;浮点型变量有自己的大小&#xff0c;数组也有自己的大小&#xff0c;那…

血流动力学与血压(一)--平均动脉压

平均动脉压 在血管血流动力学研究中&#xff0c;心血管系统通常被认为是一个简单的液压回路&#xff0c;由泵&#xff08;心脏&#xff09;组成&#xff0c;泵&#xff08;心脏&#xff09;有节奏地活动&#xff08;收缩 --> 舒张 --> 收缩 --> 舒张 --> 收缩…&am…

中国一重集中采购平台的建设经历和亮点

中国一重前身为第一重型机器厂&#xff0c;是“一五”期间建设156项重点工程项目之一&#xff0c;始建于1954年&#xff0c;是中央管理的涉及国家安全和国民经济命脉的国有重要骨干企业之一&#xff0c;是国家创新型试点企业、国家高新技术企业&#xff0c;拥有国家级企业技术中…

java 校园管理系统Myeclipse开发mysql数据库web结构jsp编程计算机网页项目

一、源码特点 JSP 校园管理系统 是一套完善的系统源码&#xff0c;对理解JSP java编程开发语言有帮助&#xff0c;系统具有完整的源代码和数据库&#xff0c;以及相应配套的设计文档&#xff0c;系统主要采用B/S模式开发。 研究的基本内容是基于Web的校园管理系统&…