|
|
本帖最后由 sanqizou 于 2026-3-15 15:25 编辑
1、刷入 armbian
镜像下载 https://github.com/ophub/amlogic-s9xxx-armbian/releases
通过写盘软件,或者 dd 写入 u 盘
找到你的 U 盘
卸载 U 盘
- diskutil unmountDisk /dev/disk2
复制代码 把 disk2 换成你实际的 U 盘编号,注意用 rdisk2 而不是 disk2,速度更快
- sudo dd if=~/Downloads/Armbian_26.02.0_amlogic_s905d_trixie_6.12.74_server_2026.03.01.img of=/dev/rdisk2 bs=1m
复制代码 插入 u 盘,进入系统先按步骤初始化,然后执行
刷完 poweroff 关机,拔出 u 盘
开机后,可以通过 armbian-config, 设置静态 ip
2、创建虚拟网桥
参考脚本
创建 https://gist.github.com/zouzongh ... bf010bcdd04836d8628
删除https://gist.github.com/zouzongh ... eb926f2ffe3c7c014a9
3、安装 incus
- apt update
- apt install -y incus incus-client
- systemctl enable --now incus
复制代码
4、创建存储池
- incus storage create default dir
- incus profile device add default root disk path=/ pool=default
- incus profile show default
复制代码
5、创建 openwrt 容器
创建容器
- incus launch images:openwrt/24.10 openwrt
复制代码 桥接到虚拟网桥
- incus config device add openwrt eth0 nic nictype=bridged parent=br-lan name=eth0
复制代码 设置静态 ip
- incus file push - openwrt/etc/config/network << 'EOF'
- config interface 'loopback'
- option device 'lo'
- option proto 'static'
- option ipaddr '127.0.0.1'
- option netmask '255.0.0.0'
- config interface 'lan'
- option device 'eth0'
- option proto 'static'
- option ipaddr '192.168.2.211'
- option netmask '255.255.255.0'
- option gateway '192.168.2.111'
- option dns '192.168.2.111'
- EOF
复制代码 重启网卡
- incus exec openwrt -- /etc/init.d/network restart
- incus exec openwrt -- ip a show eth0
复制代码
6、安装主题
下载 https://github.com/jerrykuku/luci-theme-argon/releases/tag/v2.4.3
software 搜索 luci-i18n-base-zh-cn 安装中文语言
7、安装 open克拉斯
1. 卸载 dnsmasq
2. 安装 dnsmasq-full
3. 解决读取不到随机数问题,ssh 连接 openwrt 执行
- sed -i 's/procd_add_jail/: \0/g' /etc/init.d/dnsmasq
- /etc/init.d/dnsmasq restart
- /etc/init.d/dnsmasq status
复制代码 4. 下载安装 https://github.com/vernesong/OpenClash/releases
5. 遇到错误 module 'luci.cbi.datatypes' not found,ssh 连接 openwrt 执行
- opkg install --force-reinstall luci-base luci-compat
- /etc/init.d/uhttpd restart
复制代码
6. 防护墙设置 接受 转发
|
|