How to Install SourceBans++ on macOS

SourceBans++ is a powerful administration and ban management system for Source engine-based game servers, such as Counter-Strike: Global Offensive (CS:GO) or Team Fortress 2 (TF2). In this tutorial, we will guide you through the process of installing SourceBans++ on macOS.

Prerequisites

Before we start, make sure you have the following software installed on your macOS system:

If you don't have any of these software installed, you can install them using Homebrew, a popular package manager for macOS.

  1. Open Terminal and type the following command to install Homebrew:
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  1. After installing Homebrew, use it to install the required software by running the following commands:
$ brew install git
$ brew install httpd
$ brew install php
$ brew install mysql

Installing SourceBans++

Now that you have the prerequisites installed, let's proceed with the installation of SourceBans++:

  1. Open Terminal and navigate to the document root of your Apache web server. This is usually located at /Library/WebServer/Documents/.
$ cd /Library/WebServer/Documents/
  1. Clone the SourceBans++ repository using Git.
$ git clone https://github.com/sbpp/sourcebans-pp.git
  1. Rename the sourcebans-pp directory to a name of your choice. For example, if you want to use sbpp as the directory name, run the following command:
$ mv sourcebans-pp sbpp
  1. Open the config.php file located in the sbpp directory using your preferred text editor.
$ nano sbpp/config.php
  1. Modify the following settings in the config.php file to match your MySQL database settings:
$config['database']['host'] = 'localhost';
$config['database']['port'] = 3306;
$config['database']['username'] = 'root';
$config['database']['password'] = '';
$config['database']['database'] = 'sourcebans'; // Replace with your database name
  1. Save and close the config.php file.

  2. Create a new MySQL user and grant it privileges to create tables and insert data into the sourcebans database.

$ mysql -u root -p

Enter your MySQL root password when prompted.

> CREATE USER 'sourcebans'@'localhost' IDENTIFIED BY 'your_password_here';
> GRANT ALL PRIVILEGES ON sourcebans.* TO 'sourcebans'@'localhost';
> FLUSH PRIVILEGES;
> EXIT;

Replace your_password_here with a strong password of your choice.

  1. Import the sourcebans.sql file into your MySQL database.
$ mysql -u root -p sourcebans < sbpp/sb.sql

Enter your MySQL root password when prompted.

  1. Configure Apache to serve the SourceBans++ directory.
$ sudo nano /usr/local/etc/httpd/httpd.conf
LoadModule php_module libexec/apache2/libphp.so
Include /usr/local/etc/httpd/extra/httpd-vhosts.conf
<VirtualHost *:80>
    DocumentRoot "/Library/WebServer/Documents/sbpp/"
    ServerName sbpp.local
    <Directory "/Library/WebServer/Documents/sbpp/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>
  1. Restart Apache to apply the changes.
$ sudo apachectl restart
  1. Open your web browser and navigate to http://sbpp.local. You should see the SourceBans++ installation page.

  2. Follow the on-screen instructions to complete the installation process.

Congratulations! You have successfully installed SourceBans++ on your macOS system.

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!