一键安装 (product.kopens.io)
只要服务器能上网,一条命令就能开始安装。
curl -fsSL https://product.kopens.io/plantpulse-studio/install.sh | sudo bash
如果是隔离网络,请参阅气隙安装。
开始前的检查
| 检查项 | 说明 |
|---|---|
| 权限 | 必须以 root 身份运行 (sudo bash) |
| 网络 | 能够通过 HTTPS 访问 product.kopens.io · docker.kopens.io |
| 需要的值 | Platform 地址、数据存储路径 — 详见下文 |
脚本的工作内容
- 检查是否为 root 用户
- 如果没有
git,则安装它(dnf/apt) - 先尝试 tarball 包(无需认证),失败则从仓库 clone
- 继续执行安装脚本
Studio 默认使用 tarball 路径
CDN 上已上传捆绑包,无需仓库认证即可获取。即使公司防火墙阻止了仓库访问,安装仍会继续进行。
指定值进行安装
环境变量应放在 bash 之前。放在 curl 之前会无法通过管道传递。
curl -fsSL https://product.kopens.io/plantpulse-studio/install.sh \
| sudo PLATFORM_API_TARGET=https://192.168.0.41 DATA_ROOT=/data1/pp-studio bash
如果要逐个提示输入空值,请以交互模式运行。首次安装时推荐使用。
curl -fsSL https://product.kopens.io/plantpulse-studio/install.sh | sudo INTERACTIVE=1 bash
| 环境变量 | 默认值 | 用途 |
|---|---|---|
INTERACTIVE | 0 | 如果为 1,通过提示输入空值 |
PLATFORM_API_TARGET | — | Platform API 地址(实时数据·身份认证委托) |
DATA_ROOT | /var/lib/pp-studio | 工作空间、构建、数据库数据存储位置 |
DEST | /opt/kopens/plantpulse-studio-docker | 安装位置 |
BRANCH | main | 从仓库获取时的分支 |
GIT_USER · GIT_TOKEN | — | tarball 失败转为 clone 时的认证信息 |
完整的环境变量列表见环境变量参考。