CentOS环境下搭建青岛大学OJ

1.安装必要的依赖
sudo yum update
sudo yum -y install epel-release
sudo yum -y install python-pip
sudo yum clean all
sudo yum -y install python-pip
pip install docker-compose
sudo yum -y install vim
sudo yum -y install curl
sudo yum install -y git

2.安装 Docker(建议参见官方github文档)
curl -sSL http://acs-public-mirror.oss-cn-hangzhou.aliyuncs.com/docker-engine/internet | sh - (找不到这个的镜像)
curl -sSL https://get.daocloud.io/docker | sh
sudo systemctl start docker
sudo systemctl enable docker
docker version

3.开始安装
(选择好安装路径运行命令)
git clone -b 2.0 https://github.com/QingdaoU/OnlineJudgeDeploy.git && cd OnlineJudgeDeploy
docker-compose up -d
docker ps -a

通过浏览器访问服务器的 HTTP 80 端口或者 HTTPS 443 端口,就可以开始使用了。后台管理路径为/admin, 安装过程中自动添加的超级管理员用户名为 root,密码为 rootroot, 请务必及时修改密码。


遇到的问题:

1.安装宝塔面板(不是必须的,这只是我的需求)

https://liuyanzhao.com/6323.html

2.搭建文档

https://github.com/QingdaoU/OnlineJudgeDeploy/tree/2.0

https://www.cnblogs.com/youcong/p/10085387.html

3.过程中的奇奇怪怪的问题

apt-get不能用

https://www.cnblogs.com/yadongliang/p/8660046.html

docker安装镜像找不到

https://www.cnblogs.com/yufeng218/p/8370670.html

80端口被占用

https://blog.csdn.net/qq_37495786/article/details/83274290

 

原文地址:https://www.cnblogs.com/wizarderror/p/11439757.html