0% found this document useful (0 votes)
404 views

Installing Freepbx 2.8 With Asterisk 1.8 On Centos 5.5

This document provides instructions for installing FreePBX 2.8 with Asterisk 1.8 on CentOS 5.5. It outlines preparing the system with required packages and groups. It then provides steps to install Asterisk 1.8 from source, set up the MySQL database, install FreePBX from source, and configure FreePBX. The steps conclude with rebooting the server to complete the installation.

Uploaded by

toninho0316
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
404 views

Installing Freepbx 2.8 With Asterisk 1.8 On Centos 5.5

This document provides instructions for installing FreePBX 2.8 with Asterisk 1.8 on CentOS 5.5. It outlines preparing the system with required packages and groups. It then provides steps to install Asterisk 1.8 from source, set up the MySQL database, install FreePBX from source, and configure FreePBX. The steps conclude with rebooting the server to complete the installation.

Uploaded by

toninho0316
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

 Home

 About

« Installing CentOS 5.5 with Linux Integration Services 2.1 on Hyper-V R2


Communicating multi-byte integers across platforms »

Installing FreePBX 2.8 with Asterisk 1.8 on CentOS


5.5
December 17, 2010, 5:51 pm

FreePBX has become quite popular over the last few years. Unfortunately, the
documentation has not quite caught up to the popularity. At the time of this writing,
most of the documentation available was for older versions of CentOS, FreePBX and/or
Asterix. Below I have outlined the steps required to get FreePBX 2.8 working with
Asterisk 1.8 on CentOS 5.5.

If you are reading this as after having followed the steps in my previous article
Installing CentOS 5.5 with Linux Integration Services 2.1 on Hyper-V R2 or if you
have not selected the following package groups during your installation of CentOS,
make sure you do so now by using the following commands.

Preparations

You will need five different passwords.

PASSWORD1 – Your root password.


PASSWORD2 – Used for the asterisk database user.
PASSWORD3 – Used for the FreePBX administrator.
PASSWORD4 – Used for Flash Operator Panel.
PASSWORD5 – Used for the Asterisk Recording Interface.

Requirements

1yum groupinstall "DNS Name Server"


2yum groupinstall "Web Server"
3yum groupinstall "Mail Server"
4yum groupinstall "MySQL Database"
yum groupinstall "Development Tools"
5

Once you are sure that the needed package groups are installed, you will want to install
the prerequisites as follows.

yum install e2fsprogs-devel keyutils-libs-devel krb5-devel libogg


1libselinux-devel libsepol-devel libxml2-devel libtiff-devel
yum install gmp php-pear php-pear-DB php-gd php-mysql php-pdo kernel-
2devel ncurses-devel audiofile-devel libogg-devel
3yum install openssl-devel mysql-devel zlib-devel perl-DateManip
sendmail-cf sox
Make sure you also have wget installed.

1yum install wget

Next you will setup named.

echo "options {" >> /var/named/chroot//etc/named.conf


1 echo " directory \"/var/named\";" >>
2 /var/named/chroot//etc/named.conf
3 echo " dump-file \"/var/named/data/cache_dump.db\";" >>
4 /var/named/chroot//etc/named.conf
5 echo " statistics-file \"/var/named/data/named_stats.txt\";" >>
/var/named/chroot//etc/named.conf
6 echo "};" >> /var/named/chroot//etc/named.conf
7 echo "include \"/etc/rndc.key\";" >>
8 /var/named/chroot//etc/named.conf
9 cd /var/named/chroot//etc/
chmod 640 named.conf
1 chgrp named named.conf
0 ln -s /var/named/chroot//etc/named.conf /etc/named.conf

You will want to adjust the security settings as per your requirements but for the
simplicity of this article, we are going to turn off Security-Enhanced Linux and open the
firewall fully.

1echo "SELINUX=disabled" > /etc/selinux/config


2iptables -P INPUT ACCEPT
3iptables -P OUTPUT ACCEPT
4iptables -P FORWARD ACCEPT
5iptables -F
iptables -X
6/etc/init.d/iptables save
7

LAME is required for Asterisk’s audio related functions. You will want to download
LAME to a source directory, compile and then install it.

1cd /usr/src
2wget http://downloads.sourceforge.net/project/lame/lame/3.98.4/lame-
33.98.4.tar.gz?ts=1292626574&use_mirror=cdnetworks-us-1
tar zxvf lame-3.98.4.tar.gz
4cd lame-3.98.4
5./configure
6make
7make install

You can optionally remove the source once you have installed LAME.

1cd ..
2rm -fr lame-3.98.4
3rm lame-3.98.4.tar.gz

Before continuing, insure that all packages are up to date and then reboot.

1yum update
2reboot

Installing Asterisk 1.8

Get Asterisk 1.8 and extract it to its own source folder.

1cd /usr/src
2wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-
31.8-current.tar.gz
tar xvfz asterisk-1.8-current.tar.gz
4cd asterisk-1.8.0
5contrib/scripts/get_mp3_source.sh
6./configure
7make menuconfig

The last command will launch the source configuration manager. The only portions you
will want to install are app_mysql, app_saycountpl, cdr_mysql, format_mp3,
res_config_mysql and EXTRAS-SOUNDS-EN-GSM (which can be found in the Extra
Sound Packages sub-menu). Save your selections and exit. Now compile the source and
install.

1make
2make install

You can optionally remove the source directory once you have installed Asterisk.

1cd ..
2rm -fR asterisk-1.8.0
3rm asterisk-1.8-current.tar.gz

Installing FreePBX 2.8

Get FreePBX 2.8 and extract it to its own source folder.

1cd /usr/src
2wget http://mirror.freepbx.org/freepbx-2.8.0.tar.gz
3tar xvfz freepbx-2.8.0.tar.gz
4cd freepbx-2.8.0

Start MySQL, create the asterisk databases and run the initial SQL setup scripts.

1/etc/init.d/mysqld start
2chkconfig mysqld on
3mysqladmin create asterisk
4mysqladmin create asteriskcdrdb
5mysql asterisk < SQL/newinstall.sql
mysql asteriskcdrdb < SQL/cdr_mysql_table.sql
6

Start the MySQL command line.

1mysql
Define the user and password for each of the databases.

GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost


1IDENTIFIED BY 'PASSWORD2';
2GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED
3BY 'PASSWORD2';
4flush privileges;
\q

Change the MySQL user to root.

1mysqladmin -u root password 'PASSWORD1'

Create the Asterisk user and set folder permissions.

1useradd -c "Asterisk PBX" -d /var/lib/asterisk asterisk


2chown -R asterisk:asterisk /var/run/asterisk
3chown -R asterisk:asterisk /var/log/asterisk
4chown -R asterisk:asterisk /var/lib/php/session/

Update the Apache configuration file.

1vi /etc/httpd/conf/httpd.conf

Change User apache and Group apache to User asterisk and Group asterisk.

Change AllowOverride None to AllowOverride All.

Update ServerName to use your server’s FQDN.

Start Apache.

1/etc/init.d/httpd start
2chkconfig httpd on

Start Asterisk.

1./start_asterisk start

Configure FreePBX.

1./install_amp --username=asteriskuser --password=PASSWORD2

The next series of prompts will give you default values within square brackets which
you can accept by hitting enter. If you wish to change a value, simply type it and hit
enter after.

1[asteriskuser]

This is the database user you specified earlier.


1[PASSWORD2]

This is the password for the database user.

1[localhost]

Use the default value.

1[admin]

The username for the FreePBX administrator.

1[amp111]

The password for the FreePBX administrator. It is important to change this. (Use
PASSWORD3 you prepared earlier.)

1[/var/www/html]

Use the default value.

1[xx.xx.xx.xx]

The public IP that will be used.

1[passw0rd]

The Flash Operator Panel password. It is important to change this. (Use PASSWORD4
you prepared earlier.)

1[extensions]

Use the default value.

1[/var/lib/asterisk/bin]

Use the default value.

1[/usr/local/sbin]

Use the default value.

Change the Asterisk Recording Interface password and turn on user authentication for
the web interface by editing the amportal.conf file.

1vi /etc/amportal.conf

Change the ARI_ADMIN_PASSWORD entry to update the ARI password.

1ARI_ADMIN_PASSWORD=PASSWORD5
Change the AUTHTYPE entry to database to enable authentication.

1AUTHTYPE=database

Optionally, you can turn off the FOP completely by changing the following settings.

1FOPRUN=false
2FOPDISABLE=true

Save and exit.

Add FreePBX to the boot process.

1echo "/usr/local/sbin/amportal start" >> /etc/rc.local

You can ensure that the administrator user has the proper password in the database by
navigating to the Administrators tab, choosing the admin user and clicking on the
Update password link. Once your password has been updated, logout by clicking the
link at the top right of the page.

Finally, reboot the server one last time.

1reboot

You might also like