DOMjudge is an open-source online judge system used in programming contests. It supports multiple programming languages and is efficient in handling automatic evaluation of submitted code. In this tutorial, you will learn how to install DOMjudge on the latest version of OpenSUSE.
To follow this tutorial, you should have:
First, you need to install the required dependencies for DOMjudge to run successfully. Run the following commands in the terminal:
sudo zypper update
sudo zypper install apache2 mysql mysql-workbench php7 php7-mysqlnd \
php7-curl php7-fileinfo php7-json php7-mbstring php7-openssl \
php7-posix php7-xmlrpc php7-zip php7-xmlreader unzip
Now, download the DOMjudge source code package from their website using the wget command. Change the version to the latest stable release at the time of installation.
wget https://www.domjudge.org/releases/domjudge-7.3.3.tar.gz
Next, extract the downloaded package using the following command:
sudo tar -xvf domjudge-7.3.3.tar.gz -C /opt/
Change the name of the extracted directory to "domjudge" for simplicity in the rest of the tutorial:
sudo mv /opt/domjudge-7.3.3 /opt/domjudge
Change directory to the extracted DOMjudge directory:
cd /opt/domjudge
Now, execute the following command to install DOMjudge:
sudo ./configure --prefix=/opt/domjudge --with-baseurl=/domjudge \
--with-dbname=domjudge --with-dbuser=domjudge \
--with-dbpass=YOUR_PASSWORD \
--with-apache-dir=/usr/share/apache2 \
--with-humans-txt=/var/www/html/humans.txt
Note: Replace YOUR_PASSWORD
with your desired database password.
After executing the configure
command, run the following commands to complete the DOMjudge installation:
sudo make domserver
sudo make install-domserver
The above commands will compile the DOMjudge source code, and install the DOMjudge with the default settings.
Create a database, database user, and provide privileges for the database user using the following commands:
sudo mysql -u root -p
mysql> CREATE DATABASE domjudge;
mysql> CREATE USER 'domjudge'@'localhost' IDENTIFIED BY 'YOUR_PASSWORD';
mysql> GRANT ALL PRIVILEGES ON domjudge.* TO 'domjudge'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> EXIT;
Note: Replace YOUR_PASSWORD
with your desired database password.
After creating the database, initialize it using the following command:
sudo /opt/domjudge/webapp/dbinit/mysql-database-init
To configure the Apache web server, copy the domjudge.conf
file to Apache's configuration directory using the following command:
sudo cp /opt/domjudge/webapp/apache.conf /etc/apache2/conf.d/domjudge.conf
Now, create a symbolic link for Apache's configuration file to avoid any conflict:
sudo ln -s /etc/sysconfig/apache2 /etc/apache2/conf.d/include.conf
After creating the symbolic link, restart the Apache web server to apply the changes:
sudo systemctl restart apache2
Finally, open your web browser and access the DOMjudge dashboard by entering the following URL:
http://YOUR_SERVER_IP_ADDRESS/domjudge
Use the default login credentials to log in:
Username: admin
Password: password
After logging in, you can customize your DOMjudge settings and create programming contests.
Congratulations, you have successfully installed DOMjudge on an OpenSUSE latest server. You can now use the DOMjudge system to host programming contests, test your students' programming skills, and automate the evaluation process.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!