当前位置: 首页 > article >正文

在线教育网站项目第四步:deepseek骗我, WSL2不能创建两个独立的Ubuntu,但我们能实现实例互访及外部访问

一、说明

上一章折腾了半天,搞出不少问题,今天我们在deepseek的帮助下,完成多个独立ubuntu24.04实例的安装,并完成固定ip,实践证明,deepseek不靠谱,浪费我2个小时时间,我们将在下面实现,其实网上有很多信息比较旧

计划安装实例已经端口IP分配表

服务器配置表
服务器顺序服务器名IP地址端口主机名说明
1mysql192.168.1.15

3306; ssh:2221

mysql关系型数据库
2redis6379; ssh:2222非关系型数据库
3kkfileview8012; ssh:2223kkfileview

在线文件预览

4elasticsearch9200; ssh:2224elasticsearch搜索和数据分析模型
4kibana5601; ssh:2224kibanaKibana 是为Elasticsearch设计的开源分析和可视化平台
5minio

服务端口:9000

控制台:9001

; ssh:2225

minio对象存储
6nacos

注册中心:8848

控制台:9848

; ssh:2226

nacos动态服务发现、配置管理和服务管理平台
7xxl-job-admin8080; ssh:2227xxl-job-admin分布式任务调平台
8

seata

; ssh:2228seata分布式事务
9roncoo-education-gateway7700; ssh:2229roncoo-education-gateway在线教育网关服务
9roncoo-education-system7710; ssh:2229roncoo-education-system在线教育系统服务
9roncoo-education-user7720; ssh:2229roncoo-education-user在线教育用户服务
9roncoo-education-course
7730; ssh:2229
roncoo-education-course在线教育课程服务
一共9台服务器

推荐使用WSLMan 管理工具

Release v0.1.1.0 · jet2jet/WSLMan

二、安装Ubuntu-24.04

1、建立配置文件.wslconfig

在宿主机win11的登录用户目录下,建立文件.wslconfig,添加内容:

[experimental]
autoMemoryReclaim=gradual  
networkingMode=mirrored
dnsTunneling=true
firewall=true
autoProxy=true

[boot]
systemd=true

2、选择安装新的分发

3、选择ubuntu24.04 

4、安装

安装过程 

 安装完成

5、启动,添加用户密码

ip地址很有意思,192.168.1.15 是我主机的ip,也就是win11的地址,我们在上一篇文章中可不是这样的, 刚才我们建立的9台虚拟机ip地址都是一样,据说宿主机可以通过localhost访问所有的机器,这个就是添加了全局的.wslconfig有的效果,具体配置可以查资料,上面我们已经添加了

6、安装ssh

修改默认登录用户为x58win
sudo vi /etc/wsl.conf
添加内容
[user]
default=x58win
[boot]
systemd=true

 重启wsl

 

# 安装
sudo apt-get update
sudo apt-get install openssh-server##有错误,ssh.socket 是 systemd 的套接字单元,用于按需启动 SSH 服务(当有连接时启动)
Could not execute systemctl:  at /usr/bin/deb-systemd-invoke line 148.
dpkg: error processing package openssh-server (--configure):installed openssh-server package post-installation script subprocess returned error exit status 1##解决方案
sudo systemctl stop ssh.socket      # 停止套接字
sudo systemctl disable ssh.socket   # 禁用开机启动## 修改端口
sudo vi /etc/ssh/sshd_config
#Port 22 改为
Port 2220sudo systemctl start ssh
sudo systemctl status ssh
sudo systemctl enable ssh

x58win@x58:~$ sudo vi /etc/ssh/sshd_config
x58win@x58:~$
x58win@x58:~$ sudo systemctl start ssh
x58win@x58:~$ sudo systemctl status ssh
● ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/usr/lib/systemd/system/ssh.service; enabled; preset: enabled)
     Active: active (running) since Wed 2025-03-19 18:19:16 CST; 10s ago
       Docs: man:sshd(8)
             man:sshd_config(5)
    Process: 409 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
   Main PID: 411 (sshd)
      Tasks: 1 (limit: 9510)
     Memory: 1.2M (peak: 1.6M)
        CPU: 48ms
     CGroup: /system.slice/ssh.service
             └─411 "sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups"

Mar 19 18:19:16 x58 systemd[1]: Starting ssh.service - OpenBSD Secure Shell server...
Mar 19 18:19:16 x58 sshd[411]: Server listening on 0.0.0.0 port 2220.
Mar 19 18:19:16 x58 sshd[411]: Server listening on :: port 2220.
Mar 19 18:19:16 x58 systemd[1]: Started ssh.service - OpenBSD Secure Shell server.
x58win@x58:~$ sudo systemctl enable ssh
Synchronizing state of ssh.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable ssh
x58win@x58:~$

x58win@x58:~$ sudo ss -tulpn | grep ':2220'
tcp   LISTEN 0      128           0.0.0.0:2220      0.0.0.0:*    users:(("sshd",pid=411,fd=3))
tcp   LISTEN 0      128              [::]:2220         [::]:*    users:(("sshd",pid=411,fd=4))

测试 

在win11 测试

ssh x58win@localhost -p 2220

PS C:\Windows\system32> ssh x58win@localhost -p 2220
The authenticity of host '[localhost]:2220 ([127.0.0.1]:2220)' can't be established.
ED25519 key fingerprint is SHA256:OvWuU6KZCq7AyIGzUwvNGsBwbnr3MlmnQ6knrTs9lwE.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '[localhost]:2220' (ED25519) to the list of known hosts.
x58win@localhost's password:
Welcome to Ubuntu 24.04.2 LTS (GNU/Linux 6.6.75.1-microsoft-standard-WSL2 x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/pro

 System information as of Wed Mar 19 18:23:50 CST 2025

  System load:  0.0                 Processes:             29
  Usage of /:   0.1% of 1006.85GB   Users logged in:       1
  Memory usage: 5%                  IPv4 address for eth0: 192.168.1.15
  Swap usage:   0%

 * Strictly confined Kubernetes makes edge and IoT secure. Learn how MicroK8s
   just raised the bar for easy, resilient and secure K8s cluster deployment.

   https://ubuntu.com/engage/secure-kubernetes-at-the-edge
x58win@x58:~$ ls

在其它局域网,非宿主机win11

ssh x58win@192.168.1.15 -p 2220
# 就这样是不能连接的,有防火墙打开2220转发
New-NetFirewallRule -DisplayName "WSL2 x58 ssh" -Direction Inbound -LocalPort 2220 -Action Allow -Protocol TCP
netsh interface portproxy show v4tov4

C:\Users\x230win10>ssh x58win@192.168.1.15 -p 2220
The authenticity of host '[192.168.1.15]:2220 ([192.168.1.15]:2220)' can't be established.
ED25519 key fingerprint is SHA256:OvWuU6KZCq7AyIGzUwvNGsBwbnr3MlmnQ6knrTs9lwE.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? y
Please type 'yes', 'no' or the fingerprint: yes
Warning: Permanently added '[192.168.1.15]:2220' (ED25519) to the list of known hosts.
x58win@192.168.1.15's password:
Welcome to Ubuntu 24.04.2 LTS (GNU/Linux 6.6.75.1-microsoft-standard-WSL2 x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/pro

 System information as of Wed Mar 19 18:36:44 CST 2025

  System load:  0.03                Processes:             34
  Usage of /:   0.1% of 1006.85GB   Users logged in:       1
  Memory usage: 5%                  IPv4 address for eth0: 192.168.1.15
  Swap usage:   0%

 * Strictly confined Kubernetes makes edge and IoT secure. Learn how MicroK8s
   just raised the bar for easy, resilient and secure K8s cluster deployment.

   https://ubuntu.com/engage/secure-kubernetes-at-the-edge
Last login: Wed Mar 19 18:23:51 2025 from 127.0.0.1
x58win@x58:~$

 好,OK,搞了不少时间,那个ssh.socket的错误,在ubuntu 22上直接显示是这个错误,而ubuntu24上没有指名,ssh是必须安装的所以我们先装了

7、安装docker和docker-compose

按照前面的文章安装就行

在线教育网站项目第二步 :学习Vue3 + Nuxt3+springcloud,服务器为ubuntu24.04-CSDN博客https://blog.csdn.net/jiangkp/article/details/145995259

8、导出发行版

先expert出来,然后再import

选个目录,如果启动了,需要shutdown WSL 

点击ok开始expert ,abort是停止运行

 最后变为close,直接关闭即可

9、注销Ubuntu-24.04

注销掉就都没了,可以回去看看那个appdata目录下的东西都没有

原来安装的发行版没有了 

目录下了也没有东西了

二、安装9台的服务器

mysql
redis
kkfileview
elasticsearch
minio
nacos
xxl-job-admin
seata
roncoo-education

选择上面导出的虚拟机,分发名字自己要安装虚拟机名字,自己要安装的地址

 开始安装

 完成

  

 下面再建立8个,完全为了测试

三、配置各个实例

1、进入实例

先选下用户

比方说进入redis,看下面

2、查点想查的东西 

x58win@x58:~$ docker --version
Docker version 28.0.1, build 068a01e
x58win@x58:~$ docker-compose --version
Docker Compose version v2.33.1
x58win@x58:~$ sudo systemctl status ssh
[sudo] password for x58win:
● ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/usr/lib/systemd/system/ssh.service; enabled; preset: enabled)
     Active: active (running) since Wed 2025-03-19 19:16:44 CST; 49s ago
       Docs: man:sshd(8)
             man:sshd_config(5)
    Process: 198 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
   Main PID: 214 (sshd)
      Tasks: 1 (limit: 9510)
     Memory: 2.1M (peak: 2.5M)
        CPU: 91ms
     CGroup: /system.slice/ssh.service
             └─214 "sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups"

Mar 19 19:16:44 x58 systemd[1]: Starting ssh.service - OpenBSD Secure Shell server...
Mar 19 19:16:44 x58 sshd[214]: Server listening on 0.0.0.0 port 2220.
Mar 19 19:16:44 x58 sshd[214]: Server listening on :: port 2220.
Mar 19 19:16:44 x58 systemd[1]: Started ssh.service - OpenBSD Secure Shell server.

3、修改主机名

sudo vi /etc/wsl.conf[network]
hostname = mysql  # 替换为你想要的主机名
generateHosts = false           # 阻止 WSL 自动生成 hosts 文件

更新 /etc/hosts 添加互相解析

sudo vi /etc/hosts

将x58 改为mysql

4、修改ssh端口


sudo sed -i 's/Port 2220/Port 2221/' /etc/ssh/sshd_config对应端口在这里,22开头的就是ssh地址
"mysql8" = 2221,3306
"redis" = 2222,6379
"kkfileview" = 2223,8012
"elasticsearch" = 2224,9200,5601
"minio" = 2225,9000,9001
"nacos" = 2226,8848,9848
"xxl-job-admin" = 2227,8080
"seata" = 2228,8091
"roncoo-education" = 2229,7700,7710,7720,7730

重启 

PS C:\Windows\system32> ssh x58win@192.168.1.15 -p 2221
The authenticity of host '[192.168.1.15]:2221 ([192.168.1.15]:2221)' can't be established.
ED25519 key fingerprint is SHA256:OvWuU6KZCq7AyIGzUwvNGsBwbnr3MlmnQ6knrTs9lwE.
This host key is known by the following other names/addresses:
    C:\Users\x230win10/.ssh/known_hosts:1: [192.168.1.15]:2220
Are you sure you want to continue connecting (yes/no/[fingerprint])? y
Please type 'yes', 'no' or the fingerprint: yes
Warning: Permanently added '[192.168.1.15]:2221' (ED25519) to the list of known hosts.
x58win@192.168.1.15's password:
Welcome to Ubuntu 24.04.2 LTS (GNU/Linux 6.6.75.1-microsoft-standard-WSL2 x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/pro

 System information as of Wed Mar 19 19:55:45 CST 2025

  System load:  0.23                Processes:             31
  Usage of /:   0.2% of 1006.85GB   Users logged in:       1
  Memory usage: 5%                  IPv4 address for eth0: 192.168.1.15
  Swap usage:   0%

 * Strictly confined Kubernetes makes edge and IoT secure. Learn how MicroK8s
   just raised the bar for easy, resilient and secure K8s cluster deployment.

   https://ubuntu.com/engage/secure-kubernetes-at-the-edge
Last login: Wed Mar 19 18:51:19 2025 from 192.168.1.8
x58win@mysql:~$ hostname
mysql

5、每个ubuntu24.04实例都要来一遍 

四、配置Windows防火墙和端口转发

创建脚本 MakeWslPort.ps1

# powershell.exe -ExecutionPolicy Bypass -File "D:\wsl\Script\MakeWslPort.ps1"# 脚本功能:为WSL实例分配固定IP并配置端口转发
$wslInstances = @("mysql", "redis","kkfileview","elasticsearch","minio","nacos","xxl-job-admin","seata","roncoo-education")
$ports = 80,443,2221,2222,2223,2224,2225,2226,2227,2228,2229,3306,6379,8012,9200,5601,9000,9001,8848,9848,8080,7700,7710,7720,7730netsh interface portproxy reset # 清除所有端口转发规则# 这里不需要添加
#foreach ($port in $ports) {
#	echo $port
#	netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=$port #connectaddress= 192.168.1.15 connectport=$port # netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=443 #connectaddress=192.168.1.100 connectport=443
}# 开放 TCP 端口 
New-NetFirewallRule -DisplayName "WebServer" -Direction Inbound -Protocol TCP -LocalPort 80,443,2221-2229,3306,6379,8012,9200,5601,9000,9001,8848,9848,8080,7700,7710,7720,7730 -Action Allownetsh interface portproxy show v4tov4

# 在win11 管理员ps命令行下 

powershell.exe -ExecutionPolicy Bypass -File "D:\wsl\Script\MakeWslPort.ps1"

    相关文章:

    在线教育网站项目第四步:deepseek骗我, WSL2不能创建两个独立的Ubuntu,但我们能实现实例互访及外部访问

    一、说明 上一章折腾了半天,搞出不少问题,今天我们在deepseek的帮助下,完成多个独立ubuntu24.04实例的安装,并完成固定ip,实践证明,deepseek不靠谱,浪费我2个小时时间,我们将在下面实…...

    在刀刃上发力:如何精准把握计划关键节点

    关键路径分析是项目管理中的一种重要方法,它通过在甘特图中识别出项目中最长、最关键的路径,来确定项目的最短完成时间。 关键路径上的任务都是项目成功的关键因素,任何延误都可能导致整个项目的延期。关键路径分析对于项目管理者来说至关重要…...

    组合总和||

    1.给定一个数组 candidates 和一个目标数 target &#xff0c;找出 candidates 中所有可以使数字和为 target 的组合。 candidates 中的每个数字在每个组合中只能使用一次。 #include <bits/stdc.h> using namespace std; vector<vector<int>> result; vec…...

    OpenCV图像拼接(2)基于羽化(feathering)技术的图像融合算法拼接类cv::detail::FeatherBlender

    操作系统&#xff1a;ubuntu22.04 OpenCV版本&#xff1a;OpenCV4.9 IDE:Visual Studio Code 编程语言&#xff1a;C11 算法描述 cv::detail::FeatherBlender 是 OpenCV 中用于图像拼接的一个类&#xff0c;它属于 stitching 模块的一部分。这个类实现了基于羽化&#xff08;…...

    MediaPipe软件包如何构建和安装

    MediaPipe 是一个由 Google 开发的多媒体机器学习框架&#xff0c;支持多种平台&#xff08;如 Android、iOS、桌面等&#xff09;。以下是构建和安装 MediaPipe 的步骤&#xff1a; 1. 环境准备 确保系统满足以下要求&#xff1a; 操作系统: Ubuntu (推荐 18.04 或 20.04)、…...

    分享下web3j 常见用法

    转账 fun sendEthTransaction(privateKey: String,toAddress: String,amount: BigDecimal) {//chainIdval chainId:Long 1//url 可以从https://chainlist.org/里面获取可用节点//eth转账&#xff0c;bnb同理&#xff0c;但需发送到bnb对应节点val url "https://xxx"…...

    连接chatgpt的桌面语音助手

    要创建一个连接到 ChatGPT 的桌面语音助手&#xff0c;可以使用 Python 编写一个程序来实现语音识别、与 ChatGPT API 交互以及语音合成的功能。以下是一个完整的解决方案和技术实现步骤&#xff1a; 所需工具和库 语音识别 使用 speech_recognition 库捕获用户的语音输入。需要…...

    systemctl restart 和 systemctl reload 和 systemctl daemon-reload 对比 笔记250322

    systemctl restart 和 systemctl reload 和 systemctl daemon-reload 对比 以下是 systemctl restart、systemctl reload 和 systemctl daemon-reload 的对比总结&#xff1a; 命令作用对象行为适用场景对服务的影响systemctl restart 服务名具体服务强制停止服务&#xff0c…...

    DeepSeek 助力 Vue3 开发:打造丝滑的表格(Table)之添加导出数据功能示例9,TableView15_09带排序的导出表格示例

    前言&#xff1a;哈喽&#xff0c;大家好&#xff0c;今天给大家分享一篇文章&#xff01;并提供具体代码帮助大家深入理解&#xff0c;彻底掌握&#xff01;创作不易&#xff0c;如果能帮助到大家或者给大家一些灵感和启发&#xff0c;欢迎收藏关注哦 &#x1f495; 目录 Deep…...

    spring boot 登入权限RBAC模式

    首先准备好5张表 user_info表&#xff0c;用户的信息表 role表&#xff0c;角色表&#xff08;比如超级管理员、管理员、审核员、采购......&#xff09; 创建user_role表&#xff0c;user_info表&#xff0c;role表的中间表 注意了&#xff0c;role_id和user_id是 u…...

    调用API拿到的值——存储方式

    1.响应结果示例&#xff1a; "purposeTagList":["稳中向好及进中提质"] 2.数据库中定义的 3.值的获取&#xff1a; F1 JsonNode purposeTagListNode dataNode.path("purposeTagList");if (purposeTagListNode.isArray()) {StringBuilder purp…...

    【用 Trace读源码】PlanAgent 执行流程

    前提条件 在 Trae 中打开 OpenManus 工程&#xff0c;使用 build 模式&#xff0c;模型选择 claude-sonnet-3.7 提示词 分析 agent/planning.py 中 main 方法及相关类的执行流程&#xff0c;以流程图的方式展示PlanningAgent 执行流程图 以下流程图展示了 PlanningAgent 类…...

    第一讲 | 解锁C++编程能力:基础语法解析

    C入门基础 一、C的第一个程序二、命名空间三、C输入&输出四、缺省参数/默认参数五、函数重载六、引用1.引用的特性2.引用的使用引用做返回值场景 3.const引用只有指针和引用涉及权限放大、缩小的问题&#xff0c;普通变量没有 4.指针和引用的关系 七、inline八、nullptr 一…...

    LeetCode 热题 100_划分字母区间(80_763_中等_C++)(贪心算法(求并集))

    LeetCode 热题 100_划分字母区间&#xff08;80_763&#xff09; 题目描述&#xff1a;输入输出样例&#xff1a;题解&#xff1a;解题思路&#xff1a;思路一&#xff08;贪心算法(求交集)&#xff09;&#xff1a; 代码实现代码实现&#xff08;思路一&#xff08;贪心算法(求…...

    C++ --- 多态

    1 多态的概念 多态(polymorphism)的概念&#xff1a;通俗来说&#xff0c;就是多种形态。多态分为编译时多态(静态多态)和运⾏时多 态(动态多态)&#xff0c;这⾥我们重点讲运⾏时多态&#xff0c;编译时多态(静态多态)和运⾏时多态(动态多态)。编译时 多态(静态多态)主要就是我…...

    HAL库中使用空闲中断+DMA接收数据,接收失败的问题

    问题&#xff1a; 串口屏与单片机通过串口&#xff08;USART1&#xff09;进行通信&#xff0c;调试时发现问题&#xff0c;现象如下&#xff1a; 手动页面的几个文本&#xff0c;输入的数字不会显示出来&#xff0c;比如初始值为0&#xff0c;输入200&#xff0c;200会一闪而…...

    【STM32实物】基于STM32的扫地机器人/小车控制系统设计

    基于STM32的扫地机器人/小车控制系统设计 演示视频: 基于STM32的扫地机器人小车控制系统设计 简介:扫地机器人系统采用分层结构设计,主要包括底层硬件控制层、中间数据处理层和上层用户交互层。底层硬件控制层负责对各个硬件模块进行控制和数据采集,中间数据处理层负责对采…...

    【Scrapy】Scrapy教程8——处理子链接

    通过前面几篇文章,已经了解了如何去爬取网页内容并存储到数据库,但是目前只是存储了一个页面的内容,现在想要获取每篇文章链接内的文章内容,我们来看看怎么获取。 生成新请求 首先我们肯定要先拿到链接,所以第一步都获取文章标题和链接肯定少不了,然后再爬取获取到到子…...

    使用pycel将Excel移植到Python

    1.适用需求 有些工作可能长期适用excel来进行公式计算&#xff0c;当需要把工作流程转换为可视化界面时&#xff0c;开发人员不懂专业逻辑&#xff0c;手动摸索公式很大可能出错&#xff0c;而且费时费力 2.可用工具及缺点 pandas 方便进行数据处理&#xff0c;支持各种格…...

    学习应用层

    应用层概述 客户/服务器方式&#xff08;C/S&#xff09;和对等方式&#xff08;P2P&#xff09; 动态主机配置协议DHCP 客户/服务器方式 DHCP报文会被封装成为UDP用户数据报&#xff0c;DHCP服务器端口号是UDP67&#xff0c;用户是UDP68。 广播发送&#xff0c;是因为并不知道…...

    Doris官网上没有的一些Fe参数了,都在源码中

    一、FE配置源码 apache-doris-src\fe\fe-common\src\main\java\org\apache\doris\common\Config.java 二、BE配置源码 apache-doris-src\be\src\common\config.cpp 三、FE源码 package org.apache.doris.common;public class Config extends ConfigBase {ConfField(descri…...

    蓝桥杯算法精讲:二分查找实战与变种解析

    适合人群&#xff1a;蓝桥杯备考生 | 算法竞赛入门者 | 二分查找进阶学习者 目录 一、二分查找核心要点 1. 算法思想 2. 适用条件 3. 算法模板 二、蓝桥杯真题实战 例题1&#xff1a;分巧克力&#xff08;蓝桥杯2017省赛&#xff09; 例题2&#xff1a;砍竹子&#xff0…...

    C++脚本化方案调研

    1 什么是脚本化 脚本化&#xff08;Scripting&#xff09;是指将脚本语言嵌入到主程序&#xff08;C等编译型语言&#xff09;中&#xff0c;通过以下方式扩展程序能力&#xff1a; 动态逻辑控制&#xff1a;通过脚本实现运行时逻辑调整&#xff0c;无需重新编译主程序&#x…...

    蓝桥杯(N皇后问题)------回溯法

    题目描述 在 NN 的方格棋盘放置了 N 个皇后&#xff0c;使得它们不相互攻击&#xff08;即任意 2 个皇后不允许处在同一排&#xff0c;同一列&#xff0c;也不允许处在与棋盘边框成 45 角的斜线上。你的任务是&#xff0c;对于给定的 N&#xff0c;求出有多少种合法的放置方法…...

    再探C语言(1)

    温馨提示&#xff1a; 学C语言就像玩《掘地求升》——你以为懂了语法就能通关&#xff1f; 不&#xff01;编译器会用铁锤教你做人&#xff01;(╯‵□′)╯︵┻━┻ &#x1f431;Part 1&#xff1a;sizeofの跨平台迷惑行为 Q1. 不同环境下sizeof(int)的结果 运行环境结果&a…...

    高项第十三章——项目资源管理

    什么是资源管理&#xff1f;项目资源管理包括识别、获取和管理所需资源以成功完成项目的各个过程。 本过程关注两类资源&#xff1a;实物资源包括设备、材料、设施和基础设施 团队资源或人员指的是团队的人力资源 13_1 项目资源管理基础 项目团队是执行项目工作&#xff0c…...

    C/C++转换为字符串宏和字符串拼接宏的综合使用

    本文内容参考: C/C++ 宏拼接和宏展开为字符串 - DoubleLi - 博客园 特此致谢! 1. 转换为字符串宏与字符串拼接宏 (1)转换为字符串宏 转换为字符串的宏为: #define STR(x) #x //转字符串 (2)字符串拼接宏 字符串拼接的宏为: #define CONCAT(x,y) x##y //拼接 2…...

    Linux:xxx is not in the sudoers file. This incident will be reported.

    报错 xxx is not in the sudoers file. This incident will be reported.解决方式 切换到root用户下操作 # 1、修改/etc/sudoers文件为可修改&#xff0c;默认是只读的 ls -lh /etc/sudoers -r--r----- 1 root root 4.3K Dec 1 01:45 /etc/sudoerschmod uw /etc/sudoersls…...

    掌握新编程语言的秘诀:利用 AI 快速上手 Python、Go、Java 和 Rust

    网罗开发 &#xff08;小红书、快手、视频号同名&#xff09; 大家好&#xff0c;我是 展菲&#xff0c;目前在上市企业从事人工智能项目研发管理工作&#xff0c;平时热衷于分享各种编程领域的软硬技能知识以及前沿技术&#xff0c;包括iOS、前端、Harmony OS、Java、Python等…...

    个人常用的chrome好用插件

    chrome可以说是兼容性和实用性较高的浏览器 没有复杂的ui 沉重的广告 加上各种各样的浏览器插件 现在罗列一下个人常用的几款好用的插件 1. Adblock Plus 一款免费的广告拦截器&#xff0c;可以拦截大部分网站上的广告推荐&#xff0c;还你一个干净舒服的页面 以下为b站演示…...