Installing FreePBX 12 on Ubuntu Server 14.04 LTS



 

 

Initial System Setup

When installing the machine, at package selection make sure you pick - at least - OpenSSH Server, and 'LAMP Packages'.  This installs the base packages required.

ubuntu-14.04-software-selection.png

 

Configure your root password.

sudo passwd root

Switch to the Root User

Please  note: THIS IS IMPORTANT!  You must run the entire process as root. Attempting to use 'sudo' later on will not work. Please don't ignore this. You must run this command to switch to an interactive root shell.

sudo -i

Update Your System

apt-get update && apt-get upgrade -y 

Install Required Dependencies

Reboot server

Install Dependencies for Google Voice (if required)

You may skip this section if you do not require Google Voice support.

Install iksemel

Install and Configure Asterisk

Download Asterisk source files.

Compile and install DAHDI.

If you don't have any physical hardware you don't need to run these commands

Compile and install LIBPRI.

If you don't have any physical hardware you don't need to run these commands

 

Compile and install pjproject

Compile and Install jansson

Compile and install Asterisk

You will be prompted at the point to pick which modules to build. Most of them will be enabled, but if you want to have MP3 support, you need to manually turn on 'format_mp3' on the first page.

ubuntu-14.04-enable-mp3.png

 

After selecting 'Save & Exit' you can then continue

 

Install Asterisk-Extra-Sounds

Note that this installs the (8khz) 'wav' soundfiles. If you're planning on running G722 (High Definition 'Wideband') audio, you also want to download the 722 codec pack, which is the second part. If you're not planning on using Wideband, you can skip that part.

Install and Configure FreePBX

Download and extract FreePBX.

Now create the Asterisk user and set ownership permissions.

A few small modifications to Apache.

Configure ODBC

Edit /etc/odbcinst.ini and add the following. Note that this command assumes you are installing to a new machine, and that the file is empty. If this is not a freshly installed machine, please manually verify the contents of the file, rather than just copying and pasting the lines below. The 'EOF' does no go in the file, it simply signals to the 'cat' command that you have finished pasting.

You may need to verify these paths, if you're not on a x86_64 machine. You can use the command `find / -name libmyodbc.so` to verify the location

Edit or create /etc/odbc.ini and add the following section. Note that, again, this command assumes you are installing to a new machine, and the file is empty. Please manually verify the contents of the files if this is not the case.

Prepare MySQL

You now need to generate a secure password for FreePBX to use to talk to MySQL.

That will generate a quasi-random 16 character long password, which should be secure enough for most things.  If you had set the MySQL 'root' password to be something when you were installing the machine, you will need to add a -pyourpassword flag to the following lines

Configure Asterisk database in MYSQL. 

Set permissions on MYSQL database.

Restart Asterisk and install FreePBX.

Finally, one last mod and start FreePBX.

Start FreePBX

Navigate: 

Now FreePBX is installed, it will be available via Apache. Open up your web browser and visit:

    http://Address.Of.FreePBX.Server/admin

Return to Documentation Home I Return to Sangoma Support