不会飞的章鱼

熟能生巧,勤能补拙;念念不忘,必有回响。

安装MQTT服务器

1
2
3
4
5
6
7
8
9
10
11
# 安装 Mosquitto MQTT 服务器
brew install mosquitto

# 启动 Mosquitto 服务器
brew services start mosquitto
==> Successfully started `mosquitto` (label: homebrew.mxcl.mosquitto)

# 验证 Mosquitto 服务器是否正在运行
brew services list
Name Status User File
mosquitto started * *

安装MQTT客户端

访问github-MQTTX,找到MQTTX-1.9.6-arm64.pkg下载安装即可。

然后就可以看到有个MQTTX的图标,表示MQTT客户端安装成功。

阅读全文 »

运行 EdgeX

1
2
3
4
# ARM 架构
$ curl https://raw.githubusercontent.com/edgexfoundry/edgex-compose/v3.0/docker-compose-no-secty-arm64.yml -o docker-compose.yml; docker compose up -d
# x86 架构
$ curl https://raw.githubusercontent.com/edgexfoundry/edgex-compose/v3.0/docker-compose-no-secty.yml -o docker-compose.yml; docker compose up -d

访问localhost:4000

运行成功!

阅读全文 »

level 1

Send an HTTP request using curl

1
2
$ curl http://127.0.0.1:80
pwn.college{sc9zRb7KF1lZSGtDWOxSGGTAeYp.dhjNyMDL3ATN3MzW}

level 2

Send an HTTP request using nc

阅读全文 »

什么是EdgeX

边缘中间件,服务于物理传感和执行“事物”和我们的信息技术(IT)系统之间。

EdgeX架构

设备服务

阅读全文 »

什么是 docker-compose

在 Docker 把容器技术大众化之后,Docker 周边涌现出了数不胜数的扩展、增强产品,其中有一个名字叫“Fig”的小项目格外令人瞩目。
Fig 为 Docker 引入了“容器编排”的概念,使用 YAML 来定义容器的启动参数、先后顺序和依赖关系,让用户不再有 Docker 冗长命令行的烦恼,第一次见识到了“声明式”的威力。
Docker 公司也很快意识到了 Fig 这个小工具的价值,于是就在 2014 年 7 月把它买了下来,集成进 Docker 内部,然后改名成了docker-compose

如何使用 docker-compose

安装

1
2
3
4
5
6
7
8
9
10
# intel x86_64
sudo curl -SL https://github.com/docker/compose/releases/download/v2.6.1/docker-compose-linux-x86_64 \
-o /usr/local/bin/docker-compose

# apple m1
sudo curl -SL https://github.com/docker/compose/releases/download/v2.6.1/docker-compose-linux-aarch64 \
-o /usr/local/bin/docker-compose

sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
阅读全文 »

熟悉Docker的使用

查看版本

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
$ docker version
Client:
Cloud integration: v1.0.35
Version: 24.0.2
API version: 1.43
Go version: go1.20.4
Git commit: cb74dfc
Built: Thu May 25 21:51:16 2023
OS/Arch: darwin/arm64
Context: desktop-linux

Server: Docker Desktop 4.21.1 (114176)
Engine:
Version: 24.0.2
API version: 1.43 (minimum version 1.12)
Go version: go1.20.4
Git commit: 659604f
Built: Thu May 25 21:50:59 2023
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: 1.6.21
GitCommit: 3dce8eb055cbb6872793272b4f20ed16117344f8
runc:
Version: 1.1.7
GitCommit: v1.1.7-0-g860f061
docker-init:
Version: 0.19.0
GitCommit: de40ad0
  • docker engine版本号 24.0.2
  • 系统是linux
  • 硬件架构是arm64

查看信息

阅读全文 »

背景

采访了一位哈尔滨工业大学毕业的程序员,在上海工作三年,与两位合伙人一起创业做了一个长达十年的项目,有着十几个人的公司,年收入300~400万,相对来说算成功。

采访

你觉得你处在这个年龄层的程序员里面算什么水平?

中等吧,顶多能算中等。

阅读全文 »

首先安装Docker for Mac

Enable Kubernetes

设置里打开Kubernetes,下载会持续一段时间:

验证

1
2
3
4
5
6
7
8
9
10
~  kubectl get nodes
NAME STATUS ROLES AGE VERSION
docker-desktop Ready control-plane 46h v1.27.2

~  kubectl get ns
NAME STATUS AGE
default Active 46h
kube-node-lease Active 46h
kube-public Active 46h
kube-system Active 46h
阅读全文 »

brew安装

1
brew install redis

问题

Could not connect to Redis at 127.0.0.1:6379: Connection refused

1
2
redis-cli
Could not connect to Redis at 127.0.0.1:6379: Connection refused not connected>
阅读全文 »