fuqiuluo’s blog

记录美好生活

技术分享

WSL - 在Debian安装1panel控制面板

#1panel#WSL
type
Post
status
Published
date
May 8, 2024
slug
wsl-1panel
summary
在Windows的WSL技术开出来的Debian上安装1panel控制面板进行图形化的控制我的WSL里面的容器什么的东西!
tags
1panel
WSL
category
技术分享
icon
password
notion image
今天闲来无事装个1panel在我的wsl里面,然后喜提一个错误。

环境修复

上来执行1panel的安装脚本就卡住了,看了一下鸟屎输出,叫我去用什么大便Docker Desktop
哦,是1panel不能正确的安装docker导致的...

安装docker

对了,如果你安装了 Docker Desktop For Windows 可能会导致你接下来安装docker失败,所以请保证完全卸载后重新启动后再继续哦~
你如果实在想用Docker Desktop,在Debian安装完docker之后安回来就行...
完全卸载多余的docker以及环境包,保证全新安装:

Setup Docker's apt

Note
If you use a derivative distro, such as Kali Linux, you may need to substitute the part of this command that's expected to print the version codename:
Replace this part with the codename of the corresponding Debian release, such as bookworm.

Install the Docker packages.

修复systemd

嗯嗯,可以正常安装1panel了,然后启动时候, emmmm多事之秋啊!
notion image
看这个鸟屎报错,就知道,是因为傻鸟wsl的debian没有systemd导致的...
notion image
在debian里面执行下面的命令和操作:
创建或者修改wsl.conf ,设置以下内容:
设置完成内容之后,回到Windows平台,打开终端操作wsl.exe:
接下来,重新打开debian,1panel就可以正常启动安装和操作啦!

WSL超时退出

默认情况下WSL会在终端关闭5s后自动shutdown,这个操作,让我的1panel成功升天。
notion image
其实解决办法很久以前就解决了,但是很莫名其妙,我抄WSL那堆issue里面的让WSL在后台持续运行的操作又不能解决这个问题...
所以说我偷懒,开了一个控制台在那里放着...

1Panel预览图

notion image
Loading...