Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the simply-static domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/wp-includes/functions.php on line 6121
andoq 安装openwrt

andoq 安装openwrt

玩客云刷Armbian->安装Docker->安装openwrt / 安装青龙面板 极简教程(成功率高 拿走不谢)_armbian安装openwrt-CSDN博客

#安装docker可视面板
docker run --restart always --name fast -p 8081:8081 -d -v /var/run/docker.sock:/var/run/docker.sock wangbinxingkong/fast
#打开网卡混杂模式 
ip link set eth0 promisc on
#创建网络:你的网络是多少段 X 就填多少,其他的数字不要乱改!
docker network create -d macvlan --subnet=192.168.X.0/24 --gateway=192.168.X.1 -o parent=eth0 macnet
#拉取镜像
docker pull jyhking/onecloud:1.1
#然后配置一下
docker run -itd --name=OneCloud --restart=always --network=macnet --privileged=true jyhking/onecloud:1.1 /sbin/init

#路由后台查看openwrt的ip地址->直接网页登陆IP 【账号:root 密码:password】 

树莓派中装docker,docker中装openwrt – 知乎 (zhihu.com)

自定义固件安装

scp openwrt-03.20.2024-rockchip-armv8-panther_x2-rootfs.tar.gz root@192.168.0.105:/root/

gunzip openwrt-03.20.2024-rockchip-armv8-panther_x2-rootfs.tar.gz
#使用docker import命令导入到docker,把镜像命名为openwrt
docker import openwrt-03.20.2024-rockchip-armv8-panther_x2-rootfs.tar openwrt
#检查镜像是否导入成功
docker image ls
#创建docker网络
#打开网卡混杂模式,使网卡可以接收任何流量
ip link set eth0 promisc on
#上面的命令是临时性的,重启失效。如果打算把openwrt设置成开机自动启动的话,需要改成永久有效。编辑/etc/rc.local文件,添加一行:

ip link set eth0 promisc on
#创建docker网络,网络驱动程序为macvlan,网络命名为openwrt,子网和网关根据实际情况修改
docker network create -d macvlan --subnet=192.168.0.0/24 --gateway=192.168.0.1 -o parent=eth0 openwrt
创建docker容器
使用docker run创建容器,命令格式:docker run [选项] 镜像名 命令。

docker run --restart always --name openwrt -d --network openwrt --privileged openwrt /sbin/init

openwrt基本配置
openwrt启动后,执行docker exec进入容器

docker exec -it openwrt /bin/sh
修改openwrt的root密码

passwd
编辑openwrt的/etc/config/network文件,在config interface 'lan' 一节,把设备改成eth0,把其中的ip并改成想要的ip,这里改成192.168.0.254。添加一行网关:option gateway '192.168.0.1'其他无用配置也可以删掉
重启openwrt网络,使修改生效。

service network restart

设置一下开机自动启动

docker update --restart=always openwrt
docker update --restart=always homeassistant

不加ha会导致ha启动失败