Files

26 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Ubuntu 22.04 部署
`install.sh` 将 Linux amd64 服务安装到 `/opt/remotecompile/bin/`,使用 `remotecompile` 系统账户运行,由 systemd 管理并设为开机启动。脚本会重启同名服务;不会安装或修改 Android SDK。
```sh
sudo bash install.sh /tmp/remotecompile-linux-amd64
```
可在首次安装时通过 `sudo env JAVA_HOME=... ANDROID_HOME=... bash ...` 指定服务器已有的 JDK/SDK。已有配置不覆盖;后续修改 `/etc/remotecompile/environment` 后重启。
- 配置和随机 Token:`/etc/remotecompile/environment`,仅 root 可读。
- 数据及缓存:`/var/lib/remotecompile/`,服务账户可写。
- 日志:`journalctl -u remotecompile -f`。
- 重启:`sudo systemctl restart remotecompile`。
- 仅监听 `127.0.0.1:8765`;通过本机 SSH 隧道或 HTTPS 代理访问。
- systemd 启用 ProtectHome,SDK 不应放在 `/root` 或 `/home`;建议工具链放在服务可读的 `/opt` 下。按需安装 SDK 组件时需要明确调整工具链目录权限,服务只对自身数据目录拥有写权限。
- SDK 自动下载、licenses 和签名材料需要单独准备。服务健康检查通过不代表真实项目已完成构建。
本机连接示例:
```sh
ssh -N -L 8765:127.0.0.1:8765 root@192.168.5.224
```
插件填 `http://127.0.0.1:8765`;Token 从服务器配置中读取后填入 IDE PasswordSafe。不要把配置提交仓库。