树莓派
前两天打开QQ,正好看到有人在卖树莓派,4B4G的,200R,最近淘宝上都要700+,果断买下了,加了个运费220,昨天收到玩了玩,记录一下。
经过这两天的了解,树莓派就相当于一个Linux主机+单片机,Debian系统,单片机可以外接led、测温之类的,功能也很强大,不用单片机的话,也可以当成一个Linux系统,安装各种软件。
Docker
- 修改apt源
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17sudo nano /etc/apt/sources.list
用#注释掉原来的
加入一下记录
deb https://mirrors.aliyun.com/debian stable main contrib non-free
deb https://mirrors.aliyun.com/debian stable-updates main contrib non-free
#或者这个 不带桌面的64位PIOS
deb http://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb http://mirrors.aliyun.com/debian-security/ bullseye-security main
deb-src http://mirrors.aliyun.com/debian-security/ bullseye-security main
deb http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib - 安装看到下面的提示就是安装成功了,容易卡在倒数第四行
1
2curl -fsSL https://get.docker.com -o get-docker.sh #一键安装脚本
sudo sh get-docker.sh --mirror Aliyun #使用阿里云镜像1
2
3
4
5
6
7
8
9
10
11
12
13pi@raspberrypi:~ $ sudo sh get-docker.sh --mirror Aliyun
# Executing docker install script, commit: b2e29ef7a9a89840d2333637f7d1900a83e7153f
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sh -c mkdir -p /etc/apt/keyrings && chmod -R 0755 /etc/apt/keyrings
+ sh -c curl -fsSL "https://mirrors.aliyun.com/docker-ce/linux/debian/gpg" | gpg --dearmor --yes -o /etc/apt/keyrings/docker.gpg
+ sh -c chmod a+r /etc/apt/keyrings/docker.gpg
+ sh -c echo "deb [arch=arm64 signed-by=/etc/apt/keyrings/docker.gpg] https://mirrors.aliyun.com/docker-ce/linux/debian bullseye stable" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends docker-ce docker-ce-cli containerd.io docker-compose-plugin >/dev/null
+ version_gte 20.10
+ [ -z ]
+ return 0
启动配置Docker
启动Docker1
sudo systemctl start docker
开启Docker自启
1
sudo systemctl enable docker
查看Docker当前状态,可以看到状态为active(running)
1
sudo systemctl status docker
修改源
1
2
3
4
5
6
7sudo nano /etc/docker/daemon.json
# 写入以下内容
{
"registry-mirrors": ["https://w76qpozk.mirror.aliyuncs.com"]
}
# 重启docker
sudo service docker restart安装镜像
以青龙为例- 直接从Dockerhub仓库拉取青龙面板最新镜像
1
sudo docker pull whyour/qinglong:latest #拉取镜像
- 部署青龙面板
前面为把本地文件挂载到qinglong容器,这里的端口映射为5700,如果需要修改可以自行修改,修改格式为xxxx:5700。1
2
3
4
5
6
7
8
9
10
11sudo docker run -dit \
-v $PWD/Desktop/ql/config:/ql/config \
-v $PWD/Desktop/ql/log:/ql/log \
-v $PWD/Desktop/ql/db:/ql/db \
-v $PWD/Desktop/ql/scripts:/ql/scripts \
-v $PWD/Desktop/ql/repo:/ql/repo \
-p 9000:5700 \
--name qinglong \
--hostname qinglong \
--restart always \
whyour/qinglong:latest - 拉库和配置
添加环境变量
JD_COOKIE
安装依赖,NodeJS的这几个
1
2
3
4
5jsdom
png-js
axios
date-fns
moment修改
配置文件
1
2
3# 第20行
GithubProxyUrl=""
# 第90行 通知,自己填拉库
1
ql repo https://github.com/KingRan/KR.git "jd_|jx_|jdCookie" "activity|backUp" "^jd[^_]|USER|utils|function|sign|sendNotify|ql|JDJR"
Github打不开用下面的代码
1
2
3
4ql repo https://gh.fakev.cn/KingRan/KR.git "jd_|jx_|jdCookie" "activity|backUp" "^jd[^_]|USER|utils|function|sign|sendNotify|ql|JDJR"
# 或者:
ql repo https://gh.fakev.cn/KingRan/KR.git "jd_|jx_|jdCookie" "activity|backUp" "^jd[^_]|USER|utils|function|sign|sendNotify|ql|JDJR"或者
1
2
3
4
5ql repo https://github.com/zero205/JD_tencent_scf.git "jd_|jx_|jdCookie" "backUp|icon" "^jd[^_]|USER|sendNotify|sign_graphics_validate|JDJR|JDSign|ql" "main"
ql repo https://hub.fastgit.xyz/zero205/JD_tencent_scf.git "jd_|jx_|jdCookie" "backUp|icon" "^jd[^_]|USER|sendNotify|sign_graphics_validate|JDJR|JDSign|ql" "main"
- 直接从Dockerhub仓库拉取青龙面板最新镜像
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 兜里有糖!
评论