Skip to content

Latest commit

 

History

History
executable file
·
69 lines (52 loc) · 1.7 KB

tutorial.md

File metadata and controls

executable file
·
69 lines (52 loc) · 1.7 KB

Tutorial for Installing PCSJudge in a Linux Distro

Part 1 - Setting up your environment

  • Install a Linux distro
  • Install the LAMP package - Apache2, PHP7 and Postgres. Make sure that your current version is PHP7 typing:
$ php -v
  • Check if it is all right with Apache installation just typing your server address in your browser, e.g.,
127.0.0.1
  • Install p7zip-full package
apt-get install p7zip-full

Part 2 - Downloading SharifJudge

  • Download SharifJudge from PCS' Github repository
  • Move the folder to this directory (or your predefined server folder)
var/www/html 
  • Unzip it
  • Edit index.php and change it to development mode

Part 3 - Setting up a database

Access postgres's shell by typing (where **** is your password defined at the postgres's installation process)

$ sudo -u postgres psql
  • Create a database for the Judge typing
$ create database Judge;
  • Exit the shell by typing
$ exit

Part 4 - Setting up SharifJudge

  • in your Judge folder, edit setting the parameters needed as the instructions show
/application/config/database.php 
  • Give to Twig folder access to be writable by PHP
$ chown -R www-data:www-data /application/cache/Twig
  • In /application/config/config.php change line 42 to set the base_url as the URL for the website

  • Type in you browser and follow all the instructions

localhost/Judge/index.php 
  • it will be needed to move assignments and tester folders to another directory and give them the same permission as you did for Twig
OBS: Do not forget to install g++ for compiling C++ code!