FusionPBX is a free and open source software that is used to manage and maintain multi-tenant PBX systems. It is a powerful solution that helps to manage voice, video, and fax traffic on networks. In this tutorial, we will go through the steps to install FusionPBX on EndeavourOS latest.
Before starting the installation process, make sure you have the following prerequisites:
First, update the package repository and install the required dependencies for FusionPBX with the following command:
sudo pacman -Syu
sudo pacman -S git sqlite wget tar bzip2 zip unzip pcre openssl rng-tools php php-fpm nginx mariadb mariadb-libs mariadb-clients mariadb-libs mariadb-clients freetds libsodium rabbitmq-c telnet uuid
After installing dependencies, we can configure and start the services with the following commands:
sudo systemctl start mariadb
sudo systemctl start rabbitmq
sudo systemctl enable mariadb
sudo systemctl enable rabbitmq
sudo mysql_secure_installation
sudo rabbitmq-plugins enable rabbitmq_management
sudo chown rabbitmq:rabbitmq /var/lib/rabbitmq/.erlang.cookie
sudo chmod 400 /var/lib/rabbitmq/.erlang.cookie
sudo systemctl restart rabbitmq
Next, we will download and install the latest version of FusionPBX from the official website. Run the following commands to download and extract the FusionPBX package:
cd /usr/src
sudo git clone https://github.com/fusionpbx/fusionpbx.git
cd /usr/src/fusionpbx
sudo git checkout stable
Create the symbolic link to the FusionPBX directory:
sudo ln -s /usr/src/fusionpbx /var/www/fusionpbx
Change the ownership of the fusionpbx
directory:
sudo chown -R nginx:nginx /var/www/fusionpbx
Copy the php.ini
configuration file:
sudo cp /etc/php/php.ini-development /etc/php/php.ini
Set the timezone
in the php.ini
file:
sudo sed -i 's#;date.timezone =#date.timezone = America/New_York#' /etc/php/php.ini
For the web interface of FusionPBX, we need to configure the Nginx web server. Run the following command to create a configuration file:
sudo nano /etc/nginx/conf.d/fusionpbx.conf
Add the following content into the configuration file:
server {
listen 80;
server_name _;
access_log /var/log/nginx/fusionpbx-access.log;
error_log /var/log/nginx/fusionpbx-error.log;
root /var/www/fusionpbx;
index index.php;
if (!-e $request_filename) {
rewrite ^(.+)$ /index.php?q=$1 last;
break;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PHP_VALUE "error_log=/var/log/nginx/fusionpbx-php-error.log";
include fastcgi_params;
}
location /websocket {
proxy_pass http://127.0.0.1:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
location /middleware {
proxy_pass http://127.0.0.1:5000;
proxy_set_header Host $host;
}
}
Save and close the file.
We need to allow traffic to the required ports in the firewall to access FusionPBX. Run the following commands to allow the required ports:
sudo ufw allow 22
sudo ufw allow 80
sudo ufw allow 443
sudo ufw allow 5060/udp
sudo ufw allow 5060/tcp
sudo ufw allow 5080/tcp
sudo ufw allow 5081/tcp
sudo ufw allow 16384:32768/udp
sudo ufw enable
Now we will configure FusionPBX. First, run the following command to create a configuration file for MariaDB:
sudo nano /etc/mysql/my.cnf.d/fusionpbx.cnf
Add the following content to the file:
[mysqld]
sql_mode = STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
max_allowed_packet = 16777216
character-set-server=utf8
collation-server=utf8_general_ci
Save and close the file.
Create a new database for FusionPBX:
sudo mysql -u root
create database fusionpbx;
GRANT ALL PRIVILEGES ON fusionpbx.* TO fusionpbxuser@localhost IDENTIFIED BY 'password';
flush privileges;
exit
Run the following commands to execute the FusionPBX installer:
cd /var/www/fusionpbx
sudo php /var/www/fusionpbx/core/install/pre-install.php
sudo php /var/www/fusionpbx/core/install/01_database.php
sudo php /var/www/fusionpbx/core/install/02_directory.php
sudo php /var/www/fusionpbx/core/install/03_xml_cdr.php
sudo php /var/www/fusionpbx/core/install/04_sync.php
sudo php /var/www/fusionpbx/core/install/05_modules.php
sudo php /var/www/fusionpbx/core/install/06_set_domains.php
sudo php /var/www/fusionpbx/core/install/07_set_timezone.sql
sudo php /var/www/fusionpbx/core/install/08_softswitch_configuration.php
sudo php /var/www/fusionpbx/core/install/09_staticxml.php
The installer will prompt for some values such as domain
, username
, password
, and email
for the FusionPBX admin account. Provide the necessary information to complete the installation.
After completing the installation, we can access the FusionPBX web interface by navigating to http://<YourServerIP>
in a web browser.
Login using the admin credentials specified during the installation process.
Congratulations! You have successfully installed FusionPBX on EndeavourOS latest.
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!