How to Install SourceBans++ on Debian Latest
Introduction
SourceBans++ is a powerful and easy-to-use web interface to manage bans and other features in Source Engine games. In this tutorial, we will guide you through the installation process of SourceBans++ on Debian Latest.
Prerequisites
Before starting the installation process, make sure that you have the following prerequisites:
- A Debian Latest server with root access
- Basic knowledge of SSH and command-line interface
Step-by-Step Guide
Step 1: Update the system
Start by updating the system packages to ensure that your server is up-to-date:
sudo apt update && sudo apt upgrade
Step 2: Install Dependencies
SourceBans++ requires several dependencies to be installed on your system. You can install them by running the following command:
sudo apt install apache2 php php-mysql php-curl php-xml php-mbstring php-zip mysql-server
During the installation process, you will be prompted to set up a root password for MySQL server.
Step 3: Download and Install SourceBans++
To download and install SourceBans++, follow these steps:
- Navigate to the project website: https://sbpp.dev/
- Click the "Download" button and save the archive (sbpp.tar.gz) to your server.
- Extract the archive to your web server directory:
sudo tar -xzf sbpp.tar.gz -C /var/www/html/
Where /var/www/html/ is your Apache web server's root directory.
- Change the ownership of the SourceBans++ directory to the Apache user and group:
sudo chown -R www-data:www-data /var/www/html/sbpp/
Step 4: Configure MySQL
SourceBans++ uses MySQL to store and manage data. You need to create a new MySQL database and user for SourceBans++:
- Log in to MySQL as root:
sudo mysql -u root -p
- Create a new database:
CREATE DATABASE sbpp;
- Create a new user:
CREATE USER 'sbppuser'@'localhost' IDENTIFIED BY 'yourpasswordhere';
Replace yourpasswordhere with your chosen password.
- Grant privileges to the new user:
GRANT ALL PRIVILEGES ON sbpp.* TO 'sbppuser'@'localhost';
- Flush privileges and exit:
FLUSH PRIVILEGES;
exit
Step 5: Configure SourceBans++
Now, you need to configure SourceBans++ to use the MySQL database:
- Navigate to the configuration directory:
cd /var/www/html/sbpp/config/
- Rename the
global.example.phpfile toglobal.php:
sudo mv global.example.php global.php
- Edit the
global.phpfile using your preferred text editor:
sudo nano global.php
- Find the following lines:
define('SB_DATABASE', '127.0.0.1');
define('SB_DATABASE_PORT', 3306);
define('SB_DATABASE_NAME', 'sbpp');
define('SB_DATABASE_USER', 'sbppuser');
define('SB_DATABASE_PASS', 'yourpasswordhere');
Replace 127.0.0.1, sbpp, sbppuser, and yourpasswordhere with your MySQL database information.
- Save and exit the
global.phpfile.
Step 6: Final Steps
Now that you have installed and configured SourceBans++, follow these final steps:
- Restart the Apache server:
sudo systemctl restart apache2
- Navigate to your server's IP or domain name in your web browser:
http://your_server_ip_or_domain/sbpp
- You will be prompted to create a new admin account for SourceBans++. Follow the on-screen instructions.
Congratulations! You have successfully installed and configured SourceBans++ on Debian Latest.