快速构建稳定的 Armbian 系统:玩客云折腾速通指南(二)
- onecloud install armbian unoffice:
- 自编译固件
- 下载固件
- 固件烧录
- 使用固件
- 系统初始化
- docker验证
闲逛,发现个牛人,写得非常到位。看完之后心里痒痒,自己正好也有个玩客云,拿出来试一下,看看是否名副其实!
onecloud install armbian unoffice:
下面这个链接是作者的原文地址:
https://soulteary/2025/01/11/quickly-build-a-stable-armbian-system-onecloud-speed-running-guide-2.html
我觉得写得非常好!下面我们来看看到底怎么样。
自编译固件
armbian_onecloud_build.sh
cd ~
mkdir armbian-playground
cd armbian-playground
mkdir patches
cd patches
# 下载补丁
## 确保引导程序能够正确切换和保存引导哪一个存储设备
curl -LO "https://github/armbian/build/pull/4077.patch"
## 避免系统升级内核的时候出现删除整个 /boot 目录中的内容
curl -LO "https://github/armbian/build/pull/5076.patch"
# 返回 armbian-playground 目录
cd ..
git clone --depth=1 https://github/soulteary/armbian-build-s805.git build
cd build
patch --batch -p1 -N < ../patches/5076.patch
patch --batch -p1 -N < ../patches/4077.patch
./compile.sh kernel BOARD=onecloud BRANCH=edge EXPERT=yes USE_CCACHE=no KERNEL_MAJOR_MINOR=6.10
下载固件
固件烧录
使用固件
系统初始化
system-init.sh
#!/bin/bash
#write by soulteary
#use command sudo without passwd
echo "`whoami` ALL=(ALL) NOPASSWD:ALL" | sudo tee "/etc/sudoers.d/dont-prompt-$USER-for-sudo-password"
#edit hostname
echo "youcloud" | sudo tee /etc/hostname
sudo hostname -F /etc/hostname
#install docker
sudo apt install -y ca-certificates curl gnupg lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL -H "user-agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" https://mirrors.tuna.tsinghua.edu/docker-ce/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://mirrors.tuna.tsinghua.edu/docker-ce/linux/ubuntu/ \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo gpasswd -a ${USER} docker
docker验证
docker-compose.yml
name: cronicle
services:
cronicle:
image: soulteary/cronicle:0.9.63
restart: always
hostname: cronicle
ports:
- 3012:3012
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- ./data/data:/opt/cronicle/data
- ./data/logs:/opt/cronicle/logs
- ./data/plugins:/opt/cronicle/plugins
environment:
- TZ=Asia/Shanghai
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider localhost:3012/api/app/ping || exit 1"]
interval: 5s
timeout: 1s
retries: 3
logging:
driver: "json-file"
options:
max-size: "10m"