Recent Changes - Search:

Freepbx

Linux

Support

edit SideBar

Setting up a Centos 6.3 Asterisk and Freepbx server

This Howto covers the following:

  • Choosing a version to install
  • Centos
  • Mysql
  • Apache and php
  • Dahdi (if required)
  • Asterisk
  • Freepbx
  • PhpMyAdmin (if required)
  • Bind (dns)

Additionally the following related topics will also be covered at a later date:

  • Configuring trunks
  • Postfix
  • Time synchronization (ntp)
  • Securing ssh
  • Securing mysql
  • Securing Asterisk and Freepbx
  • Setting up php cache
  • Audio file conversion

Choosing a version to install

This howto relates to the installation of asterisk 10.x and Freepbx 2.10. Some may prefer to use asterisk 1.8 instead of 10.x. Typically the latest asterisk version, though most rich with features, will be the one that has been less subjected to use in production than the penultimate version. On the other hand the penultimate version may not contain all the non urgent fixes that are contained in the latest version. The latest version should be fine, but you may need to invest more time in debugging if you run into as yet undiscovered issues.

As for Freepbx, 2.10 is stable for production use so no problems to use the latest version. It is fair to say that most Freepbx users do not use asterisk 10, so in the case of using asterisk 10 with Freepbx, you should be prepared at least to do some debugging if you run into issues.

Centos Installation

  1. First download the appropriate ISO image from centos mirrors mirror and install. If your processor is 64bit you can chose whether to install a 32 bit version or 64 bit version. Some benchmarks with GUI operations have shown the 32 and 64 bit versions don't have much performance difference. Other benchmarks (with apache) have shown performance improvements of 64 bit over 32 bit. In any case 64 bit versions will use more memory than the 32 bit versions, therefore if you chose the 64 bit make sure you are not short of memory. For example, to do a Centos install over the network, you can download the network installer http://centos.bio.lmu.de/6.3/isos/x86_64/CentOS-6.3-x86_64-netinstall.iso and boot your machine using this. Choose "Install or upgrade an existing system".
  2. You may optionally test the install media.
  3. Choose your install language
  4. Choose keyboard layout.
  5. Choose installation media, for network install use URL. The network will then be configured for the install. You may use a dynamically assigned ip address or if you prefer you may set up a static one. This is only for the network install, later you configure the ip that will be used by the server.
  6. You will be prompted to enter the URL for the installation image, for example: http://centos.bio.lmu.de/6.3/os/x86_64 for a 64bit image, http://centos.bio.lmu.de/6.3/os/i386 for a 32bit image.
  7. Choose storage devices. After this you will be able to configure the network for the new server. You can also leave the default and change it later. For network setup on an asterisk server it is wise to use a static ip address. You will need to setup the ip address (e.g. 192.168.1.2), the network mask (e.g. 255.25.255.0) the default gateway (e.g. 192.168.1.1) and the dns server (e.g. 192.168.1.1 if it is the same as your default gateway). There is no need to specify a search domain.
  8. Choose the timezone.
  9. Choose the root password.
  10. Choose disk partitioning.
  11. At this point you can choose what type of install to do. For a production server, it is best to use a non graphic environment, so for example "Minimal" and then add the additional packages later.
  12. When the install completes, login and check that the network is up, for example ping www.google.it.
  13. If you had not already set up a static ip address you can do it by using system-config-network-tui. This is not installed by default so use the following to install it:

yum install system-config-network-tui

  1. Then run the command and set up your static ip address

system-config-network-tui

  1. Update all packages. If the kernel is updated, you will need to reboot. At the end you should run yum again until it does not have any more updates. This is because some updates have dependencies so are not installed on the first run:
yum -y update
reboot
yum -y update
  1. Disable selinux. Check the following file:

vi /etc/selinux/config

has this setting:

SELINUX=disabled

reboot (if above setting was changed):

reboot

Mysql

  1. Install mysql if not already present

yum install mysql-server

  1. Setup mysqld to start on boot:

chkconfig mysqld on

  1. Start mysqld:

service mysqld start

  1. Secure the installation by running following script and answering with defaults:

/usr/bin/mysql_secure_installation

Output:
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL 
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY! 


In order to log into MySQL to secure it, we'll need the current 
password for the root user.  If you've just installed MySQL, and 
you haven't set the root password yet, the password will be blank, 
so you should just press enter here. 

Enter current password for root (enter for none): 
OK, successfully used password, moving on... 

Setting the root password ensures that nobody can log into the MySQL 
root user without the proper authorisation. 

Change the root password? [Y/n] 
New password: 
Re-enter new password: 
Password updated successfully! 
Reloading privilege tables.. 
 ... Success! 


By default, a MySQL installation has an anonymous user, allowing anyone 
to log into MySQL without having to have a user account created for 
them.  This is intended only for testing, and to make the installation 
go a bit smoother.  You should remove them before moving into a 
production environment. 

Remove anonymous users? [Y/n] 
 ... Success! 

Normally, root should only be allowed to connect from 'localhost'.  This 
ensures that someone cannot guess at the root password from the network. 

Disallow root login remotely? [Y/n] 
 ... Success! 

By default, MySQL comes with a database named 'test' that anyone can 
access.  This is also intended only for testing, and should be removed 
before moving into a production environment. 

Remove test database and access to it? [Y/n] 
 - Dropping test database... 
 ... Success! 
 - Removing privileges on test database... 
 ... Success! 

Reloading the privilege tables will ensure that all changes made so far 
will take effect immediately. 

Reload privilege tables now? [Y/n] 
 ... Success! 

Cleaning up... 

All done!  If you've completed all of the above steps, your MySQL 
installation should now be secure. 

Thanks for using MySQL!

Apache

  1. Install apache and php if not already present

yum install httpd php php-pear php-mysql php-process

  1. Setup apache to start on boot

chkconfig httpd on

  1. Setup the user and group that will be used for asterisk install and configure apache to run with these:
groupadd asterisk
useradd -c "asterisk PBX" -d /var/lib/asterisk -g asterisk asterisk
  1. Change the apache configuration to use the user and group just defined:

vi /etc/httpd/conf/httpd.conf

Change the following lines:
User apache
Group apache
to:
User asterisk
Group asterisk
  1. Modify the same file (httpd.conf) to allow apache directives to be overriden in .htaccess files. The modification has to be done in the <Directory> directive of the default server.

AllowOverride All

  1. Modify the same file (httpd.conf) to allow apache to follow symbolic links. The modification has to be done in the <Directory> directive of the default server.

Options FollowSymLinks

  1. Setup a default time zone in php configuration file:

vi /etc/php.ini

date.timezone = "Europe/Amsterdam"

See http://php.net/manual/en/timezones.php for full list of supported values.
  1. Change the permissions of the session.save_path (as defined in /etc/php.ini)

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

Note: after doing an update to php, it is necessary to check that the update has not reset the owner of the session.save_path to the default (apache) and if so re-execute the above command.
  1. Start the service

service httpd start

For other apache configuration check the apache documentation. If the server will be accessible via the public internet, then an ssl certificate should be setup and apache configured for https access.

  1. You will need to open firewall ports for the web server. To manage the firewall, install system-config-firewall-tui

yum install system-config-firewall-tui

  1. Run system-config-firewall-tui and open http and https ports (These are indicated under WWW (HTTP) and Secure WWW (HTTPS) in the menu

system-config-firewall-tui

Dahdi

Only required if using telephony hardware cards or meetme.

Asterisk

  1. Install asterisk prerequisites if not already present

yum install wget curl bison perl perl-CPAN openssl-devel kernel-devel audiofile-devel sox svn gcc-c++ make ncurses-devel libxml2-devel mysql-devel sqlite-devel

If you will use odbc with asterisk you will also need

yum install unixODBC unixODBC-devel libtool-ltdl libtool-ltdl-devel

And the relevant connector for your database, for example mysql

yum install mysql-connector-odbc

  1. Change to a suitable location for storing the downloaded software, e.g.:

cd /usr/local/src/

  1. Download latest version of asterisk (at time of writing this was 10)

wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-10-current.tar.gz

  1. Extract the source directory

tar -xvzf asterisk-10-current.tar.gz

  1. Change into the source directory (customize the command to the version that was downloaded)

cd asterisk-10.12.1

  1. Get source for fomat_mp3 (not part of downloaded asterisk tar file)

contrib/scripts/get_mp3_source.sh

  1. Configure

./configure

  1. Start compilation interactive menu

make menuselect

Under Add-ons choose:
format_mp3
app_mysql
cdr_mysql
Under Core Sound Packages and Extra Sound Packages choose any relevant packages. It is a good idea to install not just gsm but also other codecs, since it reduces cpu needs for transcoding and (depending on codec) can give better quality.
When exiting menuselect, when prompted, press S to save changes.
  1. Compile and install asterisk
make
make install
make samples
  1. Change directory onwer and group
chown -R asterisk:asterisk /var/run/asterisk
chown -R asterisk:asterisk /var/log/asterisk
chown -R asterisk:asterisk /var/lib/asterisk
chown -R asterisk:asterisk /var/spool/asterisk
chown -R asterisk:asterisk /etc/asterisk

Freepbx

  1. Install prerequisites if not already present

pear install DB

  1. Install lame
cd /usr/local/src
wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz  
tar zxvf lame-3.99.5.tar.gz
cd lame-3.99.5
./configure
make
make install
  1. Get and extract the Freepbx source code
cd /usr/local/src
wget http://mirror.freepbx.org/freepbx-2.10.0.tar.gz
tar -xvzf freepbx-2.10.0.tar.gz
cd freepbx-2.10.0
  1. Create and populate databases for configuration and cdrs
mysqladmin -u root -p create asteriskcdrdb
mysql -u root -p asteriskcdrdb < SQL/cdr_mysql_table.sql
mysqladmin -u root -p create asterisk
mysql -u root -p asterisk < SQL/newinstall.sql
  1. Create database user to be used by freepbx to connect to database and give permisisons on databases

mysql -u root -p

at the mysql prompt enter (substitute xxxxxxxx with chosen password):
GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY 'xxxxxxxx';
GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY 'xxxxxxxx';
flush privileges;
quit
  1. Start asterisk

./start_asterisk start

  1. Run freepbx install script (using same credentials authorized to mysql)

./install_amp

Output
Checking for PEAR DB..OK 
PHP Warning:  filesize(): stat failed for /tmp/freepbx_pre_install.log in /usr/local/src/freepbx-2.10.0/amp_conf/htdocs/admin/libraries/utility.functions.php on line 75 
Checking for PEAR Console::Getopt..OK 
Checking user..OK 
Checking if Asterisk is running..running with PID: 1848..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] abcd1234 
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 IP ADDRESS or hostname used to access the AMP web-admin: 
 [192.168.1.1] 109.104.101.188 
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] 

PHP Warning:  filesize(): stat failed for /var/log/asterisk/freepbx_debug in /usr/local/src/freepbx-2.10.0/amp_conf/htdocs/admin/libraries/utility.functions.php on line 641 
Created /var/lib/asterisk/bin 
Enter directory in which to store super-user scripts: 
 [/usr/local/sbin] 

/etc/amportal.conf writtenAssuming new install, --install-moh added to command line 
OK 
Reading /etc/amportal.conf..parsed amp_conf variables from /etc/amportal.conf: 
amp_conf [AMPDBHOST] => [localhost] 
amp_conf [AMPDBENGINE] => [mysql] 
amp_conf [AMPENGINE] => [asterisk] 
amp_conf [AMPMGRUSER] => [admin] 
amp_conf [AMPMGRPASS] => [amp111] 
amp_conf [AMPBIN] => [/var/lib/asterisk/bin] 
amp_conf [AMPSBIN] => [/usr/local/sbin] 
amp_conf [AMPWEBROOT] => [/var/www/html] 
amp_conf [AMPCGIBIN] => [/var/www/cgi-bin ] 
amp_conf [FOPWEBROOT] => [/var/www/html/panel] 
amp_conf [FOPPASSWORD] => [passw0rd] 
amp_conf [AUTHTYPE] => [database] 
amp_conf [AMPEXTENSIONS] => [extensions] 
amp_conf [AMPDBUSER] => [asteriskuser] 
amp_conf [AMPDBPASS] => [abcd1234] 
amp_conf [AMPWEBADDRESS] => [109.104.101.188] 
amp_conf [AMPDBNAME] => [asterisk] 
OK 
Checking for /etc/asterisk/asterisk.conf..OK 
Reading /etc/asterisk/asterisk.conf..OK 
Using asterisk as PBX Engine 
Checking for Asterisk version..10.3.1 
Checking for selinux..OK 
Connecting to database..OK 
Checking current version of AMP..2.9.0 
Installing new FreePBX files..OK (569 files copied, 0 skipped) 
Configuring install for your environment..PHP Warning:  include_once(/etc/asterisk/freepbx.conf): failed to open stream: No such file or directory in /var/lib/asterisk/bin/freepbx_setting on line 22 
PHP Warning:  include_once(): Failed opening '/etc/asterisk/freepbx.conf' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/lib/asterisk/bin/freepbx_setting on line 22 
PHP Fatal error:  Class 'freepbx_conf' not found in /var/lib/asterisk/bin/freepbx_setting on line 37 
PHP Warning:  include_once(/etc/asterisk/freepbx.conf): failed to open stream: No such file or directory in /var/lib/asterisk/bin/freepbx_setting on line 22 
PHP Warning:  include_once(): Failed opening '/etc/asterisk/freepbx.conf' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/lib/asterisk/bin/freepbx_setting on line 22 
PHP Fatal error:  Class 'freepbx_conf' not found in /var/lib/asterisk/bin/freepbx_setting on line 37 
PHP Warning:  include_once(/etc/asterisk/freepbx.conf): failed to open stream: No such file or directory in /var/lib/asterisk/bin/freepbx_setting on line 22 
PHP Warning:  include_once(): Failed opening '/etc/asterisk/freepbx.conf' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/lib/asterisk/bin/freepbx_setting on line 22 
PHP Fatal error:  Class 'freepbx_conf' not found in /var/lib/asterisk/bin/freepbx_setting on line 37 
PHP Warning:  include_once(/etc/asterisk/freepbx.conf): failed to open stream: No such file or directory in /var/lib/asterisk/bin/freepbx_setting on line 22 
PHP Warning:  include_once(): Failed opening '/etc/asterisk/freepbx.conf' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/lib/asterisk/bin/freepbx_setting on line 22 
PHP Fatal error:  Class 'freepbx_conf' not found in /var/lib/asterisk/bin/freepbx_setting on line 37 
PHP Warning:  include_once(/etc/asterisk/freepbx.conf): failed to open stream: No such file or directory in /var/lib/asterisk/bin/freepbx_setting on line 22 
PHP Warning:  include_once(): Failed opening '/etc/asterisk/freepbx.conf' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/lib/asterisk/bin/freepbx_setting on line 22 
PHP Fatal error:  Class 'freepbx_conf' not found in /var/lib/asterisk/bin/freepbx_setting on line 37 
PHP Warning:  include_once(/etc/asterisk/freepbx.conf): failed to open stream: No such file or directory in /var/lib/asterisk/bin/freepbx_setting on line 22 
PHP Warning:  include_once(): Failed opening '/etc/asterisk/freepbx.conf' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/lib/asterisk/bin/freepbx_setting on line 22 
PHP Fatal error:  Class 'freepbx_conf' not found in /var/lib/asterisk/bin/freepbx_setting on line 37 
amportal..no fpbx..freepbx_engine..freepbx_setting..gen_amp_conf.php..done 
apply username/password changes to conf files: 
running apply_conf.sh from /etc/amportal.conf 
Reading /etc/amportal.conf 
Updating configuration... 
/etc/asterisk/cdr_mysql.conf user: [asteriskuser] password: [abcd1234] hostname: [localhost] 
/etc/asterisk/manager.conf user: [admin] secret: [amp111] 
/etc/asterisk/vm_email.inc 
used web address: [109.104.101.188] for path 
Adjusting File Permissions.. 


SETTING FILE PERMISSIONS 
Permissions OK 
Done 
done with apply_conf.sh 
creating missing #include files..OK 
OK 
Setting permissions on files..OK 
Checking for upgrades..5 found 
Upgrading to 2.10.0alpha1.. 
-> Running PHP script /usr/local/src/freepbx-2.10.0/upgrades/2.10.0alpha1/migration.php 
PHP Warning:  Invalid argument supplied for foreach() in /var/www/html/admin/libraries/freepbx_conf.class.php on line 906 
Cleaning up deprecated or moved files: 
Checking /var/www/html_asterisk..Not Required 
Checking /var/www/html/admin/views/freepbx.php..removed 
Checking /var/www/html/admin/views/freepbx_admin.php..Not Required 
Checking /var/www/html/admin/views/freepbx_reload.php..Not Required 
Checking /var/www/html/admin/views/freepbx_reloadbar.php..Not Required 
Checking /var/www/html/admin/views/freepbx_footer.php..Not Required 
Checking /var/www/html/admin/views/unauthorized.php..Not Required 
Checking /var/www/html/admin/views/loggedout.php..Not Required 
Upgrading to 2.10.0alpha1..OK 
Upgrading to 2.10.0beta2.. 
-> Running PHP script /usr/local/src/freepbx-2.10.0/upgrades/2.10.0beta2/migration.php 
Cleaning up deprecated or moved files: 
Checking /var/www/html/admin/reports.php..Not Required 
Checking /var/www/html/admin/assets/js/pbxlib.js.php..Not Required 
Checking /var/www/html/admin/assets/css/jquery-ui-1.8.16.css..Not Required 
Checking /var/www/html/admin/common/db_connect.php..Not Required 
Checking /var/www/html/admin/common/json.inc.php..Not Required 
Checking /var/www/html/admin/common/libfreepbx.javascripts.js..Not Required 
Checking /var/www/html/admin/common/mainstyle-alternative.css..Not Required 
Checking /var/www/html/admin/common/mainstyle.css..Not Required 
Checking /var/www/html/admin/common/script.js.php..Not Required 
Checking /var/www/html/admin/images/category1.png..Not Required 
Checking /var/www/html/admin/images/freepbx_large.png..Not Required 
Checking /var/www/html/admin/images/header-back.png..Not Required 
Checking /var/www/html/admin/images/loading.gif..Not Required 
Checking /var/www/html/admin/images/logo.png..Not Required 
Checking /var/www/html/admin/images/modules1.png..Not Required 
Checking /var/www/html/admin/images/shadow-side-background.png..Not Required 
Checking /var/www/html/admin/images/tab-first-current.png..Not Required 
Checking /var/www/html/admin/images/tab.png..Not Required 
Checking /var/www/html/admin/images/watermark.png..Not Required 
Checking /var/www/html/admin/views/freepbx_admin.php..Not Required 
Checking /var/www/html/admin/views/loggedout.php..Not Required 
Trying to remove dir /var/www/html/admin/common..Not Required 
Upgrading to 2.10.0beta2..OK 
Upgrading to 2.10.0beta3.. 
-> Running PHP script /usr/local/src/freepbx-2.10.0/upgrades/2.10.0beta3/migration.php 
Trying to remove dir /var/www/html/admin/cdr..Not Required 
checking if recordingfile file field needed in cdr..already there 
checking if did file field needed in cdr..already there 
Upgrading to 2.10.0beta3..OK 
Upgrading to 2.10.0rc1.. 
-> Running PHP script /usr/local/src/freepbx-2.10.0/upgrades/2.10.0rc1/migration.php 
Upgrading to 2.10.0rc1..OK 
Upgrading to 2.10.0.. 
-> Running PHP script /usr/local/src/freepbx-2.10.0/upgrades/2.10.0/removefiles.php 
Cleaning up deprecated or moved files: 
Checking /var/lib/asterisk/bin/bounce_op.sh..Not Required 
Upgrading to 2.10.0..OK 
Checking dashboard.. updated to 2.10.0.3 
Checking framework.. updated to 2.10.0.0 
Checking music.. updated to 2.10.0.2 
Checking featurecodeadmin.. updated to 2.10.0.3 
Checking fw_ari.. updated to 2.10.0.0 
Checking core.. updated to 2.10.0.0 
Checking customappsreg.. updated to 2.10.0.1 
Checking infoservices.. updated to 2.10.0.2 
Checking voicemail.. updated to 2.10.0.2 
Checking recordings.. updated to 3.3.11.6 
Checking cdr.. updated to 2.10.0.4 
Creating or updating freepbx_conf settings..PHP Notice:  Undefined index: mainstyle_css_generated in /usr/local/src/freepbx-2.10.0/libfreepbx.install.php on line 2214 
..OK 
PHP Warning:  filesize(): stat failed for /var/log/asterisk/freepbx.log in /usr/local/src/freepbx-2.10.0/amp_conf/htdocs/admin/libraries/utility.functions.php on line 75 
Generating AMP configs.. 
Generating Configurations.conf, (if Asterisk is not running, you will get an error 
In case of error, start Asterisk and hit the red bar in the GUI to generate the Configurations.conf files 
Checking for PEAR Console::Getopt..OK 
PHP Warning:  filesize(): stat failed for /var/log/asterisk/freepbx_dbug in /var/www/html/admin/libraries/utility.functions.php on line 641 
Running module install.php and install.sql scripts 
Skipping extension and destination registry checks 
no crontab for asterisk 
no crontab for asterisk 
Please update your modules and reload Asterisk by browsing to your server. 
Generating AMP configs..OK 
Checking dashboard.. Module dashboard successfully installed 

SETTING FILE PERMISSIONS 
Permissions OK 
Module dashboard successfully enabled 
installed 
Checking framework.. No directory /var/www/html/admin/modules/framework/amp_conf/htdocs, install script not needed 
Module framework successfully installed 

SETTING FILE PERMISSIONS 
Permissions OK 
installed 
Checking music.. Module music successfully installed 

SETTING FILE PERMISSIONS 
Permissions OK 
Module music successfully enabled 
installed 
Checking featurecodeadmin.. Module featurecodeadmin successfully installed 

SETTING FILE PERMISSIONS 
Permissions OK 
Module featurecodeadmin successfully enabled 
installed 
Checking fw_ari.. No directory /var/www/html/admin/modules/fw_ari/htdocs_ari, install script not needed 
Module fw_ari successfully installed 

SETTING FILE PERMISSIONS 
Permissions OK 
installed 
Checking core.. Checking if directdids need migrating..already done 
updating zap callgroup, pickupgroup..not needed 
checking for delay_answer field ..already exists 
checking for pricid field ..already exists 
Checking for Global var RECORDING_STATE..Already exists! 
Checking if trunk table migration required..not needed 
Checking if privacy manager options exists..already exists 
Checking for noanswer_cid field..already exists 
Checking for busy_cid field..already exists 
Checking for chanunavail_cid field..already exists 
Checking for noanswer_dest field..already exists 
Checking for busy_dest field..already exists 
Checking for chanunavail_dest field..already exists 
Checking for General Setting migrations..not needed 
Converting IAX notransfer to transfer if needed..updated 0000 records 
deleting obsoleted record_in and record_out entries..ok 
Module core successfully installed 

SETTING FILE PERMISSIONS 
Permissions OK 
Module core successfully enabled 
installed 
Checking customappsreg.. Module customappsreg successfully installed 

SETTING FILE PERMISSIONS 
Permissions OK 
Module customappsreg successfully enabled 
installed 
Checking infoservices.. Module infoservices successfully installed 

SETTING FILE PERMISSIONS 
Permissions OK 
Module infoservices successfully enabled 
installed 
Checking voicemail.. checking if Voicemail Admin (vmailadmin) is installed..not installed, ok 
Module voicemail successfully installed 

SETTING FILE PERMISSIONS 
Permissions OK 
Module voicemail successfully enabled 
installed 
Checking recordings.. checking for fcode field..OK 
checking for fcode_pass field..OK 
Module recordings successfully installed 

SETTING FILE PERMISSIONS 
Permissions OK 
Module recordings successfully enabled 
installed 
Checking cdr.. Checking if field did is present in cdr table.. 
did field already present. 
Checking if field recordingfile is present in cdr table.. 
recordingfile field already present. 
Module cdr successfully installed 

SETTING FILE PERMISSIONS 
Permissions OK 
Module cdr successfully enabled 
installed 
Please update your modules and reload Asterisk by browsing to your server. 

************************************************************************* 
* Note: It's possible that if you click the red 'Update Now' bar BEFORE * 
* updating your modules, your machine will start dropping calls. Ensure * 
* that all modules are up to date BEFORE YOU CLICK THE RED BAR. As long * 
* as this is observed, your machine will be fully functional whilst the * 
* upgrade is in progress.                                               * 
************************************************************************* 
  1. Stop asterisk

asterisk -rx "core stop now"

  1. Remove files which will be replaced by links
rm -f /etc/asterisk/ccss.conf
rm -f /etc/asterisk/confbridge.conf
rm -f /etc/asterisk/extensions.conf
rm -f /etc/asterisk/features.conf
rm -f /etc/asterisk/iax.conf
rm -f /etc/asterisk/logger.conf
rm -f /etc/asterisk/sip.conf
rm -f /etc/asterisk/sip_notify.conf
  1. Start asterisk with amportal script

amportal start

  1. Login to freepbx at http://ip address you specified, using default credentials user admin, password admin.
  2. Click the red reload config button.
  3. The following SHOULD NOT BE NEEDED if the above instructions were followed. If however there is an error in non creation of a symbolic link (shown in the messages area) then it can be solved by doing the following (change logger.conf to relevant file name as shown in error message)
rm /etc/asterisk/logger.conf
ln -s /var/www/html/admin/modules/core/etc/logger.conf /etc/asterisk/logger.conf
amportal reload
  1. Under Admin->Administrators menu, change the default password for admin user.
  2. Under Admin->Module admin menu, use “check on line” to check for module updates. Click “upgrade all” then “process” and then “confirm”. At end of process, click red “Apply config” button (in order to get it to show, may need to navigate to one of the menu items do a refresh, for example Reports->Freepbx system status).
  3. Go back to module administration and now enable the freepbx framework (which will have been disabled after the previous upgrade). Check for online updates again. This time the option offered for freepbx framework will be upgrade and enable, chose this, click on “process” and then “confirm”. At end of process click red “Apply config button”.
Later you may go back to module administration and pick further modules from online ones (for example Sip settings, IVR, Queues, Annoucements, Call flow control etc.)
  1. Open the ports in the firewall needed by asterisk 5060 tcp/udp 1000-20000 udp

system-config-firewall-tui

  1. In order to have asterisk start automatically at boot via amportal script (and not via asterisk script – which runs asterisk as root not as asterisk)
If chkconfig shows asterisk is configured

chkconfig

turn it off with

chkconfig asterisk off

To start amportal at boot (the simple way)

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

This last command just adds amportal to the list of commands to launch after all other init scripts.
An alternative way (not used this time) would be to have a init.d style startup script for amportal and then
Example init.d script (ensure it is executable by running chmod +x amportal:
#!/bin/sh
### BEGIN INIT INFO
# chkconfig – 86 14
# Provides: amportal
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 5
# Description: starts asterisk via amportal script
### END INIT INFO

case "$1" in
'start')
        /usr/local/sbin/amportal start
        ;;
'stop')
        /usr/local/sbin/amportal stop
        ;;
*)
        echo "Usage: $0 { start | stop }"
        ;;
esac
exit 0
Then enable the script

chkconfig amportal on

PhpMyAdmin

  1. Install EPEL repository
rpm -ivh http://mirror.imt-systems.com/epel/6/i386/epel-release-6-7.noarch.rpm
yum update
  1. Install prerequisites if not already present

yum install php-mbstring php-mcrypt

  1. Install phpMyAdmin

yum install phpMyAdmin

  1. Link the install directory under the web server root

ln -s /usr/share/phpMyAdmin /var/www/html/phpMyAdmin

  1. Modify httpd configuration

vi /etc/httpd/conf/httpd.conf

Add the following lines:
<Directory "/usr/share/phpMyAdmin">
    Allow from all
    Options FollowSymLinks
</Directory>
  1. Restart apache

service httpd restart

Bind (named) DNS server

  1. Install bind

yum install bind bind-utils

  1. Have bind start when the server boots

chkconfig named on

  1. Start bind

service named start

  1. Modify default dns servers to include 127.0.0.1 as first dns server

system-config-network-tui

  1. Restart network

service network restart

Edit - History - Print - Recent Changes - Search
Page last modified on February 03, 2013, at 01:37 PM