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 1,156: Line 1,156:
==PhpMyAdmin==
==PhpMyAdmin==


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


# %item value=2% Install prerequisites if not already present
<pre>rpm -ivh http://mirror.imt-systems.com/epel/6/i386/epel-release-6-8.noarch.rpm
%commandbox% [@yum install php-mbstring php-mcrypt@]
yum update</pre>


# %item value=3%  Install phpMyAdmin
2. Install prerequisites if not already present
%commandbox% [@yum install phpMyAdmin@]


# %item value=4%  Link the install directory under the web server root
<pre>%commandbox% [@yum install php-mbstring php-mcrypt</pre>
%commandbox% [@ln -s /usr/share/phpMyAdmin /var/www/html/phpMyAdmin@]


# %item value=5% Modify httpd configuration
3. Install phpMyAdmin
%commandbox% [@vi /etc/httpd/conf/httpd.conf@]
<pre>yum install phpMyAdmin</pre>
->Add the following lines:
 
%resultbox% [@<Directory "/usr/share/phpMyAdmin">
4. Modify httpd configuration
 
<pre>vi /etc/httpd/conf/httpd.conf</pre>
 
Add the following lines:
 
<pre><Directory "/usr/share/phpMyAdmin">
     Allow from all
     Allow from all
     Options FollowSymLinks
     Options FollowSymLinks
</Directory>@]
</Directory></pre>
 
5. Restart apache
 
<pre>service httpd restart</pre>
 
6. You can now access phpMyAdmin at the URL using your ip address:


# %item value=6% Restart apache
<nowiki>http://ip/phpmyadmin</nowiki>
%commandbox% [@service httpd restart@]


!!Bind (named) DNS server
==Bind (named) DNS server==


# Install bind
# Install bind

Revision as of 12:57, 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 You may use a later version.

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

4. Start installation by clicking "Next"

Screen6 3.png

5. Choose your language and click "Next"

Screen6 4.png

6. Choose keyboard layout and click "Next"

Screen6 5.png

7. Choose storage devices and click "Next"

Screen6 6.png

8. Confirm overwriting of existing data and click "Next"

Screen6 7.png

9.Set hostname and click "Configure Network" to set up network

Screen6 8.png

10. You will be able to edit the network configuration 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. You should set the network to connect automatically. At the end click "Apply" and then "Next"

Screen6 9.png

11. Choose the timezone and click "Next"

If Centos is the only operating system you will install on the server, select System clock uses UTC.

Screen6 10.png

12. Choose the root password and click "Next"

Screen6 11.png

13. Choose disk partitioning, the default "Replace existing linux systems" is fine if you have no data on the disk you want to save, and click "Next"

Screen6 12.png

14. Confirm to write changes to disk

Screen6 13.png

15. When the install completes click "Reboot"

Screen6 14.png

16. Login to the server as root

Screen6 15.png

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

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

system-config-network-tui

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

20. Disable selinux. Check the following file:

vi /etc/selinux/config

has this setting:

SELINUX=disabled

Reboot (if above setting was changed):

reboot

Note that disabling selinux is not recommended from a security perspective, however not doing so may complicate getting your server running. Once the server is running you may go and change the settings for selinux and capture the information needed to correctly configure Asterisk and FreePBX to work with selinux. If you do so, please contribute back the steps you took. It is a non-trival task.

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

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

2. Setup apache to start on boot

chkconfig httpd on

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

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

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.

AllowOverride All

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.

Options FollowSymLinks

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

vi /etc/php.ini

Change to your time zone, for example:

date.timezone = "Europe/Amsterdam"

See http://php.net/manual/en/timezones.php for full list of supported values.

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

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

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

11. 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. It used to be required as a timing source for meetme, but this is not longer the case. See https://wiki.asterisk.org/wiki/display/AST/Timing+Interfaces

The installation and configuration of Dahdi has not been covered in this Howto.

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

2. Change to a suitable location for storing the downloaded software, for example:

cd /usr/local/src/

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

4. Extract the source directory

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

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

cd asterisk-10.12.1

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

contrib/scripts/get_mp3_source.sh

7. Configure

./configure

8. Start the compilation of the interactive menu for selecting components to build

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.

9. Compile and install asterisk

make
make install
make samples

10. Change directory owner 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

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

3. Get and extract the Freepbx source code

cd /usr/local/src
wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-12.0-latest.tgz
tar -xvzf ffreepbx-12.0-latest.tgz
cd freepbx-12.0-latest

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

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

6. Start asterisk

./start_asterisk start

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

./install_amp

Output:

Checking for PEAR DB..OK
Checking for PEAR Console::Getopt..OK
Checking user..OK
Checking if Asterisk is running..running with PID: 6098..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] abc11abc
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] 

Created /var/www/html
Enter the IP ADDRESS or hostname used to access the AMP web-admin:
 [192.168.1.1] 192.168.122.19
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/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] => [abc11abc]
amp_conf [AMPWEBADDRESS] => [192.168.122.19]
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..11.12.0
Checking for selinux..OK
Connecting to database..OK
Checking current version of FreePBX..2.11.0rc1
Installing new FreePBX files../etc/asterisk/phone.conf has been changed from the original version.
Overwrite (y=yes/a=all/n=no/d=diff/s=shell/x=exit)? y
/etc/asterisk/indications.conf has been changed from the original version.
Overwrite (y=yes/a=all/n=no/d=diff/s=shell/x=exit)? y
/etc/asterisk/musiconhold.conf has been changed from the original version.
Overwrite (y=yes/a=all/n=no/d=diff/s=shell/x=exit)? y
/etc/asterisk/queues.conf has been changed from the original version.
Overwrite (y=yes/a=all/n=no/d=diff/s=shell/x=exit)? y
/etc/asterisk/enum.conf has been changed from the original version.
Overwrite (y=yes/a=all/n=no/d=diff/s=shell/x=exit)? y
/etc/asterisk/manager.conf has been changed from the original version.
Overwrite (y=yes/a=all/n=no/d=diff/s=shell/x=exit)? y
/etc/asterisk/modules.conf has been changed from the original version.
Overwrite (y=yes/a=all/n=no/d=diff/s=shell/x=exit)? y
/etc/asterisk/meetme.conf has been changed from the original version.
Overwrite (y=yes/a=all/n=no/d=diff/s=shell/x=exit)? y
/etc/asterisk/cdr_mysql.conf has been changed from the original version.
Overwrite (y=yes/a=all/n=no/d=diff/s=shell/x=exit)? y
OK (2753 files copied, 0 skipped)
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: [abc11abc] hostname: [localhost]
	/etc/asterisk/manager.conf user: [admin] secret: [amp111]
	Adjusting File Permissions..


	SETTING FILE PERMISSIONS
	Permissions OK
	Removing any dangling symlinks
	Dangling symlinks removed
	Done
done with apply_conf.sh
creating missing #include files..OK
Setting permissions on files..OK
Loading Bootstrap..OK
Checking for upgrades..8 found
Upgrading to 2.11.0..
-> Running PHP script /usr/local/src/freepbx/upgrades/2.11.0/migration.php
Upgrading to 2.11.0..OK
Upgrading to 12.0.1alpha1..
-> Running PHP script /usr/local/src/freepbx/upgrades/12.0.1alpha1/upgrade.php
Upgrading to 12.0.1alpha1..OK
Upgrading to 12.0.1alpha4..
-> Running PHP script /usr/local/src/freepbx/upgrades/12.0.1alpha4/upgrade.php
Upgrading to 12.0.1alpha4..OK
Upgrading to 12.0.1alpha6..
-> Running PHP script /usr/local/src/freepbx/upgrades/12.0.1alpha6/upgrade.php
Upgrading to 12.0.1alpha6..OK
Upgrading to 12.0.1alpha15..
-> Running PHP script /usr/local/src/freepbx/upgrades/12.0.1alpha15/upgrade.php
Upgrading to 12.0.1alpha15..OK
Upgrading to 12.0.1alpha16..
-> Running PHP script /usr/local/src/freepbx/upgrades/12.0.1alpha16/upgrade.php
Upgrading to 12.0.1alpha16..OK
Upgrading to 12.0.1alpha31..
-> Running PHP script /usr/local/src/freepbx/upgrades/12.0.1alpha31/upgrade.php
Upgrading to 12.0.1alpha31..OK
Upgrading to 12.0.1alpha45..
-> Running PHP script /usr/local/src/freepbx/upgrades/12.0.1alpha45/upgrade.php
Upgrading to 12.0.1alpha45..OK
Checking featurecodeadmin.. updated to 12.0.0
Checking pinsets.. updated to 2.11.0.4
Checking campon.. updated to 2.11.0.2
Checking framework.. updated to 12.0.1beta5
Checking music.. updated to 12.0.1
Checking vmblast.. updated to 2.11.0.2
Checking callforward.. updated to 12.0.4
Checking queues.. updated to 12.0.3
Checking blacklist.. updated to 2.11.0.5
Checking customappsreg.. updated to 2.11.0.2
Checking directory.. updated to 2.11.0.5
Checking cidlookup.. updated to 2.11.1.10
Checking dashboard.. updated to 12.0.5
Checking core.. updated to 12.0.1alpha26
Checking announcement.. updated to 2.11.0.4
Checking printextensions.. updated to 2.11.0.1
Checking webrtc.. updated to 2.11.0.0beta7
Checking parking.. updated to 12.0.3
Checking donotdisturb.. updated to 12.0.3
Checking setcid.. updated to 2.11.0.4
Checking conferences.. updated to 12.0.5
Checking userman.. updated to 2.11.3
Checking sipsettings.. updated to 12.0.1alpha6
Checking cxpanel.. updated to 3.1.2
Checking cdr.. updated to 12.0.1alpha3
Checking timeconditions.. updated to 12.0.3
Checking hotelwakeup.. updated to 2.11.3
Checking sipstation.. updated to 2.11.1.6
Checking daynight.. updated to 2.11.0.4
Checking voicemail.. updated to 12.0.12
Checking infoservices.. updated to 2.11.0.3
Checking weakpasswords.. updated to 2.11.0.1
Checking backup.. updated to 2.11.0.18
Checking callwaiting.. updated to 12.0.3
Checking logfiles.. updated to 12.0.6
Checking findmefollow.. updated to 12.0.5
Checking callrecording.. updated to 2.11.0.8
Checking ucp.. updated to 12.0.0alpha8
Checking asteriskinfo.. updated to 2.11.0.89
Checking recordings.. updated to 12.0.2
Checking digium_phones.. updated to 2.11.1.0
Checking digiumaddoninstaller.. updated to 2.11.0.4
Checking iaxsettings.. updated to 2.11.0.3
Checking fax.. updated to 12.0.2
Checking paging.. updated to 12.0.1
Checking presencestate.. updated to 12.0.4
Checking ivr.. updated to 2.11.0.6
Checking outroutemsg.. updated to 2.11.0.2
Checking ringgroups.. updated to 2.11.0.5
PHP Notice:  Undefined variable: db in /var/www/html/admin/libraries/cronmanager.class.php on line 70
..OK
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:  file_put_contents(/var/log/asterisk/freepbx.log): failed to open stream: Permission denied in /var/www/html/admin/libraries/utility.functions.php on line 87
Running module install.php and install.sql scripts
PHP Warning:  file_put_contents(/var/log/asterisk/freepbx.log): failed to open stream: Permission denied in /var/www/html/admin/libraries/utility.functions.php on line 87
Skipping extension and destination registry checks
PHP Warning:  file_put_contents(/var/log/asterisk/freepbx.log): failed to open stream: Permission denied in /var/www/html/admin/libraries/utility.functions.php on line 87
PHP Warning:  file_put_contents(/var/log/asterisk/freepbx.log): failed to open stream: Permission denied in /var/www/html/admin/libraries/utility.functions.php on line 87
PHP Warning:  file_put_contents(/var/log/asterisk/freepbx.log): failed to open stream: Permission denied in /var/www/html/admin/libraries/utility.functions.php on line 87
PHP Warning:  file_put_contents(/var/log/asterisk/freepbx.log): failed to open stream: Permission denied in /var/www/html/admin/libraries/utility.functions.php on line 87
PHP Warning:  file_put_contents(/var/log/asterisk/freepbx.log): failed to open stream: Permission denied in /var/www/html/admin/libraries/utility.functions.php on line 87
PHP Warning:  file_put_contents(/var/log/asterisk/freepbx.log): failed to open stream: Permission denied in /var/www/html/admin/libraries/utility.functions.php on line 87
PHP Warning:  file_put_contents(/var/log/asterisk/freepbx.log): failed to open stream: Permission denied in /var/www/html/admin/libraries/utility.functions.php on line 87
PHP Warning:  file_put_contents(/var/log/asterisk/freepbx.log): failed to open stream: Permission denied in /var/www/html/admin/libraries/utility.functions.php on line 87
PHP Warning:  file_put_contents(/var/log/asterisk/freepbx.log): failed to open stream: Permission denied in /var/www/html/admin/libraries/utility.functions.php on line 87
PHP Warning:  file_put_contents(/var/log/asterisk/freepbx.log): failed to open stream: Permission denied in /var/www/html/admin/libraries/utility.functions.php on line 87
PHP Warning:  file_put_contents(/var/log/asterisk/freepbx.log): failed to open stream: Permission denied in /var/www/html/admin/libraries/utility.functions.php on line 87
PHP Warning:  file_put_contents(/var/log/asterisk/freepbx.log): failed to open stream: Permission denied in /var/www/html/admin/libraries/utility.functions.php on line 87
PHP Warning:  file_put_contents(/var/log/asterisk/freepbx.log): failed to open stream: Permission denied in /var/www/html/admin/libraries/utility.functions.php on line 87
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 featurecodeadmin.. Module featurecodeadmin successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module featurecodeadmin successfully enabled
installed
Checking pinsets.. checking if migration required..already done
Module pinsets successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module pinsets successfully enabled
installed
Checking campon.. Module campon successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module campon successfully enabled
installed
Checking framework.. installing files to /var/www/html..done
installing files to /var/lib/asterisk/bin..done
installing files to /var/lib/asterisk/agi-bin..done
Checking for upgrades..No further upgrades necessary
framework file install done, removing packages from module
file/directory: /var/www/html/admin/modules/framework/amp_conf removed successfully
file/directory: /var/www/html/admin/modules/framework/upgrades removed successfully
file/directory: /var/www/html/admin/modules/framework/libfreepbx.install.php removed successfully
Module framework successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
installed
Checking music.. Module music successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module music successfully enabled
installed
Checking vmblast.. Upgrading vmblast to add audio_label field..Not Required
Upgrading vmblast to add password field..Not Required
Dropping grplist..Not Needed
Module vmblast successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module vmblast successfully enabled
installed
Checking callforward.. Module callforward successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module callforward successfully enabled
installed
Checking queues.. dependencies pending
Checking blacklist.. dependencies pending
Checking customappsreg.. Module customappsreg successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module customappsreg successfully enabled
installed
Checking directory.. dependencies pending
Checking cidlookup.. dependencies pending
Checking dashboard.. Module dashboard successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module dashboard successfully enabled
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 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
Deleting unused globals..done
Converting IAX notransfer to transfer if needed..updated 0000 records
deleting obsoleted record_in and record_out entries..ok
checking for dest field in outbound_routes..already exists
checking for continue field in trunks..already exists
upgrading any zap trunks to dahdi if foundok
Module core successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module core successfully enabled
installed
Checking announcement.. dependencies pending
Checking printextensions.. Module printextensions successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module printextensions successfully enabled
installed
Checking webrtc.. Installing WebRTC
Module webrtc successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module webrtc successfully enabled
installed
Checking parking.. creating table parkplus if needed
Initializing default parkinglot..done
Module parking successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module parking successfully enabled
installed
Checking donotdisturb.. Module donotdisturb successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module donotdisturb successfully enabled
installed
Checking setcid.. Module setcid successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module setcid successfully enabled
installed
Checking conferences.. dependencies pending
Checking userman.. Module userman successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module userman successfully enabled
installed
Checking sipsettings.. checking for sipsettings table..none, creating table
chan_pjsip support NOT FOUND.
populating default codecs..ulaw, alaw, gsm, g726 added
Migrate rtp.conf values if needed and initialize
Migrating Audio Codecs
Module sipsettings successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module sipsettings successfully enabled
installed
Checking cxpanel.. Setting operator panel web root....<br>Done<br>Creating client symlink....<br>Done<br>Creating "cxpanel_server" Table....<br>Populating(New) "cxpanel_server"....<br>Done<br>Creating "cxpanel_voicemail_agent" Table....<br>Populating(New) "cxpanel_voicemail_agent"....<br>Done<br>Creating "cxpanel_recording_agent" Table....<br>Populating(New) "cxpanel_recording_agent"....<br>Done<br>Creating "cxpanel_email" Table....<br>Populating(New) "cxpanel_email"....<br>Done<br>Creating "cxpanel_phone_number" Table....<br>Populating(New) "cxpanel_phone_number"....<br>Done<br>Creating "cxpanel_users" Table....<br>Populating(New) "cxpanel_users"....<br>Done<br>Creating "cxpanel_queues" Table....<br>Populating(New) "cxpanel_queues"....<br>Done<br>Creating "cxpanel_conference_rooms" Table....<br>Populating(New) "cxpanel_conference_rooms"....<br>Done<br>Module cxpanel successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module cxpanel successfully enabled
installed
Checking cdr.. The following error(s) occurred:
 - Failed to run installation scripts
Module cdr successfully enabled
installed
Checking timeconditions.. converting timeconditions time field to int..OK
checking for generate_hint field..already exists
generating feature codes if needed..OK
Module timeconditions successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module timeconditions successfully enabled
installed
Checking hotelwakeup.. dependencies pending
Checking sipstation.. Checking routes for trunks..found 1
checking for phantoms..none
Module sipstation successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module sipstation successfully enabled
installed
Checking daynight.. changing primary keys to all fields..OK
Module daynight successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module daynight successfully enabled
installed
Checking voicemail.. Checking for General Setting migrations..not needed
checking if Voicemail Admin (vmailadmin) is installed..not installed, ok
Module voicemail successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module voicemail successfully enabled
installed
Checking infoservices.. Module infoservices successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module infoservices successfully enabled
installed
Checking weakpasswords.. Module weakpasswords successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module weakpasswords successfully enabled
installed
Checking backup.. added default backup servers
added default backup templates
Module backup successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module backup successfully enabled
installed
Checking callwaiting.. Module callwaiting successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module callwaiting successfully enabled
installed
Checking logfiles.. Module logfiles successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module logfiles successfully enabled
installed
Checking findmefollow.. dependencies pending
Checking callrecording.. Module callrecording successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module callrecording successfully enabled
installed
Checking ucp.. Module ucp successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module ucp successfully enabled
installed
Checking asteriskinfo.. Module asteriskinfo successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module asteriskinfo 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
Removing any dangling symlinks
Dangling symlinks removed
Module recordings successfully enabled
installed
Checking digium_phones.. Module digium_phones successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module digium_phones successfully enabled
installed
Checking digiumaddoninstaller.. Module digiumaddoninstaller successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module digiumaddoninstaller successfully enabled
installed
Checking iaxsettings.. checking for iaxsettings table..none, creating table
populating default codecs..ulaw, alaw, gsm added
Module iaxsettings successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module iaxsettings successfully enabled
installed
Checking fax.. Moving simu_fax feature code from core..done
Updating simu_fax in miscdest table..not needed
Checking if legacy fax needs migrating..starting migration
migrating defaults..migrated
No Inbound Routes to migrate
Migrating faxemail field in the fax_users table to allow longer emails...
Successfully migrated faxemail field
Module fax successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module fax successfully enabled
installed
Checking paging.. Module paging successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module paging successfully enabled
installed
Checking presencestate.. Module presencestate successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module presencestate successfully enabled
installed
Checking ivr.. Migration 2.10 not needed
Checking for timeout_append_announce..not needed
Checking for invalid_append_announce..not needed
Module ivr successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module ivr successfully enabled
installed
Checking outroutemsg.. Module outroutemsg successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module outroutemsg successfully enabled
installed
Checking ringgroups.. Checking if recordings need migration..already migrated
Module ringgroups successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module ringgroups successfully enabled
installed
Checking queues.. Checking for legacy queues table..NO table found, no migration to do just create tables
Creating queues_details..OK
Creating queues_config..OK
Dropping old queues table..OK
removing queues data extensions table..OK
checking for qregex field..OK
Checking if recordings need migration..migrating
adding agentannounce_id field..ok
adding joinannounce_id field..ok
migrate agentannounce to ids..migrated 0 entries
migrate joinannounce to ids..migrated 0 entries
dropping agentannounce field..ok
dropping joinannounce field..ok
checking for queuewait field..already exists
checking for use_queue_context field..already exists
checking for togglehint field..already exists
checking for qnoanswer field..already exists
checking for callconfirm field..already exists
checking for callconfirm_id field..already exists
checking for monitor_type field..OK
checking for monitor_heard field..OK
checking for monitor_spoken field..OK
Module queues successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module queues successfully enabled
installed
Checking blacklist.. Module blacklist successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module blacklist successfully enabled
installed
Checking directory.. Adding directory tables if needed
e_id added to table directory_entries
Module directory successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module directory successfully enabled
installed
Checking cidlookup.. dependencies pending
Checking announcement.. Checking if recordings need migration..already migrated
Module announcement successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module announcement successfully enabled
installed
Checking conferences.. Checking if music field present..already present
Checking if recordings need migration..already migrated
Checking for users field..already present
Module conferences successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module conferences successfully enabled
installed
Checking hotelwakeup.. Installing Hotel Style Wake Up Calls
Installing Default Values
Module hotelwakeup successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module hotelwakeup successfully enabled
installed
Checking findmefollow.. Checking if recordings need migration..already migrated
Module findmefollow successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module findmefollow successfully enabled
installed
Checking cidlookup.. dependencies pending
Checking cidlookup.. Installing OpenCNAM CallerID Lookup Sources...Done!
Migrating channel routing to Zap DID routing..Not Needed
Checking for cidlookup field in core's incoming table..not present
Cleaning up duplicate OpenCNAM CallerID Lookup Sources...Done!
Module cidlookup successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Module cidlookup successfully enabled
installed
No directory /var/www/html/admin/modules/framework/amp_conf/htdocs, install script not needed
Module framework successfully installed

SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
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.                                               *
*************************************************************************
****************************************
* At This Time Please Restart Asterisk *
****************************************

8. Stop asterisk

asterisk -rx "core stop now"

9. Start asterisk with amportal script

amportal start

10. Login to freepbx at http://ip address you specified, using default credentials user admin, password admin.

11. Click the red reload config button.

12. Under Admin->Module admin menu, use “check on line” to check for module updates. Under Freepbx framework click “enable” then “process” and then “confirm”. At end of process, click red “Apply config” button. The go back and use "check on line" again, under Freepbx framework, click "upgrad to ..." then "process" and then "confirm". At end of process, click red “Apply config” button.

13. 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. 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.)

14. Under Admin->Administrators menu, change the default password for admin user.

15. Open the ports in the firewall needed by asterisk 5060 tcp/udp 1000-20000 udp

system-config-firewall-tui

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

<pre>chkconfig amportal on

PhpMyAdmin

1. Install EPEL repository

rpm -ivh http://mirror.imt-systems.com/epel/6/i386/epel-release-6-8.noarch.rpm
yum update

2. Install prerequisites if not already present

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

3. Install phpMyAdmin

yum install phpMyAdmin

4. Modify httpd configuration

vi /etc/httpd/conf/httpd.conf

Add the following lines:

<Directory "/usr/share/phpMyAdmin">
    Allow from all
    Options FollowSymLinks
</Directory>

5. Restart apache

service httpd restart

6. You can now access phpMyAdmin at the URL using your ip address:

http://ip/phpmyadmin

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@]