麒麟操作系统搭建Nacos集群

news/2024/9/18 23:46:15 标签: java, spring cloud, spring

Nacos 集群搭建 2.4.2

文章目录

  • 1. 安装JDK
  • 2. 下载安装Nacos
  • 3. 启动服务
    • 3.1 准备数据库表
    • 3.2 服务启动
  • 4. 安装nginx
    • 4.1 安装前提(可选)
    • 4.2 安装nginx
    • 4.3 修改nginx配置文件
  • 5. nacos 负载
    • 5.1 编写配置文件
    • 5.2 启动nginx

环境介绍

操作系统Kylin Linux Advanced Server V10 (Lance)Kylin Linux Advanced Server V10 (Lance)Kylin Linux Advanced Server V10 (Lance)
内核版本Linux 4.19.90-52.22.v2207.ky10.aarch64Linux 4.19.90-52.22.v2207.ky10.aarch64Linux 4.19.90-52.22.v2207.ky10.aarch64
IP192.168.31.82192.168.31.83192.168.31.84
Nacos2.4.22.4.22.4.2

使用外置数据源

生产使用建议至少主备模式,或者采用高可用数据库。

nacos集群部署官方文档

1. 安装JDK

# 解压
# 下载地址 https://d.injdk.cn/download/oraclejdk/8/jdk-8u381-linux-aarch64.tar.gz
tar -zxvf jdk-8u381-linux-aarch64.tar.gz

# 创建文件夹
mkdir -p /usr/local/java

# 移动目录
mv jdk1.8.0_381 /usr/local/java

# 配置环境变量
vi /etc/profile.d/jdk.sh

#!/bin/bash
export JAVA_HOME=/usr/local/java/jdk1.8.0_381
export PATH=${PATH}:${JAVA_HOME}/bin

# 启用
source /etc/profile.d/jdk.sh

# 验证
java -version

2. 下载安装Nacos

# 下载地址
# yum install -y wget
wget https://github.com/alibaba/nacos/releases/download/2.4.2/nacos-server-2.4.2.tar.gz


# 移动
mv nacos /usr/local

# 修改配置文件
cd /usr/local/nacos/conf
cp /usr/local/nacos/conf/cluster.conf.example /usr/local/nacos/conf/cluster.conf

# 修改配置
192.168.31.82:8848
192.168.31.83:8848
192.168.31.84:8848


# 导入数据库脚本


# 修改配置文件application.properties

spring.datasource.platform=mysql
db.num=1

### Connect URL of DB:
db.url.0=jdbc:mysql://IP:端口/nacos?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
db.user.0=root
db.password.0=yuanfang_2024

3. 启动服务

3.1 准备数据库表

数据库表

如果访问不了复制下面sql即可 前提数据库中得有nacos这个数据库,如果没有则创建

/*
 * Copyright 1999-2018 Alibaba Group Holding Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/******************************************/
/*   表名称 = config_info                  */
/******************************************/
CREATE TABLE `config_info` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) DEFAULT NULL COMMENT 'group_id',
  `content` longtext NOT NULL COMMENT 'content',
  `md5` varchar(32) DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `src_user` text COMMENT 'source user',
  `src_ip` varchar(50) DEFAULT NULL COMMENT 'source ip',
  `app_name` varchar(128) DEFAULT NULL COMMENT 'app_name',
  `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段',
  `c_desc` varchar(256) DEFAULT NULL COMMENT 'configuration description',
  `c_use` varchar(64) DEFAULT NULL COMMENT 'configuration usage',
  `effect` varchar(64) DEFAULT NULL COMMENT '配置生效的描述',
  `type` varchar(64) DEFAULT NULL COMMENT '配置的类型',
  `c_schema` text COMMENT '配置的模式',
  `encrypted_data_key` varchar(1024) NOT NULL DEFAULT '' COMMENT '密钥',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_configinfo_datagrouptenant` (`data_id`,`group_id`,`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info';

/******************************************/
/*   表名称 = config_info_aggr             */
/******************************************/
CREATE TABLE `config_info_aggr` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) NOT NULL COMMENT 'group_id',
  `datum_id` varchar(255) NOT NULL COMMENT 'datum_id',
  `content` longtext NOT NULL COMMENT '内容',
  `gmt_modified` datetime NOT NULL COMMENT '修改时间',
  `app_name` varchar(128) DEFAULT NULL COMMENT 'app_name',
  `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_configinfoaggr_datagrouptenantdatum` (`data_id`,`group_id`,`tenant_id`,`datum_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='增加租户字段';


/******************************************/
/*   表名称 = config_info_beta             */
/******************************************/
CREATE TABLE `config_info_beta` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) NOT NULL COMMENT 'group_id',
  `app_name` varchar(128) DEFAULT NULL COMMENT 'app_name',
  `content` longtext NOT NULL COMMENT 'content',
  `beta_ips` varchar(1024) DEFAULT NULL COMMENT 'betaIps',
  `md5` varchar(32) DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `src_user` text COMMENT 'source user',
  `src_ip` varchar(50) DEFAULT NULL COMMENT 'source ip',
  `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段',
  `encrypted_data_key` varchar(1024) NOT NULL DEFAULT '' COMMENT '密钥',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_configinfobeta_datagrouptenant` (`data_id`,`group_id`,`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_beta';

/******************************************/
/*   表名称 = config_info_tag              */
/******************************************/
CREATE TABLE `config_info_tag` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) NOT NULL COMMENT 'group_id',
  `tenant_id` varchar(128) DEFAULT '' COMMENT 'tenant_id',
  `tag_id` varchar(128) NOT NULL COMMENT 'tag_id',
  `app_name` varchar(128) DEFAULT NULL COMMENT 'app_name',
  `content` longtext NOT NULL COMMENT 'content',
  `md5` varchar(32) DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `src_user` text COMMENT 'source user',
  `src_ip` varchar(50) DEFAULT NULL COMMENT 'source ip',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_configinfotag_datagrouptenanttag` (`data_id`,`group_id`,`tenant_id`,`tag_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_tag';

/******************************************/
/*   表名称 = config_tags_relation         */
/******************************************/
CREATE TABLE `config_tags_relation` (
  `id` bigint(20) NOT NULL COMMENT 'id',
  `tag_name` varchar(128) NOT NULL COMMENT 'tag_name',
  `tag_type` varchar(64) DEFAULT NULL COMMENT 'tag_type',
  `data_id` varchar(255) NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) NOT NULL COMMENT 'group_id',
  `tenant_id` varchar(128) DEFAULT '' COMMENT 'tenant_id',
  `nid` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'nid, 自增长标识',
  PRIMARY KEY (`nid`),
  UNIQUE KEY `uk_configtagrelation_configidtag` (`id`,`tag_name`,`tag_type`),
  KEY `idx_tenant_id` (`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_tag_relation';

/******************************************/
/*   表名称 = group_capacity               */
/******************************************/
CREATE TABLE `group_capacity` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `group_id` varchar(128) NOT NULL DEFAULT '' COMMENT 'Group ID,空字符表示整个集群',
  `quota` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '配额,0表示使用默认值',
  `usage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用量',
  `max_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限,单位为字节,0表示使用默认值',
  `max_aggr_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数,,0表示使用默认值',
  `max_aggr_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值',
  `max_history_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_group_id` (`group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='集群、各Group容量信息表';

/******************************************/
/*   表名称 = his_config_info              */
/******************************************/
CREATE TABLE `his_config_info` (
  `id` bigint(20) unsigned NOT NULL COMMENT 'id',
  `nid` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'nid, 自增标识',
  `data_id` varchar(255) NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) NOT NULL COMMENT 'group_id',
  `app_name` varchar(128) DEFAULT NULL COMMENT 'app_name',
  `content` longtext NOT NULL COMMENT 'content',
  `md5` varchar(32) DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `src_user` text COMMENT 'source user',
  `src_ip` varchar(50) DEFAULT NULL COMMENT 'source ip',
  `op_type` char(10) DEFAULT NULL COMMENT 'operation type',
  `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段',
   `encrypted_data_key` varchar(1024) NOT NULL DEFAULT '' COMMENT '密钥',
  PRIMARY KEY (`nid`),
  KEY `idx_gmt_create` (`gmt_create`),
  KEY `idx_gmt_modified` (`gmt_modified`),
  KEY `idx_did` (`data_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='多租户改造';


/******************************************/
/*   表名称 = tenant_capacity              */
/******************************************/
CREATE TABLE `tenant_capacity` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `tenant_id` varchar(128) NOT NULL DEFAULT '' COMMENT 'Tenant ID',
  `quota` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '配额,0表示使用默认值',
  `usage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用量',
  `max_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限,单位为字节,0表示使用默认值',
  `max_aggr_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数',
  `max_aggr_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值',
  `max_history_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_tenant_id` (`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='租户容量信息表';


CREATE TABLE `tenant_info` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `kp` varchar(128) NOT NULL COMMENT 'kp',
  `tenant_id` varchar(128) default '' COMMENT 'tenant_id',
  `tenant_name` varchar(128) default '' COMMENT 'tenant_name',
  `tenant_desc` varchar(256) DEFAULT NULL COMMENT 'tenant_desc',
  `create_source` varchar(32) DEFAULT NULL COMMENT 'create_source',
  `gmt_create` bigint(20) NOT NULL COMMENT '创建时间',
  `gmt_modified` bigint(20) NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_tenant_info_kptenantid` (`kp`,`tenant_id`),
  KEY `idx_tenant_id` (`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='tenant_info';

CREATE TABLE `users` (
	`username` varchar(50) NOT NULL PRIMARY KEY COMMENT 'username',
	`password` varchar(500) NOT NULL COMMENT 'password',
	`enabled` boolean NOT NULL COMMENT 'enabled'
);

CREATE TABLE `roles` (
	`username` varchar(50) NOT NULL COMMENT 'username',
	`role` varchar(50) NOT NULL COMMENT 'role',
	UNIQUE INDEX `idx_user_role` (`username` ASC, `role` ASC) USING BTREE
);

CREATE TABLE `permissions` (
    `role` varchar(50) NOT NULL COMMENT 'role',
    `resource` varchar(128) NOT NULL COMMENT 'resource',
    `action` varchar(8) NOT NULL COMMENT 'action',
    UNIQUE INDEX `uk_role_permission` (`role`,`resource`,`action`) USING BTREE
);


3.2 服务启动

# 编写nacos启动服务
vim /usr/lib/systemd/system/nacos.service

[Unit]
Description=Nacos Service
After=network.target

[Service]
# 必须添加换成jdk的环境
Environment="JAVA_HOME=/usr/local/java/jdk1.8.0_381"
Type=forking
ExecStart=/bin/bash /usr/local/nacos/bin/startup.sh
ExecReload=/bin/bash /usr/local/nacos/bin/shutdown.sh
ExecStop=/bin/bash /usr/local/nacos/bin/shutdown.sh
#是否分配独立空间
PrivateTmp=true

[Install]
WantedBy=multi-user.target

# 增加可执行权限
chmod a+x  /usr/lib/systemd/system/nacos.service 

# 重新加载
systemctl daemon-reload

# 启动
systemctl start nacos

# 查看状态
systemctl status nacos

# 重启
systemctl restart nacos

4. 安装nginx

4.1 安装前提(可选)

# 检查电脑是否安装了 pcre-config openssl 如果没有则安装
# 下载pcre(其他)
wget http://downloads.sourceforge.net/project/pcre/pcre/8.37/pcre-8.37.tar.gz

# 解压
tar -zxvf pcre-8.37.tar.gz

# 进入目录
cd pcre-8.37

# 编译安装
./configure
make install

# 检测是否安装成功
pcre-config --version

# 下载 openssl(其他)
https://github.com/openssl/openssl/releases/download/openssl-3.2.1/openssl-3.2.1.tar.gz

# 解压
tar -zxvf openssl-3.2.1.tar.gz

# 进入目录
cd openssl-3.2.1

# 编译安装
./config 

make install

# 安装zlib
yum -y install zlib zlib-devel libtool

4.2 安装nginx

# 官方地址
https://nginx.org/en/download.html

# 下载
mkdir -p /opt/software/nginx && cd /opt/software/nginx
wget https://nginx.org/download/nginx-1.26.2.tar.gz

# 解压
tar -zxvf nginx-1.26.2.tar.gz

# 进入到nginx目录编译安装
cd nginx-1.26.2

# 编译安装
./configure --prefix=/usr/local/nginx-1.26.2 \
--user=root \
--group=root \
--with-http_ssl_module \
--with-http_v2_module \
--with-http_realip_module \
--with-http_stub_status_module \
--with-http_gzip_static_module \
--with-pcre \
--with-stream \
--with-stream_ssl_module \
--with-stream_realip_module \
--with-mail \
--with-mail_ssl_module

# 安装
make && make install

# 创建软连接文件 方便后面升级
ln -s /usr/local/nginx-1.26.2 /usr/local/nginx

# 配置环境变量
vi /etc/profile.d/nginx.sh

#!/bin/bash

export NGINX_HOME=/usr/local/nginx
export PATH="${NGINX_HOME}/sbin:$PATH"

# 生效
source /etc/profile.d/nginx.sh

# 编写nginx服务
vi /usr/lib/systemd/system/nginx.service
[Unit]
Description=The nginx HTTP and reverse proxy server
After=network-online.target remote-fs.target nss-lookup.target
Wants=network-online.target

[Service]
Type=forking
PIDFile=/usr/local/nginx/logs/nginx.pid
ExecStartPre=/usr/bin/rm -f /usr/local/nginx/logs/nginx.pid
ExecStartPre=/usr/local/nginx/sbin/nginx -t
ExecStart=/usr/local/nginx/sbin/nginx
ExecReload=/usr/local/nginx/sbin/nginx -s reload
KillSignal=SIGQUIT
TimeoutStopSec=5
KillMode=process
PrivateTmp=true

[Install]
WantedBy=multi-user.target

# 增加可执行权限
chmod a+x  /usr/lib/systemd/system/nginx.service 

# 重新加载
systemctl daemon-reload

# 查看nginx版本
[root@192.168.31.82 ~]# nginx -v
nginx version: nginx/1.26.2

4.3 修改nginx配置文件

# 清空nginx.conf
echo > /usr/local/nginx/conf/nginx.conf
# 创建配置文件存放的目录
mkdir -p /usr/local/nginx/conf.d

# 导入配置文件信息
cat >> /usr/local/nginx/conf/nginx.conf << EOF

#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;
    include /usr/local/nginx/conf.d/*.conf;
}
EOF

# 检查配置文件是否错误
# nginx -t
[root@192.168.31.82 ~]# nginx -t
nginx: the configuration file /usr/local/nginx-1.26.2/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx-1.26.2/conf/nginx.conf test is successful

5. nacos 负载

5.1 编写配置文件

# 提前创建日志存储文件
touch /usr/local/nginx/logs/nacos_server.log

# 写入配置信息
vi /usr/local/nginx/conf.d/nacos_load.conf


# 日志格式
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
                    '$status $body_bytes_sent "$http_referer" '
                    '"$http_user_agent" "$http_x_forwarded_for"';
# 七层负载                    
upstream nacos_server {
   	server 192.168.31.82:8848;
  	server 192.168.31.83:8848;
  	server 192.168.31.84:8848;
   	# 使用轮询方式请求
   	least_conn;
}

server {
    listen 18848 ;
	server_name 192.168.31.82;
	access_log /usr/local/nginx/logs/nacos_server.log main;
    location /nacos/ {
        proxy_pass http://nacos_server;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
     }
}

# 检查配置文件是否存在错误
[root@192.168.31.82 ~]# nginx -t
nginx: the configuration file /usr/local/nginx-1.26.2/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx-1.26.2/conf/nginx.conf test is successful

5.2 启动nginx

systemctl start nginx

http://www.niftyadmin.cn/n/5664718.html

相关文章

微服务配置中心介绍

在微服务架构中&#xff0c;配置中心是一个非常重要的组件&#xff0c;它负责管理所有服务的配置信息&#xff0c;使得配置管理变得更加集中和动态。配置中心能够极大地提高微服务架构的灵活性和可维护性。 为什么需要配置中心&#xff1f; 在传统的单体应用中&#xff0c;配置…

[技术杂谈]暗影精灵8plus电竞版台式机安装和使用注意

最近买回二手台式机准备做深度学习训练模型使用。由于个人不是十分有钱&#xff0c;因此下血本入手一台&#xff0c;不然深度学习玩不转。配置&#xff1a;i9-12900K / 64G d4 3733频率 / 1TSSD2TB机械 / RTX3090 24G显卡 旗舰版 机箱45L超大机箱。买回来后整体不错&#…

基于yolov8的红外小目标无人机飞鸟检测系统python源码+onnx模型+评估指标曲线+精美GUI界面

【算法介绍】 基于YOLOv8的红外小目标无人机与飞鸟检测系统是一项集成了前沿技术的创新解决方案。该系统利用YOLOv8深度学习模型的强大目标检测能力&#xff0c;结合红外成像技术&#xff0c;实现了对小型无人机和飞鸟等低空飞行目标的快速、准确检测。 YOLOv8作为YOLO系列的…

[Mamba_4]LMa-UNet

题目&#xff1a;LKM-UNet: Large Kernel Vision Mamba UNet for Medical Image Segmentation 中文题目&#xff1a;LMa-UNet: 探索大kernel Mamba在医学图像分割上的潜力 0摘要 在临床实践中&#xff0c;医学图像分割提供了有关目标器官或组织的轮廓和尺寸的有用信息&#…

C++——STL(list类)

1.list的介绍 1. list是可以在常数范围内在任意位置进行插入和删除的序列式容器&#xff0c;并且该容器可以前后双向迭代。 2. list的底层是双向链表结构&#xff0c;双向链表中每个元素存储在互不相关的独立节点中&#xff0c;在节点中通过指针指向其前一个元素和后一个元素…

八股(8)——Spring,SpringBoot

八股&#xff08;8&#xff09;——Spring&#xff0c;SpringBoot 基础1.Spring 是什么&#xff1f;特性&#xff1f;有哪些模块&#xff1f;Spring 有哪些特性呢&#xff1f; 2.Spring 有哪些模块呢&#xff1f;3.Spring 有哪些常用注解呢&#xff1f;Web 开发方面有哪些注解呢…

C++学习笔记之变量作用域

C学习笔记之变量作用域 https://www.runoob.com/cplusplus/cpp-variable-scope.html 在C程序中&#xff0c;通常有 3 个地方可以声明变量 在函数或者代码块当中&#xff0c;为局部变量在函数的参数定义中&#xff0c;为形式参数在所有函数的外部&#xff0c;为全局变量 作用域…

Hive性能优化高频面试题及答案

目录 高频面试题及答案1. 如何通过分区来优化Hive查询性能?2. 如何使用桶(Bucket)来优化Hive性能?3. 什么是Hive的`Map Side Join`?如何启用它?4. 如何通过压缩提高Hive的存储和查询性能?5. 什么是ORC文件格式?为什么它有助于提高性能?6. 如何通过调整Hive中的内存参数…