Universal Online Judge Documents
来源:互联网 发布:梦幻西游频繁网络错误 编辑:程序博客网 时间:2024/05/29 08:03
Universal Online Judge
Dependence
This is a dockerized version of UOJ. Before installation, please make sure that Docker has already been installed on your OS.
The docker image of UOJ is 64-bit, so a 32-bit host OS may cause installation failure.
Installation
First please download JDK7u76 and JDK8u31, and put them to docker/jdk-7u76-linux-x64.tar.gz
and docker/jdk-8u31-linux-x64.tar.gz
. These two compressed files are used by judge_client for judging Java program. If you are too lazy to download these two huge files, you can simply place two empty .tar.gz files there.
Next, you can run the following command in your terminal: (not the one in the docker/
directory!)
./install
If everything goes well, you will see Successfully built <image-id>
in the last line of the output.
To start your UOJ main server, please run:
docker run -it -p 80:80 -p 3690:3690 <image-id>
If you are using docker on Mac OS or having ‘std: compile error. no comment’ message on uploading problem data, you could possibly use this alternative command:
docker run -it -p 80:80 -p 3690:3690 --cap-add SYS_PTRACE <image-id>
The default hostname of UOJ is local_uoj.ac
, so you need to modify your host file in your OS in order to map 127.0.0.1
to local_uoj.ac
. (It is /etc/hosts
on Linux.) After that, you can access UOJ in your web browser.
The first user registered after the installation of UOJ will be a super user. If you need another super user, please register a user and change its usergroup
to “S” in the table user_info
. Run
mysql app_uoj233 -u root -p
to login mysql in the terminal.
Notice that if you want only one judge client, then everything is ok now. Cheers!
However, if you want more judge clients, you need to set up them one by one. First run:
./config_judge_client
and answer the questions.
- uoj container id: the container id of the main server.
- uoj ip: the ip address of the main server.
- judger name: you can take a name you like, such as judger, judger_2, very_strong_judger. (containing special characters may cause unforeseeable consequence.)
After that, a sql command is given, we will talk about it later.
Next, we need to run:
./install_judge_client
to build the docker image. If you want to run judger at the same server, you just need to run
docker run -it <image-id>
And, you need to complete the sql command given just now with the ip address of the judger docker, and modify the database. To someone who do not know how to get the ip address of a docker container, here is the answer:
docker inspect --format '{{ .NetworkSettings.IPAddress }}' <container-id>
Or, if you want to run judger at different server, you need to copy the image to the other server, and run
docker run -p 2333 -it <image-id>
Similarly, you need to complete the sql command and modify the database. This time, you need to fill with the ip address of the host machine of the judger docker.
You may meet many difficulties during the installation. Good luck and have fun!
Notes
mysql default password: root
local_main_judger password: judger
You can change the default hostname and something else in /var/www/uoj/app/.config.php
. However, not all the config is here, haha.
More Documentation
As you know, my Yingyu is not very hao. Suoyi only the README file is En(Chi)nglish for internationalization.
More documentation is here: https://vfleaking.github.io/uoj/
License
MIT License.
- Universal Online Judge Documents
- Online Judge
- Online Judge
- Online Judge
- Online Judge
- Online Judge
- Online Judge
- Active Perl Online documents
- online documents ---mark
- online judge制作手记
- 成幻Online Judge
- Online Judge汇总
- online judge汇总
- ACM Online Judge 列表
- hdu 1073 Online Judge
- 关于online judge系统
- HDU 1073 Online Judge
- HDU 1073 Online Judge
- linux多线程设计
- 如何爬取了知乎用户信息,并做了简单的分析
- 年龄问题
- 数据链路层---PPP协议
- SpringAOP中,获取参数名称
- Universal Online Judge Documents
- nyoj ACM:士兵杀敌(四)(树状数组)
- 最简单易用的Qt 界面库插件 FTStyle (二)最新版本
- 【mysql】FATAL ERROR: Could not find ./bin/my_print_defaults 解决方法
- 方格填数-用next_permutation()全排列函数做的
- CodeForces 764C Timofey and a tree
- [DP] BZOJ 4758 [Usaco2017 Jan]Subsequence Reversal
- 方程的解
- 写给初学者01_android_什么是安卓