WBO is a web-based platform for hosting and organizing programming contests. It is available for free on GitHub, and can be installed on a variety of operating systems, including Void Linux.
In this tutorial, we will walk you through the steps required to install WBO on your Void Linux machine.
Before you begin, make sure you have the following:
First, you need to make sure that Git and PHP dependencies are installed on your system. To do this, run the following command:
sudo xbps-install -S git php php-mysqli php-fpm
This will install Git, PHP and the necessary PHP modules for running the WBO application.
Next, navigate to a directory where you want to store the WBO application files (e.g. /var/www/), and clone the WBO repository using the following command:
sudo git clone https://github.com/lovasoa/whitebophir.git
This will download the WBO files into a directory named "whitebophir."
WBO requires PHP-FPM to run, so you need to set up a pool configuration file for it. You can use the following command to create a new pool configuration file under /etc/php-fpm.d/:
sudo nano /etc/php-fpm.d/whitebophir.conf
In this file, add the following code:
[whitebophir]
user = www-data
group = www-data
listen = /run/php-fpm-whitebophir.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0660
pm = dynamic
pm.max_children = 10
pm.start_servers = 3
pm.min_spare_servers = 2
pm.max_spare_servers = 4
php_admin_value[memory_limit] = 512M
php_admin_value[upload_max_filesize] = 10M
php_admin_value[post_max_size] = 10M
This will create a new PHP-FPM pool for WBO named "whitebophir" and configure some basic settings such as the maximum number of PHP processes and upload limits.
Save the file and exit nano.
To serve the WBO application via a web server, you need to create a new configuration file for the web server. In this example, we will show you how to configure Nginx as the web server, but the process will be similar for other web servers.
Create a new Nginx configuration file for WBO:
sudo nano /etc/nginx/conf.d/whitebophir.conf
Add the following code to the file:
server {
listen 80;
server_name your.domain.com;
root /var/www/whitebophir/public;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/run/php-fpm-whitebophir.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
Replace "your.domain.com" with your own domain name, and save the file.
To allow the web server to access the WBO files, you need to set the appropriate permissions. Run the following commands:
sudo chown -R www-data:www-data /var/www/whitebophir
sudo chmod -R 755 /var/www/whitebophir
These commands will change the ownership of the WBO files to the www-data user and group, and set the permission to 755.
Finally, you need to create a new database and user for WBO. Log in to MySQL/MariaDB as root:
sudo mysql -u root -p
Create a new database and user for WBO:
CREATE DATABASE whitebophir;
CREATE USER 'whitebophir'@'localhost' IDENTIFIED BY 'yourpassword';
GRANT ALL PRIVILEGES ON whitebophir.* TO 'whitebophir'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Replace "yourpassword" with a strong password of your choice.
The preparation work is complete. Now you can install WBO by visiting your web server's domain name in a web browser. Follow the installation wizard, and enter the database information you created in the previous step.
You'll be asked to create an admin account during the installation process, so make sure you choose a strong username and password.
Once the installation is complete, you should be able to log in to the WBO admin dashboard and start creating programming contests.
In this tutorial, we have shown you how to install WBO on Void Linux. By following these steps carefully, you should have successfully installed and configured WBO with your web server and database, allowing you to enjoy all the benefits of a powerful programming contest platform.
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!