下面这个链接是作者的原文地址:
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 "github/armbian/build/pull/4077.patch"
## 避免系统升级内核的时候出现删除整个 /boot 目录中的内容
curl -LO "github/armbian/build/pull/5076.patch"
# 返回 armbian-playground 目录
cd ..
git clone --depth=1 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" 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] 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
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"
本文发布于:2025-04-07 03:28:00,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/1743967726584823.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |