ubuntu 22.04安装k8s高可用集群

article/2025/9/6 15:11:06

文章目录

  • 1.环境准备(所有节点)
    • 1.1 关闭无用服务
    • 1.2 环境和网络
    • 1.3 apt源
    • 1.4 系统优化
    • 1.5 安装nfs客户端
  • 2. 装containerd(所有节点)
  • 3. master的高可用方案(master上操作)
    • 3.1 安装以及配置haproxy(3master相同)
    • 3.2 keepalived
      • 1)master-01
      • 2)master-02
      • 3)master-03
  • 4. 核心组件安装(所有节点)
    • 4.1 kubelet、kubeadm、kubectl安装
    • 4.2 提前下载镜像(所有节点)【非必要】
    • 4.2 缺少一个镜像
  • 5. 集群初始化
    • 5.1 主机名
    • 5.2 初始化
      • 1)master-01
      • 2)其他master
      • 3)node节点
      • 4) 检查
    • 5.3 网络安装
  • 6. storageclass 的安装

1.环境准备(所有节点)

  • 服务器规划
类型IP 地址主机名
Master 110.10.239.155k8s-master-01
Master 210.10.239.156k8s-master-02
Master 310.10.239.161k8s-master-03
虚拟IP10.10.239.150apiserver-vip
  • 系统信息
root@cto-gpu-pro-n01:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.5 LTS
Release:        22.04
Codename:       jammy

1.1 关闭无用服务

  • 关闭交换分区
# sed -i "/swap/{s/^/#/g}" /etc/fstab
# swapoff -a
  • 关闭防火墙
root@boe:~# ufw disable
root@boe:~# ufw status
Status: inactive

1.2 环境和网络

  • hostname
# hostname master-01
# vim /etc/hostmame
  • hosts
cat >> /etc/hosts << EOF
10.10.239.155 master-01
10.10.239.156 master-02
10.10.239.157 master-03
EOF
  • 打开路由
# cat > /etc/sysctl.d/k8s.conf << EOF
net.bridge.bridge-nf-call-ip6tables = 1 
net.bridge.bridge-nf-call-iptables = 1 
net.ipv4.ip_forward = 1 
EOF
# modprobe br_netfilter 
# echo br_netfilter | tee /etc/modules-load.d/k8s.conf
# sysctl -p /etc/sysctl.d/k8s.conf 
  • 加载内核模块
#cat > /etc/modules-load.d/ipvs.conf <<EOF 
ip_vs
ip_vs_lc
ip_vs_wlc
ip_vs_rr
ip_vs_wrr
ip_vs_lblc
ip_vs_lblcr
ip_vs_dh
ip_vs_sh
ip_vs_fo
ip_vs_nq
ip_vs_sed
ip_vs_ftp
nf_conntrack
EOF# systemctl restart systemd-modules-load.service

验证结果如下:


root@boe:~# lsmod | grep '^ip_vs'
ip_vs_ftp              16384  0
ip_vs_sed              16384  0
ip_vs_nq               16384  0
ip_vs_fo               16384  0
ip_vs_sh               16384  0
ip_vs_dh               16384  0
ip_vs_lblcr            16384  0
ip_vs_lblc             16384  0
ip_vs_wrr              16384  0
ip_vs_rr               16384  1338
ip_vs_wlc              16384  0
ip_vs_lc               16384  0
ip_vs                 176128  1366 ip_vs_wlc,ip_vs_rr,ip_vs_dh,ip_vs_lblcr,ip_vs_sh,ip_vs_fo,ip_vs_nq,ip_vs_lblc,ip_vs_wrr,ip_vs_lc,ip_vs_sed,ip_vs_ftp

1.3 apt源

  • apt源的配置文件
vim /etc/apt/sources.list
  • 内容如下
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu/ jammy main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ jammy universe
# deb-src http://archive.ubuntu.com/ubuntu/ jammy universe
deb http://archive.ubuntu.com/ubuntu/ jammy-updates universe
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates universe## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://archive.ubuntu.com/ubuntu/ jammy multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-updates multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates multiverse## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiversedeb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-security main restricted
deb http://archive.ubuntu.com/ubuntu/ jammy-security universe
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-security universe
deb http://archive.ubuntu.com/ubuntu/ jammy-security multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-security multiverse
  • 安装依赖工具(非必要)
apt install vim wget curl net-tools  bind9-utils socat ipvsadm ipset
  • vim: 用于安装 Vim 编辑器。
  • wget: 用于下载文件的命令行工具。
  • curl: 用于与服务器通信的命令行工具,常用于测试和下载数据。
  • net-tools: 包含一些基本的网络工具,如 ifconfig,netstat 等。
  • conntrack-tools: 包含用于管理和查看连接跟踪表的工具(如 conntrack)。
  • bind9-utils: 提供一些与 DNS 相关的工具,如 dig,nslookup 等。
  • socat: 用于处理网络和文件的双向数据流。
  • ipvsadm: 用于配置 IP 虚拟服务器(IPVS)。
  • ipset: 用于管理 IP 集合(用于防火墙等)。
  • 缓存离线包(非必要)

用下边这个脚本可以把以上服务的依赖下载到本地

#!/bin/bashPACKAGES="vim wget curl net-tools bind9-utils socat ipvsadm ipset"
mkdir -p ./deb-downloads
cd ./deb-downloads || exitfor pkg in $PACKAGES; doecho "正在处理 $pkg 及其依赖..."apt-rdepends "$pkg" | grep -v "^ " | grep -vE '^(debconf-2.0|perlapi-|libc6|libgcc-s1|linux-libc-dev|gcc-|gcc-|base-files)$' | sort -u | while read dep; doecho "下载 $dep ..."apt download "$dep" || echo "警告:无法下载 $dep"done
done

以后安装使用

sudo dpkg -i /usr/local/src/pkg-down/tools/deb-downloads/lib*.deb
sudo dpkg -i /usr/local/src/pkg-down/tools/deb-downloads/*.deb

1.4 系统优化

  • 内核优化
# cat >>/etc/sysctl.conf <<EOF
net.ipv4.ip_forward = 1
vm.swappiness = 0
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.ipv4.tcp_max_syn_backlog = 65536
net.core.netdev_max_backlog =  32768
net.core.somaxconn = 32768
net.core.wmem_default = 8388608
net.core.rmem_default = 8388608
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_synack_retries = 2
net.ipv4.tcp_syn_retries = 2
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_mem = 94500000 915000000 927000000
net.ipv4.tcp_max_orphans = 3276800
net.ipv4.ip_local_port_range = 1024  65535
EOF# sysctl -p
  • 句柄数
ulimit -n 655350

永修生效修改如下两个文件

# cat >>/etc/security/limits.conf <<EOF
* soft memlock unlimited
* hard memlock unlimited
* soft nofile 655350
* hard nofile 655350
* soft nproc 655350
* hard nproc 655350
EOF
vim /etc/systemd/system.conf
DefaultLimitNOFILE=655350

或者

echo ulimit -n 655350 >>/etc/profile

1.5 安装nfs客户端

以后storageClass需要用

apt install -y nfs-common

2. 装containerd(所有节点)

  • 需要的工具
sudo apt install apt-transport-https ca-certificates software-properties-common
  • 添加秘钥
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
  • 添加apt源
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  • 更新索引
apt update
  • 安装containerd
apt install containerd.io
  • 生产containerd配置文件
mkdir -p /etc/containerd
containerd config default | sudo tee /etc/containerd/config.toml
  • 添加 SystemdCgroup = true
# sed -i '/containerd.runtimes.runc.options/a\ \ \ \ \ \ \ \ \ \ \ \ SystemdCgroup = true' /etc/containerd/config.toml 
  • 启动
systemctl start containerd
systemctl enable containerd
  • 测试
ctr images pull docker.io/library/nginx:alpine
  • 缓存安装包(非必要)
apt-rdepends containerd | grep -v "^ " | grep -vE '^(debconf-2.0|perlapi-|libc6|libgcc-s1|linux-libc-dev|gcc-|base-files)$' | sort -u | xargs -I{} sh -c 'echo 下载 {}; apt download {} || echo "警告:无法下载 {}"'

以后安装使用

sudo dpkg -i /usr/local/src/pkg-down/tools/deb-downloads/lib*.deb
sudo dpkg -i /usr/local/src/pkg-down/tools/deb-downloads/*.deb

3. master的高可用方案(master上操作)

在这里插入图片描述

3.1 安装以及配置haproxy(3master相同)

  • 安装
# apt -y install haproxy
  • 修改配置
    修改/etc/haproxy/haproxy.cfg文件
global#   /etc/sysconfig/syslog##    local2.*                       /var/log/haproxy.log#log         127.0.0.1 local2chroot      /var/lib/haproxypidfile     /var/run/haproxy.pidmaxconn     4000user        haproxygroup       haproxydaemondefaultsmode                    tcplog                     globalretries                 3timeout connect         10stimeout client          1mtimeout server          1mfrontend  kubernetesbind *:7443mode tcpdefault_backend kubernetes_masterbackend kubernetes_masterbalance     roundrobinserver master01 10.10.239.155:6443 check maxconn 2000server master02 10.10.239.156:6443 check maxconn 2000server master03 10.10.239.161:6443 check maxconn 2000
  • 启动
# systemctl start haproxy
# systemctl enable haproxy

3.2 keepalived

1)master-01

  • 安装
# apt -y install keepalived
  • 修改配置文件
    修改 /etc/keepalived/keepalived.conf,从节点按注释修改。
global_defs {router_id LVS_DEVELvrrp_skip_check_adv_addr// vrrp_strict vrrp_garp_interval 0vrrp_gna_interval 0
}vrrp_instance VI_1 {state MASTER   #从节点为BACKUPinterface ens4  #根据实际情况修改virtual_router_id 150 #不能和其他集群冲突priority 100   #master最高,根据情况修改  advert_int 1authentication {auth_type PASSauth_pass 1111}virtual_ipaddress {10.10.239.150    #虚拟ip}
}
  • 启动服务
# systemctl enable keepalived
# systemctl start keepalived

2)master-02

  • 安装
# apt -y install keepalived
  • 修改配置文件
    修改 /etc/keepalived/keepalived.conf,从节点按注释修改。
global_defs {router_id LVS_DEVELvrrp_skip_check_adv_addr// vrrp_strict vrrp_garp_interval 0vrrp_gna_interval 0
}vrrp_instance VI_1 {state BACKUPinterface ens4virtual_router_id 150priority 90 advert_int 1authentication {auth_type PASSauth_pass 1111}virtual_ipaddress {10.10.239.150}
}
  • 启动服务
# systemctl enable keepalived
# systemctl start keepalived

3)master-03

  • 安装
# apt -y install keepalived
  • 修改配置文件
    修改 /etc/keepalived/keepalived.conf,从节点按注释修改。
global_defs {router_id LVS_DEVELvrrp_skip_check_adv_addr// vrrp_strict vrrp_garp_interval 0vrrp_gna_interval 0
}vrrp_instance VI_1 {state BACKUPinterface ens4virtual_router_id 150priority 80 advert_int 1authentication {auth_type PASSauth_pass 1111}virtual_ipaddress {10.10.239.150}
}
  • 启动服务
# systemctl enable keepalived
# systemctl start keepalived

4. 核心组件安装(所有节点)

4.1 kubelet、kubeadm、kubectl安装

  • 使得 apt 支持 ssl 传输
apt-get update && apt-get install -y apt-transport-https
  • 加载秘钥
curl https://mirrors.aliyun.com/kubernetes/apt/doc/apt-key.gpg | apt-key add -
  • 添加k8s镜像源
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
deb https://mirrors.aliyun.com/kubernetes/apt/ kubernetes-xenial main
EOF
  • apt安装
 apt-get install -y kubelet=1.23.17-00 kubeadm=1.23.17-00 kubectl=1.23.17-00
  • runtime
crictl config runtime-endpoint /run/containerd/containerd.sock
  • 启动服务
systemctl daemon-reload
systemctl enable kubelet && systemctl start kubelet 

4.2 提前下载镜像(所有节点)【非必要】

  • 提前下载镜像
kubeadm config images pull --image-repository registry.aliyuncs.com/google_containers
  • 结果
W0528 03:24:37.161961  250879 version.go:105] falling back to the local client version: v1.23.17
[config/images] Pulled registry.aliyuncs.com/google_containers/kube-apiserver:v1.23.17
[config/images] Pulled registry.aliyuncs.com/google_containers/kube-controller-manager:v1.23.17
[config/images] Pulled registry.aliyuncs.com/google_containers/kube-scheduler:v1.23.17
[config/images] Pulled registry.aliyuncs.com/google_containers/kube-proxy:v1.23.17
[config/images] Pulled registry.aliyuncs.com/google_containers/pause:3.6
[config/images] Pulled registry.aliyuncs.com/google_containers/etcd:3.5.6-0
[config/images] Pulled registry.aliyuncs.com/google_containers/coredns:v1.8.6

4.2 缺少一个镜像

说明:集群中已经将需要的镜像改成阿里云镜像了,但是初始化的时候还是会需要检查registry.k8s.io/pause:3.8这个镜像,虽然pod启动时实际用到的仍是阿里云的pause:3.8镜像

  • 拉取镜像

缺少的这个镜像我提前推倒内网harbor了

ctr images pull harbocto.boe.com.cn/kubernetes/pause:3.8
  • 打tag
ctr images tag harbocto.boe.com.cn/kubernetes/pause:3.8 registry.k8s.io/pause:3.8
  • 查看结果
[root@cto-gpu-pro-m01 ~]# crictl images
IMAGE                                                    TAG                 IMAGE ID            SIZE
......
harbocto.boe.com.cn/kubernetes/pause                     3.8                 4873874c08efc       309kB
registry.k8s.io/pause                                    3.8                 4873874c08efc       309kB
......

5. 集群初始化

5.1 主机名

  • master-01
hostname k8s-master-01
echo "hostname k8s-master-01" > /etc/hostnamecat >> /etc/hosts <<EOF 
10.10.239.155 k8s-master-01
10.10.239.155 k8s-master-02
10.10.239.156 k8s-master-03
EOF
  • master-02
hostname k8s-master-02
echo "hostname k8s-master-02" > /etc/hostnamecat >> /etc/hosts <<EOF 
10.10.239.150 k8s-master-01
10.10.239.155 k8s-master-02
10.10.239.156 k8s-master-03
EOF
  • master-03
hostname k8s-master-04
echo "hostname k8s-master-04" > /etc/hostnamecat >> /etc/hosts <<EOF 
10.10.239.150 k8s-master-01
10.10.239.155 k8s-master-02
10.10.239.156 k8s-master-03
EOF

5.2 初始化

1)master-01

  • master 1
kubeadm init \--control-plane-endpoint "10.10.239.150:7443" \--upload-certs \--image-repository registry.aliyuncs.com/google_containers \--kubernetes-version v1.23.17 \--pod-network-cidr 10.244.0.0/16
  • 输出
Your Kubernetes control-plane has initialized successfully!To start using your cluster, you need to run the following as a regular user:mkdir -p $HOME/.kubesudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/configsudo chown $(id -u):$(id -g) $HOME/.kube/configAlternatively, if you are the root user, you can run:export KUBECONFIG=/etc/kubernetes/admin.confYou should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:https://kubernetes.io/docs/concepts/cluster-administration/addons/You can now join any number of the control-plane node running the following command on each as root:kubeadm join 10.10.239.150:7443 --token 6877nh.cjqvl57r45g3pygo \--discovery-token-ca-cert-hash sha256:86774076430c354eb6114d703c5e05afdfbd1a2270edcd7b51117feb961719c9 \--control-plane --certificate-key 95555619210539f09ad585dd1a19ecbf8326180fd91a0827173b2339576c6adcPlease note that the certificate-key gives access to cluster sensitive data, keep it secret!
As a safeguard, uploaded-certs will be deleted in two hours; If necessary, you can use
"kubeadm init phase upload-certs --upload-certs" to reload certs afterward.Then you can join any number of worker nodes by running the following on each as root:kubeadm join 10.10.239.150:7443 --token 6877nh.cjqvl57r45g3pygo \--discovery-token-ca-cert-hash sha256:86774076430c354eb6114d703c5e05afdfbd1a2270edcd7b51117feb961719c9
  • kubectl 配置环境(按上边输出操作即可)
mkdir -p $HOME/.kube
cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
chown $(id -u):$(id -g) $HOME/.kube/config

2)其他master

  • 按上边的输出执行命令
  kubeadm join 10.10.239.150:7443 --token 6877nh.cjqvl57r45g3pygo \--discovery-token-ca-cert-hash sha256:86774076430c354eb6114d703c5e05afdfbd1a2270edcd7b51117feb961719c9 \--control-plane --certificate-key 95555619210539f09ad585dd1a19ecbf8326180fd91a0827173b2339576c6adc
  • kubectl 配置环境
mkdir -p $HOME/.kube
cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
chown $(id -u):$(id -g) $HOME/.kube/config

3)node节点

kubeadm join 10.10.239.150:7443 --token 6877nh.cjqvl57r45g3pygo \--discovery-token-ca-cert-hash sha256:86774076430c354eb6114d703c5e05afdfbd1a2270edcd7b51117feb961719c9

4) 检查

  • 查看节点
root@k8s-master-01:~# kubectl get node -n kube-system
NAME            STATUS     ROLES                  AGE   VERSION
k8s-master-01   NotReady   control-plane,master   20m   v1.23.17
k8s-master-02   NotReady   control-plane,master   11m   v1.23.17
k8s-master-03   NotReady   control-plane,master   10m   v1.23.17

NotReady是因为我们没有设置状态

  • 查看kube-system中pod
root@k8s-master-01:~# kubectl get pod -n kube-system
NAME                                    READY   STATUS    RESTARTS      AGE
coredns-6d8c4cb4d-flqtp                 0/1     Pending   0             20m
coredns-6d8c4cb4d-w8tc8                 0/1     Pending   0             20m
etcd-k8s-master-01                      1/1     Running   0             20m
etcd-k8s-master-02                      1/1     Running   0             11m
etcd-k8s-master-03                      1/1     Running   0             10m
kube-apiserver-k8s-master-01            1/1     Running   0             20m
kube-apiserver-k8s-master-02            1/1     Running   0             12m
kube-apiserver-k8s-master-03            1/1     Running   1 (10m ago)   10m
kube-controller-manager-k8s-master-01   1/1     Running   1 (11m ago)   20m
kube-controller-manager-k8s-master-02   1/1     Running   0             12m
kube-controller-manager-k8s-master-03   1/1     Running   0             9m53s
kube-proxy-2xnjx                        1/1     Running   0             11m
kube-proxy-jftx5                        1/1     Running   0             20m
kube-proxy-zpxv8                        1/1     Running   0             12m
kube-scheduler-k8s-master-01            1/1     Running   1 (11m ago)   20m
kube-scheduler-k8s-master-02            1/1     Running   0             12m
kube-scheduler-k8s-master-03            1/1     Running   0             9m45s

5.3 网络安装

有很多选择,
一般小集群我选择 flannel,见 《flannel网络的安装和删除》
大的集群选择calico,见《calico网络安装和删除》

6. storageclass 的安装

  • 安装
    见文档 《K8S对象-StorageClass》
  • FAQ
    《【FAQ】1.21创建PV报错》

在这里插入图片描述


http://www.hkcw.cn/article/GYPXMXyrUs.shtml

相关文章

k8s中kubeSphere的安装使用+阿里云私有镜像仓库配置完整步骤

一、实验目的 1、掌握kubeSphere 的安装部署 2、掌握kubesphere 使用外部镜像仓库&#xff1b; 2、熟悉图像化部署任务&#xff1a;产生pod---定义服务--验证访问 本次实验旨在通过 KubeSphere 平台部署基于自定义镜像&#xff08;nginx:1.26.0 &#xff09;的有状态副本集…

innovus: write_lef_abstract如何写入stripe信息

我正在「拾陆楼」和朋友们讨论有趣的话题&#xff0c;你⼀起来吧&#xff1f; 拾陆楼知识星球入口 block level需要把pg 信息写到lef里&#xff0c;方便top level查看&#xff0c;这里提供一种简单方法: write_lef_abstract -5.8 -PGPinLayers {ME5 ME6 ME7 ME8 AL_RDL} -str…

MySQL索引与事物

目录 一&#xff1a;MySQL索引介绍 1.索引概述 2.索引作用 3.索引的分类 关键区别 &#xff08;1&#xff09;普通索引 &#xff08;2&#xff09;唯一索引 &#xff08;3&#xff09;主键索引 &#xff08;4&#xff09;组合索引&#xff08;最左前缀) 4.全文索引&am…

光年号,国外云手机号的创新应用与发展趋势

光年号&#xff0c;国外云手机号的创新应用与发展趋势 光年号作为新兴通信技术代表&#xff0c;与国外云手机号结合&#xff0c;推动通信变革。光年号的灵活性提升了国外云手机号的使用效率&#xff0c;光年号服务正在全球扩展&#xff0c;光年号和国外云手机号的融合创新&…

Java开发经验——阿里巴巴编码规范实践解析7

摘要 本文主要解析了阿里巴巴 Java 开发中的 SQL 编码规范&#xff0c;涉及 SQL 查询优化、索引建立、字符集选择、分页查询处理、外键与存储过程的使用等多个方面&#xff0c;旨在帮助开发者提高代码质量和数据库操作性能&#xff0c;避免常见错误和性能陷阱。 1. 【强制】业…

【经验】Ubuntu中设置terminator的滚动行数、从Virtualbox复制到Windows时每行后多一空行

1、设置terminator的滚动行数 1.1 问题描述 在终端 terminator 中&#xff0c;调试程序时&#xff0c;只能查看有限行数的打印日志&#xff0c;大约是500行&#xff0c;怎么能增加行数 1.2 解决方法 1&#xff09;安装terminator sudo apt install terminator和 terminato…

Photoshop2025(PS2025)软件及安装教程

在数字图像编辑领域&#xff0c;Adobe Photoshop 一直是无可争议的王者。如今&#xff0c;Photoshop 2025 重磅登场&#xff0c;再次为我们带来了惊喜与变革&#xff0c;进一步巩固了它在行业中的领先地位。 Photoshop 2025 在人工智能方面的升级令人瞩目。其全新的 “Magic Se…

NHANES指标推荐:UAR

文章题目&#xff1a;The Uric Acid to Albumin Ratio Predicts All-cause and Cardiovascular Mortality Among U.S. Adults Results from the National Health and Nutrition Examination Survey in 2003-2018 中文标题&#xff1a;尿酸与白蛋白比值可预测美国成年人的全因死…

C++23 std::fstreams基础回顾

文章目录 引言1.1 std::fstreams概述1.2 std::fstreams的主要功能和常用操作 2. 独占模式 (P2467R1) 的详细介绍2.1 独占模式的定义和背景2.2 独占模式的作用和优势 3. C23 std::fstreams支持独占模式 (P2467R1) 的具体实现方式3.1 代码示例3.2 实现步骤解释 4. 使用该特性可能…

Unity3D仿星露谷物语开发55之保存游戏到文件

1、目标 将游戏保存到文件&#xff0c;并从文件中加载游戏。 Player在游戏中种植的Crop&#xff0c;我们希望保存到文件中&#xff0c;当游戏重新加载时Crop的GridProperty数据仍然存在。这次主要实现保存地面属性&#xff08;GridProperties&#xff09;信息。 我们要做的是…

Windows 中禁止在桌面放置文件以保持桌面整洁

假设用户名为xxx&#xff0c;进入文件夹C:\Users\xxx&#xff0c;选中该文件夹下桌面文件夹并单击右键选择属性。 点击编辑。 选中用户xxx并将其写入权限设置为拒绝。随后桌面在无法主动授权情况下无法新建文件或者文件夹&#xff08;设置权限之前可以先将桌面文件移动到别处&…

STM32开发全解析:从环境搭建到项目实战的技术文档撰写指南

在嵌入式开发领域&#xff0c;STM32系列微控制器凭借高性能、低功耗及丰富外设等特性&#xff0c;成为工程师的首选平台。本文以STM32F103C8T6为例&#xff0c;结合技术文档撰写规范&#xff0c;系统拆解从基础知识、开发环境到实战项目的全流程&#xff0c;为STM32技术传播提供…

AI数字人系统开发——引领未来交互革命

随着人工智能技术的不断发展&#xff0c;AI数字人系统开发正引领着一场前所未有的交互革命。它将打破传统的人机交互方式&#xff0c;为我们带来更加自然、智能、高效的交互体验。 我们的AI数字人系统开发&#xff0c;融合了多种先进的技术&#xff0c;如计算机视觉、语音识别…

tryhackme——Data Exfiltration

文章目录 一、网络拓扑二、数据泄露分类2.1 传统数据泄露2.2 C2通信2.3 隧道 三、隧道3.1 Exfiltration using TCP socket3.2 Exfiltration using SSH3.3 Exfiltrate using HTTP(S)HTTP隧道 3.4 Exfiltration using ICMP3.4.1 ICMP数据包结构3.4.2 MSF实现ICMP数据泄露3.4.3 IC…

计算机毕业设计酒店后台管理系统(vue+springboot+mysql+开题+论文)

摘要&#xff1a; 本文将介绍一个基于Vue.js、Spring Boot和MySQL的酒店后台管理系统毕业设计项目。该项目旨在为酒店提供高效、便捷、安全的管理平台&#xff0c;实现客房管理、订单管理、客户管理、员工管理等功能。本文将涵盖项目背景、技术选型、系统架构、功能模块、数据库…

华为OD机试真题——告警抑制(2025A卷:100分)Java/python/JavaScript/C/C++/GO最佳实现

2025 A卷 100分 题型 本专栏内全部题目均提供Java、python、JavaScript、C、C++、GO六种语言的最佳实现方式; 并且每种语言均涵盖详细的问题分析、解题思路、代码实现、代码详解、3个测试用例以及综合分析; 本文收录于专栏:《2025华为OD真题目录+全流程解析+备考攻略+经验分…

LabVIEW旋转机械智能监测诊断系统

采用 LabVIEW 开发旋转机械智能监测与故障诊断系统&#xff0c;通过集品牌硬件与先进信号处理技术&#xff0c;实现旋转机械振动信号的实时采集、分析及故障预警。系统突破传统监测手段的局限性&#xff0c;解决了复杂工业环境下信号干扰强、故障特征提取难等问题&#xff0c;为…

学习路之PHP--easyswoole简易增删改查入门

这里写目录标题 0、安装orm插件一、创建数据库二、创建模型三、 0、安装orm插件 composer require easyswoole/orm一、创建数据库 表&#xff1a; CREATE TABLE cases (id int(11) NOT NULL AUTO_INCREMENT COMMENT 主键,title varchar(200) CHARACTER SET utf8 COLLATE utf…

C++通用日志模块

概述 在 C 项目中开发时经常需要日志模块&#xff0c;为了不引入其它第三方日志模块包的基础上&#xff0c;基于标准的 C17 的基础自己封装了一个日志模块 功能总结 日志分等级&#xff08;DEBUG / INFO / WARN / ERROR&#xff09;支持日志文件轮转&#xff0c;自动备份旧日…

Arbitrum Stylus 合约实战 :Rust 实现 ERC20

在《Arbitrum Stylus 深入解析与 Rust 合约部署实战》篇中&#xff0c;我们深入探讨了 Arbitrum Stylus 的核心技术架构&#xff0c;包括其 MultiVM 机制、Rust 合约开发环境搭建&#xff0c;以及通过 cargo stylus 实现简单计数器合约的部署与测试。Stylus 作为 Arbitrum Nitr…