Вы находитесь на странице: 1из 9

3/05/13

VoipSupport | Freepbx / Setting up a Centos 6.3 Asterisk and Freepbx server

Freepbx /

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 w 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 versio 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 as 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. 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 version 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 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 yo 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

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 as 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 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 additio 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:
y u mi n s t a l ls y s t e m c o n f i g n e t w o r k t u i

14. Then run the command and set up your static ip address
s y s t e m c o n f i g n e t w o r k t u i

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 up
y u myu p d a t e r e b o o t

www.voipsupport.it/pmwiki/pmwiki.php?n=Freepbx.HowtoCentos63

1/9

3/05/13

r e b o o t y u myu p d a t e

VoipSupport | Freepbx / Setting up a Centos 6.3 Asterisk and Freepbx server

16. Disable selinux. Check the following file:


v i/ e t c / s e l i n u x / c o n f i g

has this setting:


S E L I N U X = d i s a b l e d

reboot (if above setting was changed):


r e b o o t

Mysql
1. Install mysql if not already present
y u mi n s t a l lm y s q l s e r v e r

2. Setup mysqld to start on boot:


c h k c o n f i gm y s q l do n

3. Start mysqld:
s e r v i c em y s q l ds t a r t

4. Secure the installation by running following script and answering with defaults:
/ u s r / b i n / m y s q l _ s e c u r e _ i n s t a l l a t i o n

Output:
N O T E :R U N N I N GA L LP A R T SO FT H I SS C R I P TI SR E C O M M E N D E DF O RA L LM y S Q L S E R V E R SI NP R O D U C T I O NU S E ! P L E A S ER E A DE A C HS T E PC A R E F U L L Y ! I no r d e rt ol o gi n t oM y S Q Lt os e c u r ei t ,w e ' l ln e e dt h ec u r r e n t p a s s w o r df o rt h er o o tu s e r . I fy o u ' v ej u s ti n s t a l l e dM y S Q L ,a n d y o uh a v e n ' ts e tt h er o o tp a s s w o r dy e t ,t h ep a s s w o r dw i l lb eb l a n k , s oy o us h o u l dj u s tp r e s se n t e rh e r e . E n t e rc u r r e n tp a s s w o r df o rr o o t( e n t e rf o rn o n e ) : O K ,s u c c e s s f u l l yu s e dp a s s w o r d ,m o v i n go n . . . S e t t i n gt h er o o tp a s s w o r de n s u r e st h a tn o b o d yc a nl o gi n t ot h eM y S Q L r o o tu s e rw i t h o u tt h ep r o p e ra u t h o r i s a t i o n . C h a n g et h er o o tp a s s w o r d ?[ Y / n ] N e wp a s s w o r d : R e e n t e rn e wp a s s w o r d : P a s s w o r du p d a t e ds u c c e s s f u l l y ! R e l o a d i n gp r i v i l e g et a b l e s . . . . .S u c c e s s ! B yd e f a u l t ,aM y S Q Li n s t a l l a t i o nh a sa na n o n y m o u su s e r ,a l l o w i n ga n y o n e t ol o gi n t oM y S Q Lw i t h o u th a v i n gt oh a v eau s e ra c c o u n tc r e a t e df o r t h e m . T h i si si n t e n d e do n l yf o rt e s t i n g ,a n dt om a k et h ei n s t a l l a t i o n g oab i ts m o o t h e r . Y o us h o u l dr e m o v et h e mb e f o r em o v i n gi n t oa p r o d u c t i o ne n v i r o n m e n t . R e m o v ea n o n y m o u su s e r s ?[ Y / n ] . . .S u c c e s s ! N o r m a l l y ,r o o ts h o u l do n l yb ea l l o w e dt oc o n n e c tf r o m' l o c a l h o s t ' . T h i s e n s u r e st h a ts o m e o n ec a n n o tg u e s sa tt h er o o tp a s s w o r df r o mt h en e t w o r k . D i s a l l o wr o o tl o g i nr e m o t e l y ?[ Y / n ] . . .S u c c e s s ! B yd e f a u l t ,M y S Q Lc o m e sw i t had a t a b a s en a m e d' t e s t 't h a ta n y o n ec a n a c c e s s . T h i si sa l s oi n t e n d e do n l yf o rt e s t i n g ,a n ds h o u l db er e m o v e d b e f o r em o v i n gi n t oap r o d u c t i o ne n v i r o n m e n t . R e m o v et e s td a t a b a s ea n da c c e s st oi t ?[ Y / n ] -D r o p p i n gt e s td a t a b a s e . . . . . .S u c c e s s ! -R e m o v i n gp r i v i l e g e so nt e s td a t a b a s e . . . . . .S u c c e s s ! R e l o a d i n gt h ep r i v i l e g et a b l e sw i l le n s u r et h a ta l lc h a n g e sm a d es of a r w i l lt a k ee f f e c ti m m e d i a t e l y . R e l o a dp r i v i l e g et a b l e sn o w ?[ Y / n ] . . .S u c c e s s ! C l e a n i n gu p . . . A l ld o n e ! I fy o u ' v ec o m p l e t e da l lo ft h ea b o v es t e p s ,y o u rM y S Q L i n s t a l l a t i o ns h o u l dn o wb es e c u r e .

www.voipsupport.it/pmwiki/pmwiki.php?n=Freepbx.HowtoCentos63

2/9

3/05/13
T h a n k sf o ru s i n gM y S Q L !

VoipSupport | Freepbx / Setting up a Centos 6.3 Asterisk and Freepbx server

Apache
1. Install apache and php if not already present
y u mi n s t a l lh t t p dp h pp h p p e a rp h p m y s q lp h p p r o c e s s

2. Setup apache to start on boot


c h k c o n f i gh t t p do n

3. Setup the user and group that will be used for asterisk install and configure apache to run with these:
g r o u p a d da s t e r i s k u s e r a d dc" a s t e r i s kP B X "d/ v a r / l i b / a s t e r i s kga s t e r i s ka s t e r i s k

4. Change the apache configuration to use the user and group just defined:
v i/ e t c / h t t p d / c o n f / h t t p d . c o n f

Change the following lines:


U s e ra p a c h e G r o u pa p a c h e

to:
U s e ra s t e r i s k G r o u pa s t e r i s k

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 serve
A l l o w O v e r r i d eA l l

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.
O p t i o n sF o l l o w S y m L i n k s

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

v i/ e t c / p h p . i n i d a t e . t i m e z o n e=" E u r o p e / A m s t e r d a m "

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)
c h o w nRa s t e r i s k : a s t e r i s k/ v a r / l i b / p h p / s e s s i o n /

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 8. Start the service
s e r v i c eh t t p ds t a r t

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 configur 9. You will need to open firewall ports for the web server. To manage the firewall, install system-config-firewall-tui
y u mi n s t a l ls y s t e m c o n f i g f i r e w a l l t u i

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
s y s t e m c o n f i g f i r e w a l l t u i

Dahdi
Only required if using telephony hardware cards or meetme.

Asterisk
1. Install asterisk prerequisites if not already present

y u mi n s t a l lw g e tc u r lb i s o np e r lp e r l C P A No p e n s s l d e v e lk e r n e l d e v e la u d i o f i l e d e v e ls o xs v ng c c c + +m a k en c u r s e s d e v e ll i b x m l 2 d e v e lm y s

If you will use odbc with asterisk you will also need
y u mi n s t a l lu n i x O D B Cu n i x O D B C d e v e ll i b t o o l l t d ll i b t o o l l t d l d e v e l

www.voipsupport.it/pmwiki/pmwiki.php?n=Freepbx.HowtoCentos63

And the relevant connector for your database, for example mysql

3/9

3/05/13
y u mi n s t a l lm y s q l c o n n e c t o r o d b c

VoipSupport | Freepbx / Setting up a Centos 6.3 Asterisk and Freepbx server


And the relevant connector for your database, for example mysql

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


c d/ u s r / l o c a l / s r c /

3. Download latest version of asterisk (at time of writing this was 10)
w g e th t t p : / / d o w n l o a d s . a s t e r i s k . o r g / p u b / t e l e p h o n y / a s t e r i s k / a s t e r i s k 1 0 c u r r e n t . t a r . g z

4. Extract the source directory


t a rx v z fa s t e r i s k 1 0 c u r r e n t . t a r . g z

5. Change into the source directory (customize the command to the version that was downloaded)
c da s t e r i s k 1 0 . 1 2 . 1

6. Get source for fomat_mp3 (not part of downloaded asterisk tar file)
c o n t r i b / s c r i p t s / g e t _ m p 3 _ s o u r c e . s h

7. Configure
. / c o n f i g u r e

8. Start compilation interactive menu


m a k em e n u s e l e c t

Under Add-ons choose:


f o r m a t _ m p 3 a p p _ m y s q l c d r _ m y s q l

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 When exiting menuselect, when prompted, press S to save changes. 9. Compile and install asterisk
m a k e m a k ei n s t a l l m a k es a m p l e s

10. Change directory onwer and group


c h o w nRa s t e r i s k : a s t e r i s k/ v a r / r u n / a s t e r i s k c h o w nRa s t e r i s k : a s t e r i s k/ v a r / l o g / a s t e r i s k c h o w nRa s t e r i s k : a s t e r i s k/ v a r / l i b / a s t e r i s k c h o w nRa s t e r i s k : a s t e r i s k/ v a r / s p o o l / a s t e r i s k c h o w nRa s t e r i s k : a s t e r i s k/ e t c / a s t e r i s k

Freepbx
1. Install prerequisites if not already present
p e a ri n s t a l lD B

2. Install lame
c d/ u s r / l o c a l / s r c w g e th t t p : / / d o w n l o a d s . s o u r c e f o r g e . n e t / p r o j e c t / l a m e / l a m e / 3 . 9 9 / l a m e 3 . 9 9 . 5 . t a r . g z t a rz x v fl a m e 3 . 9 9 . 5 . t a r . g z c dl a m e 3 . 9 9 . 5 . / c o n f i g u r e m a k e m a k ei n s t a l l

3. Get and extract the Freepbx source code


c d/ u s r / l o c a l / s r c w g e th t t p : / / m i r r o r . f r e e p b x . o r g / f r e e p b x 2 . 1 0 . 0 . t a r . g z t a rx v z ff r e e p b x 2 . 1 0 . 0 . t a r . g z c df r e e p b x 2 . 1 0 . 0

4. Create and populate databases for configuration and cdrs


m y s q l a d m i nur o o tpc r e a t ea s t e r i s k c d r d b m y s q lur o o tpa s t e r i s k c d r d b<S Q L / c d r _ m y s q l _ t a b l e . s q l m y s q l a d m i nur o o tpc r e a t ea s t e r i s k m y s q lur o o tpa s t e r i s k<S Q L / n e w i n s t a l l . s q l

www.voipsupport.it/pmwiki/pmwiki.php?n=Freepbx.HowtoCentos63

4/9

3/05/13

VoipSupport | Freepbx / Setting up a Centos 6.3 Asterisk and Freepbx server

5. Create database user to be used by freepbx to connect to database and give permisisons on databases
m y s q lur o o tp

at the mysql prompt enter (substitute xxxxxxxx with chosen password):


G R A N TA L LP R I V I L E G E SO Na s t e r i s k c d r d b . *T Oa s t e r i s k u s e r @ l o c a l h o s tI D E N T I F I E DB Y' x x x x x x x x ' ; G R A N TA L LP R I V I L E G E SO Na s t e r i s k . *T Oa s t e r i s k u s e r @ l o c a l h o s tI D E N T I F I E DB Y' x x x x x x x x ' ; f l u s hp r i v i l e g e s ; q u i t

6. Start asterisk
. / s t a r t _ a s t e r i s ks t a r t

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


. / i n s t a l l _ a m p

Output

C h e c k i n gf o rP E A RD B . . O K P H PW a r n i n g : f i l e s i z e ( ) :s t a tf a i l e df o r/ t m p / f r e e p b x _ p r e _ i n s t a l l . l o gi n/ u s r / l o c a l / s r c / f r e e p b x 2 . 1 0 . 0 / a m p _ c o n f / h t d o c s / a d m i n / l i b r a r i e s / u t C h e c k i n gf o rP E A RC o n s o l e : : G e t o p t . . O K C h e c k i n gu s e r . . O K C h e c k i n gi fA s t e r i s ki sr u n n i n g . . r u n n i n gw i t hP I D :1 8 4 8 . . O K C h e c k i n gf o r/ e t c / a m p o r t a l . c o n f . . / e t c / a m p o r t a l . c o n fd o e sn o te x i s t ,c o p y i n gd e f a u l t C r e a t i n gn e w/ e t c / a m p o r t a l . c o n f E n t e ry o u rU S E R N A M Et oc o n n e c tt ot h e' a s t e r i s k 'd a t a b a s e : [ a s t e r i s k u s e r ] E n t e ry o u rP A S S W O R Dt oc o n n e c tt ot h e' a s t e r i s k 'd a t a b a s e : [ a m p 1 0 9 ]a b c d 1 2 3 4 E n t e rt h eh o s t n a m eo ft h e' a s t e r i s k 'd a t a b a s e : [ l o c a l h o s t ] E n t e raU S E R N A M Et oc o n n e c tt ot h eA s t e r i s kM a n a g e ri n t e r f a c e : [ a d m i n ] E n t e raP A S S W O R Dt oc o n n e c tt ot h eA s t e r i s kM a n a g e ri n t e r f a c e : [ a m p 1 1 1 ] E n t e rt h ep a t ht ou s ef o ry o u rA M Pw e br o o t : [ / v a r / w w w / h t m l ] E n t e rt h eI PA D D R E S So rh o s t n a m eu s e dt oa c c e s st h eA M Pw e b a d m i n : [ 1 9 2 . 1 6 8 . 1 . 1 ]1 0 9 . 1 0 4 . 1 0 1 . 1 8 8 U s es i m p l eE x t e n s i o n s[ e x t e n s i o n s ]a d m i no rs e p a r a t eD e v i c e sa n dU s e r s[ d e v i c e a n d u s e r ] ? [ e x t e n s i o n s ] E n t e rd i r e c t o r yi nw h i c ht os t o r eA M Pe x e c u t a b l es c r i p t s : [ / v a r / l i b / a s t e r i s k / b i n ]

P H PW a r n i n g : f i l e s i z e ( ) :s t a tf a i l e df o r/ v a r / l o g / a s t e r i s k / f r e e p b x _ d e b u gi n/ u s r / l o c a l / s r c / f r e e p b x 2 . 1 0 . 0 / a m p _ c o n f / h t d o c s / a d m i n / l i b r a r i e s C r e a t e d/ v a r / l i b / a s t e r i s k / b i n E n t e rd i r e c t o r yi nw h i c ht os t o r es u p e r u s e rs c r i p t s : [ / u s r / l o c a l / s b i n ]

/ e t c / a m p o r t a l . c o n fw r i t t e n A s s u m i n gn e wi n s t a l l ,i n s t a l l m o ha d d e dt oc o m m a n dl i n e O K R e a d i n g/ e t c / a m p o r t a l . c o n f . . p a r s e da m p _ c o n fv a r i a b l e sf r o m/ e t c / a m p o r t a l . c o n f : a m p _ c o n f[ A M P D B H O S T ]= >[ l o c a l h o s t ] a m p _ c o n f[ A M P D B E N G I N E ]= >[ m y s q l ] a m p _ c o n f[ A M P E N G I N E ]= >[ a s t e r i s k ] a m p _ c o n f[ A M P M G R U S E R ]= >[ a d m i n ] a m p _ c o n f[ A M P M G R P A S S ]= >[ a m p 1 1 1 ] a m p _ c o n f[ A M P B I N ]= >[ / v a r / l i b / a s t e r i s k / b i n ] a m p _ c o n f[ A M P S B I N ]= >[ / u s r / l o c a l / s b i n ] a m p _ c o n f[ A M P W E B R O O T ]= >[ / v a r / w w w / h t m l ] a m p _ c o n f[ A M P C G I B I N ]= >[ / v a r / w w w / c g i b i n] a m p _ c o n f[ F O P W E B R O O T ]= >[ / v a r / w w w / h t m l / p a n e l ] a m p _ c o n f[ F O P P A S S W O R D ]= >[ p a s s w 0 r d ] a m p _ c o n f[ A U T H T Y P E ]= >[ d a t a b a s e ] a m p _ c o n f[ A M P E X T E N S I O N S ]= >[ e x t e n s i o n s ] a m p _ c o n f[ A M P D B U S E R ]= >[ a s t e r i s k u s e r ] a m p _ c o n f[ A M P D B P A S S ]= >[ a b c d 1 2 3 4 ] a m p _ c o n f[ A M P W E B A D D R E S S ]= >[ 1 0 9 . 1 0 4 . 1 0 1 . 1 8 8 ] a m p _ c o n f[ A M P D B N A M E ]= >[ a s t e r i s k ] O K C h e c k i n gf o r/ e t c / a s t e r i s k / a s t e r i s k . c o n f . . O K R e a d i n g/ e t c / a s t e r i s k / a s t e r i s k . c o n f . . O K U s i n ga s t e r i s ka sP B XE n g i n e C h e c k i n gf o rA s t e r i s kv e r s i o n . . 1 0 . 3 . 1 C h e c k i n gf o rs e l i n u x . . O K C o n n e c t i n gt od a t a b a s e . . O K C h e c k i n gc u r r e n tv e r s i o no fA M P . . 2 . 9 . 0 I n s t a l l i n gn e wF r e e P B Xf i l e s . . O K( 5 6 9f i l e sc o p i e d ,0s k i p p e d ) C o n f i g u r i n gi n s t a l lf o ry o u re n v i r o n m e n t . . P H PW a r n i n g : i n c l u d e _ o n c e ( / e t c / a s t e r i s k / f r e e p b x . c o n f ) :f a i l e dt oo p e ns t r e a m :N os u c hf i l eo rd P H PW a r n i n g : i n c l u d e _ o n c e ( ) :F a i l e do p e n i n g' / e t c / a s t e r i s k / f r e e p b x . c o n f 'f o ri n c l u s i o n( i n c l u d e _ p a t h = ' . : / u s r / s h a r e / p e a r : / u s r / s h a r e / p h p ' ) P H PF a t a le r r o r : C l a s s' f r e e p b x _ c o n f 'n o tf o u n di n/ v a r / l i b / a s t e r i s k / b i n / f r e e p b x _ s e t t i n go nl i n e3 7 P H PW a r n i n g : i n c l u d e _ o n c e ( / e t c / a s t e r i s k / f r e e p b x . c o n f ) :f a i l e dt oo p e ns t r e a m :N os u c hf i l eo rd i r e c t o r yi n/ v a r / l i b / a s t e r i s k / b i n / f r e e p b x _ P H PW a r n i n g : i n c l u d e _ o n c e ( ) :F a i l e do p e n i n g' / e t c / a s t e r i s k / f r e e p b x . c o n f 'f o ri n c l u s i o n( i n c l u d e _ p a t h = ' . : / u s r / s h a r e / p e a r : / u s r / s h a r e / p h p ' ) P H PF a t a le r r o r : C l a s s' f r e e p b x _ c o n f 'n o tf o u n di n/ v a r / l i b / a s t e r i s k / b i n / f r e e p b x _ s e t t i n go nl i n e3 7 P H PW a r n i n g : i n c l u d e _ o n c e ( / e t c / a s t e r i s k / f r e e p b x . c o n f ) :f a i l e dt oo p e ns t r e a m :N os u c hf i l eo rd i r e c t o r yi n/ v a r / l i b / a s t e r i s k / b i n / f r e e p b x _ P H PW a r n i n g : i n c l u d e _ o n c e ( ) :F a i l e do p e n i n g' / e t c / a s t e r i s k / f r e e p b x . c o n f 'f o ri n c l u s i o n( i n c l u d e _ p a t h = ' . : / u s r / s h a r e / p e a r : / u s r / s h a r e / p h p ' ) P H PF a t a le r r o r : C l a s s' f r e e p b x _ c o n f 'n o tf o u n di n/ v a r / l i b / a s t e r i s k / b i n / f r e e p b x _ s e t t i n go nl i n e3 7 P H PW a r n i n g : i n c l u d e _ o n c e ( / e t c / a s t e r i s k / f r e e p b x . c o n f ) :f a i l e dt oo p e ns t r e a m :N os u c hf i l eo rd i r e c t o r yi n/ v a r / l i b / a s t e r i s k / b i n / f r e e p b x _ P H PW a r n i n g : i n c l u d e _ o n c e ( ) :F a i l e do p e n i n g' / e t c / a s t e r i s k / f r e e p b x . c o n f 'f o ri n c l u s i o n( i n c l u d e _ p a t h = ' . : / u s r / s h a r e / p e a r : / u s r / s h a r e / p h p ' ) P H PF a t a le r r o r : C l a s s' f r e e p b x _ c o n f 'n o tf o u n di n/ v a r / l i b / a s t e r i s k / b i n / f r e e p b x _ s e t t i n go nl i n e3 7

www.voipsupport.it/pmwiki/pmwiki.php?n=Freepbx.HowtoCentos63

5/9

3/05/13

VoipSupport | Freepbx / Setting up a Centos 6.3 Asterisk and Freepbx server

P H PW a r n i n g : i n c l u d e _ o n c e ( / e t c / a s t e r i s k / f r e e p b x . c o n f ) :f a i l e dt oo p e ns t r e a m :N os u c hf i l eo rd i r e c t o r yi n/ v a r / l i b / a s t e r i s k / b i n / f r e e p b x _ P H PW a r n i n g : i n c l u d e _ o n c e ( ) :F a i l e do p e n i n g' / e t c / a s t e r i s k / f r e e p b x . c o n f 'f o ri n c l u s i o n( i n c l u d e _ p a t h = ' . : / u s r / s h a r e / p e a r : / u s r / s h a r e / p h p ' ) P H PF a t a le r r o r : C l a s s' f r e e p b x _ c o n f 'n o tf o u n di n/ v a r / l i b / a s t e r i s k / b i n / f r e e p b x _ s e t t i n go nl i n e3 7 P H PW a r n i n g : i n c l u d e _ o n c e ( / e t c / a s t e r i s k / f r e e p b x . c o n f ) :f a i l e dt oo p e ns t r e a m :N os u c hf i l eo rd i r e c t o r yi n/ v a r / l i b / a s t e r i s k / b i n / f r e e p b x _ P H PW a r n i n g : i n c l u d e _ o n c e ( ) :F a i l e do p e n i n g' / e t c / a s t e r i s k / f r e e p b x . c o n f 'f o ri n c l u s i o n( i n c l u d e _ p a t h = ' . : / u s r / s h a r e / p e a r : / u s r / s h a r e / p h p ' ) P H PF a t a le r r o r : C l a s s' f r e e p b x _ c o n f 'n o tf o u n di n/ v a r / l i b / a s t e r i s k / b i n / f r e e p b x _ s e t t i n go nl i n e3 7 a m p o r t a l . . n of p b x . . f r e e p b x _ e n g i n e . . f r e e p b x _ s e t t i n g . . g e n _ a m p _ c o n f . p h p . . d o n e a p p l yu s e r n a m e / p a s s w o r dc h a n g e st oc o n ff i l e s : r u n n i n ga p p l y _ c o n f . s hf r o m/ e t c / a m p o r t a l . c o n f R e a d i n g/ e t c / a m p o r t a l . c o n f U p d a t i n gc o n f i g u r a t i o n . . . / e t c / a s t e r i s k / c d r _ m y s q l . c o n fu s e r :[ a s t e r i s k u s e r ]p a s s w o r d :[ a b c d 1 2 3 4 ]h o s t n a m e :[ l o c a l h o s t ] / e t c / a s t e r i s k / m a n a g e r . c o n fu s e r :[ a d m i n ]s e c r e t :[ a m p 1 1 1 ] / e t c / a s t e r i s k / v m _ e m a i l . i n c u s e dw e ba d d r e s s :[ 1 0 9 . 1 0 4 . 1 0 1 . 1 8 8 ]f o rp a t h A d j u s t i n gF i l eP e r m i s s i o n s . .

S E T T I N GF I L EP E R M I S S I O N S P e r m i s s i o n sO K D o n e d o n ew i t ha p p l y _ c o n f . s h c r e a t i n gm i s s i n g# i n c l u d ef i l e s . . O K O K S e t t i n gp e r m i s s i o n so nf i l e s . . O K C h e c k i n gf o ru p g r a d e s . . 5f o u n d U p g r a d i n gt o2 . 1 0 . 0 a l p h a 1 . . >R u n n i n gP H Ps c r i p t/ u s r / l o c a l / s r c / f r e e p b x 2 . 1 0 . 0 / u p g r a d e s / 2 . 1 0 . 0 a l p h a 1 / m i g r a t i o n . p h p P H PW a r n i n g : I n v a l i da r g u m e n ts u p p l i e df o rf o r e a c h ( )i n/ v a r / w w w / h t m l / a d m i n / l i b r a r i e s / f r e e p b x _ c o n f . c l a s s . p h po nl i n e9 0 6 C l e a n i n gu pd e p r e c a t e do rm o v e df i l e s : C h e c k i n g/ v a r / w w w / h t m l _ a s t e r i s k . . N o tR e q u i r e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / v i e w s / f r e e p b x . p h p . . r e m o v e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / v i e w s / f r e e p b x _ a d m i n . p h p . . N o tR e q u i r e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / v i e w s / f r e e p b x _ r e l o a d . p h p . . N o tR e q u i r e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / v i e w s / f r e e p b x _ r e l o a d b a r . p h p . . N o tR e q u i r e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / v i e w s / f r e e p b x _ f o o t e r . p h p . . N o tR e q u i r e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / v i e w s / u n a u t h o r i z e d . p h p . . N o tR e q u i r e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / v i e w s / l o g g e d o u t . p h p . . N o tR e q u i r e d U p g r a d i n gt o2 . 1 0 . 0 a l p h a 1 . . O K U p g r a d i n gt o2 . 1 0 . 0 b e t a 2 . . >R u n n i n gP H Ps c r i p t/ u s r / l o c a l / s r c / f r e e p b x 2 . 1 0 . 0 / u p g r a d e s / 2 . 1 0 . 0 b e t a 2 / m i g r a t i o n . p h p C l e a n i n gu pd e p r e c a t e do rm o v e df i l e s : C h e c k i n g/ v a r / w w w / h t m l / a d m i n / r e p o r t s . p h p . . N o tR e q u i r e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / a s s e t s / j s / p b x l i b . j s . p h p . . N o tR e q u i r e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / a s s e t s / c s s / j q u e r y u i 1 . 8 . 1 6 . c s s . . N o tR e q u i r e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / c o m m o n / d b _ c o n n e c t . p h p . . N o tR e q u i r e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / c o m m o n / j s o n . i n c . p h p . . N o tR e q u i r e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / c o m m o n / l i b f r e e p b x . j a v a s c r i p t s . j s . . N o tR e q u i r e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / c o m m o n / m a i n s t y l e a l t e r n a t i v e . c s s . . N o tR e q u i r e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / c o m m o n / m a i n s t y l e . c s s . . N o tR e q u i r e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / c o m m o n / s c r i p t . j s . p h p . . N o tR e q u i r e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / i m a g e s / c a t e g o r y 1 . p n g . . N o tR e q u i r e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / i m a g e s / f r e e p b x _ l a r g e . p n g . . N o tR e q u i r e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / i m a g e s / h e a d e r b a c k . p n g . . N o tR e q u i r e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / i m a g e s / l o a d i n g . g i f . . N o tR e q u i r e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / i m a g e s / l o g o . p n g . . N o tR e q u i r e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / i m a g e s / m o d u l e s 1 . p n g . . N o tR e q u i r e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / i m a g e s / s h a d o w s i d e b a c k g r o u n d . p n g . . N o tR e q u i r e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / i m a g e s / t a b f i r s t c u r r e n t . p n g . . N o tR e q u i r e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / i m a g e s / t a b . p n g . . N o tR e q u i r e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / i m a g e s / w a t e r m a r k . p n g . . N o tR e q u i r e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / v i e w s / f r e e p b x _ a d m i n . p h p . . N o tR e q u i r e d C h e c k i n g/ v a r / w w w / h t m l / a d m i n / v i e w s / l o g g e d o u t . p h p . . N o tR e q u i r e d T r y i n gt or e m o v ed i r/ v a r / w w w / h t m l / a d m i n / c o m m o n . . N o tR e q u i r e d U p g r a d i n gt o2 . 1 0 . 0 b e t a 2 . . O K U p g r a d i n gt o2 . 1 0 . 0 b e t a 3 . . >R u n n i n gP H Ps c r i p t/ u s r / l o c a l / s r c / f r e e p b x 2 . 1 0 . 0 / u p g r a d e s / 2 . 1 0 . 0 b e t a 3 / m i g r a t i o n . p h p T r y i n gt or e m o v ed i r/ v a r / w w w / h t m l / a d m i n / c d r . . N o tR e q u i r e d c h e c k i n gi fr e c o r d i n g f i l ef i l ef i e l dn e e d e di nc d r . . a l r e a d yt h e r e c h e c k i n gi fd i df i l ef i e l dn e e d e di nc d r . . a l r e a d yt h e r e U p g r a d i n gt o2 . 1 0 . 0 b e t a 3 . . O K U p g r a d i n gt o2 . 1 0 . 0 r c 1 . . >R u n n i n gP H Ps c r i p t/ u s r / l o c a l / s r c / f r e e p b x 2 . 1 0 . 0 / u p g r a d e s / 2 . 1 0 . 0 r c 1 / m i g r a t i o n . p h p U p g r a d i n gt o2 . 1 0 . 0 r c 1 . . O K U p g r a d i n gt o2 . 1 0 . 0 . . >R u n n i n gP H Ps c r i p t/ u s r / l o c a l / s r c / f r e e p b x 2 . 1 0 . 0 / u p g r a d e s / 2 . 1 0 . 0 / r e m o v e f i l e s . p h p C l e a n i n gu pd e p r e c a t e do rm o v e df i l e s : C h e c k i n g/ v a r / l i b / a s t e r i s k / b i n / b o u n c e _ o p . s h . . N o tR e q u i r e d U p g r a d i n gt o2 . 1 0 . 0 . . O K C h e c k i n gd a s h b o a r d . .u p d a t e dt o2 . 1 0 . 0 . 3 C h e c k i n gf r a m e w o r k . .u p d a t e dt o2 . 1 0 . 0 . 0 C h e c k i n gm u s i c . .u p d a t e dt o2 . 1 0 . 0 . 2 C h e c k i n gf e a t u r e c o d e a d m i n . .u p d a t e dt o2 . 1 0 . 0 . 3 C h e c k i n gf w _ a r i . .u p d a t e dt o2 . 1 0 . 0 . 0 C h e c k i n gc o r e . .u p d a t e dt o2 . 1 0 . 0 . 0 C h e c k i n gc u s t o m a p p s r e g . .u p d a t e dt o2 . 1 0 . 0 . 1 C h e c k i n gi n f o s e r v i c e s . .u p d a t e dt o2 . 1 0 . 0 . 2 C h e c k i n gv o i c e m a i l . .u p d a t e dt o2 . 1 0 . 0 . 2 C h e c k i n gr e c o r d i n g s . .u p d a t e dt o3 . 3 . 1 1 . 6 C h e c k i n gc d r . .u p d a t e dt o2 . 1 0 . 0 . 4 C r e a t i n go ru p d a t i n gf r e e p b x _ c o n fs e t t i n g s . . P H PN o t i c e : U n d e f i n e di n d e x :m a i n s t y l e _ c s s _ g e n e r a t e di n/ u s r / l o c a l / s r c / f r e e p b x 2 . 1 0 . 0 / l i b f r e e . . O K P H PW a r n i n g : f i l e s i z e ( ) :s t a tf a i l e df o r/ v a r / l o g / a s t e r i s k / f r e e p b x . l o gi n/ u s r / l o c a l / s r c / f r e e p b x 2 . 1 0 . 0 / a m p _ c o n f / h t d o c s / a d m i n / l i b r a r i e s / u G e n e r a t i n gA M Pc o n f i g s . . G e n e r a t i n gC o n f i g u r a t i o n s . c o n f ,( i fA s t e r i s ki sn o tr u n n i n g ,y o uw i l lg e ta ne r r o r I nc a s eo fe r r o r ,s t a r tA s t e r i s ka n dh i tt h er e db a ri nt h eG U It og e n e r a t et h eC o n f i g u r a t i o n s . c o n ff i l e s C h e c k i n gf o rP E A RC o n s o l e : : G e t o p t . . O K P H PW a r n i n g : f i l e s i z e ( ) :s t a tf a i l e df o r/ v a r / l o g / a s t e r i s k / f r e e p b x _ d b u gi n/ v a r / w w w / h t m l / a d m i n / l i b r a r i e s / u t i l i t y . f u n c t i o n s . p h po nl i n e6 4

www.voipsupport.it/pmwiki/pmwiki.php?n=Freepbx.HowtoCentos63

6/9

3/05/13

VoipSupport | Freepbx / Setting up a Centos 6.3 Asterisk and Freepbx server

P H PW a r n i n g : f i l e s i z e ( ) :s t a tf a i l e df o r/ v a r / l o g / a s t e r i s k / f r e e p b x _ d b u gi n/ v a r / w w w / h t m l / a d m i n / l i b r a r i e s / u t i l i t y . f u n c t i o n s . p h po nl i n e6 4 R u n n i n gm o d u l ei n s t a l l . p h pa n di n s t a l l . s q ls c r i p t s S k i p p i n ge x t e n s i o na n dd e s t i n a t i o nr e g i s t r yc h e c k s n oc r o n t a bf o ra s t e r i s k n oc r o n t a bf o ra s t e r i s k P l e a s eu p d a t ey o u rm o d u l e sa n dr e l o a dA s t e r i s kb yb r o w s i n gt oy o u rs e r v e r . G e n e r a t i n gA M Pc o n f i g s . . O K C h e c k i n gd a s h b o a r d . .M o d u l ed a s h b o a r ds u c c e s s f u l l yi n s t a l l e d S E T T I N GF I L EP E R M I S S I O N S P e r m i s s i o n sO K M o d u l ed a s h b o a r ds u c c e s s f u l l ye n a b l e d i n s t a l l e d C h e c k i n gf r a m e w o r k . .N od i r e c t o r y/ v a r / w w w / h t m l / a d m i n / m o d u l e s / f r a m e w o r k / a m p _ c o n f / h t d o c s ,i n s t a l ls c r i p tn o tn e e d e d M o d u l ef r a m e w o r ks u c c e s s f u l l yi n s t a l l e d S E T T I N GF I L EP E R M I S S I O N S P e r m i s s i o n sO K i n s t a l l e d C h e c k i n gm u s i c . .M o d u l em u s i cs u c c e s s f u l l yi n s t a l l e d S E T T I N GF I L EP E R M I S S I O N S P e r m i s s i o n sO K M o d u l em u s i cs u c c e s s f u l l ye n a b l e d i n s t a l l e d C h e c k i n gf e a t u r e c o d e a d m i n . .M o d u l ef e a t u r e c o d e a d m i ns u c c e s s f u l l yi n s t a l l e d S E T T I N GF I L EP E R M I S S I O N S P e r m i s s i o n sO K M o d u l ef e a t u r e c o d e a d m i ns u c c e s s f u l l ye n a b l e d i n s t a l l e d C h e c k i n gf w _ a r i . .N od i r e c t o r y/ v a r / w w w / h t m l / a d m i n / m o d u l e s / f w _ a r i / h t d o c s _ a r i ,i n s t a l ls c r i p tn o tn e e d e d M o d u l ef w _ a r is u c c e s s f u l l yi n s t a l l e d S E T T I N GF I L EP E R M I S S I O N S P e r m i s s i o n sO K i n s t a l l e d C h e c k i n gc o r e . .C h e c k i n gi fd i r e c t d i d sn e e dm i g r a t i n g . . a l r e a d yd o n e u p d a t i n gz a pc a l l g r o u p ,p i c k u p g r o u p . . n o tn e e d e d c h e c k i n gf o rd e l a y _ a n s w e rf i e l d. . a l r e a d ye x i s t s c h e c k i n gf o rp r i c i df i e l d. . a l r e a d ye x i s t s C h e c k i n gf o rG l o b a lv a rR E C O R D I N G _ S T A T E . . A l r e a d ye x i s t s ! C h e c k i n gi ft r u n kt a b l em i g r a t i o nr e q u i r e d . . n o tn e e d e d C h e c k i n gi fp r i v a c ym a n a g e ro p t i o n se x i s t s . . a l r e a d ye x i s t s C h e c k i n gf o rn o a n s w e r _ c i df i e l d . . a l r e a d ye x i s t s C h e c k i n gf o rb u s y _ c i df i e l d . . a l r e a d ye x i s t s C h e c k i n gf o rc h a n u n a v a i l _ c i df i e l d . . a l r e a d ye x i s t s C h e c k i n gf o rn o a n s w e r _ d e s tf i e l d . . a l r e a d ye x i s t s C h e c k i n gf o rb u s y _ d e s tf i e l d . . a l r e a d ye x i s t s C h e c k i n gf o rc h a n u n a v a i l _ d e s tf i e l d . . a l r e a d ye x i s t s C h e c k i n gf o rG e n e r a lS e t t i n gm i g r a t i o n s . . n o tn e e d e d C o n v e r t i n gI A Xn o t r a n s f e rt ot r a n s f e ri fn e e d e d . . u p d a t e d0 0 0 0r e c o r d s d e l e t i n go b s o l e t e dr e c o r d _ i na n dr e c o r d _ o u te n t r i e s . . o k M o d u l ec o r es u c c e s s f u l l yi n s t a l l e d S E T T I N GF I L EP E R M I S S I O N S P e r m i s s i o n sO K M o d u l ec o r es u c c e s s f u l l ye n a b l e d i n s t a l l e d C h e c k i n gc u s t o m a p p s r e g . .M o d u l ec u s t o m a p p s r e gs u c c e s s f u l l yi n s t a l l e d S E T T I N GF I L EP E R M I S S I O N S P e r m i s s i o n sO K M o d u l ec u s t o m a p p s r e gs u c c e s s f u l l ye n a b l e d i n s t a l l e d C h e c k i n gi n f o s e r v i c e s . .M o d u l ei n f o s e r v i c e ss u c c e s s f u l l yi n s t a l l e d S E T T I N GF I L EP E R M I S S I O N S P e r m i s s i o n sO K M o d u l ei n f o s e r v i c e ss u c c e s s f u l l ye n a b l e d i n s t a l l e d C h e c k i n gv o i c e m a i l . .c h e c k i n gi fV o i c e m a i lA d m i n( v m a i l a d m i n )i si n s t a l l e d . . n o ti n s t a l l e d ,o k M o d u l ev o i c e m a i ls u c c e s s f u l l yi n s t a l l e d S E T T I N GF I L EP E R M I S S I O N S P e r m i s s i o n sO K M o d u l ev o i c e m a i ls u c c e s s f u l l ye n a b l e d i n s t a l l e d C h e c k i n gr e c o r d i n g s . .c h e c k i n gf o rf c o d ef i e l d . . O K c h e c k i n gf o rf c o d e _ p a s sf i e l d . . O K M o d u l er e c o r d i n g ss u c c e s s f u l l yi n s t a l l e d S E T T I N GF I L EP E R M I S S I O N S P e r m i s s i o n sO K M o d u l er e c o r d i n g ss u c c e s s f u l l ye n a b l e d i n s t a l l e d C h e c k i n gc d r . .C h e c k i n gi ff i e l dd i di sp r e s e n ti nc d rt a b l e . . d i df i e l da l r e a d yp r e s e n t . C h e c k i n gi ff i e l dr e c o r d i n g f i l ei sp r e s e n ti nc d rt a b l e . . r e c o r d i n g f i l ef i e l da l r e a d yp r e s e n t . M o d u l ec d rs u c c e s s f u l l yi n s t a l l e d S E T T I N GF I L EP E R M I S S I O N S P e r m i s s i o n sO K M o d u l ec d rs u c c e s s f u l l ye n a b l e d i n s t a l l e d P l e a s eu p d a t ey o u rm o d u l e sa n dr e l o a dA s t e r i s kb yb r o w s i n gt oy o u rs e r v e r .

www.voipsupport.it/pmwiki/pmwiki.php?n=Freepbx.HowtoCentos63

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

7/9

3/05/13

VoipSupport | Freepbx / Setting up a Centos 6.3 Asterisk and Freepbx server


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *N o t e :I t ' sp o s s i b l et h a ti fy o uc l i c kt h er e d' U p d a t eN o w 'b a rB E F O R E* *u p d a t i n gy o u rm o d u l e s ,y o u rm a c h i n ew i l ls t a r td r o p p i n gc a l l s .E n s u r e* *t h a ta l lm o d u l e sa r eu pt od a t eB E F O R EY O UC L I C KT H ER E DB A R .A sl o n g* *a st h i si so b s e r v e d ,y o u rm a c h i n ew i l lb ef u l l yf u n c t i o n a lw h i l s tt h e* *u p g r a d ei si np r o g r e s s . * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

8. Stop asterisk
a s t e r i s kr x" c o r es t o pn o w "

9. Remove files which will be replaced by links


r mf/ e t c / a s t e r i s k / c c s s . c o n f r mf/ e t c / a s t e r i s k / c o n f b r i d g e . c o n f r mf/ e t c / a s t e r i s k / e x t e n s i o n s . c o n f r mf/ e t c / a s t e r i s k / f e a t u r e s . c o n f r mf/ e t c / a s t e r i s k / i a x . c o n f r mf/ e t c / a s t e r i s k / l o g g e r . c o n f r mf/ e t c / a s t e r i s k / s i p . c o n f r mf/ e t c / a s t e r i s k / s i p _ n o t i f y . c o n f

10. Start asterisk with amportal script


a m p o r t a ls t a r t

11. Login to freepbx at http://ip address you specified, using default credentials user admin, password admin. 12. Click the red reload config button.

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 are file name as shown in error message)
r m/ e t c / a s t e r i s k / l o g g e r . c o n f l ns/ v a r / w w w / h t m l / a d m i n / m o d u l e s / c o r e / e t c / l o g g e r . c o n f/ e t c / a s t e r i s k / l o g g e r . c o n f a m p o r t a lr e l o a d

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

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 App menu items do a refresh, for example Reports->Freepbx system status).

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 tim 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.) 17. Open the ports in the firewall needed by asterisk 5060 tcp/udp 1000-20000 udp
s y s t e m c o n f i g f i r e w a l l t u i

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
c h k c o n f i g

turn it off with


c h k c o n f i ga s t e r i s ko f f

To start amportal at boot (the simple way)


e c h o" / u s r / l o c a l / s b i n / a m p o r t a ls t a r t "> >/ e t c / r c . l o c a l

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:
# ! / b i n / s h # # #B E G I NI N I TI N F O #c h k c o n f i g8 61 4 #P r o v i d e s :a m p o r t a l #R e q u i r e d S t a r t :$ n e t w o r k #R e q u i r e d S t o p :$ n e t w o r k #D e f a u l t S t a r t :235 #D e s c r i p t i o n :s t a r t sa s t e r i s kv i aa m p o r t a ls c r i p t # # #E N DI N I TI N F O c a s e" $ 1 "i n ' s t a r t ' ) / u s r / l o c a l / s b i n / a m p o r t a ls t a r t

www.voipsupport.it/pmwiki/pmwiki.php?n=Freepbx.HowtoCentos63

8/9

3/05/13
' s t o p ' )

/ u s r / l o c a l / s b i n / a m p o r t a ls t a r t ; ; / u s r / l o c a l / s b i n / a m p o r t a ls t o p ; ; * )

VoipSupport | Freepbx / Setting up a Centos 6.3 Asterisk and Freepbx server

e c h o" U s a g e :$ 0{s t a r t|s t o p} " ; ; e s a c e x i t0

Then enable the script


c h k c o n f i ga m p o r t a lo n

PhpMyAdmin
1. Install EPEL repository
r p mi v hh t t p : / / m i r r o r . i m t s y s t e m s . c o m / e p e l / 6 / i 3 8 6 / e p e l r e l e a s e 6 7 . n o a r c h . r p m y u mu p d a t e

2. Install prerequisites if not already present


y u mi n s t a l lp h p m b s t r i n gp h p m c r y p t

3. Install phpMyAdmin
y u mi n s t a l lp h p M y A d m i n

4. Link the install directory under the web server root


l ns/ u s r / s h a r e / p h p M y A d m i n/ v a r / w w w / h t m l / p h p M y A d m i n

5. Modify httpd configuration


v i/ e t c / h t t p d / c o n f / h t t p d . c o n f

Add the following lines:


< D i r e c t o r y" / u s r / s h a r e / p h p M y A d m i n " > A l l o wf r o ma l l O p t i o n sF o l l o w S y m L i n k s < / D i r e c t o r y >

6. Restart apache
s e r v i c eh t t p dr e s t a r t

Bind (named) DNS server


1. Install bind
y u mi n s t a l lb i n db i n d u t i l s

2. Have bind start when the server boots


c h k c o n f i gn a m e do n

3. Start bind
s e r v i c en a m e ds t a r t

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


s y s t e m c o n f i g n e t w o r k t u i

5. Restart network
s e r v i c en e t w o r kr e s t a r t
Page last modified on February 03, 2013, at 01:37 PM

www.voipsupport.it/pmwiki/pmwiki.php?n=Freepbx.HowtoCentos63

9/9