Installation

Installing the FreePBX application

FreePBX is an application the is built on the LAMPA stack, so in theory any system running this stack could run FreePBX.

The links below can help you get the application installed. Once it is installed, you'll want to go the Administration Guide to learn about setting up your new PBX.

Should you get stuck, go to the Support Center for help.

We do most of our development on CentOS, so we highly recommend that you use the same setup. In fact, for a pain free installation why not buy it pre-installed on a server from our online store.

  1. FreePBX ISO
  2. FreePBX 2.2 Issues
  3. Upgrading from A@H or an older AMP
  4. CentOS 4.3
  5. Using yum on RHEL instructions
  6. CentOS 4.4, Sangoma A200D, 3Ware 8006-2LP SATA RAID
  7. ClarkConnect
  8. Debian Linux
  9. FreeBSD
  10. Gentoo Linux
  11. PoundKey
  12. SuSE Linux
  13. Ubuntu Linux

Once the product is installed (i.e. Asterisk is running and the FreePBX GUI is up), you can go about configuring your PBX.

 


Install Procedure for Centos 4.3

Centos 4.3 Installation Walkthrough

CentOS 4.3 (CentOS) is the distribution used throughout this guide.
We believe that the goals of the distribution are in good alignment
with the mission-critical nature of a corporate telephone system.
CentOS ISOs can be downloaded from a number of mirror sites. Check the
official CentOS website for more information.

Detailing a Linux installation is beyond the scope of this
document. There are numerous articles, HOW-TOs and books available to
the individual that deal with this subject. Therefore, for the purposes
of this document it is assumed that the CentOS installation is that of
a Server system. Furthermore, for the purposes of this
document it is assumed that the partitioning of the hard disk drive was
done automatically by selecting Autopartition when prompted, and that no previous partitions existed on the drive prior to installation.

Important Installation Notice During the installation you will be prompted about Firewalls and Selinux. Both of these MUST BE DISABLED.
The Sections to disable are highlighted in red below. After clicking
next, you will be prompted if you are sure this is correct - Click on Proceed.

Package Group Selection
Whilst It is not recommended to use the X Window System on a
production freePBX server, it is possible. If you're only doing this
for a test, or experementation, feel free to install X and Gnome or
KDE. If you are planning on using this as a production system, please
avoid installing X unless it's absoloutely necessary.

freePBX has several requirements (which we will cover in a later
section) but at this point of the CentOS installation ensure that at
least the following package groups are selected

  • Web Server
  • Mail Server (Not selected by default)
  • MySQL Database (Not selected by default)
  • Development Tools (Not selected by default)

After you've done this, the machine will install CentOS, install,
and reboot. At this stage, you have a functioning Linux system!

Post-Install Configuration

After your machine reboots, you need to log in as 'root' - You were
prompted for the root password on installation. When you log in
successfully, you will have a prompt li

For performance and security reasons it is important to update the system immediately after install. CentOS uses yum (or up2date but that is not a recommended way of doing updates) for this purpose. In this document we will use yum:

[root@dhcp1 ~]# yum -y update

Setting up Update Process

Setting up repositories

...etc....

...etc...

Update: gnupg.i386 0:1.2.6-3 python.i386 0:2.3.4-14.2 sendmail.i386 0:8.13.1-3.RHEL4.3 tzdata.noarch 0:2006a-2.EL4

Complete!

root[@dhcp1 ~]#

Additional Package Installation to Satisfy freePBX dependencies
You can check if a particular package is installed by doing either:

[root@dhcp1 ~]# yum info [package]

or:

[root@dhcp1 ~]# rpm -qa | grep [package]

If the package is not installed, install it by using yum:

[root@dhcp1 ~]# yum install [package]

Full documentation on 'yum' is available by typing man yum.

The following packages need to be additionally installed with yum:

[root@dhcp1 ~]# yum install gcc
libxml2-devel libtiff-devel mysql-server php-gd php-mysql kernel-devel
kernel-smp-devel bison ncurses-devel audiofile-devel subversion
libogg-devel openssl-devel mysql-devel

lame is not available through a yum repository; but it can be obtained and installed from Dag Wieers' RPM repository:

[root@dhcp1 ~]# rpm -ivh http://apt.sw.be/redhat/el4/en/i386/RPMS.dag/lame-3.96.1-2.2.el4.rf.i386.rpm

Satisfying freePBX's PERL module dependencies
freePBX, from version 2.1 does not have any specific perl
dependancies. There used to be a big list here, but we finally managed
to get rid of all of them!

Get the latest freePBX files
You may wish to check that the link specified here is actually the latest and greatest. Look at the files available on Source Forge and pick the latest one there.

[root@dhcp1 ~]# cd /usr/src

[root@dhcp1 src]# wget http://easynews.dl.sourceforge.net/sourceforge/amportal/freepbx-2.1.1.tar.gz

[root@dhcp1s src]# tar zxf freepbx-2.1.1.tar.gz

A pause while the files are extracted...

[root@dhcp1 src]#

Getting all the required Asterisk and Zaptel files.

[root@dhcp1 ~]# cd /usr/src

[root@dhcp1 src]# svn co http://svn.digium.com/svn/asterisk/branches/1.2 asterisk

..Lots of files...

[root@dhcp1 src]# svn co http://svn.digium.com/svn/asterisk-addons/branches/1.2 asterisk-addons

..Lots of files...

[root@dhcp1 src]# svn co http://svn.digium.com/svn/asterisk-sounds/trunk asterisk-sounds

..Lots of files...

[root@dhcp1 src]# svn co http://svn.digium.com/svn/zaptel/branches/1.2 zaptel

..Lots of files...

[root@dhcp1 src]# svn co http://svn.digium.com/svn/libpri/branches/1.2 libpri

..Lots of files...

Patch and Compile zaptel (and libpri)
If you plan on useing IAX or conferencing and _don't_ have any digium hardware skip this part and read this ztdummy install guide then continue on at "Compile Asterisk"

[root@dhcp1 src]# cd /usr/src/zaptel

[root@dhcp1 zaptel]# cp ztdummy.c ztdummy.c.orig

[root@dhcp1 zaptel]# sed -i "s/if 0/if 1/" ztdummy.c

[root@dhcp1 zaptel]# make

If you get an error that looks like this:

/usr/src/zaptel/zaptel.c:420: error: syntax error before "zone_lock"

/usr/src/zaptel/zaptel.c:420: warning: type defaults to `int' in declaration of `zone_lock'

/usr/src/zaptel/zaptel.c:420: error: incompatible types in initialization

..10 or so more lines..

it means that your CentOS header files have an error in them.

This is a known bug and is easily repaired by

[root@dhcp1 zaptel]# sed -i s/rw_lock/rwlock/ /usr/src/kernels/`uname -r`-`uname -m`/include/linux/spinlock.h

You can now retry the make command. After it's finished, you need to run make install and make config. If you will be using a Digium or Sangoma telephony card that supports T1/E1 signaling do this step as well:

[root@dhcp1 zaptel]# cd /usr/src/libpri

[root@dhcp1 libpri]# make install

Compile Asterisk
Now you get to compile the centre of the package - asterisk! This is relatively paineless:

[root@dhcp1 libpri]# cd /usr/src/asterisk

[root@dhcp1 asterisk]# mkdir /var/run/asterisk

[root@dhcp1 asterisk]# make install

[root@dhcp1 asterisk]# make config

Take a couple of minutes now and configure your zaptel
files, before continuing. If you think you'll want to have Asterisk and
freePBX itself handle faxing (rather than using a dedicated fax
device), you should read the Faxing page.

Create user and set permissions
Unfortunately, issues in Asterisk 1.2 require us
to run the web server process as the same user as asterisk. In this
situation, it's easier for us to run httpd as 'asterisk', rather than
asterisk as 'httpd', as there's far less configuration that needs to be
done.

[root@dhcp1 ~l]# useradd -c "Asterisk PBX" -d /var/lib/asterisk asterisk

[root@dhcp1 ~]# chown asterisk /var/lib/php/session/

Using nano (or your favourite editor, but nano is fine), you need to change User apache and Group apache to User asterisk and Group asterisk.

[root@dhcp1 ~]# nano +227 /etc/httpd/conf/httpd.conf (Push Control-X to save when you've finished)

You also want to change AllowOverride None to AllowOverride All

[root@dhcp1 ~]# nano +311 /etc/httpd/conf/httpd.conf (Push Control-X to save when you've finished)

Set up MySQL
Before you can do anything to MySQL, you need to make sure it's running:

[root@dhcp1 ~]# /etc/init.d/mysqld start

Initializing MySQL database: [ OK ]

Starting MySQL: [ OK ]

[root@dhcp1 ~]#

Now, to configure the databases for freePBX:

[root@dhcp1 ~]# cd /usr/src/freepbx-2.1.1

[root@dhcp1 freepbx-2.1.1]# mysqladmin create asterisk

[root@dhcp1 freepbx-2.1.1]# mysqladmin create asteriskcdrdb

[root@dhcp1 freepbx-2.1.1]# mysql asterisk < SQL/newinstall.sql

[root@dhcp1 freepbx-2.1.1]# mysql asteriskcdrdb < SQL/cdr_mysql_table.sql

They also need to be secured, so that not just anyone can access
them. freePBX will prompt you for a database password when you do the
install. You need to pick that now. We'll assume that you've picked
'asteriskuser' and 'amp109' - you probably shouldn't use these, as they
are well known passwords for Asterisk@Home builds. If anyone's trying
to attack your machine, they will try this.

[root@dhcp1 freepbx-2.1.1]# mysql

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 8 to server version: 4.1.16

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY 'amp109';

Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY 'amp109';

Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

mysql> \q

Bye

[root@dhcp1 freepbx-2.0.1]

Now, after all of this, you need to pick a root 'mysql' password.
For this, we'll pretend it's 's33kret'. If you need to do anything else
with mysql, you'll need to provide this password.

[root@dhcp1 freepbx-2.1.1]# mysqladmin -u root password 's33kret'

Build the cdr_mysql module for Asterisk (Yep, more compiling!)

[root@dhcp1 freepbx-2.1.1]# cd /usr/src/asterisk-addons

[root@dhcp1 freepbx-2.1.1]# cp Makefile Makefile.orig

[root@dhcp1 freepbx-2.1.1]# sed -i 's/SOURCE/SOURCE -DMYSQL_LOGUNIQUEID/' Makefile

[root@dhcp1 freepbx-2.1.1]# make && make install

Install freePBX at last!
You're there - you've done the hard yards, and finally you can install freePBX!

WARNING! If you have an existing Asterisk installation, the script below will overwrite your Asterisk configuration files. Backup your

/etc/asterisk directory before running.

$cd /usr/src/freepbx-2.1-beta1

$./install_amp

Checking for PEAR DB..OK

Checking for PEAR Console::Getopt..OK

Checking for libasteriskperl (perl bindings for asterisk)...Checking user..OK

Checking for /etc/amportal.conf../etc/amportal.conf does not exist, copying default

Creating new /etc/amportal.conf

Enter your USERNAME to connect to the 'asterisk' database: [asteriskuser]

Enter your PASSWORD to connect to the 'asterisk' database: [amp109]

Enter the hostname of the 'asterisk' database: [localhost]

Enter a USERNAME to connect to the Asterisk Manager interface: [admin]

Enter a PASSWORD to connect to the Asterisk Manager interface:[amp111]

Enter the path to use for your AMP web root:[/var/www/html]

Enter the path to use for your FOP web root:[/var/www/html/panel]

Created /var/www/html/panel

Enter the path to your Apache cgi-bin:[/var/www/cgi-bin]

Enter the IP ADDRESS or hostname used to access the AMP web-admin:[xx.xx.xx.xx] The IP Address of your Asterisk Machine

Enter a PASSWORD to perform call transfers with the Flash Operator Panel: [passw0rd]

Use simple Extensions [extensions] admin or separate Devices and Users [deviceanduser]? extensions

Enter directory in which to store AMP executable scripts: [/var/lib/asterisk/bin]

Created /var/lib/asterisk/bin

Enter directory in which to store super-user scripts: [/usr/sbin]

/etc/amportal.conf writtenOK

Reading /etc/amportal.conf..OK

Checking for /etc/asterisk/asterisk.conf../etc/asterisk/asterisk.conf does not exist, copying default

OK

Reading /etc/asterisk/asterisk.conf..OK

Connecting to database..OK

Checking current version of AMP..1.10.010beta1

Installing new AMP files..OK

Configuring install for your environment..OK

Setting permissions on files..OK

Checking for upgrades..5 found

Upgrading to 1.10.010..

Upgrading to 1.10.010..OK

Upgrading to 2.0beta1..

-> Running PHP script /usr/src/freepbx-2.0-beta4/upgrades/2.0beta1/emergencycid.php

-> Running SQL script /usr/src/freepbx-2.0-beta4/upgrades/2.0beta1/tables.sql

PHP Notice: Undefined variable: data in /usr/src/freepbx-2.0-beta4/install_amp on line 305

Upgrading to 2.0beta1..OK

Upgrading to 2.0beta2..

Upgrading to 2.0beta2..OK

Upgrading to 2.0beta3..

-> Running PHP script /usr/src/freepbx-2.0-beta4/upgrades/2.0beta3/fixgotovm.php

Updating existing voicemail destinations..

..OK

Upgrading to 2.0beta3..OK

Upgrading to 2.0beta4..

Upgrading to 2.0beta4..OK

Generating AMP configs..

Generating Configurations.conf..

Checking for PEAR DB..OK

Checking for PEAR Console::Getopt..OK

Checking for /etc/amportal.conf..OK

Reading /etc/amportal.conf..OK

Connecting to database..OK

Please Reload Asterisk by visiting http://XXX.XXX.XXX.XX/admin

Generating AMP configs..OK

Restarting Flash Operator Panel..-bash: /var/www/html/admin/bounce_op.sh: Permission denied

OK

Please Reload Asterisk by visiting http://XXX.XXX.XXX.XX/admin

If you get any warnings or errors in the last part of the output,
they're usually not traumatic, but please use the IRC Support tool to
report a bug to the developers.

amportal control script

Starting with version 1.10.004, freePBX provided a new control
script. The functionality of which is to start, stop or kill services
in the freePBX environment, or to set permissions on directories/files
in the freePBX environment:

$amportal

----------AMP Control Script-----------

Usage: amportal start|stop|kill|chown

start: Starts Asterisk and Flash Operator Panel server

stop: Gracefully stops Asterisk and the FOP server

restart: Stop and Starts

kill: Kills Asterisk and the FOP server

chown: Sets appropriate permissions on files

The amportal script is the recommended way to stop and start asterisk:

$ /usr/sbin/amportal stop

$ /usr/sbin/amportal start

19.Automatic start-up

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

Ensure services are starting at boot time and reboot

In order to access and use freePBX we will want both Apache (httpd)
and MySQL (mysqld) to be started at boot. You can check to see if they
are setup to start at boot by using chkconfig:

[root@dhcp1 freepbx-2.1.1]# chkconfig --list httpd

httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off

[root@dhcp1 freepbx-2.1.1]# chkconfig --list mysqld

mysqld 0:off 1:off 2:off 3:off 4:off 5:off 6:off

Here we see that both httpd and mysqld have off
across the board (runlevels). chkconfig can also be used to turn on a
particular service, which you would want to do in this case.

^[root@dhcp1 freepbx-2.1.1]# chkconfig httpd on

[root@dhcp1 freepbx-2.1.1]# chkconfig mysqld on

You can now access freePBX with your web browser.

The first time you click on the FreePBX Administration link you
will be prompted for a username and password. Use admin and admin.
CREATE A NEW ADMINISTRATIVE USER IMMEDIATELY AFTER LOGIN.


Install process for CentOS 5.1

1. Install CentOS, enabling the following packages:

 

*DNS Server

*Web Server

*Mail Server

*MySQL Database

*Development Tools

 

yum install nano

reboot

 

2. Edit Network settings

 

nano /etc/sysconfig/network

 

HOSTNAME=internal.hostname.DOMAIN.com (Set your internal hostname name here)

 

Ctrl-X to save, 'Y' to confirm

 

nano /etc/sysconfig/network-scripts/ifcfg-eth0

 

IPADDDR=192.168.1.20

NETMASK=255.255.255.0

NETWORK=192.168.1.0

 

Ctrl-X to save, 'Y' to confirm

 

 

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

echo " directory \"/var/named\";" >> /etc/named.conf

echo " dump-file \"/var/named/data/cache_dump.db\";" >> /etc/named.conf

echo " statistics-file \"/var/named/data/named_stats.txt\";" >> /etc/named.conf

echo "};" >> /etc/named.conf

echo "include \"/etc/rndc.key\";" >> /etc/named.conf

 

service named start

 

chkconfig named on

 

nano /etc/resolv.conf

 

search internal.DOMAIN.com (Set your internal domain name here)

nameserver 192.168.1.5

nameserver 127.0.0.1

 

nano /etc/hosts

 

127.0.0.1 internal.hostname.DOMAIN.com (Set your internal hostname name here)

127.0.0.1 asterisk1.local

127.0.0.1 localhost

 

Ctrl-X to save, 'Y' to confirm

 

iptables -P INPUT ACCEPT

iptables -P OUTPUT ACCEPT

iptables -P FORWARD ACCEPT

iptables -F

iptables -X

 

/etc/init.d/iptables save

 

service network restart

 

3. Update:

 

yum -y update

 

4. Disable Selinux:

 

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

 

reboot

 

5. Install dependencies and extra packages:

 

yum install e2fsprogs-devel keyutils-libs-devel krb5-devel libogg libselinux-devel libsepol-devel libxml2-devel libtiff-devel gmp php-pear php-pear-DB php-gd php-mysql php-pdo kernel-devel ncurses-devel audiofile-devel libogg-devel openssl-devel mysql-devel zlib-devel perl-DateManip sendmail-cf

 

cd /usr/src

 

wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz

tar zxvf lame-3.97.tar.gz

cd lame-3.97

./configure

make

make install

 

6. Install Asterisk and FreePBX:

 

cd /usr/src

 

wget http://downloads.digium.com/pub/asterisk/asterisk-1.4-current.tar.gz

wget http://downloads.digium.com/pub/asterisk/asterisk-addons-1.4-current.tar...

wget http://downloads.digium.com/pub/zaptel/zaptel-1.4-current.tar.gz

wget http://downloads.digium.com/pub/libpri/libpri-1.4-current.tar.gz

wget http://easynews.dl.sourceforge.net/sourceforge/amportal/freepbx-2.3.1.ta...

 

tar zxvf asterisk-1.4-current.tar.gz

tar zxvf asterisk-addons-1.4-current.tar.gz

tar zxvf zaptel-1.4-current.tar.gz

tar zxvf libpri-1.4-current.tar.gz

tar zxvf freepbx-2.3.1.tar.gz

 

cd /usr/src/zaptel-1.4-current

 

./configure

make

make install

make config

/sbin/ztcfg

 

echo "/sbin/ztcfg" >> /etc/rc.d/rc.local

 

cd /usr/src/libpri-1.4-current

 

./configure

make

make install

 

cd /usr/src/asterisk-1.4-current

 

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

mkdir /var/run/asterisk

mkdir /var/log/asterisk

chown -R asterisk:asterisk /var/run/asterisk

chown -R asterisk:asterisk /var/log/asterisk

chown -R asterisk:asterisk /var/lib/php/session/

 

nano +231 /etc/httpd/conf/httpd.conf

 

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

 

Ctrl-X to save, 'Y' to confirm

 

nano +329 /etc/httpd/conf/httpd.conf

 

Change AllowOverride None to AllowOverride All

 

Ctrl-X to save, 'Y' to confirm

 

./configure

make

make install

 

/etc/init.d/mysqld start

 

cd /usr/src/freepbx-2.3.1

 

mysqladmin create asterisk

mysqladmin create asteriskcdrdb

mysql asterisk < SQL/newinstall.sql

mysql asteriskcdrdb < SQL/cdr_mysql_table.sql

 

mysql

 

GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY 'SOMEPASSWORD';

GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY 'SOMEPASSWORD';

flush privileges;

 

\q

 

mysqladmin -u root password 'SOMEPASSWORD'

 

cd /usr/src/asterisk-addons

 

./configure

make

make install

 

cd /usr/src/freepbx-2.3.1

 

./start_asterisk start

 

./install_amp --username=asteriskuser --password=SOMEPASSWORD

 

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

 

chkconfig httpd on

 

chkconfig mysqld on

 

Open browser to http://ipaddressofpbx/admin

 

Click red bar in FreePBX

 

7. Fix ARI password:

 

nano -w /var/www/html/recordings/includes/main.conf.php

 

$ari_admin_password = "SOMEPASSWORD";

 

Ctrl-X to save, 'Y' to confirm

 

8. Configure Sendmail:

 

nano /etc/mail/sendmail.mc

 

define(`SMART_HOST', `relay.DOMAIN.com)dnl

 

MASQUERADE_AS(`pbx.DOMAIN.com')dnl

 

FEATURE(`masquerade_envelope')dnl

 

Ctrl-X to save, 'Y' to confirm

 

make -C /etc/mail

 

9. Edit sip_nat.conf for proper NAT:

 

nano /etc/asterisk/sip_nat.conf

 

localnet=192.168.1.0/255.255.255.0

externhost=pbx.DOMAIN.com (Set your external hostname name here)

externrefresh=10

fromdomain=DOMAIN.com (Set your external domain name here)

nat=yes

qualify=yes

canreinvite=no

 

Ctrl-X to save, 'Y' to confirm

 

10. Add extra codecs to config:

 

nano /etc/asterisk/sip_custom.conf

 

allow=gsm

allow=h261

allow=h263

allow=h263p

videosupport=yes

 

Ctrl-X to save, 'Y' to confirm

 

nano /etc/asterisk/iax_custom.conf

 

allow=gsm

allow=h261

allow=h263

allow=h263p

videosupport=yes

 

Ctrl-X to save, 'Y' to confirm

 

asterisk -rx reload

 

11. Edit voicemail config:

 

nano /etc/amportal.conf

 

If the web interface on your PBX will be accessible on the internet:

 

AMPWEBADDRESS=pbx.DOMAIN.com (Set your external hostname name here)

 

If the web interface on your PBX will be accessible only on your internal network:

 

AMPWEBADDRESS=internal.hostname.DOMAIN.com (Set your internal hostname name here)

 

Ctrl-X to save, 'Y' to confirm

 

or if your users will NOT have access to the web interface:

 

nano /etc/asterisk/vm_email.inc

 

remove "Visit http://AMPWEBADDRESS/cgi-bin/vmail.cgi?action=login&mailbox=${VM_MAILBOX} to check your voicemail with a web browser.\n"

 

Ctrl-X to save, 'Y' to confirm

 

nano /etc/asterisk/vm_general.inc

 

serveremail=pbx@DOMAIN.com ; Who the e-mail notification should appear to come from

fromstring=DOMAIN PBX ; Real name of email sender

 

Ctrl-X to save, 'Y' to confirm

 

12. Fix MOH directory:

 

ln -s /var/lib/asterisk/moh /var/lib/asterisk/mohmp3

 

asterisk -rx reload

 

14. Open browser to http://ipaddressofpbx

Done!

 

 

Optional Package:

 

ConfControl is a partial rewrite of Web-MeetMe which includes only the conference control page and not all the scheduling options. It includes a replacement index.html page which adds a link to ConfControl from the FreePBX home page.

 

cd /var/www/html

wget http://www.2l2o.com/asterisk/ConfControl1.0.tar.gz

tar zxvf ConfControl1.0.tar.gz

rm ConfControl1.0.tar.gz

Install Process for ClarkConnect

Detailed guides for installing FreePBX on ClakConnect can be found here:

http://samyantoun.50webs.com/asterisk/freepbx/clarkconnect/


Install Process for Debian

A good guide is http://www.squishychicken.com/index.php?option=com_content&task=view&id=13&Itemid=2. It's for AMP and Asterisk 1.2, but can used to install freePBX instead.

Updated for FreePBX and other software version changes. I also felt it needed to be made more idiot proof for dummies like me who spent many frustrating hours trying to get it to work.
http://powerontech.com/freepbx-on-debian.htm

There is a good Ubuntu guide here that can be of assistance, until somebody writes an updated guide for freePBX 2.3 and Debian Etch.


Install Process for freeBSD

0.- In the meantime freepbx is not in the oficial freebs ddistribution download the port from here

http://www.freepbx.org/attachment/ticket/761/freepbx-2.1.tar

1.- Choose what apache, mysql and php version you want to use. For example, you could put this in your make.conf:

  DEFAULT_PHP_VER=5

  DEFAULT_MYSQL_VER=50

  APACHE_PORT=www/apache20

2.- cd /usr/ports/misc/freepbx

3.- If you have php previously install make sure you have pear in your php.ini include paths.

3.- make install

4.- drink a coffee

5.- Read the post instalation notes:

       1) enable .php files in your apache config

       2) adding index.php as default index files

       3) add pear and /.../admin to your php.ini includes

       4) Make sure asterisk and mysql are running fine

       5) Make sure asterisk accepts connections (manager.conf)

6.- http://localhost/FreePBX

7.- Complete this document!


Install Process for Gentoo

This is a work in progress

Notes
Basic gentoo knowledge is required, if you don't know what a USE flag then this will be hard to follow.

Look the the requirements in the INSTALL file and get your apache/php flags correct and reemerge dev-lang/php if needed.

emerge asterisk >= 1.2 - http://gentoo-portage.com/net-misc/asterisk

and asterisk-addons - http://gentoo-portage.com/net-misc/asterisk-addons

note: as of this writing the correct ebuild is asterisk-1.2.9_p1

Both are masked with ~x86 so (if you're not on x86 modify as needed) umask them with

`echo "net-misc/asterisk ~x86" >> /etc/portage/package.keywords`

and

`echo "net-misc/asterisk-addons ~x86" >> /etc/portage/package.keywords`

To emerge:

`emerge asterisk asterisk-addons`

Note: I have `net-misc/asterisk zaptel speex mysql -vmdbmysql` in
my package.use for asterisk but you may need otherwise, read the use
flags descriptions at gentoo-portage.com

This will get asterisk to be ready to futher configure.

Amportal Issues:

  • It appears some gentoo paths are not compatible with amportal:

in /usr/sbin/safe_asterisk change

ASTSBINDIR=/sbin to

ASTSBINDIR=/usr/sbin

  • amportal can't run the safe_opserver because the asterisk user on my machine had /bin/false for it's shell

check in /etc/passwd and make the asterisk user have /bin/bash as the shell if it's not already such.

I also needed asterisk ownership on the htdocs folder above the freepbx files.

  • note: this article used to tell you how to implement it
    with lighthttpd but I've cleared out that info as it is more specific
    than it needs to be and novices may make serious mistakes following
    them.

Install Process for Poundkey

"Engineered by Digium in conjunction with rPath, Pound Key includes all
the Linux components necessary to run, debug and build Asterisk, and
only those components. You no longer have to worry about kernel
versions and package dependencies. Unlike other Linux distributions
used to deploy Asterisk, no unnecessary components that might
compromise security or performance are included."

While technically true, PoundKey is missing several components
needed for FreePBX to run. Below are most of the commands neded to
ensure a smooth installation of FreePBX when following the normal
INSTALL document.

Install missing rPath components from the primary distributions:

conary update libxml2 libtiff bison audiofile php-mysql m4

Install lame from the Media Center Linux repository:

conary update lame=steel.rpath.org@rpl:devel

Repair PEAR for proper operation of the install_amp script:

pear install DB

Install perl MIME::Types:

perl -MCPAN -e "install MIME::Types"

Once these steps are complete, the normall INSTALL document can be easily followed.


Install Process for SuSE

FreePBX 2 has been tested with SuSe LES 9 and SuSe 10.

In reality seems fairly solid with not a lot of work needing to be
done to run FreePBX. Mainly check that you have DB (installable via
PEAR if required) and PHP4-GETTEXT (available as part of the SUSE
install) installed. If you have any PHP problems check that you have
the line include_path = ".:/usr/share/php" in /etc/php.ini. (The '.:' is the important bit)

To install DB, or if you aren't sure whether you have it installed, you can use pear. pear list will show a list of installed packages. To install DB either run pear install DB
on the command line or visit http://pear.php.net/package/DB and
download the latest stable version, 1.7.6 at present. A pear install
should download it and install it but it will complain about any
dependancies it needs and had a tendancy to fail on my system due for
this exact reason. The best way I found was to download the file onto
my SuSe? system and run pear install -n <location/filename>
manually. This tells pear to ignore any dependancies, as otherwise it
will probably complain about pear itself! Once finished you should have
DB.php and a DB directory in /usr/share/php.

When installing FreePBX remember that the webserver root is
different to the one defaulted to in the install_amp script. Your
webserver root should be /srv/www/htdocs so use that as the root and a
bit of common sense to change the panel and cgi-bin paths.

No other file changes should be required to get FreePBX working.


Install Process for Ubuntu 6.06

In this document there are various boxes, with text inside them.
These are examples of what you see on your screen, what you should
type, and/or the expected responses. For example:

rob@rob-laptop:~$ id

uid=1000(rob) gid=1000(rob)
groups=4(adm),20(dialout),24(cdrom),25(floppy),
29(audio),30(dip),44(video),46(plugdev),
106(lpadmin),110(scanner),112(admin),1000(rob)

In that situation, you would type 'id' and the response would be
similar to the response indicated. If you see an error, that probably
means you've typed something incorrectly, but it could also suggest
other problems. Read the error carefully, and if you don't know how to
fix it, feel free to post to the forums or ask on IRC.

Operating System Installation
Installation of Ubuntu is out of the scope of this document.. As a
reference point this document was written with accepting the defaults
for everything suggested in the installer..

Post Installation Configuration
After your machine has rebooted and you've logged in, you need to
switch to the 'root' account. Whilst installing you were prompted for a
password, which is what you must enter when prompted below:

rob@rob-laptop:~$ sudo su -

Password: Enter Password Here

root@rob-laptop:~#

This gives you full control of the system. It's the equivlent of typing 'sudo' before every command.

You now need to ensure that your machine is able to access the
internet, and once that is working you can proceed with the
installation Usually being able to browse the internet with Firefox is
a good indication that you won't be having any problems.

Check for updates and install required packages
Before running apt-get, you must edit the sources.list file so that you can install from the "universe".

nano +17 -w /etc/apt/sources.list

Remove the # signs from this line and add multiverse at the end:

deb http://us.archive.ubuntu.com/ubuntu/ dapper universe multiverse

Multiverse gives you access to a lot more packages then the standard repository does, useful for future reference.

Unless you've added extra repositories, your sources.list should look something like:

deb http://archive.ubuntu.com/ubuntu/ dapper main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ dapper-updates main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu/ dapper-security main restricted universe multiverse

In addition to this, you must update apt's package lists"

apt-get update

You need to ensure that your machine is up to date with the current
security packages release by Ubuntu. After doing so, an apt-get of the
modules below will install all the requirements for freePBX

root@rob-laptop:~# apt-get install
php5 php5-cli php5-mysql mysql-server php-pear php-db openssh-server
curl sox apache2 subversion build-essential libncurses5-dev libssl-dev
linux-headers-`uname -r` libmysqlclient15-dev

... Please copy-and-paste that line, rather than trying to type it in.

Reading package lists... Done

Building dependency tree... Done

The following extra packages will be installed:

apache-common apache2-common apache2-mpm-prefork apache2-utils

... Several more lines of automatically imported packages ...

mysql-server-5.0 openssh-server php-db php-http php-mail php-net-smtp

php-net-socket php-pear php-xml-parser php4 php4-cli php4-common php4-mysql

php4-pear php5-common sox ssl-cert zlib1g-dev

0 upgraded, 39 newly installed, 0 to remove and 6 not upgraded.

Need to get 40.6MB of archives.

After unpacking 107MB of additional disk space will be used.

Do you want to continue [Y/n]? y

Get:1 http://au.archive.ubuntu.com dapper/main libpcre3 6.4-1.1ubuntu4 [174kB]

Get:2 http://security.ubuntu.com dapper-security/main libapr0 2.0.55-4ubuntu2.1 [132kB]

Get:3 http://au.archive.ubuntu.com dapper/main ssl-cert 1.0.13 [9526B]

Get:4 http://au.archive.ubuntu.com dapper/main curl 7.15.1-1ubuntu2 [168kB]

... The machine now proceeds to download and install packages ...

Setting up sox (12.17.9-1) ...

root@rob-laptop:~#

Downloading and Installing Asterisk

Previous comment:
Options, if you use edgy instead of dapper, you will get the
latest version of asterisk without needing to compile etc etc etc, all
you need to do is: apt-get install asterisk and skip to the section on
MySQL... Dapper also has packaged versions of asterisk and is quite
useable also, and is a lot easier to manage then compiling and
re-compiling to upgrade all the time

Rob's Response:
Well, I tried this, (on 6.06 LTS) and got Asterisk-1.2.7.1, and
Zaptel-1.2.5. Both of these are _woefully_ out of date. Asterisk has 3
Denial-Of-Service bugs and 2 security bugs, and Zaptel doesn't have the
proper echo cancellation enabled in it. Yes. Maybe it might be easier
to type in 'apt-get install asterisk zaptel', but it'll be crap.
Compile from source, it's not that hard. To make it easier, I've put
one box at the bottom of the downloading section that you can
copy-and-paste from to install everything from source.

Downloading
We will be using subversion to download the latest version of the
1.2 branch of Asterisk, Zaptel, LibPRI and Asterisk-Addons.
asterisk-sounds will be the latest version.

root@rob-laptop:/usr/src# svn co http://svn.digium.com/svn/asterisk/branches/1.2 asterisk-1.2

... Lots of files are downloaded ...

root@rob-laptop:/usr/src# svn co http://svn.digium.com/svn/zaptel/branches/1.2 zaptel-1.2

... Zaptel files download ...

root@rob-laptop:/usr/src# svn co http://svn.digium.com/svn/libpri/branches/1.2 libpri-1.2

... LibPRI downloads - Note, this is quite small, only about 15 files. This is normal ...

root@rob-laptop:/usr/src# svn co http://svn.digium.com/svn/asterisk-addons/branches/1.2 asterisk-addons-1.2

... Asterisk-Addons downloads...

root@rob-laptop:/usr/src# svn co http://svn.digium.com/svn/asterisk/trunk/sounds asterisk-sounds

... The default Sounds package downloads now. This can be quite large ...

root@rob-laptop:/usr/src#

Compiling and Installing
You now need to compile and install the latest version of asterisk.

root@rob-laptop:/usr/src# cd libpri-1.2

root@rob-laptop:/usr/src/libpri-1.2# make install

gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -c -o copy_string.o copy_string.c

gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -c -o pri.o pri.c

... libpri compiles ...

install -m 644 libpri.a /usr/lib

if test $(id -u) = 0; then /sbin/ldconfig -n /usr/lib; fi

root@rob-laptop:/usr/src/libpri-1.2# cd ../zaptel-1.2

root@rob-laptop:/usr/src/zaptel-1.2# make install config

cc -I. -O4 -g -Wall -DBUILDING_TONEZONE -DSTANDALONE_ZAPATA
-DZAPTEL_CONFIG=\"/etc/zaptel.conf\" -DHOTPLUG_FIRMWARE -c -o
gendigits.o gendigits.c

cc -o gendigits gendigits.o -lm

./gendigits > tones.h

... zaptel compiles - Note that any errors here are usually
because of you not having the correct version of linux-headers'
installed ...

ZAPTELVERSION="SVN-branch-1.2-r1468" build_tools/make_version_h > version.h.tmp

if cmp -s version.h.tmp version.h ; then echo; else \

mv version.h.tmp version.h ; \

fi

... Zaptel compiles ...

root@rob-laptop:/usr/src/zaptel-1.2# cd ../asterisk-1.2

root@rob-laptop:/usr/src/asterisk-1.2# make install

if cmp -s .cleancount .lastclean ; then echo ; else \

make clean; cp -f .cleancount .lastclean;\

fi

make1: Entering directory `/usr/src/asterisk-1.2'

... Asterisk Compiles ...

root@rob-laptop:/usr/src/asterisk-1.2# cd ../asterisk-addons-1.2

root@rob-laptop:/usr/src/asterisk-addons-1.2# make install

./mkdep -fPIC -I../asterisk -D_GNU_SOURCE -I/usr/include/mysql `ls *.c`

make -C format_mp3 all

... Asterisk-Addons now install ...

root@rob-laptop:/usr/src/asterisk-addons-1.2# cd ../asterisk-sounds/

root@rob-laptop:/usr/src/asterisk-sounds# make install

... Lots of additional sound files are installed here ...

root@rob-laptop:/usr/src/asterisk-sounds#

Copy-And-Paste this, for ease of installation:

cd /usr/src
svn co http://svn.digium.com/svn/asterisk/branches/1.2 asterisk-1.2
svn co http://svn.digium.com/svn/zaptel/branches/1.2 zaptel-1.2
svn co http://svn.digium.com/svn/libpri/branches/1.2 libpri-1.2
svn co http://svn.digium.com/svn/asterisk-addons/branches/1.2 asterisk-addons-1.2
svn co http://svn.digium.com/svn/asterisk/trunk/sounds asterisk-sounds
cd /usr/src/libpri-1.2 && make install
cd /usr/src/zaptel-1.2
sed -i 's!^#define ECHO_CAN_KB1!/* #define ECHO_CAN_KB1 */!' zconfig.h
sed -i 's!/\* #define ECHO_CAN_MG2 \*/!#define ECHO_CAN_MG2!' zconfig.h
make install
cd /usr/src/asterisk-1.2 && make install
cd /usr/src/asterisk-addons-1.2
sed -i 's/_GNU_SOURCE/_GNU_SOURCE -DMYSQL_LOGUNIQUEID/' Makefile
make install

If all you wanted to do was install Asterisk on a Ubuntu machine,
you're done - you now have a fully functional Asterisk box, for you to
play with as you wish. If you want, you can run 'make samples' in the
asterisk-1.2 directory to install some example configuration files for
you to play with. However, since you're reading this on the FreePBX
site, we're now up to isetting the machine up and nstalling FreePBX.

Create user and set permissions
Unfortunately, issues in Asterisk 1.2 require us
to run the web server process as the same user as asterisk. In this
situation, it's easier for us to run httpd as 'asterisk', rather than
asterisk as 'httpd', as there's far less configuration that needs to be
done.

root@rob-laptop:~# addgroup asterisk

Adding group `asterisk' (1001)...

Done.

root@rob-laptop:~# useradd -g asterisk -c "Asterisk PBX" -d /var/lib/asterisk asterisk

root@rob-laptop:~# mkdir /var/run/asterisk

root@rob-laptop:~# chown -R asterisk /var/lib/php5

Using nano (or your favourite editor, but nano is fine), you need to change User apache and Group apache to User asterisk and Group asterisk.

[root@dhcp1 ~]# nano +101 /etc/apache2/apache2.conf (Push Control-X to save when you've finished)

You also want to change AllowOverride None to AllowOverride All

[root@dhcp1 ~]# nano +12 /etc/apache2/sites-enabled/000-default (Push Control-X to save when you've finished)

And then restart asterisk to re-load its configuration.

root@rob-laptop:~# /etc/init.d/apache2 restart

Set up MySQL
Before you can do anything to MySQL, you need to make sure it's running:

root@rob-laptop:~# /etc/init.d/mysql start

Starting MySQL database server: mysqld.

root@rob-laptop:~#

Now, you must cd to the /usr/src directory and get the source to freepbx using svn:

root@rob-laptop:/usr/src/freepbx# cd /usr/src/

root@rob-laptop:/usr/src# svn co https://svn.sourceforge.net/svnroot/amportal/freepbx/branches/2.2 freepbx-2.2

A freepbx/amp_conf

A freepbx/amp_conf/astetc

... freePBX now downloads ...

Checked out revision 2574.

root@rob-laptop:/usr/src# cd /usr/src/freepbx-2.2

Now, to configure the databases for freePBX:

root@rob-laptop:/usr/src/freepbx# mysqladmin create asterisk

root@rob-laptop:/usr/src/freepbx# mysqladmin create asteriskcdrdb

root@rob-laptop:/usr/src/freepbx# mysql asterisk < SQL/newinstall.sql

root@rob-laptop:/usr/src/freepbx# mysql asteriskcdrdb < SQL/cdr_mysql_table.sql

They also need to be secured, so that not just anyone can access
them. freePBX will prompt you for a database password when you do the
install. You need to pick that now. We'll assume that you've picked
'asteriskuser' and 'amp109' - you probably shouldn't use these, as they
are well known passwords for Asterisk@Home builds. If anyone's trying
to attack your machine, they will try this.

root@rob-laptop:/usr/src/freepbx# mysql

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 12 to server version: 5.0.22-Debian_0ubuntu6.06.2-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY 'amp109'; (This is the first username and password asked for below)

Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY 'amp109';

Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

mysql> \q

Bye

root@rob-laptop:/usr/src/freepbx#

Now, after all of this, you need to pick a root 'mysql' password.
For this, we'll pretend it's 's33kret'. If you need to do anything else
with mysql, you'll need to provide this password.

root@rob-laptop:/usr/src/freepbx# mysqladmin -u root password 's33kret'

Install freePBX at last!
You're there - you've done the hard yards, and finally you can install freePBX!

WARNING! If you have an existing Asterisk
installation, the script below will overwrite your Asterisk
configuration files. Backup your /etc/asterisk directory before
running.

root@rob-laptop:/usr/src/freepbx# ./install_amp

Checking for PEAR DB..OK

Checking for PEAR Console::Getopt..OK

Checking user..OK

Checking for /etc/amportal.conf../etc/amportal.conf does not exist, copying default

Creating new /etc/amportal.conf

Enter your USERNAME to connect to the 'asterisk' database:

[asteriskuser] (Just push enter if you've done the defaults above, or, fill in the details you entered)

Enter your PASSWORD to connect to the 'asterisk' database:

[amp109] (As above, the password you picked in the MYSQL command)

Enter the hostname of the 'asterisk' database:

[localhost] (Just push enter)

Enter a USERNAME to connect to the Asterisk Manager interface:

[admin] (Just push enter)

Enter a PASSWORD to connect to the Asterisk Manager interface:

[amp111] (Just push enter)

Enter the path to use for your AMP web root:

[/var/www/html]

/var/www

Enter the path to use for your FOP web root:

[/var/www/html/panel]

/var/www/panel

Enter the path to your Apache cgi-bin:

[/var/www/cgi-bin] /usr/lib/cgi-bin

Enter the IP ADDRESS or hostname used to access the AMP web-admin:

[xx.xx.xx.xx] Enter the IP Address of your UBUNTU SERVER HERE

Enter a PASSWORD to perform call transfers with the Flash Operator Panel:

[passw0rd] (Just push enter)

Use simple Extensions [extensions] admin or separate Devices and Users [deviceanduser]?

[extensions](Just push enter)

Enter directory in which to store AMP executable scripts:

[/var/lib/asterisk/bin] (Just push enter)

Created /var/lib/asterisk/bin

Enter directory in which to store super-user scripts:

[/usr/sbin] (Just push enter)

/etc/amportal.conf writtenOK

Reading /etc/amportal.conf..OK

Checking for /etc/asterisk/asterisk.conf..OK

Reading /etc/asterisk/asterisk.conf..OK

Checking for Asterisk 1.2..OK

Checking for selinux..OK

At this stage, you're almost done, but there's quite often a
problem when people have made a typo, or forgotten to put a password in
the mysql server. If you see these lines:

Connecting to database..FAILED

Try running ./install_amp --username=user --password=pass (using your own user and pass)

[FATAL] Cannot connect to database

root@rob-laptop:/usr/src/freepbx#

it means that you haven't done the 'GRANT ALL PRIVILEGES ...'
command in MySQL, or, you've put the wrong password in when you were
doing the installation. All is not lost. If you want to re-run the
installation, with it prompting you again, you can simply delete the
/etc/amportal.conf file (rm /etc/amportal.conf) or edit it and put the correct password in. Then re-run ./install_amp and it should proceed along happily.

root@rob-laptop:/usr/src/freepbx# ./install_amp

Checking for PEAR DB..OK

Checking for PEAR Console::Getopt..OK

Checking user..OK

Checking for /etc/amportal.conf..OK

Reading /etc/amportal.conf..OK

Checking for /etc/asterisk/asterisk.conf..OK

Reading /etc/asterisk/asterisk.conf..OK

Checking for Asterisk 1.2..OK

Checking for selinux..OK

Connecting to database..OK

Checking current version of AMP..2.1.2

Installing new AMP files..OK

Configuring install for your environment..OK

Setting permissions on files..OK

Checking for upgrades..0 found

Generating AMP configs..

Generating Configurations.conf..

Checking for PEAR DB..OK

Checking for PEAR Console::Getopt..OK

Checking for /etc/amportal.conf..OK

Reading /etc/amportal.conf..OK

Reading /etc/asterisk/asterisk.conf..OK

Connecting to database..OK

Please Reload Asterisk by visiting http://192.168.1.53/admin

Generating AMP configs..OK

Restarting Flash Operator Panel..op_server.pl: no process killed

OK

Please Reload Asterisk by visiting http://192.168.1.53/admin

root@rob-laptop:/usr/src/freepbx# modprobe ztdummy

root@rob-laptop:/usr/src/freepbx# amportal start

Starting FreePBX and Asterisk automatically
If you don't have any zaptel hardware, you can automatically start
ztdummy and asterisk by editing /etc/rc.local, and before the 'exit 0'
line insert these two lines:

modprobe ztdummy
/usr/sbin/amportal start &

That ensures that the timing module (ztdummy) is loaded, and that
asterisk is running on bootup. You can also use the /etc/init.d/zaptel
script to start zaptel, hopefully someone with more ubuntu knowledge
can update this page with how to enable it.

Congratulations!
You're done - you now have a fully functional FreePBX
Installation. The first thing to do is log in (Go to the IP address of
the Ubuntu machine above, and click on 'Setup'). The default username
is 'admin' and the default password is 'admin'. Go to the
'Administrators' tab and change the password straight away. After that,
you can visit the Online Module Repository and see what modules are
available.


Install Process for Ubuntu Server 7.04

Placeholder until more detailed instructions can be written

For now, see UbuntuServer


Upgrading your system

Upgrading FreePBX
Note: You may need to install subversion for your linux distribution if you have any errors. Do this by typing yum -y install subversion at the root prompt.
Upgrading to the latest Released Version: 2.4.0
You will want to pull the release tarball, and follow the instructions below. Once you have installed it you will want to navigate to Module Admin menu item and update all modules as well as install other available modules not included in the release tarball.

cd /usr/src/
wget http://mirror.freepbx.org/freepbx-2.4.0.tar.gz
tar zxvf freepbx-2.4.0.tar.gz
cd freepbx-2.4.0
./start_asterisk start # for upgrades use: ./amportal start 
./install_amp

On some rare cases you may experience an issue with the SQL database not being correctly updated. If that appears to be the case, you can safely add the --force-version option. For example, if you were upgrading from version 2.1.3 you might type:

cd /usr/src/freepbx-2.4.0
./install_amp --force-version=2.1.3

(Replace 2.1.3 with the version you are upgrading from, or an earlier version which is also safe)

Upgrading to the latest stable 2.4 branch from SVN
If you prefer to pull directly from the SVN repository you can follow these instructions below. Once you have installed FreePBX it is important to navigate to Module Admin in FreePBX and upgrade your modules. Installing FreePBX in this way (vs. using the release tarball) is not recommended for initial installs unless you are very familiar with the project. Without loading critical modules like core, framework, voicemail and some others your system will not be able to do anything for you or will function improperly.

cd /usr/src/
svn co http://svn.freepbx.org/freepbx/branches/2.4 freepbx-2.4

Installation instructions are the same as above after exploding the tarball

Upgrading to the trunk branch
The trunk is where active development happens. The project tries hard to keep it relatively stable but it is a dynamic place a times. This differs from release branches where they are limited to the latest bug fixes. You can access the development trunk as described below.

cd /usr/src/
svn co http://svn.freepbx.org/freepbx/trunk freepbx-trunk

Note: this code is under active development, and may be broken at times. However, there's usually new things in SVN that you may want to play with. Also, when you're using SVN, you must specify the last 'released' version you were using. This ensures that the database layout is up to date. You do this with the command:

cd /usr/src/freepbx-trunk
./install_amp --force-version=2.1.3

(Replace 2.1.3 with the version you are upgrading from)

Changing the URL from a previously checked SVN checkout
You may already have already performed an svn co from the repository and when you now try to access the repository (e.g. doing an svn update) it no longer works because the URL has been changed from some of the recent SVN changes. You can simply change the URL to point to the new repository location with the following instructions:

  1. Go to the root of your checked out branch and type svn info
  2. you will see something such as: https://amportal.svn.sourceforge.net/svnroot/amportal/freepbx/branches/2.3 as part of the information.
  3. you would then execute the following command:
    svn switch --relocate https://amportal.svn.sourceforge.net/svnroot/amportal/freepbx/branches/2.3 http://svn.freepbx.org/freepbx/branches/2.3
    
  4. That would be it, you should now be pointing to the proper repository. You may need to modify the above URL depending on what you get from your svn info command.