How to Install BoxBilling on AlmaLinux 9
Introduction
This guide explains how to install BoxBilling on AlmaLinux 9 using Apache, MariaDB, and PHP. The goal is to provide a clean, step-by-step process for beginners while preserving all commands exactly as written. Each command is followed by a short explanation to help you understand what it does without altering the installation flow.
Prerequisites
Before starting, ensure you have the following:
- AlmaLinux 9 server (fresh or cleanly configured)
- Root or sudo privileges
- A domain or IP pointing to the server
- Basic familiarity with Linux commands
Step 1: Update the System
Command:
Description:
Updates all system packages to their latest versions to ensure your server is secure and ready for new software.
Step 2: Install Apache Web Server
Command:
Installs the Apache web server, which will serve BoxBilling’s web interface.
Enables Apache to start at boot and starts the service immediately.
Step 3: Install MariaDB
Command:
Installs MariaDB server and client packages to provide the database backend for BoxBilling.
Starts MariaDB now and configures it to start automatically on system boot.
Step 4: Install EPEL Repository
Command:
Adds the EPEL software repository, which provides additional packages needed on Enterprise Linux systems.
Step 5: Add Remi Repository for PHP 8.2
Command:
Installs the Remi repository that includes updated PHP versions required by BoxBilling.
Resets the default PHP module to allow switching versions.
Enables PHP 8.2 from Remi, ensuring compatibility with BoxBilling.
Step 6: Install PHP and Required Extensions
Command:
Installs PHP 8.2 and all extensions needed for BoxBilling, along with unzip (for extracting archives) and wget (for downloading files).
Restarts Apache so it can load the PHP module.
Step 7: Secure MariaDB Installation
Command:
Description:
Runs an interactive script to secure MariaDB by setting a root password and removing insecure defaults.
Step 8: Create Database and User
Command:
Logs in to MariaDB as the root user.
Inside the MySQL prompt, run the following exact commands:
Creates the database for BoxBilling.
Creates a dedicated user with a strong password.
Grants full access to the BoxBilling database.
Applies your changes and exits the database shell.
Step 9: Download and Extract BoxBilling
Command:
Moves to Apache’s default web root directory.
Downloads the latest BoxBilling release from GitHub.
Extracts BoxBilling into a folder named boxbilling.
Assigns ownership of BoxBilling files to Apache.
Sets appropriate permissions so Apache can read and execute files.
Step 10: Configure Apache Virtual Host
Command:
Opens a new Apache configuration file.
Paste the following:
Defines how Apache serves the BoxBilling website.
Applies the configuration by restarting Apache.
Step 11: Adjust PHP Settings
Command:
Opens the PHP configuration file.
Modify or add the following lines:
Increases resource limits to ensure smooth BoxBilling operation.
Applies the PHP configuration changes.
Step 12: Create Data Directories
Command:
Creates required directories for BoxBilling.
Gives Apache ownership of the data directory.
Ensures proper write permissions.
Step 13: Verify Installation
After uploading and configuring all files, open:
The installer will walk you through:
-
Preparation
-
Database configuration
-
Admin account setup
-
Finalization (remove install directory and set bb-config.php to 644)
You can then log in at:
Conclusion
You have now installed BoxBilling on AlmaLinux 9 using Apache, MariaDB, and PHP 8.2.
This setup allows you to run a stable and efficient billing platform.
All commands were preserved exactly as provided while adding clear explanations to make the installation process easy to follow.