aws(学习笔记第十二课) 使用AWS的RDS-MySQL

aws(学习笔记第十二课)

  • 使用AWS的RDS

学习内容:

  • AWS的RDS-MySQL

1. 使用AWS的RDS

  1. 什么是RDS
    RDS就是Relation Database Service的缩写,是AWS提供的托管关系型数据库系统。让用户能够在 AWS Cloud 云中更轻松地设置、操作和扩展关系数据库。

    • 数据库和web server服务器下的架构
      在这里插入图片描述
  2. 使用Cloudformation构建RDS以及AutoScaling
    注意mail地址的时候,要指定postgresql@163.com的形式,要用@加上domain的形式,否则,下面的wordpressinstall会报错,导致该cloudformation创建失败

    • Cloudformation代码
      {"AWSTemplateFormatVersion": "2010-09-09","Description": "AWS in Action: chapter 9","Parameters": {"KeyName": {"Description": "Key Pair name","Type": "AWS::EC2::KeyPair::KeyName","Default": "my-cli-key"},"BlogTitle": {"Description": "The title of the blog.","Type": "String","Default": "Amazon Web Services in Action - Example"},"AdminUsername": {"Description": "A username for admin.","Type": "String","Default": "admin"},"AdminPassword": {"Description": "A password for admin","Type": "String","NoEcho": "true"},"AdminEMail": {"Description": "The email address of the administrator.","Type": "String"}},"Mappings": {"EC2RegionMap": {"ap-northeast-1": {"AmazonLinuxAMIHVMEBSBacked64bit": "ami-cbf90ecb"},"ap-southeast-1": {"AmazonLinuxAMIHVMEBSBacked64bit": "ami-68d8e93a"},"ap-southeast-2": {"AmazonLinuxAMIHVMEBSBacked64bit": "ami-fd9cecc7"},"eu-central-1": {"AmazonLinuxAMIHVMEBSBacked64bit": "ami-a8221fb5"},"eu-west-1": {"AmazonLinuxAMIHVMEBSBacked64bit": "ami-a10897d6"},"sa-east-1": {"AmazonLinuxAMIHVMEBSBacked64bit": "ami-b52890a8"},"us-east-1": {"AmazonLinuxAMIHVMEBSBacked64bit": "ami-1ecae776"},"us-west-1": {"AmazonLinuxAMIHVMEBSBacked64bit": "ami-d114f295"},"us-west-2": {"AmazonLinuxAMIHVMEBSBacked64bit": "ami-e7527ed7"}}},"Resources": {"VPC": {"Type": "AWS::EC2::VPC","Properties": {"CidrBlock": "172.31.0.0/16","EnableDnsHostnames": "true"}},"InternetGateway": {"Type": "AWS::EC2::InternetGateway","Properties": {}},"VPCGatewayAttachment": {"Type": "AWS::EC2::VPCGatewayAttachment","Properties": {"VpcId": {"Ref": "VPC"},"InternetGatewayId": {"Ref": "InternetGateway"}}},"SubnetA": {"Type": "AWS::EC2::Subnet","Properties": {"AvailabilityZone": {"Fn::Select": ["0", {"Fn::GetAZs": ""}]},"CidrBlock": "172.31.38.0/24","VpcId": {"Ref": "VPC"}}},"SubnetB": {"Type": "AWS::EC2::Subnet","Properties": {"AvailabilityZone": {"Fn::Select": ["1", {"Fn::GetAZs": ""}]},"CidrBlock": "172.31.37.0/24","VpcId": {"Ref": "VPC"}}},"RouteTable": {"Type": "AWS::EC2::RouteTable","Properties": {"VpcId": {"Ref": "VPC"}}},"RouteTableAssociationA": {"Type": "AWS::EC2::SubnetRouteTableAssociation","Properties": {"SubnetId": {"Ref": "SubnetA"},"RouteTableId": {"Ref": "RouteTable"}}},"RouteTableAssociationB": {"Type": "AWS::EC2::SubnetRouteTableAssociation","Properties": {"SubnetId": {"Ref": "SubnetB"},"RouteTableId": {"Ref": "RouteTable"}}},"RoutePublicNATToInternet": {"Type": "AWS::EC2::Route","Properties": {"RouteTableId": {"Ref": "RouteTable"},"DestinationCidrBlock": "0.0.0.0/0","GatewayId": {"Ref": "InternetGateway"}},"DependsOn": "VPCGatewayAttachment"},"NetworkAcl": {"Type": "AWS::EC2::NetworkAcl","Properties": {"VpcId": {"Ref": "VPC"}}},"SubnetNetworkAclAssociationA": {"Type": "AWS::EC2::SubnetNetworkAclAssociation","Properties": {"SubnetId": {"Ref": "SubnetA"},"NetworkAclId": {"Ref": "NetworkAcl"}}},"SubnetNetworkAclAssociationB": {"Type": "AWS::EC2::SubnetNetworkAclAssociation","Properties": {"SubnetId": {"Ref": "SubnetB"},"NetworkAclId": {"Ref": "NetworkAcl"}}},"NetworkAclEntryIngress": {"Type": "AWS::EC2::NetworkAclEntry","Properties": {"NetworkAclId": {"Ref": "NetworkAcl"},"RuleNumber": "100","Protocol": "-1","RuleAction": "allow","Egress": "false","CidrBlock": "0.0.0.0/0"}},"NetworkAclEntryEgress": {"Type": "AWS::EC2::NetworkAclEntry","Properties": {"NetworkAclId": {"Ref": "NetworkAcl"},"RuleNumber": "100","Protocol": "-1","RuleAction": "allow","Egress": "true","CidrBlock": "0.0.0.0/0"}},"LoadBalancer": {"Type": "AWS::ElasticLoadBalancing::LoadBalancer","Properties": {"Subnets": [{"Ref": "SubnetA"}, {"Ref": "SubnetB"}],"LoadBalancerName": "awsinaction-elb","Listeners": [{"InstancePort": "80","InstanceProtocol": "HTTP","LoadBalancerPort": "80","Protocol": "HTTP"}],"HealthCheck": {"HealthyThreshold": "2","Interval": "5","Target": "TCP:80","Timeout": "3","UnhealthyThreshold": "2"},"SecurityGroups": [{"Ref": "LoadBalancerSecurityGroup"}],"Scheme": "internet-facing"},"DependsOn": "VPCGatewayAttachment"},"LoadBalancerSecurityGroup": {"Type": "AWS::EC2::SecurityGroup","Properties": {"GroupDescription": "awsinaction-elb-sg","VpcId": {"Ref": "VPC"},"SecurityGroupIngress": [{"CidrIp": "0.0.0.0/0","FromPort": 80,"IpProtocol": "tcp","ToPort": 80}]}},"WebServerSecurityGroup": {"Type": "AWS::EC2::SecurityGroup","Properties": {"GroupDescription": "awsinaction-sg","VpcId": {"Ref": "VPC"},"SecurityGroupIngress": [{"CidrIp": "0.0.0.0/0","FromPort": 22,"IpProtocol": "tcp","ToPort": 22}, {"FromPort": 80,"IpProtocol": "tcp","SourceSecurityGroupId": {"Ref": "LoadBalancerSecurityGroup"},"ToPort": 80}]}},"DatabaseSecurityGroup": {"Type": "AWS::EC2::SecurityGroup","Properties": {"GroupDescription": "awsinaction-db-sg","VpcId": {"Ref": "VPC"},"SecurityGroupIngress": [{"IpProtocol": "tcp","FromPort": "3306","ToPort": "3306","SourceSecurityGroupId": {"Ref": "WebServerSecurityGroup"}}]}},"Database": {"Type": "AWS::RDS::DBInstance","DeletionPolicy": "Delete","Properties": {"AllocatedStorage": "25","DBInstanceClass": "db.t3.medium","DBInstanceIdentifier": "awsinaction-db","DBName": "wordpress","Engine": "MySQL","EngineVersion": "5.7","MasterUsername": "wordpress","MasterUserPassword": "wordpress","VPCSecurityGroups": [{"Fn::GetAtt": ["DatabaseSecurityGroup", "GroupId"]}],"DBSubnetGroupName": {"Ref": "DBSubnetGroup"}},"DependsOn": "VPCGatewayAttachment"},"DBSubnetGroup" : {"Type" : "AWS::RDS::DBSubnetGroup","Properties" : {"DBSubnetGroupDescription" : "DB subnet group","SubnetIds": [{"Ref": "SubnetA"}, {"Ref": "SubnetB"}]}},"LaunchTemplate": {"Type": "AWS::EC2::LaunchTemplate","Metadata": {"AWS::CloudFormation::Init": {"config": {"packages": {"yum": {"php": [],"php-mysql": [],"mysql": [],"httpd": []}},"sources": {"/var/www/html": "https://wordpress.org/wordpress-4.2.4.tar.gz"},"files": {"/tmp/config": {"content": {"Fn::Join": ["", ["#!/bin/bash -ex\n","cp /var/www/html/wordpress/wp-config-sample.php /var/www/html/wordpress/wp-config.php\n","sed -i \"s/'database_name_here'/'wordpress'/g\" wp-config.php\n","sed -i \"s/'username_here'/'wordpress'/g\" wp-config.php\n","sed -i \"s/'password_here'/'wordpress'/g\" wp-config.php\n","sed -i \"s/'localhost'/'", {"Fn::GetAtt": ["Database", "Endpoint.Address"]}, "'/g\" wp-config.php\n","chmod -R 777 wp-content/ \n","curl -O https://raw.githubusercontent.com/AWSinAction/builds/gh-pages/phar/wp-cli.phar \n","php wp-cli.phar core install --url=\"", {"Fn::GetAtt": ["LoadBalancer", "DNSName"]}, "/wordpress\" --title=\"", {"Ref": "BlogTitle"}, "\" --admin_user=\"", {"Ref": "AdminUsername"}, "\" --admin_password=\"", {"Ref": "AdminPassword"}, "\" --admin_email=\"", {"Ref": "AdminEMail"}, "\" \n"								]]},"mode": "000500","owner": "root","group": "root"}},"commands": {"01_config": {"command": "/tmp/config","cwd": "/var/www/html/wordpress"}},"services": {"sysvinit": {"httpd": {"enabled": "true","ensureRunning": "true"}}}}}},"Properties": {"LaunchTemplateName": "LaunchTemplate","LaunchTemplateData":{"EbsOptimized": false,"ImageId": {"Fn::FindInMap": ["EC2RegionMap", {"Ref": "AWS::Region"}, "AmazonLinuxAMIHVMEBSBacked64bit"]},"InstanceType": "t2.micro","NetworkInterfaces":[{"DeviceIndex":0,"AssociatePublicIpAddress":true,"Groups":[{"Ref": "WebServerSecurityGroup"}],"DeleteOnTermination":true}],"KeyName": {"Ref": "KeyName"},"UserData": {"Fn::Base64": {"Fn::Join": ["", ["#!/bin/bash -ex\n","yum update -y aws-cfn-bootstrap\n","/opt/aws/bin/cfn-init -v --stack ", {"Ref": "AWS::StackName"}, " --resource LaunchTemplate --region ", {"Ref": "AWS::Region"}, "\n","/opt/aws/bin/cfn-signal -e $? --stack ", {"Ref": "AWS::StackName"}, " --resource AutoScalingGroup --region ", {"Ref": "AWS::Region"}, "\n"]]}}}}},"AutoScalingGroup": {"Type": "AWS::AutoScaling::AutoScalingGroup","Properties": {"LoadBalancerNames": [{"Ref": "LoadBalancer"}],"LaunchTemplate" : {"LaunchTemplateId" : {"Ref" : "LaunchTemplate"},"Version" : {"Fn::GetAtt" : ["LaunchTemplate","LatestVersionNumber"]}},"MinSize": "2","MaxSize": "2","DesiredCapacity": "2","VPCZoneIdentifier": [{"Ref": "SubnetA"}, {"Ref": "SubnetB"}]},"CreationPolicy": {"ResourceSignal": {"Timeout": "PT10M"}},"DependsOn": "VPCGatewayAttachment"}},"Outputs": {"URL": {"Value": {"Fn::Join": ["", ["http://", {"Fn::GetAtt": ["LoadBalancer", "DNSName"]}, "/wordpress"]]},"Description": "Wordpress URL"}}
      }
      
  3. 逐步解析整个Cloudformation

    • 定义VPC以及两个subnet

      • 代码
        "VPC": {"Type": "AWS::EC2::VPC","Properties": {"CidrBlock": "172.31.0.0/16","EnableDnsHostnames": "true"}},"InternetGateway": {"Type": "AWS::EC2::InternetGateway","Properties": {}},"VPCGatewayAttachment": {"Type": "AWS::EC2::VPCGatewayAttachment","Properties": {"VpcId": {"Ref": "VPC"},"InternetGatewayId": {"Ref": "InternetGateway"}}},"SubnetA": {"Type": "AWS::EC2::Subnet","Properties": {"AvailabilityZone": {"Fn::Select": ["0", {"Fn::GetAZs": ""}]},"CidrBlock": "172.31.38.0/24","VpcId": {"Ref": "VPC"}}},"SubnetB": {"Type": "AWS::EC2::Subnet","Properties": {"AvailabilityZone": {"Fn::Select": ["1", {"Fn::GetAZs": ""}]},"CidrBlock": "172.31.37.0/24","VpcId": {"Ref": "VPC"}}},
        
      • 系统构成 系统构成图
      • 代码解析
        • 定义了一个VPC
        • 定义了一个InternetGateway,并将其attachVPC上。
        • 定义了两个subnet,其中每个subnet都在一个AvailabilityZoneAZ)里面。
    • 定义RouterRouteTable,并附加在两个subnet

      • 代码
        "RouteTable": {"Type": "AWS::EC2::RouteTable","Properties": {"VpcId": {"Ref": "VPC"}}},"RouteTableAssociationA": {"Type": "AWS::EC2::SubnetRouteTableAssociation","Properties": {"SubnetId": {"Ref": "SubnetA"},"RouteTableId": {"Ref": "RouteTable"}}},"RouteTableAssociationB": {"Type": "AWS::EC2::SubnetRouteTableAssociation","Properties": {"SubnetId": {"Ref": "SubnetB"},"RouteTableId": {"Ref": "RouteTable"}}},"RoutePublicNATToInternet": {"Type": "AWS::EC2::Route","Properties": {"RouteTableId": {"Ref": "RouteTable"},"DestinationCidrBlock": "0.0.0.0/0","GatewayId": {"Ref": "InternetGateway"}},"DependsOn": "VPCGatewayAttachment"},
        
        • 对应的系统构成
          在这里插入图片描述
          注意,"DependsOn": "VPCGatewayAttachment",因为需要0.0.0.0路由到InternetGateway的时候,需要VPC attach到InternetGateway作为先行条件,所以加上DependsOn
        • 代码解析
          • 定义一个RouteTable,指定VPC
          • 将这个RouteTable附加到subnet A
          • 将这个RouteTable附加到subnet B
          • 给路由表RouteTable加上路由RouteEC2如果想要访问Internet网络,那么经由InternetGateway
    • 定义RouterRouteTable,并附加在两个subnet

      • 代码

        		"NetworkAcl": {"Type": "AWS::EC2::NetworkAcl","Properties": {"VpcId": {"Ref": "VPC"}}},"SubnetNetworkAclAssociationA": {"Type": "AWS::EC2::SubnetNetworkAclAssociation","Properties": {"SubnetId": {"Ref": "SubnetA"},"NetworkAclId": {"Ref": "NetworkAcl"}}},"SubnetNetworkAclAssociationB": {"Type": "AWS::EC2::SubnetNetworkAclAssociation","Properties": {"SubnetId": {"Ref": "SubnetB"},"NetworkAclId": {"Ref": "NetworkAcl"}}},"NetworkAclEntryIngress": {"Type": "AWS::EC2::NetworkAclEntry","Properties": {"NetworkAclId": {"Ref": "NetworkAcl"},"RuleNumber": "100","Protocol": "-1","RuleAction": "allow","Egress": "false","CidrBlock": "0.0.0.0/0"}},"NetworkAclEntryEgress": {"Type": "AWS::EC2::NetworkAclEntry","Properties": {"NetworkAclId": {"Ref": "NetworkAcl"},"RuleNumber": "100","Protocol": "-1","RuleAction": "allow","Egress": "true","CidrBlock": "0.0.0.0/0"}},
        
      • 系统构成
        在这里插入图片描述

      • 代码解析

        • 定义一个NetworkAcl
        • 定义两个SubnetNetworkAclAssociation,一个是从0.0.0.0入站(egress = true)的网络都开放,另一个是从subnet出站(egress = true)到0.0.0.0的都开放
    • 定义一个LoadBalancer以及security group

      • 代码
        "LoadBalancer": {"Type": "AWS::ElasticLoadBalancing::LoadBalancer","Properties": {"Subnets": [{"Ref": "SubnetA"}, {"Ref": "SubnetB"}],"LoadBalancerName": "awsinaction-elb","Listeners": [{"InstancePort": "80","InstanceProtocol": "HTTP","LoadBalancerPort": "80","Protocol": "HTTP"}],"HealthCheck": {"HealthyThreshold": "2","Interval": "5","Target": "TCP:80","Timeout": "3","UnhealthyThreshold": "2"},"SecurityGroups": [{"Ref": "LoadBalancerSecurityGroup"}],"Scheme": "internet-facing"},"DependsOn": "VPCGatewayAttachment"},"LoadBalancerSecurityGroup": {"Type": "AWS::EC2::SecurityGroup","Properties": {"GroupDescription": "awsinaction-elb-sg","VpcId": {"Ref": "VPC"},"SecurityGroupIngress": [{"CidrIp": "0.0.0.0/0","FromPort": 80,"IpProtocol": "tcp","ToPort": 80}]}},
        
      • 系统构成
        在这里插入图片描述
      • 代码解析
        • 定义一个LoadBalancer
        • 定义一个LoadBalancerSecurityGroup,开放internetLoadBalancer80端口访问
    • 定义WebServerSecurityGroup

      • 代码
        "WebServerSecurityGroup": {"Type": "AWS::EC2::SecurityGroup","Properties": {"GroupDescription": "awsinaction-sg","VpcId": {"Ref": "VPC"},"SecurityGroupIngress": [{"CidrIp": "0.0.0.0/0","FromPort": 22,"IpProtocol": "tcp","ToPort": 22}, {"FromPort": 80,"IpProtocol": "tcp","SourceSecurityGroupId": {"Ref": "LoadBalancerSecurityGroup"},"ToPort": 80}]}},
        
      • 系统构成
        在这里插入图片描述
        • 代码解析
          • 定义一个WebServerSecurityGroup
          • 允许internet访问22端口
          • 只允许LoadBalancerSecurityGroup所属的主机访问80端口
    • 定义数据库和数据所在的security group

      • 代码
        "DatabaseSecurityGroup": {"Type": "AWS::EC2::SecurityGroup","Properties": {"GroupDescription": "awsinaction-db-sg","VpcId": {"Ref": "VPC"},"SecurityGroupIngress": [{"IpProtocol": "tcp","FromPort": "3306","ToPort": "3306","SourceSecurityGroupId": {"Ref": "WebServerSecurityGroup"}}]}},"Database": {"Type": "AWS::RDS::DBInstance","DeletionPolicy": "Delete","Properties": {"AllocatedStorage": "25","DBInstanceClass": "db.t3.medium","DBInstanceIdentifier": "awsinaction-db","DBName": "wordpress","Engine": "MySQL","EngineVersion": "5.7","MasterUsername": "wordpress","MasterUserPassword": "wordpress","VPCSecurityGroups": [{"Fn::GetAtt": ["DatabaseSecurityGroup", "GroupId"]}],"DBSubnetGroupName": {"Ref": "DBSubnetGroup"}},"DependsOn": "VPCGatewayAttachment"},"DBSubnetGroup" : {"Type" : "AWS::RDS::DBSubnetGroup","Properties" : {"DBSubnetGroupDescription" : "DB subnet group","SubnetIds": [{"Ref": "SubnetA"}, {"Ref": "SubnetB"}]}},
        

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

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

相关文章

云原生-docker安装与基础操作

一、云原生 Docker 介绍 Docker 在云原生中的优势 二、docker的安装 三、docker的基础命令 1. docker pull(拉取镜像) 2. docker images(查看本地镜像) 3. docker run(创建并启动容器) 4. docker ps…

Spark 核心概念与宽窄依赖的详细解析

Spark 的介绍与搭建:从理论到实践_spark环境搭建-CSDN博客 Spark 的Standalone集群环境安装与测试-CSDN博客 PySpark 本地开发环境搭建与实践-CSDN博客 Spark 程序开发与提交:本地与集群模式全解析-CSDN博客 Spark on YARN:Spark集群模式…

【css】html里面的图片宽度设为百分比,高度要与宽度一样

场景&#xff1a;展示图片列表的时候&#xff0c;原始图片宽高不一致。 外层div的宽度自适应&#xff0c;图片宽度不能固定数值&#xff0c;只能设置百分比。图片高度也不能设置固定数值。 如何让图片的高度与图片的宽度一样呢&#xff1f; html代码 &#xff1a; <div cl…

c#使用COM接口设置excel单元格宽高匹配图片,如何计算?

c#使用COM接口设置excel单元格宽高如何换算 在实际工作中&#xff0c;经常需要在excel中插入图片。并设置单元格与图片对齐。但是excel单元格的宽度和高度使用不同的单位。单元格的宽度以字符宽度为单位&#xff0c;而高度以点为单位。如果按照实际值来设置&#xff0c;例如设…

RHCE web解析、dns配置、firewalld配置实验

RHCE web解析、dns配置、firewalld配置实验 实验一1.清理软件包2.安装软件包3.配置web服务查看默认测试页面报错讲解12 4.安装DNS解析需要的bind软件包5.修改网络配置&#xff0c;查错&#xff0c;修改权限 实验二配置文件haha.confnamed.confnamed.haha 实验一 1、学习方法 重…

JavaEE进阶----SpringMVC(三)---响应的获取

文章目录 1.cookie和session获取1.1servlet写法获取1.2spring获取cookie1.3传统方法获取session1.4sring获取session内容 2.访问静态页面3.一个项目部署多个服务4.responsebody的介绍5.返回html的片段6.不同相应content-type类型6.1text/html类型6.2application-json类型6.3 js…

Chromium 中MemoryMappedFile使用例子c++

文件映射基础介绍参考微软官网&#xff1a; 使用文件映射 - Win32 apps | Microsoft Learn 在文件中创建视图 - Win32 apps | Microsoft Learn 创建命名的共享内存 - Win32 apps | Microsoft Learn 使用大页面创建文件映射 - Win32 apps | Microsoft Learn 从文件句柄获取…

OpenHarmony4.1蓝牙芯片如何适配?触觉智能RK3568主板SBC3568演示

当打开蓝牙后没有反应时&#xff0c;需要排查蓝牙节点是否对应、固件是否加载成功&#xff0c;本文介绍开源鸿蒙OpenHarmony4.1系统下适配蓝牙的方法&#xff0c;触觉智能SBC3568主板演示 修改对应节点 开发板蓝牙硬件连接为UART1&#xff0c;修改对应的节点&#xff0c;路径为…

前端 JS面向对象 原型 prototype

目录 一、问题引出 二、prototype原型对象 三、小结 四、constructor 五、__proto__对象原型 六、原型链 一、问题引出 由于JS的构造函数存在内存浪费问题&#xff1a; function Star(name,age){this.namenamethis.ageagethis.singfunction () {console.log("唱歌&…

生成 Django 中文文档 PDF 版

文章目录 背景克隆 Django 文档和翻译仓库配置 conf.py设置和同步翻译生成 .pot 文件运行 sphinx-intl update复制翻译文件 构建 PDF生成 tex 文件安装 MikTeX生成 PDF Sphinx 生成文档 背景 浏览看到一个帖子&#xff0c;有个评论说可以用 sphinx 构建一个 pdf&#xff0c;正…

mysql 实现分库分表之 --- 基于 MyCAT 的分片策略详解

引言 在我们日常工作的项目中&#xff0c;特别是面向 C 端用户的产品&#xff0c;随着业务量的逐步扩大&#xff0c;数据量也呈指数级增长。为了应对日益增长的数据库压力&#xff0c;数据库优化已成为项目中不可或缺的一环&#xff0c;而分库分表则是海量数据优化方案中的重要…

JUC-locks锁

JUC-locks锁 1、JUC-locks锁概述2、管程模型3、ReentrantLock可重入锁3.1 ReentrantLock源码3.2 Sync静态内部类3.3 NonfairSync非公平锁3.4 FairSync公平锁 如有侵权&#xff0c;请联系&#xff5e; 如有错误&#xff0c;也欢迎批评指正&#xff5e; 1、JUC-locks锁概述 java…

GEE 数据集——美国gNATSGO(网格化国家土壤调查地理数据库)完整覆盖了美国所有地区和岛屿领土的最佳可用土壤信息

目录 简介 代码 引用 网址推荐 知识星球 机器学习 gNATSGO&#xff08;网格化国家土壤调查地理数据库&#xff09; 简介 gNATSGO&#xff08;网格化国家土壤调查地理数据库&#xff09;数据库是一个综合数据库&#xff0c;完整覆盖了美国所有地区和岛屿领土的最佳可用土…

kettle开发-Day43-数据对比

前言&#xff1a; 随着数字化的深入&#xff0c;各种系统及烟囱的建立&#xff0c;各系统之间的架构和数据存储方式不同&#xff0c;导致做数据仓库或数据湖时发现&#xff0c;因自建的系统或者非标准化的系统经常存在物理删除而不是软删除。这就延伸出一个问题&#xff0c;经常…

哪款开放式耳机好用?5款实力出众的开放式耳机按头安利!

随着耳机市场日益火爆&#xff0c;许多品牌与款式不断涌现。但是&#xff0c;不少劣质产品在核心性能上缺乏专业优化&#xff0c;且选用低质材料&#xff0c;在音质还原度和佩戴舒适性等关键方面存在明显短板&#xff0c;导致性能欠佳&#xff0c;聆听体验不佳&#xff0c;还可…

Unity资源打包Addressable资源保存在项目中

怎么打包先看“Unity资源打包Addressable AA包” 其中遗留一个问题&#xff0c;下载下来的资源被保存在C盘中了&#xff0c;可不可以保存在项目中呢&#xff1f;可以。 新建了一个项目&#xff0c;路径与“Unity资源打包Addressable AA包”都不相同了 1.创建资源缓存路径 在…

矩阵的各种计算:乘法、逆矩阵、转置、行列式等——基于Excel实现

在Excel中,可以使用内置的函数和公式来实现矩阵的各种计算。以下是具体方法: 矩阵乘法: 使用MMULT函数。如图矩阵A在单元格范围A1:B2,矩阵B在单元格范围D1:E2,结果矩阵的左上角单元格为G1:选中结果矩阵的区域(如G1:H2)。输入公式:=MMULT(A1:B2, D1:E2)。按Ctrl+Shift…

[ComfyUI]Flux:繁荣生态魔盒已开启,6款LORA已来,更有MJ6写实动漫风景艺术迪士尼全套

今天&#xff0c;我们将向您介绍一款非常实用的工具——[ComfyUI]Flux。这是一款基于Stable Diffusion的AI绘画工具&#xff0c;旨在为您提供一键式生成图像的便捷体验。无论您是AI绘画的新手还是专业人士&#xff0c;这个工具都能为您带来极大的便利。 在这个教程中&#xff…

【设计模式】关联关系与依赖关系

UML 图将事物之间的联系分为 6 种&#xff1a;关联、依赖、聚合、组合、泛化、实现 我认为关联关系和依赖关系非常不好理解。 我们看下定义&#xff1a; 关联&#xff1a;表示一种拥有的关系。具有方向性。如果一个类单方向的访问另一个类&#xff0c;称为单向关联。如果两个类…

前端Cypress自动化测试全网详解

Cypress 自动化测试详解&#xff1a;从安装到实战 Cypress 是一个强大的端到端&#xff08;End-to-End, E2E&#xff09;功能测试框架&#xff0c;基于 Node.js 构建&#xff0c;支持本地浏览器直接模拟测试&#xff0c;并具有测试录屏功能&#xff0c;极大地方便了测试失败时的…