1 简介
这是一个关于 1Panel v1.3
版本使用本地应用的教程。
省流总结:只要将符合规则的应用放到/opt/1panel/resource/apps/local
文件夹下
1.1 如何创建适合自己的本地应用
-
技巧 1:如何提交自己想要的应用
-
技巧 2:可以使用命令查看本地应用创建相关帮助
1panel app help
- 技巧 3:一个应用创建例子,即会在当前目录生成一个应用模板文件夹
1panel app init -k debian -v 11.7
创建一个应用初始模板,应用 key 关键词(文件夹名)为: debian,版本号为: 11.7
2 第三方应用库
这边毛遂自荐一个本地应用库,一般都是我自己用到的,应用暂时还不是很多。
默认 1Panel
安装在 /opt/
路径下,如果不是可按需修改。
关于大陆电磁环境复杂,github
网络连接可能有问题,可以自行搜寻解决方式,如 ghproxy
等。
2.1 使用 git
命令获取应用
- 克隆名为 localApps 的分支的仓库到 /opt/1panel/resource/apps/local/appstore-localApps 目录下
git clone -b localApps https://github.com/okxlin/appstore /opt/1panel/resource/apps/local/appstore-localApps
- 将 /opt/1panel/resource/apps/local/appstore-localApps/apps 目录下的所有文件复制到 /opt/1panel/resource/apps/local/ 目录下
cp -rf /opt/1panel/resource/apps/local/appstore-localApps/apps/* /opt/1panel/resource/apps/local/
- 删除 /opt/1panel/resource/apps/local/appstore-localApps 目录及其内容
rm -r /opt/1panel/resource/apps/local/appstore-localApps
- 然后应用商店刷新本地应用即可。
将其转换为 1panel
计划任务形式则是,在计划任务框里添加以下命令
git clone -b localApps https://github.com/okxlin/appstore /opt/1panel/resource/apps/local/appstore-localApps
cp -rf /opt/1panel/resource/apps/local/appstore-localApps/apps/* /opt/1panel/resource/apps/local/
rm -r /opt/1panel/resource/apps/local/appstore-localApps
2.2 使用压缩包方式获取应用
- 下载 localApps.zip 文件到目标目录
wget -P /opt/1panel/resource/apps/local https://github.com/okxlin/appstore/archive/refs/heads/localApps.zip
- 解压缩localApps.zip文件到目标目录
unzip -o -d /opt/1panel/resource/apps/local/ /opt/1panel/resource/apps/local/localApps.zip
- 复制appstore-localApps/apps目录下的所有内容到目标目录
cp -rf /opt/1panel/resource/apps/local/appstore-localApps/apps/* /opt/1panel/resource/apps/local/
- 删除appstore-localApps目录及其内容
rm -r /opt/1panel/resource/apps/local/appstore-localApps
- 删除localApps.zip文件
rm /opt/1panel/resource/apps/local/localApps.zip
- 然后应用商店刷新本地应用即可。
将其转换为1panel
计划任务形式则是,在计划任务框里添加以下命令
wget -P /opt/1panel/resource/apps/local https://github.com/okxlin/appstore/archive/refs/heads/localApps.zip
unzip -o -d /opt/1panel/resource/apps/local/ /opt/1panel/resource/apps/local/localApps.zip
cp -rf /opt/1panel/resource/apps/local/appstore-localApps/apps/* /opt/1panel/resource/apps/local/
rm -r /opt/1panel/resource/apps/local/appstore-localApps
rm /opt/1panel/resource/apps/local/localApps.zip
2.3 备注
未显示在本地应用列表里的,但是存在实际文件夹,表示是测试应用