This guide explains how to install and configure NextGenSwitch. The process includes preparing your system, installing dependencies, setting up the web and database environment, configuring the application, and running the installer.
Before beginning the installation, ensure that
Ensure the following PHP extensions are installed and enabled.
Use your operating system’s package manager to install these. Ensure all services (web server, database server, Redis, Supervisor) are started and enabled to run at boot.
Clone the NextGenSwitch source code from the official repository and place it in your web server’s root directory. You will also need to unzip the required storage files
cd /var/www/html
sudo git clone https://github.com/nextgenswitch/nextgenswitch.git easypbx
cd easypbx
unzip storage.zip
NextGenSwitch provides a pre-built package for system integration. Install it using your system’s package installer. The installation package can be found at the following location /var/www/html/easypbx/setup/nextgenswitch-1.0-1.el8.noarch.rpm
dnf install -y setup/nextgenswitch-1.0-1.el8.noarch.rpm
composer install
php artisan key:generate
Before installing NextGenSwitch, a properly configured database environment is required. This includes creating a dedicated database and a user with appropriate privileges
Begin by creating a new database that will be used exclusively by NextGenSwitch.
CREATE DATABASE easypbx CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
Next, create a dedicated database user that will be used by the application to interact with the database. This user should have a strong password and be granted only the necessary privileges on the NextGenSwitch database.
Example (for reference only)
CREATE USER 'easypbx'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON easypbx.* TO 'easypbx'@'localhost';
FLUSH PRIVILEGES;
Replace
your_password
with a secure password of your choice.
This command initializes the system, sets up the required configurations and prepares services like the web server and Supervisor for background job processing.
php artisan easypbx:install \
--db-host=localhost \
--db-port=3306 \
--db-user=easypbx \
--db-pass=easypbx \
--db-name=easypbx
--db-host
: The hostname or IP address of the database server (typically localhost
).--db-port
: The port number used by the database server (default is 3306
for MySQL/MariaDB).--db-user
: The database username created for the application.--db-pass
: The corresponding password for the database user.--db-name
: The name of the database created for NextGenSwitch.Please modify the database configuration parameters to match your specific database credentials and setup
Modify the nextgenswitch.conf
Apache configuration file as needed, based on your server’s environment and operating system-specific directory structure.
Restart all necessary services to ensure the application runs properly and all components are loaded with the latest configurations.
Use the built-in command to create a superadmin user for accessing the NextGenSwitch web interface.
php artisan easypbx:setup
Once the setup is complete