DOMJudge is an automated judge system for coding competitions. It is widely used in programming contests and universities around the world. In this tutorial, we will discuss how to install DOMJudge on Arch Linux in a step-by-step manner.
Before we start the installation process, make sure that you have the following prerequisites installed on your Arch Linux system:
If you don't have any of these installed, you can use the following command to install them:
$ sudo pacman -S apache php mariadb gcc
First, download the latest version of DOMJudge from its official website. You can use the following command to download it:
$ wget https://www.domjudge.org/releases/domjudge-7.3.3.tar.gz
After downloading, extract the DOMJudge archive using the following command:
$ tar xvzf domjudge-7.3.3.tar.gz
Once you have extracted the archive, navigate to the "domjudge-7.3.3" directory and run the following commands to configure and install DOMJudge:
$ cd domjudge-7.3.3
$ sudo ./configure --with-baseurl=/domjudge
$ sudo make install
The --with-baseurl=/domjudge
option in the first command specifies the base URL where DOMJudge will be accessible (in our case, it is "/domjudge").
Next, we need to create a database for DOMJudge. Use the following commands to create a database and a user with full privileges on the database:
$ sudo mysql
mysql> CREATE DATABASE domjudge;
mysql> CREATE USER 'domjudge'@'localhost' IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON domjudge.* TO 'domjudge'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> exit
Replace "password" with your own secure password.
Run the following command to install the DOMJudge database schema:
$ sudo make install-domjudge-database
Next, we need to make some changes to the Apache configuration file, PHP configuration file and Domserver configuration file.
Open the Apache configuration file /etc/httpd/conf/httpd.conf
in a text editor and add the following lines at the end of the file:
Alias /domjudge "/opt/domjudge/domserver/www"
<Directory "/opt/domjudge/domserver/www">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Save and close the file.
Open the PHP configuration file /etc/php/php.ini
in a text editor and add the following lines at the end of the file:
date.timezone = "UTC"
upload_max_filesize = 1G
post_max_size = 1G
memory_limit = 128M
Save and close the file.
Open the Domserver configuration file /opt/domjudge/domserver/etc/domserver.yml
in a text editor and make the following changes:
database_type: "mysql"
database_hostname: "localhost"
database_name: "domjudge"
database_username: "domjudge"
database_password: "password"
Replace "password" with the password you set for the MySQL user in step 4.
Finally, start the Apache and MariaDB services and start the DOMJudge server:
$ sudo systemctl start httpd mariadb domjudge-worker@default
To test the installation, open a web browser and go to http://localhost/domjudge
. If everything is set up correctly, you should see the DOMJudge login page.
Congratulations, you have successfully installed DOMJudge on Arch Linux!
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!