面板端常用命令¶
在装面板的服务器上,用 root 运行。
服务管理¶
systemctl status ocean # 查看状态
systemctl restart ocean # 重启
systemctl stop ocean # 停止
systemctl start ocean # 启动
journalctl -u ocean -n 100 # 看最近 100 行日志
journalctl -fu ocean # 实时看日志
面板网页里也有 管理 → 运行日志,不用登录服务器就能看。
文件位置¶
| 项目 | 位置 |
|---|---|
| 程序与数据目录 | /opt/ocean/ |
| 数据库 | /opt/ocean/data.db |
| 配置文件 | /opt/ocean/config.yml |
| 首次安装的账号密码 | /opt/ocean/init.log |
配置文件¶
/opt/ocean/config.yml 里常用的项:
database-path: "data.db"
listen: "127.0.0.1:18888"
public-url: "https://panel.example.com"
agent-bin-dir: "agent-bin"
| 项 | 说明 |
|---|---|
listen |
面板监听的地址和端口。用反向代理时用 127.0.0.1:18888。 |
public-url |
面板对外的完整地址。 |
改完后 systemctl restart ocean 生效。
备份与恢复¶
# 备份
cp -a /opt/ocean /root/ocean-backup-$(date +%Y%m%d)
# 恢复(先停服务)
systemctl stop ocean
rm -rf /opt/ocean
cp -a /root/ocean-backup-日期 /opt/ocean
systemctl start ocean
建议
用宝塔等工具设一个每天自动备份 /opt/ocean/ 的计划任务。