How to Install SourceBans++ on MXLinux Latest

Introduction

SourceBans++ is an open-source administration and ban management system for game servers. It provides a straightforward and efficient way to manage users, ban lists, and more. In this tutorial, we will guide you through the process of installing SourceBans++ on MXLinux Latest.

Prerequisites

Step 1: Install Required Dependencies

Before starting the installation process, make sure to install the required dependencies. Use the apt package manager to install the following packages:

sudo apt-get update
sudo apt-get install build-essential git php php-dev php-mysql php-curl php-pear php-zip php-json libapache2-mod-php

Step 2: Clone the SourceBans++ Repository

Clone the SourceBans++ repository using the following command:

cd /var/www/html/
sudo git clone https://github.com/sbpp/sourcebans-pp.git

This command will download the SourceBans++ repository and create a new directory named sourcebans-pp inside the /var/www/html/ directory.

Step 3: Install the Required PHP Extensions

After cloning the repo, change the directory to the sourcebans-pp directory and install the required PHP extensions using the pecl command:

cd /var/www/html/sourcebans-pp
sudo pecl install grpc
sudo pecl install protobuf

Step 4: Install Composer

Composer is a PHP dependency manager required by SourceBans++. You can install Composer by running the following command:

sudo curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer

Step 5: Install Dependencies with Composer

Next, install the SourceBans++ dependencies using Composer by running the following command inside the sourcebans-pp directory:

sudo composer install

Step 6: Create Database and User

Now that the dependencies are installed, you need to create a new database and user for SourceBans++. You can do this by logging in to your MySQL server and running the following commands:

CREATE DATABASE sourcebans;
CREATE USER 'sbppuser'@'localhost' IDENTIFIED BY 'sbpppassword';
GRANT ALL PRIVILEGES ON sourcebans.* TO 'sbppuser'@'localhost';
FLUSH PRIVILEGES;

Note: Replace sbppuser and sbpppassword with your desired database username and password.

Step 7: Generate Configuration File

Copy the example configuration file and generate a new configuration file using the following commands:

cd /var/www/html/sourcebans-pp/config/
cp _base.php.example _base.php
cp databases.yml.example databases.yml

Edit the databases.yml file to include your database credentials:

all:
  doctrine:
    class: sfDoctrineDatabase
    param:
      dsn:      mysql:host=localhost;dbname=sourcebans
      username: sbppuser
      password: sbpppassword
      encoding: utf8
      persistent: true

Note: Replace sbppuser and sbpppassword with your desired database username and password.

Step 8: Set Permissions

Change the ownership and permissions of the sourcebans-pp directory to the Apache/Nginx user (www-data):

sudo chown -R www-data:www-data /var/www/html/sourcebans-pp
sudo chmod -R 755 /var/www/html/sourcebans-pp

Step 9: Configure Apache Virtual Host

If you are using Apache as your webserver, you will need to create a new virtual host file. Open a new file:

sudo nano /etc/apache2/sites-available/sourcebans.conf

Then, add the following configuration:

<VirtualHost *:80>
   ServerAdmin webmaster@localhost
   DocumentRoot /var/www/html/sourcebans-pp/web
   <Directory /var/www/html/sourcebans-pp/web>
      Options FollowSymLinks
      AllowOverride All
      Require all granted
   </Directory>

   ErrorLog ${APACHE_LOG_DIR}/error.log
   CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

Step 10: Enable the Virtual Host

Enable the virtual host you just created by running the following command:

sudo a2ensite sourcebans.conf

Step 11: Restart Apache

Restart the Apache webserver to apply the changes:

sudo systemctl restart apache2

Step 12: Access SourceBans

You can now access SourceBans++ by visiting http://your-server-ip/sourcebans-pp/web/ in your web browser.

Conclusion

Congratulations! You have successfully installed SourceBans++ on MXLinux Latest. You can now use it for managing your game server bans and users.

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!