Skip to content

Commit 5626149

Browse files
committed
补充 1panel 安装和更新教程
1 parent 7eda454 commit 5626149

File tree

9 files changed

+57
-0
lines changed

9 files changed

+57
-0
lines changed

docs/install/os-1panel.mdx

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# 1Panel
2+
3+
## 安装
4+
5+
1. 应用商店搜索 `zfile`
6+
7+
<img className={'sm:w-6/12 '} src="/img/2025/5/11/1panel-1.png"></img>
8+
9+
2. 点击安装,按提示信息填写:
10+
11+
<img className={'sm:w-6/12 '} src="/img/2025/5/11/1panel-2.png"></img>
12+
13+
3. 等待安装完成(首次安装可能比较慢,因为要拉取镜像),然后访问上一步填写的 `http://ip:端口` 即可(域名和 https 配置参考 1panel 官方教程)
14+
15+
## 更新
16+
17+
点击 `容器` -> `更多` -> `升级`
18+
19+
<img className={'sm:w-6/12 '} src="/img/2025/5/11/1panel-3.png"></img>
20+
<img className={'sm:w-6/12 '} src="/img/2025/5/11/1panel-4.png"></img>
21+
22+
23+
如果你从 4.1.5 升级过来的,升级后之前的数据丢失了,是因为 1panel 默认映射的目录变化了,按照以下操作:
24+
25+
<img className={'sm:w-6/12 '} src="/img/2025/5/11/1panel-5.png"></img>
26+
27+
双击 `docker-compose.yml` 文件,检查下面的 `volumes` 块,最新版应该是:
28+
29+
```yaml
30+
volumes:
31+
- ./data/db:/root/.zfile-v4/db
32+
- ./data/logs:/root/.zfile-v4/logs
33+
- ./data/mnt:/data/file
34+
```
35+
36+
4.1.5 版本是:
37+
38+
```yaml
39+
volumes:
40+
- /opt/zfile/data/db:/root/.zfile-v4/db
41+
- /opt/zfile/data/logs:/root/.zfile-v4/logs
42+
- /opt/zfile/data/mnt:/root/.zfile-v4/mnt
43+
```
44+
45+
46+
方式1:将 /opt/zfile/data/ 目录下的文件迁移到 docker-compose.yml 文件所在目录下的 data/ 目录下,然后重建容器即可。
47+
<img className={'sm:w-6/12 '} src="/img/2025/5/11/1panel-6.png"></img>
48+
<img className={'sm:w-6/12 '} src="/img/2025/5/11/1panel-7.png"></img>
49+
50+
方式2:可以将 `docker-compose.yml` 文件中的 `volumes` 块替换成上面的内容,保存后,重建容器即可。
51+
52+
<img className={'sm:w-6/12 '} src="/img/2025/5/11/1panel-7.png"></img>

sidebars.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ const sidebars = {
6161
type: 'doc',
6262
label: '宝塔传统方式'
6363
},
64+
{
65+
id: 'install/os-1panel',
66+
type: 'doc',
67+
label: '1Panel应用商店'
68+
},
6469
{
6570
id: 'install/os-linux',
6671
type: 'doc',

static/img/2025/5/11/1panel-1.png

93.6 KB
Loading

static/img/2025/5/11/1panel-2.png

135 KB
Loading

static/img/2025/5/11/1panel-3.png

128 KB
Loading

static/img/2025/5/11/1panel-4.png

84.8 KB
Loading

static/img/2025/5/11/1panel-5.png

88 KB
Loading

static/img/2025/5/11/1panel-6.png

48.3 KB
Loading

static/img/2025/5/11/1panel-7.png

89.6 KB
Loading

0 commit comments

Comments
 (0)