基于 Laravel 的开源 Online Judge 项目——NOJ

NOJ

基于Laravel的开源Online Judge项目——NOJ

NOJ是一个由PHP+Laravel开发而成的开源在线测评系统,开源地址:GitHub Repo

Installation

CentOS will be recommended for hosting NOJ, but all major operating systems are theoretically supported.

Till now, NOJ have been successfully deployed to the following systems:

  • Ubuntu 16.04.3 LTS
  • CentOS Linux release 7.6.1810 (Core)
  • Windows 10 Professional 10.0.17134 Build 17134

Here is detailed step about deploying NOJ:

  1. You need to have a server and installed the following:

  2. Clone NOJ to your website folder;

cd /path-to-noj/
git clone https://github.com/ZsgsDesign/NOJ ./
  1. Change your website root to public folder and then, if there is a open_basedir restriction, remove it;

  2. Now run the following commands at the root folder of NOJ;

composer install

Notice: you may find this step(or others) fails with message like "func() has been disabled for security reasons", it means you need to remove restrictions on those functions, basically Laravel and Composer require proc_open and proc_get_status to work properly.

  1. Almost done, you still got to modify a few folders and give them permission to write;
chmod -R 775 storage/
chmod -R 775 bootstrap/
chmod -R 775 app/Http/Controllers/VirtualCrawler/
chmod -R 775 app/Http/Controllers/VirtualJudge/
  1. OK, right now we still need to configure environment, a typical .env just like the .env.example, you simply need to type the following codes;
cp .env.example .env
vim .env
  1. Now, we need to configure the database, thankfully Laravel have migration already;
php artisan migrate
  1. Lastly, we need to configure the virtual judger and online judger;
crontab -e
* * * * * php /path-to-noj/artisan schedule:run

php artisan queue:work --queue=noj,codeforces,contesthunter,poj,vijos,pta,uva,hdu,uvalive
  1. NOJ's up-and-running, enjoy!

Credit

Laravel

Markdown

Simple-HTML-Dom

JudgeServer

HTML Purifier

See composer.json or Dependency List for more info.

License

FOSSA Status

JohnZhang
《L01 基础入门》
我们将带你从零开发一个项目并部署到线上,本课程教授 Web 开发中专业、实用的技能,如 Git 工作流、Laravel Mix 前端工作流等。
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!