FreePBX is an open-source, web-based application that can be used to manage Asterisk (PBX) platform. We recently showed you how to install Asterisk on Ubuntu. When you install Asterisk, you’ll get a terminal console where you can manage the system. The problem with managing Asterisk via the terminal is, it can be very difficult to configure complicated phone trees via the terminal. For a simple-to-use interface, install FreePBX. This post is going to show you how to install FreePBX to manage Asterisk. To get started with managing FreePBX, follow the steps below:

Install Asterisk PBX

Since you’re going to be managing Asterisk, your first task will be to install it. The good thing is, we’ve shown our users how to install Asterisk on Ubuntu. Below is a tutorial that showed you how to install Asterisk on Ubuntu. How to install Asterisk PBX on Ubuntu Linux After installing the Asterisk above, continue below to install and configure FreePBX.

Apache HTTP Server

Apache2 HTTP Server is the most popular web server in use. so install it since FreePBX needs it. To install Apache2 HTTP on the Ubuntu server, run the commands below. After installing Apache2, the commands below can be used to stop, start and enable the Apache2 service to always start up with the server boots. To find out if the Apache2 HTTP server is installed, simply open your web browser and type in the server’s IP or hostname. When you see a page similar to the one below, then Apache2 is installed and working. After that, run the commands below to remove the Apache2 default index.html file.

Install MariaDB Database Server

FreePBX also needs a database server to store its content. and MariaDB database server is a great place to start when looking at open-source database servers to use with FreePBX. To install MariaDB run the commands below. After installing MariaDB, the commands below can be used to stop, start and enable the MariaDB service always to start up when the server boots. Run these on Ubuntu After that, run the commands below to secure the MariaDB server by creating a root password and disallowing remote root access. When prompted, answer the questions below by following the guide.

Enter current password for root (enter for none): Just press the Enter Set root password? [Y/n]: Y New password: Enter password Re-enter new password: Repeat password Remove anonymous users? [Y/n]: Y Disallow root login remotely? [Y/n]: Y Remove test database and access to it? [Y/n]:  Y Reload privilege tables now? [Y/n]:  Y

Restart MariaDB server To test if MariaDB is installed, type the commands below to logon into the MariaDB server To test if MariaDB is installed and working, run the commands below: That should display MariaDB’s service status. By default, on Ubuntu, MariaDB is configured to use the UNIX auth_socket plugin. You’ll want to run the SQL commands below for the root user to use mysql_native_password. You’ll need a MariaDB root account to set up FreePBX later. Run the commands below to log on to MariaDB. When prompted for a password, type the root password you created above. Switch to the MySQL database. Then update the root account to use mysql_native_password. Finally, save your changes and exit.

PHP 7.2 may not be available in Ubuntu default repositories. to install it, you will have to get it from third-party repositories. Run the commands below to add the below third-party repository to upgrade to PHP 7.2 Then update and upgrade to PHP 7.2 Next, run the commands below to install PHP 7.2 and related modules. After installing PHP 7.2, run the commands below to open the PHP default config file for Apache2. Then make the changes on the following lines below in the file and save. The value below is a great setting to apply in your environment. After making the change above, save the file and close it. To test PHP 7.2 settings with Apache2, create a phpinfo.php file in the Apache2 root directory by running the commands below Then type the content below and save the file. Save the file. then browse to your server hostname followed by /phpinfo.php You should see the PHP default test page.

Install Nodejs

After installing the server above, run the commands below to add Nodejs 10 repository to Ubuntu Then run the commands below to install Nodejs.

Install FreePBX

At this point, you should have everything ready for FreePBX. To download and install FreePBX, run the commands below: Finally, run the commands below to install. If you get an error, run the commands below to resolve: If you also get an error: Run the commands below to resolve: When you have resolved all the errors above, go back and try the installation again. After installing, you should get a similar message as shown below: After installing, restart Apache2. Now go and access the FreePBX portal. http://localhost Setup, login, and start building your PBX That’s it! Conclusion: This post showed you how to install Asterisk and FreePBX to create your PBX systems. If you find any error above, please use the comment form below to report. Thanks,