From 70195ceca0c8ef307b52f3dda36cc4f12fc13ce2 Mon Sep 17 00:00:00 2001 From: undefined Date: Thu, 24 Nov 2022 17:09:32 +0800 Subject: [PATCH] install: fix outdated link --- install/docker/judge/Dockerfile | 2 +- install/ubuntu-2004.sh | 76 --------------------------------- 2 files changed, 1 insertion(+), 77 deletions(-) delete mode 100644 install/ubuntu-2004.sh diff --git a/install/docker/judge/Dockerfile b/install/docker/judge/Dockerfile index af7d156b..c2c6dee7 100644 --- a/install/docker/judge/Dockerfile +++ b/install/docker/judge/Dockerfile @@ -22,7 +22,7 @@ ADD ./judge.yaml /root/judge.yaml RUN chmod +x /root/entrypoint.sh RUN yarn global add pm2 @hydrooj/hydrojudge && \ - wget https://s3.undefined.moe/file/executor-amd64 -O /usr/bin/sandbox && \ + wget https://github.com/criyle/go-judge/releases/download/v1.6.0/executorserver_1.6.0_linux_amd64 -O /usr/bin/sandbox && \ chmod +x /usr/bin/sandbox ENTRYPOINT /root/entrypoint.sh diff --git a/install/ubuntu-2004.sh b/install/ubuntu-2004.sh deleted file mode 100644 index e9642de8..00000000 --- a/install/ubuntu-2004.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash -name=focal -echo "Running Hydro Installer for ubuntu 20.04" -echo "此脚本已不再维护,推荐使用新版安装工具:" -echo "LANG=zh bash <(curl https://hydro.ac/install.sh)" -echo "详情请参阅文档 -> https://hydro.js.org" -echo "使用 Ctrl-C 退出该脚本,或是等待十秒后继续。" -echo "Will continue installation in 10 secs, press Ctrl-C to exit" -sleep 10 - -# Basic -echo "apt-get update" -apt-get -qq update -echo "apt-get install curl wget gnupg -y" -apt-get install -y curl wget gnupg >/dev/null -wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | apt-key add - -echo "deb [ arch=amd64 ] https://mirrors.tuna.tsinghua.edu.cn/mongodb/apt/ubuntu $name/mongodb-org/4.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.4.list -echo "apt-get update" -apt-get -qq update -mkdir -p /data/db /data/file - -# Install NodeJS -echo "Installing NodeJS" -curl -o- https://cdn.jsdelivr.net/gh/nvm-sh/nvm@v0.36.0/install.sh | sed 's/raw.githubusercontent.com\/nvm-sh\/nvm\//cdn.jsdelivr.net\/gh\/nvm-sh\/nvm@/g' | sed 's/github.com\/nvm-sh\/nvm.git/gitee.com\/imirror\/nvm/g' | bash -export NVM_DIR=/root/.nvm -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" -NVM_NODEJS_ORG_MIRROR=https://mirrors.tuna.tsinghua.edu.cn/nodejs-release nvm install 14 -nvm use 14 -npm i yarn -g -echo "Installing pm2" -yarn global add pm2 - -# Install MongoDB -echo "Installing MongoDB" -db_password=$(cat /dev/urandom | head -n 10 | md5sum | head -c 20) -apt-get -qq install -y mongodb-org -echo "db.createUser({ - user: 'hydro', - pwd: '$db_password', - roles: [ - { role: 'readWrite', db: 'hydro' } - ] -})" >/tmp/createUser.js -echo "pm2 start mongod" -pm2 start mongod >/dev/null -sleep 2 -mongo 127.0.0.1:27017/hydro /tmp/createUser.js -rm /tmp/createUser.js -echo "pm2 stop mongod" -pm2 stop mongod >/dev/null -pm2 del mongod >/dev/null -echo 'Starting mongodb' -pm2 start "mongod --auth --bind_ip 0.0.0.0" --name mongodb - -# Install Compiler -echo 'Installing g++' -apt-get install -y g++ >/dev/null - -# Install HydroOJ -echo "Installing Hydro" -yarn global add hydrooj @hydrooj/ui-default @hydrooj/hydrojudge -wget https://s3.undefined.moe/file/executor-amd64 -O /usr/bin/sandbox -chmod +x /usr/bin/sandbox -pm2 start sandbox -mkdir ~/.hydro -echo "{\"host\":\"127.0.0.1\",\"port\":\"27017\",\"name\":\"hydro\",\"username\":\"hydro\",\"password\":\"$db_password\"}" >~/.hydro/config.json -echo '["@hydrooj/ui-default","@hydrooj/hydrojudge"]' >~/.hydro/addon.json -pm2 start hydrooj - -pm2 startup -pm2 save - -# Done -echo "Done" -echo "Database username: hydro" -echo "Database password: $db_password"