Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tedlz123 committed Feb 22, 2015
1 parent 5372d30 commit 22c00b0
Show file tree
Hide file tree
Showing 85 changed files with 11,847 additions and 0 deletions.
63 changes: 63 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
HUST JOL安装说明
by zhblue([email protected])
自动安装使用install.sh,运行前阅读脚本头部说明设置数据库帐号。使用root运行。


手动安装顺序如下:

下载源码
http://code.google.com/p/hustoj/
svn checkout http://hustoj.googlecode.com/svn/trunk/ hustoj-read-only
创建数据库
mysql
set names utf8;
create database jol;
use jol;
source db.sql
配置Web界面
cp -R web /var/www/html/JudgeOnline
注册用户
http://127.0.0.1/JudgeOnline/registerpage.php
注册一个普通帐号
创建管理员
insert into privilege(user_id,rightstr) values('zhblue','administrator');
zhblue 为需要加管理员权限的帐号
管理员登录
普通登录后访问http://127.0.0.1/JudgeOnline/admin
##########添加用户
useradd --uid 1536 judge
judge_client.cc:424
setuid(1536); ==> //设置判题用户//
编译判题服务器、客户端


需要make g++ libmysql++-dev
(yum install g++ mysql-devel / apt-get install g++ libmysql++-dev)
mkdir /home/judge/
mkdir /home/judge/etc
mkdir /home/judge/data
mkdir /home/judge/log
mkdir /home/judge/run0

cd hustoj-read-only/core/
sudo ./make.sh


判题配置文件
########################/home/judge/etc/judge.conf###########################
OJ_HOST_NAME=localhost #数据库地址
OJ_USER_NAME=jol #数据库用户名
OJ_PASSWORD=# 数据库密码
OJ_DB_NAME=jol #数据库名
OJ_PORT_NUMBER=3306 #数据库端口
OJ_RUNNING=1 #可以同时运行几个进程
OJ_SLEEP_TIME=1 #如果有空闲 要休眠多久
OJ_TOTAL=1 #总共有多少台机器负责判题
OJ_MOD=0 #当前机器评判取模为多少的提交
########################/home/judge/etc/judge.conf###########################

设置启动脚本
with root or sudo
echo "/usr/bin/judged" > /etc/init.d/judged
chmod +x /etc/init.d/judged
ln -s /etc/init.d/judged /etc/rc3.d/S99judged
5 changes: 5 additions & 0 deletions java0.policy
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

grant {
permission java.io.FilePermission "./*", "read";
permission java.io.FilePermission "./*", "write";
};
22 changes: 22 additions & 0 deletions judge.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
OJ_HOST_NAME=127.0.0.1
OJ_USER_NAME=root
OJ_PASSWORD=root
OJ_DB_NAME=jol
OJ_PORT_NUMBER=3306
OJ_RUNNING=4
OJ_SLEEP_TIME=5
OJ_TOTAL=1
OJ_MOD=0
OJ_JAVA_TIME_BONUS=2
OJ_JAVA_MEMORY_BONUS=512
OJ_JAVA_XMS=-Xms32m
OJ_JAVA_XMX=-Xmx256m
OJ_SIM_ENABLE=0
OJ_HTTP_JUDGE=0
OJ_HTTP_BASEURL=http://127.0.0.1/JudgeOnline
OJ_HTTP_USERNAME=admin
OJ_HTTP_PASSWORD=admin
OJ_OI_MODE=0
OJ_SHM_RUN=0
OJ_USE_MAX_TIME=1
OJ_LANG_SET=0,1,2,3,4,5,6,7,8,9,10,11
Loading

0 comments on commit 22c00b0

Please sign in to comment.