-
Notifications
You must be signed in to change notification settings - Fork 4
Installation
CountStarlight edited this page Nov 5, 2016
·
2 revisions
For running MySui Online Judge, a Linux server with following requirements is needed:
- Webserver running PHP version 5.3 or later
- PHP CLI (PHP command line interface, i.e.
php
shell command) You should be able to runphp
from command line. In Ubuntu you need to installphp5-cli
package. - MySql database (with
mysqli
extension for PHP) or PostgreSql database - PHP must have permission to run shell commands using shell_exec function. For example this command should run correctly:
echo shell_exec("php -v");
- Tools for compiling and running submitted codes (
gcc
,g++
,javac
,java
,python2
,python3
commands) - It is better to have
perl
installed for more precise time and memory limit and imposing size limit on output of submitted code.
-
- Download the latest release from download page and unpack downloaded file in your public html directory.
-
-
[Optional] Move folders
system
andapplication
somewhere outside your public directory, and enter their full path inindex.php
file.
-
[Optional] Move folders
$system_path = '/home/mohammad/secret/system';
$application_folder = '/home/mohammad/secret/application';
-
- Create a MySql or PostgreSql database for Sharif Judge. Do not install any database connection package for C/C++, Java or Python.
-
- Set database connection settings in file
application/config/database.php
. You can use a prefix for your table names.
- Set database connection settings in file
/* Enter database connection settings here: */
'dbdriver' => 'postgre', // database driver (mysqli, postgre)
'hostname' => 'localhost', // database host
'username' => `, // database username
'password' => `, // database password
'database' => `, // database name
'dbprefix' => 'shj_', // table prefix
/**********************************************/
-
- Make
application/cache/Twig
writable by php.
- Make
-
- Open Sharif Judge's main page in a web browser and follow the installation process.
-
- Log in with your admin account.
-
tester
andassignments
somewhere outside your public directory. Then save their full path inSettings
page. These two folders must be writable by PHP. Submitted files will be stored inassignments
folder. So it should be somewhere not publicly accessible.
Important: [Secure Sharif Judge]https://github.com/MySuiLab/MySuiOJ/wiki/Security)
Now that you have installed MySui Online Judge, you may want to:
- Add Assignment
- Change settings (time zone, upload size limit, ...)
- Add Users
- [IMPORTANT] Secure
- [IMPORTANT] Enable Sandbox
- Learn about Shield
- Enable clean URLs