mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
更新ubuntu1804自动安装脚本
This commit is contained in:
1 parent
0ed107bbba
commit
6fa6ace318
2 files changed
+9
-5
No files matched your search
@@ -1,10 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Basic
|
||||
apt-get update
|
||||
apt-get install curl wget unzip gnupg -y
|
||||
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
|
||||
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.0.list
|
||||
apt-get update
|
||||
apt-get install curl wget unzip
|
||||
|
||||
# Install MongoDB
|
||||
apt-get install -y mongodb-org
|
||||
@@ -12,17 +13,20 @@ apt-get clean
|
||||
mkdir -p /data/db
|
||||
|
||||
# Install NodeJS
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash
|
||||
export $NVM_DIR=/root/.nvm
|
||||
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' | bash
|
||||
export NVM_DIR=/root/.nvm
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
||||
nvm install 14
|
||||
nvm use 14
|
||||
|
||||
# Install HydroOJ
|
||||
npm i yarn -g
|
||||
yarn global add hydrooj @hydrooj/ui-default
|
||||
# TODO: install basic addons?
|
||||
yarn global add hydrooj @hydrooj/ui-default @hydrooj/hydrojudge
|
||||
|
||||
# TODO: auto-config & start? pm2 daemon?
|
||||
|
||||
# Finish
|
||||
echo "Done! use 'hydrooj' to start."
|
||||
|
||||
# TODO: install judge
|
||||
@@ -4,7 +4,7 @@ import os from 'os';
|
||||
import fs from 'fs-extra';
|
||||
import AdmZip from 'adm-zip';
|
||||
import xml2js from 'xml2js';
|
||||
import { ObjectID } from 'bson';
|
||||
import { ObjectID } from 'mongodb';
|
||||
import { filter } from 'lodash';
|
||||
import decodeHTML from 'decode-html';
|
||||
import { LocalProblemConfig } from 'hydrooj';
|
||||
|
||||
Reference in new issue
Block a user