Howto: Installation of Centos 6.x server with Asterisk 11 and FreePBX 12: Difference between revisions

From voipsupport
Jump to navigation Jump to search
Line 10: Line 10:
3. You may optionally test the install media, else choose "Skip".
3. You may optionally test the install media, else choose "Skip".


[[File:screen6_2.png]]
[[File:screen6_2.png ]]





Revision as of 11:42, 13 June 2016

Centos Installation

1. First download the appropriate ISO image from centos mirrors http://isoredirect.centos.org/centos/6/isos/ 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. This howto uses the minimal install image: http://isoredirect.centos.org/centos/6/isos/x86_64/CentOS-6.5-x86_64-minimal.iso

2. Burn the images to a CD and boot from the CD (unless you are setting up a Virtual Server where you can boot from the ISO file directly). Choose "Install or upgrade an existing system"

Screen6 1.png

3. You may optionally test the install media, else choose "Skip".

Screen6 2.png


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.8/os/x86_64 for a 64bit image, http://centos.bio.lmu.de/6.8/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

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

system-config-network-tui

15. 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

16. 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

2. Setup mysqld to start on boot:

chkconfig mysqld on

3. Start mysqld:

service mysqld start

4. 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

%commandbox% [@yum install httpd php php-pear php-mysql php-process@]

  1. %item value=2% Setup apache to start on boot

%commandbox% [@chkconfig httpd on@]

  1. %item value=3% Setup the user and group that will be used for asterisk install and configure apache to run with these:

%commandbox% [@groupadd asterisk useradd -c "asterisk PBX" -d /var/lib/asterisk -g asterisk asterisk@]

  1. %item value=4% Change the apache configuration to use the user and group just defined:

%commandbox% [@vi /etc/httpd/conf/httpd.conf@] ->Change the following lines: %resultbox% [@User apache Group apache@] ->to: %resultbox% [@User asterisk Group asterisk@]

  1. %item value=5%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.

%resultbox% [@AllowOverride All@]

  1. %item value=6% 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.

%resultbox% [@Options FollowSymLinks@]

  1. %item value=7% Setup a default time zone in php configuration file:

%commandbox% [@vi /etc/php.ini@]

%resultbox% [@date.timezone = "Europe/Amsterdam"@] ->See http://php.net/manual/en/timezones.php for full list of supported values.

  1. %item value=8% Change the permissions of the session.save_path (as defined in /etc/php.ini)

%commandbox% [@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. %item value=8% Start the service

%commandbox% [@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. %item value=9% You will need to open firewall ports for the web server. To manage the firewall, install system-config-firewall-tui

%commandbox% [@yum install system-config-firewall-tui@]

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

%commandbox% [@system-config-firewall-tui@]

!!Dahdi

Only required if using telephony hardware cards or meetme.

!!Asterisk

  1. Install asterisk prerequisites if not already present

%commandbox% [@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

%commandbox% [@yum install unixODBC unixODBC-devel libtool-ltdl libtool-ltdl-devel@]

-> And the relevant connector for your database, for example mysql

%commandbox% [@yum install mysql-connector-odbc@]

  1. %item value=2% Change to a suitable location for storing the downloaded software, e.g.:

%commandbox% [@cd /usr/local/src/@]

  1. %item value=3% Download latest version of asterisk (at time of writing this was 10)

%commandbox% [@wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-10-current.tar.gz@]

  1. %item value=4% Extract the source directory

%commandbox% [@tar -xvzf asterisk-10-current.tar.gz@]

  1. %item value=5% Change into the source directory (customize the command to the version that was downloaded)

%commandbox% [@cd asterisk-10.12.1@]

  1. %item value=6% Get source for fomat_mp3 (not part of downloaded asterisk tar file)

%commandbox% [@contrib/scripts/get_mp3_source.sh@]

  1. %item value=7% Configure

%commandbox% [@./configure@]

  1. %item value=8% Start compilation interactive menu

%commandbox% [@make menuselect@] ->Under Add-ons choose: %resultbox% [@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. %item value=9% Compile and install asterisk

%commandbox% [@make make install make samples@]

  1. %item value=10% Change directory onwer and group

%commandbox% [@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

%commandbox% [@pear install DB@]

  1. %item value=2% Install lame

%commandbox% [@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. %item value=3% Get and extract the Freepbx source code

%commandbox% [@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. %item value=4% Create and populate databases for configuration and cdrs

%commandbox% [@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. %item value=5% Create database user to be used by freepbx to connect to database and give permisisons on databases

%commandbox% [@mysql -u root -p@]

->at the mysql prompt enter (substitute xxxxxxxx with chosen password): %commandbox% [@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. %item value=6% Start asterisk

%commandbox% [@./start_asterisk start@]

  1. %item value=7% Run freepbx install script (using same credentials authorized to mysql)

%commandbox% [@./install_amp@]

->Output %resultbox% [@ 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. %item value=8% Stop asterisk

%commandbox% [@asterisk -rx "core stop now"@]

  1. %item value=9% Remove files which will be replaced by links

%commandbox% [@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. %item value=10% Start asterisk with amportal script

%commandbox% [@amportal start@]

  1. %item value=11% Login to freepbx at http://ip address you specified, using default credentials user admin, password admin.
  1. %item value=12% Click the red reload config button.
  1. %item value=13% 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)

%commandbox% [@rm /etc/asterisk/logger.conf ln -s /var/www/html/admin/modules/core/etc/logger.conf /etc/asterisk/logger.conf amportal reload@]

  1. %item value=14% Under Admin->Administrators menu, change the default password for admin user.
  1. %item value=15% 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).
  1. %item value=16% 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. %item value=17% Open the ports in the firewall needed by asterisk 5060 tcp/udp 1000-20000 udp

%commandbox% [@system-config-firewall-tui@]

  1. %item value=18% 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 %commandbox% [@chkconfig@]

-> turn it off with %commandbox% [@chkconfig asterisk off@]

-> To start amportal at boot (the simple way) %commandbox% [@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: %resultbox% [@

  1. !/bin/sh
      1. BEGIN INIT INFO
  2. chkconfig – 86 14
  3. Provides: amportal
  4. Required-Start: $network
  5. Required-Stop: $network
  6. Default-Start: 2 3 5
  7. Description: starts asterisk via amportal script
      1. 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 %commandbox% [@chkconfig amportal on@]

!!PhpMyAdmin

  1. Install EPEL repository

%commandbox% [@rpm -ivh http://mirror.imt-systems.com/epel/6/i386/epel-release-6-7.noarch.rpm yum update@]

  1. %item value=2% Install prerequisites if not already present

%commandbox% [@yum install php-mbstring php-mcrypt@]

  1. %item value=3% Install phpMyAdmin

%commandbox% [@yum install phpMyAdmin@]

  1. %item value=4% Link the install directory under the web server root

%commandbox% [@ln -s /usr/share/phpMyAdmin /var/www/html/phpMyAdmin@]

  1. %item value=5% Modify httpd configuration

%commandbox% [@vi /etc/httpd/conf/httpd.conf@] ->Add the following lines: %resultbox% [@<Directory "/usr/share/phpMyAdmin">

   Allow from all
   Options FollowSymLinks

</Directory>@]

  1. %item value=6% Restart apache

%commandbox% [@service httpd restart@]

!!Bind (named) DNS server

  1. Install bind

%commandbox% [@yum install bind bind-utils@]

  1. %item value=2% Have bind start when the server boots

%commandbox% [@chkconfig named on@]

  1. %item value=3% Start bind

%commandbox% [@service named start@]

  1. %item value=4% Modify default dns servers to include 127.0.0.1 as first dns server

%commandbox% [@system-config-network-tui@]

  1. %item value=5% Restart network

%commandbox% [@service network restart@]