云计算实训09——rsync远程同步、自动化推取文件、对rsyncd服务进行加密操作、远程监控脚本

一、rsync远程同步


1.rsync基本概述

(1)sync同步

(2)async异步

(3)rsync远程同步

2.rsync的特点

可以镜像保存整个目录树和文件系统
可以保留原有权限,owner,group,时间,软硬链接,文件acl,文件属性等
传输效率高,使用同步算法
支持匿名传输,方便网站镜像,安全性高

3、rsync与scp的区别

两者都可以实现远程同步,但是相对⽐⽽⾔,rsync能⼒更强
① ⽀持增量备份
② 数据同步时保持⽂件的原有属性

4.rsyn的使用

安装rsync软件包
[root@localhost ~]# yum -y install rsync

[root@localhost ~]# which rsync
/usr/bin/rsync

push 推,相当于上传;
pull 拉,相当于下载;

(1)本地同步

同步文件的内容,文件的属性,文件的新增,文件的修改,文件的删除(--delete)
在家目录中创建一些文件,将文件同步到opt下

[root@localhost ~]# cd
[root@localhost ~]# mkdir folder

在folder目录下创建f1,f2,f3

[root@localhost ~]# mkdir folder/f{1..3}
[root@localhost ~]# tree folder/
folder/
├── f1
├── f2
└── f3

3 directories, 0 files

在folder目录下的f1下创建file0,file1,file2,file3,file4


[root@localhost ~]# touch folder/f1/file{0..4}
[root@localhost ~]# tree folder/
folder/
├── f1
│   ├── file0
│   ├── file1
│   ├── file2
│   ├── file3
│   └── file4
├── f2
└── f3

3 directories, 5 files

同步文件

将folder目录下的文件传到opt目录

rsync -av /目录 /tmp  同步目录
[root@localhost ~]# rsync -av folder/ /opt/

[root@localhost opt]# ls
a.txt  f1  f2  f3
[root@localhost opt]# tree /opt/
/opt/
├── a.txt
├── f1
│   ├── file0
│   ├── file1
│   ├── file2
│   ├── file3
│   └── file4
├── f2
└── f3

使用rsync命令进行同步

rsync -avR 保存相对路径,也就是同步目录
[root@localhost ~]# rsync -avR folder/ /opt/

[root@localhost ~]# tree /opt/
/opt/
└── folder
    ├── f1
    │   ├── file0
    │   ├── file1
    │   ├── file2
    │   ├── file3
    │   └── file4
    ├── f2
    └── f3

4 directories, 5 files

现在不传输到opt目录,就在本地的及格目录传

[root@localhost ~]# tree folder/
folder/
├── f1
│   ├── file0
│   ├── file1
│   ├── file2
│   ├── file3
│   └── file4
├── f2
└── f3

3 directories, 5 files

将f1下的文件同步到f2下

rsync -av /目录/ /tmp/  同步目录下的文件

[root@localhost ~]# rsync -av folder/f1/ folder/f2/

在f1底下创建file5文件

[root@localhost ~]# touch folder/f1/file5
[root@localhost ~]# tree folder/
folder/
├── f1
│   ├── file0
│   ├── file1
│   ├── file2
│   ├── file3
│   ├── file4
│   └── file5
├── f2
│   ├── file0
│   ├── file1
│   ├── file2
│   ├── file3
│   └── file4
└── f3

3 directories, 11 files

再次将f1下的文件同步到f2下,发现新创建的file5也被同步过去了

[root@localhost ~]# rsync -av folder/f1/ folder/f2/

[root@localhost ~]# tree folder/
folder/
├── f1
│   ├── file0
│   ├── file1
│   ├── file2
│   ├── file3
│   ├── file4
│   └── file5
├── f2
│   ├── file0
│   ├── file1
│   ├── file2
│   ├── file3
│   ├── file4
│   └── file5
└── f3

3 directories, 12 files

删除文件

删除f1下的file0文件
[root@localhost ~]# rm -rf folder/f1/file0
[root@localhost ~]# tree folder/
folder/
├── f1
│   ├── file1
│   ├── file2
│   ├── file3
│   ├── file4
│   └── file5
├── f2
│   ├── file0
│   ├── file1
│   ├── file2
│   ├── file3
│   ├── file4
│   └── file5
└── f3

3 directories, 11 files

再次将f1下的文件同步到f2下,发现删除的file0在f2中仍然存在

[root@localhost ~]# rsync -av folder/f1/ folder/f2/

[root@localhost ~]# tree folder/
folder/
├── f1
│   ├── file1
│   ├── file2
│   ├── file3
│   ├── file4
│   └── file5
├── f2
│   ├── file0
│   ├── file1
│   ├── file2
│   ├── file3
│   ├── file4
│   └── file5
└── f3

3 directories, 11 files

使用--delete 进行删除同步,将f1 下的文件同步到f2下

[root@localhost ~]# rsync -av --delete folder/f1/ folder/f2/
sending incremental file list
deleting file0

sent 115 bytes  received 21 bytes  272.00 bytes/sec
total size is 0  speedup is 0.00

发现f2中的file0文件也被删除了

[root@localhost ~]# tree folder/
folder/
├── f1
│   ├── file1
│   ├── file2
│   ├── file3
│   ├── file4
│   └── file5
├── f2
│   ├── file1
│   ├── file2
│   ├── file3
│   ├── file4
│   └── file5
└── f3

3 directories, 10 files

由此看出:文件的增加会同步,而文件的删除并不会


rsync语法

rsync [选项] 原数据位置 目录位置

-v 详细模式输出
-a 归档模式,递归的⽅式传输⽂件,并保持⽂件的属性
-R 保留相对路径

修改文件

对f1中的file1文件进行修改,然后编辑文件内容
[root@localhost ~]# vim folder/f1/file1
[root@localhost ~]# cat folder/f1/file1
大家好,我是阿优,超级无敌阿优!
[root@localhost ~]# cat folder/f2/file1
发现修改了f1中的内容,f2目录中没有发生改变

再次使用--delete进行同步
[root@localhost ~]# rsync -av --delete folder/f1/ folder/f2/
sending incremental file list
./
file1

sent 217 bytes  received 38 bytes  510.00 bytes/sec
total size is 47  speedup is 0.18

发现f2中的file1文件也被修改了
[root@localhost ~]# cat folder/f2/file1
大家好,我是阿优,超级无敌阿优!

由此得出:文件的修改也会被rsync同步

[root@localhost ~]# touch folder/f1/file0 -m -d "2024-7-14 00:00"
[root@localhost ~]# rsync -av --delete folder/f1/ folder/f2/
[root@localhost ~]# touch folder/f1/file0 -m -d "2024-7-14 00:00"
[root@localhost ~]# rsync -av --delete folder/f1/ folder/f2/
[root@localhost ~]# ls -l folder/f1/file0
-rw-r--r--. 1 root root 0 7月  14 00:00 folder/f1/file0

#给组用户增加写的权限

[root@localhost ~]# chmod g+w folder/f1/file0
[root@localhost ~]# ls -l folder/f1/file0
-rw-rw-r--. 1 root root 0 7月  14 00:00 folder/f1/file0
[root@localhost ~]# rsync -av --delete folder/f1/ folder/f2/
[root@localhost ~]# ls -l folder/f2/file0
-rw-rw-r--. 1 root root 0 7月  14 00:00 folder/f2/file0
#同步文件内容的修改、文件的删除,以及文件的属性的修改

(2)远程同步


向另一台主机 /tmp目录同步数据

[root@localhost ~]# rsync -av folder/ root@192.168.1.10:/tmp/
root@192.168.1.10's password: 


要实现远程同步,要求对另一台主机也要安装rsync

远程主机上操作:

在tmp目录下新建一个大小为300M,名为lajiwenjian的文件

 dd if=/dev/zero of=/tmp/lajiwenjian bs=300M count=1

查看tmp下的文件
  ls -lh /tmp/
将文件同步到192.168.1.20的原主机上
rsync -a root@192.168.1.20::

关闭防火墙

systemctl stop firewalld

关闭selinux

 setenforce 0

原主机上操作:

#从远程主机拉取数据
[root@localhost ~]# rsync -av root@192.168.1.10:/tmp/lajiwenjian /tmp/
root@192.168.1.10's password: 
receiving incremental file list
lajiwenjian

sent 43 bytes  received 314,649,690 bytes  15,348,767.46 bytes/sec
total size is 314,572,800  speedup is 1.00

#查看,发现lajiwenjian已经存在
[root@localhost ~]# ls -l /tmp/
总用量 307200
-rw-r--r--. 1 root root 314572800 7月  18 11:04 lajiwenjian

由此证明:两台主机是可以进行远程同步数据的

(3)服务器项目同步


对原主机进行免密操作

[root@localhost ~]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:xoC7J0cpoMXgcvndhrxNRzX7BVbRtYi1vQC0Md9d2+4 root@localhost.localdomain
The key's randomart image is:
+---[RSA 2048]----+
|.         .=o.ooB|
|.o . .     .O+=.B|
|..* . .   .o.= =+|
|.+ o + * .   ..o.|
|.   + * S .   ...|
|     + * .     . |
|    o + .       E|
|     +           |
|                 |
+----[SHA256]-----+
[root@localhost ~]# ssh-copy-id root@192.168.1.10

再次从远程主机拉取数据

[root@localhost ~]# rsync -av root@192.168.1.10:/tmp/lajiwenjian /tmp/
receiving incremental file list

sent 20 bytes  received 51 bytes  6.76 bytes/sec
total size is 314,572,800  speedup is 4,430,602.82

启动rsync服务

检查rsync服务是否启动

[root@localhost ~]# systemctl status rsyncd
[root@localhost ~]# systemctl start rsyncd


[root@localhost ~]# netstat -lntup | grep rsync
tcp        0      0 0.0.0.0:873             0.0.0.0:*               LISTEN      2664/rsync          
tcp6       0      0 :::873                  :::*                    LISTEN      2664/rsync    

找到服务配置文件

[root@localhost ~]# find / -name "rsync*conf"
/etc/rsyncd.conf
[root@localhost ~]# vim /etc/rsyncd.conf

创建多级目录

[root@localhost ~]# mkdir -p /app/studentweb/src/main/java/co/goho/ayou.studentweb
[root@localhost ~]# tree /app/
/app/
└── studentweb
    └── src
        └── main
            └── java
                └── co
                    └── goho
                        └── ayou.studentweb

7 directories, 0 files

在多级目录下创建.java文件

[root@localhost ~]touch /app/studentweb/src/main/java/co/goho/ayou.studentweb/File{0..9}.java
[root@localhost ~]# tree /app/
/app/
└── studentweb
    └── src
        └── main
            └── java
                └── co
                    └── goho
                        └── ayou.studentweb
                            ├── File0.java
                            ├── File1.java
                            ├── File2.java
                            ├── File3.java
                            ├── File4.java
                            ├── File5.java
                            ├── File6.java
                            ├── File7.java
                            ├── File8.java
                            └── File9.java

7 directories, 10 files
[root@localhost ~]# ls /app/
studentweb

检测app项目

进入app目录下的studentweb目录
[root@localhost ~]# cd /app/studentweb/

编辑配置文件
[root@localhost studentweb]# vim /etc/rsyncd.conf

重新启动rsyncd服务
[root@localhost studentweb]# systemctl restart rsyncd

注:备份服务器不需要启动rsyncd服务
#在y主机提供了一个针对app/下项目的rsync服务
[root@localhost studentweb]# tree /app/
/app/
└── studentweb
    └── src
        └── main
            └── java
                └── co
                    └── goho
                        └── ayou.studentweb
                            ├── File0.java
                            ├── File1.java
                            ├── File2.java
                            ├── File3.java
                            ├── File4.java
                            ├── File5.java
                            ├── File6.java
                            ├── File7.java
                            ├── File8.java
                            └── File9.java

7 directories, 10 files
 

远程主机上操作:

从原主机对数据进行同步

rsync -av 原 ::目标目录

[root@dongdong ~]#rsync -a root@192.168.1.20::
[root@dongdong ~]#rsync -ac root@192.168.1.20::app /tmp/

查看tmp目录
[root@dongdong ~]# ls -l /tmp/

再次同步
[root@dongdong ~]# rsync -av root@192.168.1.20::app /tmp/

再次查看
[root@dongdong ~]# ls -l /tmp/
[root@dongdong ~]# tree /tmp/src/
/tmp/src/
└── main
    └── java
        └── co
            └── goho
                └── ayou.studentweb
                    ├── File0.java
                    ├── File1.java
                    ├── File2.java
                    ├── File3.java
                    ├── File4.java
                    ├── File5.java
                    ├── File6.java
                    ├── File7.java
                    ├── File8.java
                    └── File9.java

5 directories, 10 files


发现原主机的数据被成功同步给远程主机了

二、自动化推取文件

1.检查并启动rsync服务

检查rsync服务是否启动
[root@localhost ~]# netstat -lntup | grep rsync          
启动rsync服务
[root@localhost ~]# systemctl start rsyncd

再次检查rsync服务是否启动

[root@localhost ~]# netstat -lntup | grep rsync
tcp        0      0 0.0.0.0:873             0.0.0.0:*               LISTEN      3368/rsync          
tcp6       0      0 :::873                  :::*                    LISTEN      3368/rsync          
  

2.设置每一分钟推送一次代码


(1)查看rsync所在的位置

[root@localhost ~]# which rsync
/usr/bin/rsync

(2)编辑计划任务--每分钟推取一次

[root@localhost ~]# crontab -e
*/1 * * * * /usr/bin/rsync -av /app/studentweb/ root@192.168.1.10:/tmp/

若文件没有被修改,则没必要推送


(3)编辑计划任务,删除计划任务

[root@localhost ~]# crontab -e
crontab: installing new crontab
您在 /var/spool/mail/root 中有新邮件

(4)另外开一台主机进行验证

删除/tmp下的所有内容

[root@dongdong ~]# rm -rf /tmp/*
在原主机计划任务编辑完成后,查看/tmp目录
[root@dongdong ~]# ls /tmp/
src

可以发现/tmp目录下多了src,是从原主机同步过来的

3.给rsyncd服务添加密码

(1)编辑配置文件

        添加两属性

[root@localhost ~]# vim /etc/rsyncd.conf
auth users=user0,user1
#secrets file=/etc/rsync.secrets

(2)创建编辑rsync密码文件

账号:密码

[root@localhost ~]# vim /etc/rsync.secrets
tom:tom

jerry:jerry

(3) 给密码文件添加权限

[root@localhost ~]# ls -l /etc/rsync.secrets 
-rw-r--r--. 1 root root 28 7月  18 15:12 /etc/rsync.secrets

[root@localhost ~]# #chmod 600 /etc/rsync.secrets

(4)重启rsyncd服务

[root@localhost ~]# systemctl restart rsyncd

4.安装监听工具

(1)安装inotify-tools软件包

[root@localhost ~]# yum -y install inotify-tools

此处安装完成后,会生成以下两个文件

(2)查看inotifywait的位置

[root@localhost ~]# which inotifywait
/usr/bin/inotifywait

(3)创建并编辑脚本文件

[root@localhost ~]# vim inotify.sh

#!/bin/bash
/usr/bin/inotifywait -mrq -e modify,delete,create,attrib,move /app/studentweb | while read events
do

                rsync -av /app/studentweb/ root@192.168.1.10:/tmp/
done

(4)进行查看

[root@localhost ~]# ls
anaconda-ks.cfg  d0  echo.txt  folder  inotify.sh  list  vuehtml000

发现我们创建的inotify.sh脚本文件是存在的

(5)对脚本文件进行改名,将其改为inotiftest.sh

[root@localhost ~]# mv inotify.sh inotiftest.sh

(6)对更改后的脚本文件的用户权限进行修改

[root@localhost ~]# chmod 700 inotiftest.sh 
[root@localhost ~]# ls
anaconda-ks.cfg  d0  echo.txt  folder  inotiftest.sh  list  vuehtml000

(7)创建测试文件,及编辑所创建的文件,以便测试

在studentweb的目录下创建名为 天天好心情!的文件

[root@localhost ~]# touch /app/studentweb/天天好心情!

创建名为天天好心情  的文件
[root@localhost ~]# touch /app/studentweb/天天好心情

创建名为/woshidongdong的文件
[root@localhost ~]# touch /app/studentweb/woshidongdong
[root@localhost ~]# vim /app/studentweb/woshidongdong 

查看编辑文件的内容
[root@localhost ~]# cat /app/studentweb/woshidongdong 
天天好心情

(8)运行脚本文件

[root@localhost ~]# ./inotiftest.sh 

sending incremental file list
./
.woshidongdong.swp
woshidongdong
天天好心情
天天好心情!

(9)将原主机的脚本转入后台运行

[root@localhost ~]# nohup ./inotiftest.sh &
[3] 17277
[root@localhost ~]# nohup: 忽略输入并把输出追加到"nohup.out"

(10)在另一台主机进行测试

[root@dongdong ~]# rm -rf /tmp/*
[root@dongdong ~]# ls /tmp/
src  woshidongdong  天天好心情  天天好心情!

发现我们所创建的文件和内容也被同步到tmp目录下了


 

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

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

相关文章

数据分析入门:用Python和Numpy探索音乐流行趋势

一、引言 音乐是文化的重要组成部分,而音乐流行趋势则反映了社会文化的变迁和人们审美的变化。通过分析音乐榜单,我们可以了解哪些歌曲或歌手正在受到大众的欢迎,甚至预测未来的流行趋势。Python作为一种强大的编程语言,结合其丰…

[数据集][目标检测]导盲犬拐杖检测数据集VOC+YOLO格式4635张2类别

数据集格式:Pascal VOC格式YOLO格式(不包含分割路径的txt文件,仅仅包含jpg图片以及对应的VOC格式xml文件和yolo格式txt文件) 图片数量(jpg文件个数):4635 标注数量(xml文件个数):4635 标注数量(txt文件个数):4635 标注…

【ubuntu】没有声音??连不上网络???

一. ubuntu 突然之后没有声音??? 卸载并重新加载 ALSA 驱动: 使用 alsa force-reload 命令来卸载并重新加载 ALSA 驱动: sudo alsa reload还不行?那就强制 reload sudo alsa force-reload二. ubuntu 突…

深入剖析CommonJS modules和ECMAScript modules

目录 前言CommonJS:服务器端模块化的先驱背景与起源语法与机制 ECMAScript Modules:现代前端的基石背景与起源语法与机制 比较与权衡语法差异加载机制编译时与运行时运行时行为构建第三方库现代开发环境 结论 前言 在 JavaScript 生态系统中&#xff0c…

RabbitMQ学习实践一:MQ的安装

文章是本人在学习springboot实现消息队列功能时所经历的过程的记录,仅供参考,如有侵权请随时指出。 参考文章地址: RabbitMQ安装与入门_rabbitmq win11配置-CSDN博客 RabbitMQ入门到实战一篇文章就够了-CSDN博客 RabbitMQ系列&#xff08…

【LeetCode】十五、回溯法:括号生成 + 子集

文章目录 1、回溯法2、leetcode22:括号生成3、leetcode78:子集 1、回溯法 使用场景,如找[1,2,3]的所有子集: 2、leetcode22:括号生成 以n2为例,即两个左括号、两个右括号&#xff0c…

汇编实验5

本实验在32位Linux虚拟机中完成(点击查看安装教程) 实验内容 二进制炸弹实际是由C语言源程序生成的可执行目标代码,主程序可参考bomb.c。运行时,会按次序提示用户输入3个不同的字符串。如果输入的字符串有误,炸弹就会…

随手记:vsCode修改主题色为自定义颜色

因为工作需要长时间面对vscode,视力不好,想要把工具改成护眼色,于是就把vscode改成了自定义的护眼色 效果图: 操作步骤: 快捷键打开设置页面: 按住ctrlshiftp 选择Open setting 按回车键 打开setting页面编…

FlagEval 7月榜丨新增29个模型评测结果,智源发布评估技术报告《AI大模型能力全景扫描》

智源研究院FlagEval 7月榜单新增29个语言、多模态和文生图开源与闭源模型评测结果,包括阿里巴巴、OpenAI、快手、智谱等厂商近期发布的新模型。 本次评测发现,大语言模型,国产模型主观能力整体有所提升;视觉语言新模型的能力有所…

ArduPilot开源代码之AP_DAL_RangeFinder

ArduPilot开源代码之AP_DAL_RangeFinder 1. 源由2. 框架设计2.1 枚举 Status2.2 公有方法2.3 私有成员变量 3. 重要例程3.1 应用函数3.1.1 ground_clearance_cm_orient3.1.2 max_distance_cm_orient3.1.3 has_orientation3.1.4 get_backend 3.2 其他函数3.2.1 AP_DAL_RangeFind…

git config

文章目录 1.简介2.格式3.选项4.示例参考文献 1.简介 安装完 Git 后,需要对 Git 环境进行一次配置,且只需要配置一次。程序升级时会保留配置信息。 你可以在任何时候再次通过运行命令来修改它们。 Git 自带一个 git config 的工具来设置控制 Git 外观和…

AI(Adobe lliustrator)教程+软件包

简介: 软件主要应用于印刷出版、海报书籍排版、专业插画、多媒体图像处理和互联网页面的制作等,也可以为线稿提供较高的精度和控制,适合生产任何小型设计到大型的复杂项目。 通常用于创建LOGO(商标或徽标),图标,插图…

【数据结构】线性结构——数组、链表、栈和队列

目录 前言 一、数组(Array) 1.1优点 1.2缺点 1.3适用场景 二、链表(Linked List) 2.1优点 2.2缺点 2.3适用场景 三、栈(Stack) 3.1优点 3.2缺点 3.3适用场景 四、队列(Queue) 4.1优点…

根目录满迁移docker文件

在 Ubuntu 下,迁移 Docker 的数据存储位置到另一个挂载点需要按照以下步骤进行操作。确保在操作之前备份重要数据,以防止意外情况发生。 步骤概述 停止 Docker 服务: bash sudo systemctl stop docker创建新的存储位置: 假设你有…

递归式函数

在java中&#xff0c;函数递归是会报编译错误的。比如我定义一个斐波那契函数&#xff1a; public class RecursiveFunction {public static void main(String[] args) {fibonacci x -> x < 3 ? 1 : fibonacci.apply(x - 1) fibonacci.apply(x - 2);} }它就报了这个错…

设计模式-三大分类

软件七大设计原则 1、单一职责 定义&#xff1a;每个类应该只有一个引起它变化的原因。 解释&#xff1a;一个类只负责一个功能&#xff0c;这样可以减少类之间的耦合&#xff0c;提高系统的可维护性和可扩展性。 2、开闭原则 定义&#xff1a;软件实体&#xff08;类、模块…

使用Dockerfile构建镜像

通过基础镜像 centos:7&#xff0c;在该镜像中安装 jdk 和 tomcat 以后将其制作为一个新的镜像 mscentos:7 创建目录 mkdir -p /kong/docker/dockerfile编写 Dockerfile 文件 vim DockerfileDockerfile 文件内容如下&#xff1a; # 指明构建的新镜像是来自于 centos:7 基础…

广义可加模型和光滑曲线拟合的R代码

&#x1f3c6;本文收录于《CSDN问答解答》专栏&#xff0c;主要记录项目实战过程中的Bug之前因后果及提供真实有效的解决方案&#xff0c;希望能够助你一臂之力&#xff0c;帮你早日登顶实现财富自由&#x1f680;&#xff1b;同时&#xff0c;欢迎大家关注&&收藏&…

jvm-并发-java基础-数据结构小测

这篇文章是一些练习题&#xff0c;答案后续更新。 请简述银行家算法 请简述死锁产生的条件 解决死锁的几种方式 简述synchronized锁的膨胀 什么是cas cas 的问题如何解决 jmm 简单理解 volatile 单例模式 线程安全的两种代码 懒汉&恶汉 线程池的7个参数分别是什么…

ABAQUS细观混凝土周期性边界(PBC)表征体元(REV)界面层(ITZ)及砂浆塑性损伤(CDP)模拟

混凝土的细观结构决定着其宏观破坏行为&#xff0c;对混凝土在结构尺度上采用细观模型将导致巨大的计算量而难以实现&#xff0c;表征体元&#xff08;‌REV&#xff09;‌方法可选取一定的平均范围来描述混凝土的性质和行为&#xff0c;这对于理解和模拟混凝土的损伤机理至关重…