php 编写 online judge,基于 Laravel 的开源 Online Judge 项目——NOJ

NOJ

02a571620b7d0e48c5fc7d337a8e49cc.png

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:

cd /path-to-noj/

git clone https://github.com/ZsgsDesign/NOJ ./

Change your website root to public folder and then, if there is a open_basedir restriction, remove it;

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.

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/

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

Now, we need to configure the database, thankfully Laravel have migration already;

php artisan migrate

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

NOJ's up-and-running, enjoy!

Credit

See composer.json or Dependency List for more info.

License

git%2Bgithub.com%2FZsgsDesign%2FCodeMaster.svg?type=large

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值