Installing FreePBX 13 on Ubuntu Server 14.04.2 LTS

freepbx install

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

MySQL Password

After selecting 'Continue' you will be prompted (several times) for a root password. There is no need to set one, and setting one is discouraged! As part of the FreePBX install, a secure (128 bit) password is generated, and used to lock down MySQL. If you set a password now, it is not possible for the installer to secure your database. Please just push 'enter' when prompted for a password.

Unlock and configure your root password.

You may find it helpful to log in directly as root to manage and update your system. We recommend you do set a root password, and enable SSH logins from root, so you don't need to go through secondary steps that may cause problems. This command enables SSH root logins, and prompts you for a new root password.

Compile and install DAHDI.

If you don't have any physical PSTN hardware attached to this machine, you don't need to install DAHDI (For example, a T1 or E1 card, or a USB device). Most smaller setups will not have DAHDI hardware, and this step can be safely skipped.

Compile and Install jansson

Compile and install Asterisk

cd/usr/src

tarxvfz asterisk-13-current.tar.gz

rm-f asterisk-13-current.tar.gz

cdasterisk-*

contrib/scripts/install_prereqinstall

./configure

contrib/scripts/get_mp3_source.sh

makemenuselect

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

After selecting 'Save & Exit' you can then continue

make

makeinstall

makeconfig

ldconfig

update-rc.d -f asterisk remove

Install Asterisk Soundfiles.

The 'make install' above installs a standard low-quality base sound file by default. This is suitable if you are on a small, underpowered system (such as a Rasberry Pi), but on a larger system you should install higher quality soundfiles. Note that this installs the (8khz) 'wav' soundfiles and G722 (High Definition 'Wideband') audio.

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.

cat>> /etc/odbcinst.ini << EOF

[MySQL]

Description = ODBC forMySQL

Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so

Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so

FileUsage = 1

EOF

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.

cat>> /etc/odbc.ini << EOF

[MySQL-asteriskcdrdb]

Description=MySQL connection to 'asteriskcdrdb'database

driver=MySQL

server=localhost

database=asteriskcdrdb

Port=3306

Socket=/var/run/mysqld/mysqld.sock

option=3

EOF

Download and install FreePBX.

That's it!

You can now start using FreePBX. Open up your web browser and connect to the IP address or hostname of your new FreePBX server. You will see the Admin setup page, which is where you set your 'admin' account password, and configure an email address to receive update notifications.