This is legacy code, i help to develop it when i was in 3rd semester during my bachelor degree (2012). Sorry if the code is kind of ugly :D
This is online judge application for competitive programming. Developed using PHP (CodeIgniter), and compile thing handled by Python scripts. For now its supports C/C++, Java, Python, and Ruby.
Install Step:
-
Install Webserver (LAMP)
Use Nginx or Apache Web Server to host this app, MySQL database, and PHP. You can googling how to install it. Config the root directory of Nginx/Apache to this apps folder
lpoj/lpoj
. -
Install
fromdos
sudo apt-get install tofrodos
-
Change Folder inside
pclp
to permission 777cd pclp/
find . -type d -exec chmod 777 {} +
-
Install Sandbox
sudo dpkg -i libsandbox_<version>_<platform>.deb
sudo dpkg -i pysandbox_<version>_<platform>.deb
-
Install Python MySQLdb
sudo apt-get install build-essential python-dev libmysqlclient-dev
sudo apt-get install python-mysqldb
-
Install All Compiler
install gcc, g++, ruby, python, java, just googling it :D
-
Import Database Default Schema & Change Database Config
Import file
schema.sql
to MySQL database.Change this config file
pclp/compilerDaemonMk4b/database.py
And also database config for the web app in
lpoj/application/config/database.php
-
Run Compiler Daemon
bash pclp/starter.sh
-
Try It!
Open
localhost
in your browser.Default login for admin: username is
admin
, passwordadmin
.Default login for ordinary user: username is
user
, passworduser
.
Finish, happy exploring.