(第三十三天)

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( 外网地址 )

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

uniapp 页面跳转传参:父页面监听子页面传过来的数据

父页面 监听events事件 uni.navigateTo({url: "/components/watermark-camera",events: { // 重点重点重点重点重点重点重点重点getImages(data) { // 接收子页面抛出的 getImages 事件console.log("水印相机的照片&#xff1a;", data)}}})子页面 const …

<数据集>航拍牧场奶牛识别数据集<目标检测>

数据集格式&#xff1a;VOCYOLO格式 图片数量&#xff1a;1805张 标注数量(xml文件个数)&#xff1a;1805 标注数量(txt文件个数)&#xff1a;1805 标注类别数&#xff1a;1 标注类别名称&#xff1a;[cow] 序号类别名称图片数框数1cow1805141337 使用标注工具&#xff…

World of Warcraft [CLASSIC] the Eye of Eternity [EOE] P1-P2

World of Warcraft [CLASSIC] the Eye of Eternity [EOE] 永恒之眼&#xff08;蓝龙&#xff09; 第一阶段 第二阶段 第三阶段 载具1-6技能介绍 World of Warcraft [CLASSIC] the Eye of Eternity [EOE]_永恒之眼 eoe-CSDN博客 永恒之眼怎么出副本呢&#xff0c;战斗结束&am…

makefile文件基本语法

一、makefile文件基本介绍 Makefile 文件是 make 工具使用的配置文件&#xff0c;它定义了如何自动化构建项目的规则和命令。Makefile 文件的主要作用是指定如何编译和链接程序&#xff0c;以及管理文件之间的依赖关系&#xff0c;从而实现高效的构建过程。 1.1 Makefile 的基…

uniapp微信小程序 分享功能

uniapp https://zh.uniapp.dcloud.io/api/plugins/share.html#onshareappmessage export default {onShareAppMessage(res) {if (res.from button) {// 来自页面内分享按钮console.log(res.target)}return {title: 自定义分享标题,path: /pages/test/test?id123}} }需要再真机…

Appium定位元素

使用工具&#xff1a; 报错: Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn‘t 参考链接&#xff1a;Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn‘t-CSD…

Centos安装Jenkins教程详解版(JDK8+Jenkins2.346.1)

本教程基于 JDK8 和 Jenkins2.346.1 JDK安装 下载OpenJDK8文件 wget https://mirrors.tuna.tsinghua.edu.cn/Adoptium/8/jdk/x64/linux/OpenJDK8U-jdk_x64_linux_hotspot_8u422b05.tar.gz解压到指定目录 # 创建目录 mkdir -p /usr/local/software# 解压文件到指定目录&#…

Eclipse部署一个项目到Tomcat和部署多个项目到Tomcat

Eclipse部署一个项目到Tomcat&#xff1a; https://blog.csdn.net/weixin_42334396/article/details/105902994 Eclipse部署多个项目到Tomcat&#xff1a; https://blog.csdn.net/zhanglin1220/article/details/82056185 使用cmd方法强制关闭端口&#xff0c;解除端口占用方法&…

多元统计分析——基于R语言的单车使用情况可视化分析

注&#xff1a;基于R语言的单车使用情况可视化分析为实验记录&#xff0c;存在不足&#xff0c;自行改进。 一、提出问题&#xff08;要解决或分析的问题&#xff09; 1 、用户对共享单车的使用习惯&#xff0c;环境对共享单车运营带来的影响&#xff1f; 2 、共享单车的租赁…

stripe Element 如何使用

这里要准备好几个东西&#xff1a; 一个支付成功过后的回调 还有一个下单的接口 一旦进入这个下单界面&#xff0c;就要去调下单的接口的&#xff0c;用 post, 这个 接口你自己写&#xff0c;可以写在后端中&#xff0c;也可以放到 nextjs 的 api 中。 首先说的是这个下单…

聚星文社——绘唐科技Ai推文软件

聚星文社——绘唐科技Ai推文软件 聚星文社--绘唐科技Ai推文软件https://iimenvrieak.feishu.cn/docx/ZhRNdEWT6oGdCwxdhOPcdds7nof AI推文软件是一种利用人工智能技术帮助用户自动生成推文内容的工具。 该软件会分析用户提供的相关信息和目标群体&#xff0c; 然后使用机器学习…

闲置物品交易平台网站商城-计算机毕设Java|springboot实战项目

&#x1f393; 作者&#xff1a;计算机毕设小月哥 | 软件开发专家 &#x1f5a5;️ 简介&#xff1a;8年计算机软件程序开发经验。精通Java、Python、微信小程序、安卓、大数据、PHP、.NET|C#、Golang等技术栈。 &#x1f6e0;️ 专业服务 &#x1f6e0;️ 需求定制化开发源码提…

【运维高级内容--MySQL】

目录 一、mysql安装 二、MySQL主从复制 一、mysql安装 yum install cmake gcc-c openssl-devel ncurses-devel.x86_64 rpcgen.x86_64 #安装依赖性 #在root路径下下载mysql-boost-5.7.44、libtirpc-devel-1.3.3-8.el9_4.x86_64.rpm安装包 yum install libtirpc-devel…

MFC之word操作

MFC对word操作 背景说明 当对程序的内容进行输出时&#xff0c;比如自定义对象属性描述或者注释&#xff08;详细设计&#xff09;生成文档时&#xff0c;如果采用手动输入会比较麻烦&#xff0c;并且当程序变动时&#xff0c;需要再一次修改对应文档&#xff0c;作为程序员做…

ASP.NET Core 入门教程一 创建最小 API

构建最小 API&#xff0c;以创建具有最小依赖项的 HTTP API。 它们非常适合需要在 ASP.NET Core 中仅包括最少文件、功能和依赖项的微服务和应用。 本教程介绍使用 ASP.NET Core 生成最小 API 的基础知识。 启动 Visual Studio 2022 并选择“创建新项目”。 在“创建新项目”…

移情别恋c++ ദ്ദി˶ー̀֊ー́ ) ——6.vector(模拟实现)

1.存储结构 namespace zone {template<class T> //需要模板class vector{public:private:iterator _start;iterator _finish;iterator _endofstorage;}; } 可见&#xff0c;vector内核是由三个指针实现的 2.默认成员函数 2.1.构造函数 1.初始化列表 vector() :_star…

linux 磁盘满了,程序运行失败,如何处理?df -h

场景&#xff1a;紧急呼救&#xff0c;上传图片失败了。我一脸懵&#xff0c;服务器这是又咋地了&#xff0c;别邪乎姐姐&#xff0c;姐姐胆子小啊。 一、寻找问题原因 1、OSS出问题了&#xff1f; 然后我尝试了 IOS 的APP是没问题的&#xff0c;Android提示上传失败&#xf…

IIS发布打包后文件

1.打开IIS软件 2 添加网站&#xff0c; 自定义网站名称-选择要放置的资源路径-选择IP地址 3.打开放置的资源目录放置打包后文件 4.选择浏览 搜索不到IIS可进行一下操作 控制面板-程序和功能-启用或关闭windows功能-勾选IIS

Linux之数字证书

新书速览|Ubuntu Linux运维从零开始学_ubuntu linux运维从零开始学 pdf 下载-CSDN博客 《Ubuntu Linux运维从零开始学&#xff08;Linux技术丛书&#xff09;》(肖志健)【摘要 书评 试读】- 京东图书 (jd.com) 随着网络环境的恶化&#xff0c;人们已经逐渐抛弃网络上面的明文…

【python】灰色预测 GM(1,1) 模型

文章目录 前言python代码 前言 用 python 复刻上一篇博客的 Matlab 代码。 【学习笔记】灰色预测 GM(1,1) 模型 —— Matlab python代码 # %% import numpy as np import statsmodels.api as sm import matplotlib.pyplot as plt from matplotlib.pylab import mplmpl.rcPa…