OJ在线判题系统-HOJ部署教程-快速部署-单机部署

环境配置

推荐服务器配置

CPU内存硬盘建议
n*2核n*4Gn*20G推测大约n*(100~200)人使用

系统选择:

优先Ubuntu16.04及以上,amd64/arm64架构

linux环境搭建

安装docker

sudo apt-get update
sudo apt-get install \
   apt-transport-https \
   ca-certificates \
   curl \
   gnupg-agent \
   software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) \
  stable"
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
sudo curl -L https://github.com/docker/compose/releases/download/1.28.6/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

换源

单机部署

git clone https://gitee.com/himitzh0730/hoj-deploy.git && cd hoj-deploy
# 或者选择github的仓库
# git clone https://github.com/HimitZH/HOJ-Deploy.git && cd hoj-deploy
cd standAlone
docker-compose up -d

打开浏览器,访问http://服务器ip,如若正常,即可看到OJ首页。

默认唯一的超级管理员账号如下,请注意之后点击页面右上角头像选择我的设置修改默认密码!

账号:root
密码:hoj123456

© 版权声明
THE END
喜欢就支持一下吧
点赞5 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容