1.lxc创建alpine系统
可以是“无特权的容器”,可以取消勾选”嵌套“。ip在pve创建lxc容器时设置固定ip并指定ip。
2.更改alpine软件源
|
|
更新
|
|
3.创建文件夹
|
|
4.安装adguardhome
4.1下载
github下载页面
https://github.com/AdguardTeam/AdGuardHome/releases
例如
|
|
4.2解压
|
|
4.3创建启动脚本
|
|
添加以下内容
#!/sbin/openrc-run
#
# openrc service-script for AdGuardHome
#
# place in /etc/init.d/
# start on boot: "rc-update add adguardhome"
# control service: "service adguardhome <start|stop|restart|status|checkconfig>"
#
description="AdGuard Home: Network-level blocker"
pidfile="/run/$RC_SVCNAME.pid"
command="/root/program/AdGuardHome/AdGuardHome"
command_args="-s run"
command_background=true
extra_commands="checkconfig"
depend() {
need net
provide dns
after firewall
}
checkconfig() {
"$command" --check-config || return 1
}
stop() {
if [ "${RC_CMD}" = "restart" ] ; then
checkconfig || return 1
fi
ebegin "Stopping $RC_SVCNAME"
start-stop-daemon --stop --exec "$command" \
--pidfile "$pidfile" --quiet
eend $?
}
添加执行权限
|
|
4.4配置开机启动
添加开机启动
|
|
启动服务
|
|
5.打开网页
ip:3000
参考
Alpine LXC容器安装AdGuardHome-OPENWRT专版-恩山无线论坛 - Powered by Discuz! (right.com.cn)