From 547b6939e8c2bf4c60b08523575fb1a1ddb6cfe0 Mon Sep 17 00:00:00 2001 From: admin <84259781@qq.com> Date: Wed, 14 Oct 2026 19:27:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..6739965 --- /dev/null +++ b/README.md @@ -0,0 +1,48 @@ +# 部署(请跳至校内部署) + +## 校内部署 + +> 附件列表(无他用): +>[NIX 安装脚本](http://10.16.80.222/attach_files/hydro-setup/1) +>[APT 换源脚本](http://10.16.80.222/attach_files/hydro-setup/2) +>[Hydro 安装脚本](http://10.16.80.222/attach_files/hydro-setup/3) + +#### 1. 安装 Debian + +下载 debian13,[镜呈](http://10.16.80.222:5555/) + +#### 2. 安装一些基础软件 + +```bash +su - +apt update && apt install curl wget sudo +``` +安装完后请使用以下命令换源: + +```bash +su - +bash <(curl -s http://10.16.80.222:3000/Weishen/Hydro-Setup/raw/branch/main/apt-mirror.sh) +``` +#### 3. 安装 Hydro OJ + +```bash +su - +LANG=zh . <(curl http://10.16.80.222:3000/Weishen/Hydro-Setup/raw/branch/main/setup.sh) && pm2 unstartup && pm2 startup -u root +``` + +## 使用官网部署(仅供参考) + +> Hydro 需要使用以下端口: 80, 443, 2019, 8888, 5050, 27017,请确保这些端口空闲。 + +安装和安装后的所有操作均需要在 root 权限下进行!(sudo su 输入用户的密码, 或 su - 输入 root 账户的密码)。 + +运行下面的脚本,等待几分钟即可(建议复制防止敲错): + +```bash +LANG=zh . <(curl https://hydro.ac/setup.sh) +``` + +如果有特殊需求,安装脚本支持一些可选的高级选项,以此方式调用:` . <(curl https://hydro.ac/setup.sh) --foo --bar` + +> --no-caddy 不配置安装反向代理,只监听 127.0.0.1:8888 端口 +> --judge 仅作为独立评测机安装 \ No newline at end of file