(第三十三天)

1. 设置主从从 mysql57 服务器
1 )配置主数据库 
[root@msater_5 ~] # systemctl stop filewalld
[root@msater_5 ~] # setenforce 0
[root@msater_5 ~] # systemctl disable filewalld
[root@msater_5 ~] # ls
anaconda-ks.cfg mysql-5.7.44-linux-glibc2.12-x86_64.tar.gz
[root@msater_5 ~] # tar -xf mysql-5.7.44-linux-glibc2.12-x86_64.tar.gz
[root@msater_5 ~] # cp -r mysql-5.7.44-linux-glibc2.12-x86_64 /usr/local/mysql
[root@msater_5 ~] # rm -rf /etc/my.cnf
[root@msater_5 ~] # mkdir /usr/local/mysql/mysql-files
[root@msater_5 ~] # useradd -r -s /sbin/nologin mysql
[root@msater_5 ~] # chown mysql:mysql /usr/local/mysql/mysql-files
[root@msater_5 ~] # chown 750 /usr/local/mysql/mysql-files
[root@msater_5 ~] # /usr/local/mysql/bin/mysqld --initialize --user=mysql --
basedir=/usr/local/mysql
2024 -08-21T09 :39:16.036321Z 0 [Warning] CA certi2024-08-21T09:39:16.384066Z 1
[Note] A temporary password is generated for root@localhost: RV3DtuxCi;A-
[root@msater_5 ~] # cp /usr/local/mysql/support-files/mysql.server
/etc/init.d/mysql57
[root@msater_5 ~] # vim /usr/local/mysql/my.cnf
[mysqld]
basedir = /usr/local/mysql
datadir = /usr/local/mysql/data
socket = /tmp/mysql.sock
port = 3306
log-error = /usr/local/mysql/data/db01-master.err
log-bin = /usr/local/mysql/data/binlog
server-id = 10
character_set_server = utf8mb4
[root@msater_5 ~] # service mysql57 start
[root@msater_5 ~] # /usr/local/mysql/bin/mysql -p
Enter password:
mysql> alter user 'root' @ 'localhost' identified by 'root' ;
Query OK, 0 rows affected (0.00 sec)
mysql> create user 'li' @ '%' identified by 'li' ;
Query OK, 0 rows affected (0.00 sec)
mysql> grant all on *.* to 'li' @ '%' ;
uery OK, 0 rows affected (0.01 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
mysql> create user 'slave' @ '%' identified by 'slave' ;
Query OK, 0 rows affected (0.00 sec)
mysql> grant replication slave on *.* to 'slave' @ '%' ;
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
2 )配置 slave01 数据库
[root@slave01_5 ~] # ls
anaconda-ks.cfg mysql-5.7.44-linux-glibc2.12-x86_64.tar.gz
[root@slave01_5 ~] # systemctl stop firewalld
[root@slave01_5 ~] # systemctl disable firewalld
[root@slave01_5 ~] # setenforce 0
[root@slave01_5 ~] # tar -xf mysql-5.7.44-linux-glibc2.12-x86_64.tar.gz
[root@slave01_5 ~] # cp -r mysql-5.7.44-linux-glibc2.12-x86_64
/usr/local/mysql
[root@slave01_5 ~] # rm -rf /etc/my.cnf
[root@slave01_5 ~] # mkdir /usr/local/mysql/mysql-files
[root@slave01_5 ~] # useradd -r -s /sbin/nologin mysql
[root@slave01_5 ~] # chown mysql:mysql /usr/local/mysql/mysql-files/
[root@slave01_5 ~] # chown 750 /usr/local/mysql/mysql-files/
[root@slave01_5 ~] # yum -y install rsync
3 )配置 slave02 数据库
[root@slave01_5 ~] # ls
anaconda-ks.cfg mysql-5.7.44-linux-glibc2.12-x86_64.tar.gz
[root@slave01_5 ~] # systemctl stop firewalld
[root@slave01_5 ~] # systemctl disable firewalld
[root@slave01_5 ~] # setenforce 0
[root@slave01_5 ~] # tar -xf mysql-5.7.44-linux-glibc2.12-x86_64.tar.gz
[root@slave01_5 ~] # cp -r mysql-5.7.44-linux-glibc2.12-x86_64
/usr/local/mysql
[root@slave01_5 ~] # rm -rf /etc/my.cnf
[root@slave01_5 ~] # mkdir /usr/local/mysql/mysql-files
[root@slave01_5 ~] # useradd -r -s /sbin/nologin mysql
[root@slave01_5 ~] # chown mysql:mysql /usr/local/mysql/mysql-files/
[root@slave01_5 ~] # chown 750 /usr/local/mysql/mysql-files/
[root@slave01_5 ~] # yum -y install rsync
4 )同步 data
[root@msater_5 ~] # service mysql57 stop
[root@msater_5 ~] # rm -rf /usr/local/mysql/data/auto.cnf
[root@msater_5 ~] # yum -y install rsync
[root@msater_5 ~] # rsync -av /usr/local/mysql/data
root@192.168.2.58:/usr/local/mysql/
[root@msater_5 ~] # rsync -av /usr/local/mysql/data
root@192.168.2.59:/usr/local/mysql/
5 )修改 slave01 配置文件
[root@slave01_5 ~] # ls /usr/local/mysql/
bin docs lib man README support-files
data include LICENSE mysql-files share
[root@slave01_5 ~] # vim /usr/local/mysql/my.cnf
[mysqld]
basedir = /usr/local/mysql
datadir = /usr/local/mysql/data
socket = /tmp/mysql.sock
port = 3310
log-error = /usr/local/mysql/data/err.log
relay-log = /usr/local/mysql/data/relaylog
character_set_server = utf8mb4
server-id = 11
[root@slave01_5 ~] # cp /usr/local/mysql/support-files/mysql.server
/etc/init.d/mysql57
[root@slave01_5 ~] # sed -i '$aexport PATH=$PATH:/usr/local/mysql/bin'
/etc/profile
[root@slave01_5 ~] # source /etc/profile
6 )修改 slave02 配置文件
[root@slave01_5 ~] # ls /usr/local/mysql/
bin docs lib man README support-files
data include LICENSE mysql-files share
[root@slave01_5 ~] # vim /usr/local/mysql/my.cnf
[mysqld]
basedir = /usr/local/mysql
datadir = /usr/local/mysql/data
socket = /tmp/mysql.sock
port = 3310
log-error = /usr/local/mysql/data/err.log
relay-log = /usr/local/mysql/data/relaylog
character_set_server = utf8mb4
server-id = 12
[root@slave01_5 ~] # cp /usr/local/mysql/support-files/mysql.server
/etc/init.d/mysql57
[root@slave01_5 ~] # sed -i '$aexport PATH=$PATH:/usr/local/mysql/bin'
/etc/profile
[root@slave01_5 ~] # source /etc/profile
7 )主服务器锁表
[root@msater_5 ~] # mysql -proot
mysql> select user,host from mysql.user;
+ --------------- + ----------- +
| user | host |
+ --------------- + ----------- +
| slave | % |
| li | % |
| mysql.session | localhost |
| mysql.sys | localhost |
| root | localhost |
+ --------------- + ----------- +
5 rows in set (0.00 sec)
mysql> flush tables with read lock;
Query OK, 0 rows affected (0.00 sec)
mysql> show master status;
+ --------------- + ---------- + -------------- + ------------------ + ---------------
---- +
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
Executed_Gtid_Set |
+ --------------- + ---------- + -------------- + ------------------ + ---------------
---- +
| binlog.000002 | 154 | | |
|
+ --------------- + ---------- + -------------- + ------------------ + ---------------
---- +
1 row in set (0.00 sec)
8 )配置主从服务
[root@slave01_5 ~] # mysql -uroot -proot
mysql> change master to
master_host = "10.0.0.57" ,master_user = "slave" ,master_password = "slave" ,master_lo
g_file = "binlog.000002" ,master_log_pos = 154 ;
Query OK, 0 rows affected, 2 warnings (0.01 sec)
mysql> start slave;
Query OK, 0 rows affected (0.01 sec)
mysql> show slave status\G;
*************************** 1 . row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192 .168.2.57
Master_User: slave
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: binlog.000002
Read_Master_Log_Pos: 154
Relay_Log_File: relaylog.000002
Relay_Log_Pos: 317
Relay_Master_Log_File: binlog.000002
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
9 )配置主从从服务
[root@slave01_5 ~] # mysql -uroot -proot
mysql> change master to
master_host = "10.0.0.57" ,master_user = "slave" ,master_password = "slave" ,master_lo
g_file = "binlog.000002" ,master_log_pos = 154 ;
Query OK, 0 rows affected, 2 warnings (0.01 sec)
mysql> start slave;
Query OK, 0 rows affected (0.01 sec)
mysql> show slave status\G;
*************************** 1 . row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192 .168.2.57
Master_User: slave
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: binlog.000002
Read_Master_Log_Pos: 154
Relay_Log_File: relaylog.000002
Relay_Log_Pos: 317
Relay_Master_Log_File: binlog.000002
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
2. mysql 中添加 eleme 数据库设置为 utf8mb4
[root@msater_5 ~] # mysql -proot
mysql> unlock tables;
Query OK, 0 rows affected (0.00 sec)
mysql> create database if not exists eleme charset utf8mb4;
Query OK, 1 row affected (0.00 sec)
mysql> show databases;
+ -------------------- +
| Database |
+ -------------------- +
| information_schema |
| eleme |
| mysql |
| performance_schema |
| sys |
| test |
+ -------------------- +
6 rows in set (0.00 sec)
3. 添加表 t_user master
mysql> use eleme;
Database changed
mysql> create table t_user(
- > id int primary key auto_increment,
- > name varchar(45) not null,
- > username varchar(45) not null,
- > password varchar(45) not null,
- > remark varchar(45)
- > );
Query OK, 0 rows affected (0.01 sec)
mysql> show tables;
+ ----------------- +
| Tables_in_eleme |
+ ----------------- +
| t_user |
+ ----------------- +
1 row in set (0.00 sec)
4. 添加 2 行记录( master
mysql> insert into eleme.t_user values(1, ' 超级管理员 ' , 'admin' , 'admin' , ' 超级管理
' ),(2, ' 普通用户 ' , 'guest' , 'guest' , ' 普通用户 ' );
Query OK, 2 rows affected (0.00 sec)
Records: 2 Duplicates: 0 Warnings: 0
mysql> select * from eleme.t_user;
+ ---- + ----------------- + ---------- + ---------- + ----------------- +
| id | name | username | password | remark |
+ ---- + ----------------- + ---------- + ---------- + ----------------- +
| 1 | 超级管理员 | admin | admin | 超级管理员 |
| 2 | 普通用户 | guest | guest | 普通用户 |
+ ---- + ----------------- + ---------- + ---------- + ----------------- +
2 rows in set (0.00 sec)
5. 使用 mycat 为三台数据库设置负载均衡(读写分离)
1 )前期 jdk 环境部署
[root@mycat ~] # systemctl stop firewalld
[root@mycat ~] # systemctl disable firewalld
[root@mycat ~] # ls
anaconda-ks.cfg Mycat-server-1.6.5-release-20180122220033-
linux.tar.gz
jdk-8u192-linux-x64.tar.gz v
[root@mycat ~] # tar -xf jdk-8u192-linux-x64.tar.gz
[root@mycat ~] # tar -xf Mycat-server-1.6.5-release-20180122220033-
linux.tar.gz
[root@mycat ~] # cp -r jdk1.8.0_192/ /usr/local/jdk
[root@mycat ~] # cp -r mycat/ /usr/local/
[root@mycat ~] # ls /usr/local/jdk/
bin lib src.zip
COPYRIGHT LICENSE THIRDPARTYLICENSEREADME-JAVAFX.txt
include man THIRDPARTYLICENSEREADME.txt
javafx-src.zip README.html
jre release
[root@mycat ~] # sed -i '$aexport JAVA_HOME=/usr/local/jdk' /etc/profile
[root@mycat ~] # source /etc/profile
[root@mycat ~] # $JAVA_HOME
-bash : /usr/local/jdk: 是一个目录
[root@mycat ~] # sed -i '$aexport PATH=$PATH:$JAVA_HOME/bin' /etc/profile
[root@mycat ~] # source /etc/profile
[root@mycat ~] # $PATH
-bash : /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/jdk/bin:
没有那个文件或目录
[root@mycat ~] # javac -version
javac 1 .8.0_192
2 )修改 server.xml 配置文件
[root@mycat ~] # vim /usr/local/mycat/conf/server.xml
93 <user name = "li" defaultAccount = "true" >
94 <property name = "password" >li</property>
95 <property name = "schemas" >eleme</property>
# 注释
107 <!--
108 <user name = "user" >
109 <property name = "password" >user</property>
110 <property name = "schemas" >TESTDB</property>
111 <property name = "readOnly" >true</property>
112 </user>
113 -- >
3 )修改 schema.xml 配置文件
4 )启动服务
[root@mycat ~] # /usr/local/mycat/bin/mycat start
Starting Mycat-server...
[root@mycat ~] # netstat -lnput | grep 8066
tcp6 0 0 :::8066 :::* LISTEN
1336 /java
6. 客户端测试 mycat
7. 部署 java17 环境
1 java01
[root@java01 ~] # ls
anaconda-ks.cfg jdk-17_linux-x64_bin.tar.gz
[root@java01 ~] # tar -xf jdk-17_linux-x64_bin.tar.gz
[root@java01 ~] # ls
anaconda-ks.cfg jdk-17.0.12 jdk-17_linux-x64_bin.tar.gz
[root@java01 ~] # cp -r jdk-17.0.12/ /usr/local/jdk
[root@java01 ~] # vim /etc/profile
export JAVA_HOME = /usr/local/jdk
export PATH = $PATH : $JAVA_HOME /bin
[root@java01 ~] # source /etc/profile
[root@java01 ~] # javac --version
javac 17 .0.12
[root@java01 ~] # firewall-cmd --add-port=8080/tcp --permanent
success
[root@java01 ~] # firewall-cmd --reload
success
[root@java01 ~] # ls
anaconda-ks.cfg application.yml eleme_server-0.0.1-SNAPSHOT.jar jdk-
17.0.12 jdk-17_linux-x64_bin.tar.gz
[root@java01 ~] # vim application.yml
server:
port: 8080
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://10.0.0.11:8066/eleme
username: li
password: li
[root@java01 ~] # java -jar eleme_server-0.0.1-SNAPSHOT.jar
2 )浏览器访问: 10.0.0.12:8080
3 java02
[root@java01 ~] # ls
anaconda-ks.cfg jdk-17_linux-x64_bin.tar.gz
[root@java01 ~] # tar -xf jdk-17_linux-x64_bin.tar.gz
[root@java01 ~] # ls
anaconda-ks.cfg jdk-17.0.12 jdk-17_linux-x64_bin.tar.gz
[root@java01 ~] # cp -r jdk-17.0.12/ /usr/local/jdk
[root@java01 ~] # vim /etc/profile
export JAVA_HOME = /usr/local/jdk
export PATH = $PATH : $JAVA_HOME /bin
[root@java01 ~] # source /etc/profile
[root@java01 ~] # javac --version
javac 17 .0.12
[root@java01 ~] # firewall-cmd --add-port=8080/tcp --permanent
success
[root@java01 ~] # firewall-cmd --reload
success
[root@java01 ~] # ls
anaconda-ks.cfg application.yml eleme_server-0.0.1-SNAPSHOT.jar jdk-
17.0.12 jdk-17_linux-x64_bin.tar.gz
[root@java01 ~] # vim application.yml
server:
port: 8080
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://10.0.0.11:8066/eleme
username: li
password: li
[root@java01 ~] # java -jar eleme_server-0.0.1-SNAPSHOT.jar
4 )浏览器访问: 10.0.0.13:8080
8. 部署 LVS-nat 模式
1 lvs
[root@lvs ~] # ifconfig ens33:0 10.0.0.100 broadcast 10.0.0.100 netmask
255.255.255.255 up
[root@lvs ~] # route add -host 10.0.0.100 dev ens33:0
[root@lvs ~] # yum -y install ipvsadm
[root@lvs ~] # ipvsadm -C
[root@lvs ~] # ipvsadm -A -t 10.0.0.100:8080 -s rr
[root@lvs ~] # ipvsadm -a -t 10.0.0.100:8080 -r 10.0.0.12 -g
[root@lvs ~] # ipvsadm -a -t 10.0.0.100:8080 -r 10.0.0.13 -g
[root@lvs ~] # systemctl stop firewalld
[root@lvs ~] # systemctl disable firewalld
Removed symlink /etc/systemd/system/multi
user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus
org.fedoraproject.FirewallD1.service.
[root@lvs ~] # setenforce 0
[root@lvs ~] # systemctl stop firewalld
[root@lvs ~] # ipvsadm -Ln
TCP 10 .0.0.100:8080 rr
- > 10 .0.0.12:8080 Route 1 0 1
- > 10 .0.0.13:8080 Route 1 0 1
2 java01
[root@java01 ~] # ifconfig lo:0 10.0.0.100 broadcast 10.0.0.100 netmask
255.255.255.255 up
[root@java01 ~] # route add -host 10.0.0.100 dev lo:0
[root@java01 ~] # echo 1 > /proc/sys/net/ipv4/conf/lo/arp_ignore
[root@java01 ~] # echo 2 > /proc/sys/net/ipv4/conf/lo/arp_announce
[root@java01 ~] # echo 1 > /proc/sys/net/ipv4/conf/all/arp_ignore
[root@java01 ~] # echo 2 > /proc/sys/net/ipv4/conf/all/arp_announce
3 java02
[root@java01 ~] # ifconfig lo:0 10.0.0.100 broadcast 10.0.0.100 netmask
255.255.255.255 up
[root@java01 ~] # route add -host 10.0.0.100 dev lo:0
[root@java01 ~] # echo 1 > /proc/sys/net/ipv4/conf/lo/arp_ignore
[root@java01 ~] # echo 2 > /proc/sys/net/ipv4/conf/lo/arp_announce
[root@java01 ~] # echo 1 > /proc/sys/net/ipv4/conf/all/arp_ignore
[root@java01 ~] # echo 2 > /proc/sys/net/ipv4/conf/all/arp_announce
4 )浏览器访问: 10.0.0.100:8080( 外网地址 )

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

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

相关文章

【Unity】通用GM QA工具 运行时数值修改 命令行 测试工具

GM工具使用: GM工具通常用于游戏运行时修改数值(加钱/血量)、解锁关卡等&#xff0c;用于快速无死角测试游戏。一个通用型GM工具对于游戏项目是非常实用且必要的&#xff0c;但通用不能向易用妥协&#xff0c;纯命令行GM门槛太高&#xff0c;对QA不友好。 这类运行时命令行工具…

进程的创建、终止

目录 前言1. 进程创建2. 进程终止3. exit && _exit 的异同3.1 相同点3.2 不同点 前言 紧接着进程地址空间之后&#xff0c;我们这篇文章开始谈论进程控制相关的内容&#xff0c;其中包括进程是如何创建的&#xff0c;进程终止的几种情况&#xff0c;以及进程异常终止的…

数学建模学习(115):主成分分析(PCA)与Python实践

文章目录 一.主成分分析简介1.1 数学背景与维度诅咒1.2 PCA的定义与应用二.协方差矩阵——特征值和特征向量三.如何为数据集选择主成分数量四.特征提取方法五.LDA——与PCA的区别六.PCA的应用七.PCA在异常检测中的应用八.总结一.主成分分析简介 1.1 数学背景与维度诅咒 主成成…

TOP10漏洞原理

## 本人为学习网安不久的新人&#xff0c;记一次学习笔记&#xff0c;有缺陷或者表述不对的地方欢迎大家指出&#xff0c;感谢&#xff01; ## 1、sql注入&#xff1a;web应用程序对用户输入的数据没有进行过滤&#xff0c;或者过滤不严&#xff0c;就把sql语句拼接进数据库…

Mac电脑遇到DNS解析失败,ip可以访问,域名无法访问

当Mac电脑遇到DNS解析失败的问题时&#xff0c;可以尝试以下几个解决方法‌&#xff1a; 1.检查网络连接‌&#xff1a;确保Mac已连接到可用的网络&#xff0c;并且网络连接正常。可以尝试重新连接Wi-Fi或使用有线连接来排除网络问题。 2.清除DNS缓存‌&#xff1a;打开终端应…

docker容器基本命令、docker进入容器的指令、容器的备份、镜像底层原理、使用commit命令制造镜像、将镜像推送到阿里云镜像仓库与私服仓库

除了exit 还有 ctrlpq exit退出停止 ctrlpq 退出不停止 将本地镜像推到阿里云 登入阿里云 容器镜像服务 实力列表 镜像仓库 创建镜像仓库 安装里面步骤来 这里192.168.10.145这部分用自己ifconfig地址

【Android 远程数据库操作】

按正常情况下&#xff0c;前端不应该直接进行远程数据库操作&#xff0c;这不是一个明智的方式&#xff0c;应该是后端提供对应接口来处理&#xff0c;奈何公司各方面原因需要前端这样做。 对此&#xff0c;我对远程数据库操作做了总结&#xff0c;便于自己复盘&#xff0c;同…

python绘制爱心代码

效果展示 完整代码 Python中绘制爱心的代码可以通过多种方式实现&#xff0c;高级的爱心代码通常指的是使用较复杂的算法或者图形库来生成更加精致的爱心图形。下面是一个使用Python的Turtle模块来绘制爱心的示例代码&#xff1a; import turtledef draw_love():turtle.speed…

[Other]-安装ruby、ascli、ascp

最近新接到这样一个需求&#xff0c;将生物原始数据上传到某中心&#xff0c;其中用到ascp命令&#xff0c;阴差阳错的装了ruby、ascli&#xff0c;这里就都一并介绍下安装方式&#xff0c;由于服务器老旧默认安装时ruby2.0&#xff0c;又 升级到2.7等引发的一系列问题&#xf…

XSS-DOM

文章目录 源码SVG标签Dom-Clobbringtostring 源码 <script>const data decodeURIComponent(location.hash.substr(1));;const root document.createElement(div);root.innerHTML data;// 这里模拟了XSS过滤的过程&#xff0c;方法是移除所有属性&#xff0c;sanitize…

AI工具革新:国内外设计艺术的融合

在人工智能的浪潮中&#xff0c;全球的创新者和开发者们推出了一系列令人惊叹的工具&#xff0c;它们正以前所未有的速度改变着我们的工作、学习和生活方式。从图像生成到语言处理&#xff0c;从数据分析到自动化设计&#xff0c;AI 作图工具展示了其强大的能力&#xff0c;帮助…

DRF——Filter条件搜索模块

文章目录 条件搜索自定义Filter第三方Filter内置Filter 条件搜索 如果某个API需要传递一些条件进行搜索&#xff0c;其实就在是URL后面通过GET传参即可&#xff0c;例如&#xff1a; /api/users?age19&category12在drf中也有相应组件可以支持条件搜索。 自定义Filter …

面试题详解

前言&#xff1a;这一期我们专门来巩固所学知识&#xff0c;同时见识一些面试题。对知识做出一个总结。 1 不创建临时变量交换两个整数 . 第一种方法 #include<stdio.h> int main() {int a 0;int b 0;scanf("%d %d", &a, &b);printf("交换前…

神经网络算法 - 一文搞懂BERT(基于Transformer的双向编码器)

本文将从BERT的本质、BERT的原理、BERT的应用三个方面&#xff0c;带您一文搞懂Bidirectional Encoder Representations from Transformers | BERT。 Google BERT BERT架构&#xff1a; 一种基于多层Transformer编码器的预训练语言模型&#xff0c;通过结合Tokenization、多种E…

Java基于数据库、乐观锁、悲观锁、Redis、Zookeeper分布式锁的简单案例实现(保姆级教程)

1. 分布式锁的定义 分布式锁是一种在分布式系统中用来协调多个进程或线程对共享资源进行访问的机制。它确保在分布式环境下&#xff0c;多个节点&#xff08;如不同的服务器或进程&#xff09;不会同时访问同一个共享资源&#xff0c;从而避免数据不一致、资源竞争等问题。 2…

等保测评服务的业务连续性规划:确保信息安全服务的韧性

在当前的数字化转型浪潮中&#xff0c;信息安全已成为企业运营的关键一环。等保测评服务作为信息安全合规的重要组成部分&#xff0c;其业务连续性规划对于保障服务的稳定性和客户信息资产的安全至关重要。本文将探讨等保测评服务的业务连续性规划策略&#xff0c;旨在构建一个…

树状数组算法

文章目录 树状数组是什么树状数组与线段树的区别与联系树状数组讲解点修&#xff0c;区查&#xff0c;讲解及模板点查&#xff0c;区修讲解及模板 树状数组是什么 树状数组是一种数据结构&#xff0c;提供O(logn)时间内的单点修改和区间求和操作&#xff0c;比线段树有更优的常…

MD编辑器学习笔记

MD编辑器学习笔记 目录标题文本样式列表图片链接代码片数学公式表格部分总结 目录 目录是使用“[TOC](目录&#xff09;”&#xff0c;记住别忘了加上&#xff08;&#xff09;标题 使用#来确定标题&#xff0c;几个#就是几级标题。记住#后面要加上空格文本样式 tips: 在写正…

物流抓取机器人整体设计方案

一、功能简介 1、运行环境&#xff1a;巡线行驶&#xff08;7路数字循迹&#xff0c;麦克纳姆轮车底盘&#xff09; 2、目标识别&#xff1a;颜色识别&#xff08;Maix-II Dock 视觉模块&#xff09; 3、目标定位&#xff1a;视觉测距&#xff08;Maix-II Dock 视觉模块&#x…

VS实⽤调试技巧(附调试例题)

&#x1f381;&#x1f381;创作不易&#xff0c;关注作者不迷路&#x1f380;&#x1f380; VS实⽤调试技巧&#xff08;附调试例题&#xff09; 前言一、什么是bug&#xff1f;二、什么是调试&#xff08;debug&#xff09;&#xff1f;三、Debug和Release四、VS调试快捷键五…