硬件:香橙派zero3
系统:Ubuntu 22.04.5 LTS,Casaos0.4.13
软件:homepage和glances
软件安装
homepage和glances可以在应用商店安装,不多介绍。homepage官网
homepage设置
文件对应关系:
bookmarks.yaml:书签
docker.yaml:Docker 容器
kubernetes.yaml:kubernetes 容器
logs:日志目录
services.yaml:各项服务
settings.yaml:Homepage 设置
widgets.yaml:小部件
setting.yaml
添加language: zh-CN
设置语音为中文,title
设置网页标题,hideVersion: true
隐藏网页底部发布信息,background
设置背景,这里image
使用的是随机壁纸,每次刷新都会是不一样的背景。
language: zh-CN
title: 哈哈233的主页
hideVersion: true
background:
image: https://api.xsot.cn/bing?jump=true
blur: sm #模糊程度,范围 sm, "", md, xl...
saturate: 50 #饱和度,范围 0, 50, 100...
brightness: 50 #亮度,范围 0, 50, 75...
opacity: 50 #不透明度,范围 0-100
layout为布局设置,可选择column
(行)和row
(列)两种风格,columns
设置行个数,header: false
用来隐藏头部显示
widgets.yaml
resource
下可以额外显示cputemp(cpu温度)
,uptime(服务器在线时间)
和expanded(扩展信息)
datetime(时间)
可设置大小风格
openmeteo(天气)
可使用这个网页查询经纬度
search(搜索框)
这里使用必应,可用百度(baidu),focus(进入网页聚焦搜索框)
- resources:
cpu: true
memory: true
disk: /
cputemp: true
uptime: true
expanded: true
- datetime:
text_size: xl
format:
timeStyle: short
- openmeteo:
label: 鄂州 # optional
latitude: 52.52
longitude: 13.41
timezone: Asia/Shanghai # optional
units: metric # or imperial
cache: 5 # Time in minutes to cache API responses, to stay within limits
- search:
provider: bing
focus: true
target: _blank
docker.yaml
配合glances使用
services.yaml
总共有8项设置,这里后面3项无法正常加载,故而舍去。url
选择自己对应的地址端口即可,这里2大类对应setting.yaml
中layout
部分设置
- Moniter:
- 系统信息:
widget:
type: glances
url: http://192.168.5.18:61208
metric: info
version: 4 #homepage默认为glances3.x模式,如用最新4.xglances必须加此参数
- 处理器:
widget:
type: glances
url: http://192.168.5.18:61208
metric: cpu
version: 4
- 内存:
widget:
type: glances
url: http://192.168.5.18:61208
metric: memory
version: 4
- 进程:
widget:
type: glances
url: http://192.168.5.18:61208
metric: process
version: 4
- 网络:
widget:
type: glances
url: http://192.168.5.18:61208
metric: network:eth0
version: 4
icon(图片地址)
href(应用地址)
可设置为ip:端口号,这里使用nginix反向代理域名了
description(描述)
随便写,看得懂就行
ping(测试延迟)
测的是服务器到这里的延迟,想用就用。
有些特殊的应用会有额外的组件,显示各种状态信息,具体参数和获取教程官网有写,直接看官网信息更方便
结尾
额外说一下比较特殊的Portainer,这里的server就是docker.yaml中的设置,如果组件信息显示api错误且参数设置无误,可以试试给相应文件更多权限,例如这里的/var/run/docker.sock(记得用sudo给,不然重启可能重置),还有参数env需要留意,每个人可能都不一样,记得看完教程