Freepbx installation and configuration tutorial for centos 5.1

Source: Internet
Author: User
Tags nameserver digium
In

  • Installation

1. Install centos, enabling the following packages:

 

* DNS Server

* Web Server

* Mail Server

* MySQL database

* Development tools

 

Yum install nano

Reboot

 

2. Edit network settings

 

Nano/etc/sysconfig/Network

 

Hostname = internal.hostname.domain.com (set your internal hostname name here)

 

CTRL-X to save, 'y' to confirm

 

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

 

Ipadddr = 192.168.1.20

Netmask = 255.255.255.0

Network = 192.168.1.0

 

CTRL-X to save, 'y' to confirm

 

 

Echo "Options {">/etc/named. conf

Echo "directory/"/var/named/";">/etc/named. conf

Echo "Dump-file/"/var/named/data/cache_dump.db/";">/etc/named. conf

Echo "Statistics-file/"/var/named/data/named_stats.txt/";">/etc/named. conf

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

Echo "include/"/etc/rndc. Key/";">/etc/named. conf

 

Service named start

 

Chkconfig named on

 

Nano/etc/resolv. conf

 

Search internal.domain.com (set your internal domain name here)

Nameserver 192.168.1.5

Nameserver 127.0.0.1

 

Nano/etc/hosts

 

127.0.0.1 internal.hostname.domain.com (set your internal hostname name here)

127.0.0.1 asterisk1.local

127.0.0.1 localhost

 

CTRL-X to save, 'y' to confirm

 

Iptables-P input accept

Iptables-P output accept

Iptables-P forward accept

Iptables-F

Iptables-x

 

/Etc/init. d/iptables save

 

Service Network restart

 

3. Update:

 

Yum-y update

 

4. Disable SELinux:

 

Echo "SELinux = disabled">/etc/SELinux/config

 

Reboot

 

5. Install dependencies and extra packages:

 

Yum install e2fsprogs-devel keyutils-libs-devel krb5-devel libogg libselinux-devel libsepol-devel libxml2-devel LibTIFF-devel gmp php-pear-db php-Gd PHP-mysql PHP-PDO kernel- devel ncurses-devel audiofile-devel libogg-devel OpenSSL-devel mysql-devel
Zlib-devel Perl-datemanip sendmail-cf

 

CD/usr/src

 

Wget

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

Tar zxvf lame-3.97.tar.gz

CD lame-3.97

./Configure

Make

Make install

 

6. Install Asterisk and freepbx:

 

CD/usr/src

 

Wget

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

Wget

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

Wget

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

Wget

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

Wget

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

 

Tar zxvf asterisk-1.4-current.tar.gz

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

Tar zxvf zaptel-1.4-current.tar.gz

Tar zxvf libpri-1.4-current.tar.gz

Tar zxvf freepbx-2.3.1.tar.gz

 

CD/usr/src/zaptel-1.4-current

 

./Configure

Make

Make install

Make config

/Sbin/ztcfg

 

Echo "/sbin/ztcfg">/etc/rc. d/rc. Local

 

CD/usr/src/libpri-1.4-current

 

./Configure

Make

Make install

 

CD/usr/src/asterisk-1.4-Current

 

Useradd-c "asterisk PBX"-D/var/lib/asterisk Asterisk

Mkdir/var/run/Asterisk

Mkdir/var/log/Asterisk

Chown-r asterisk: asterisk/var/run/Asterisk

Chown-r asterisk: asterisk/var/log/Asterisk

Chown-r asterisk: asterisk/var/lib/PHP/SESSION/

 

Nano + 231/etc/httpd/CONF/httpd. conf

 

Change User Apache and Group Apache to user Asterisk and group asterisk.

 

CTRL-X to save, 'y' to confirm

 

Nano + 329/etc/httpd/CONF/httpd. conf

 

Change AllowOverride none to AllowOverride all

 

CTRL-X to save, 'y' to confirm

 

./Configure

Make

Make install

 

/Etc/init. d/mysqld start

 

CD/usr/src/freepbx-2.3.1

 

Mysqladmin create Asterisk

Mysqladmin create asteriskcdrdb

MySQL asterisk <SQL/newinstall. SQL

MySQL asteriskcdrdb <SQL/cdr_mysql_table. SQL

 

MySQL

 

Grant all privileges on asteriskcdrdb. * To asteriskuser @ localhost identified by 'somepassword ';

Grant all privileges on Asterisk. * To asteriskuser @ localhost identified by 'somepassword ';

Flush privileges;

 

/Q

 

Mysqladmin-u Root Password 'somepassword'

 

CD/usr/src/asterisk-Addons

 

./Configure

Make

Make install

 

CD/usr/src/freepbx-2.3.1

 

./Start_asterisk start

 

./Install_amp -- username = asteriskuser -- Password = somepassword

 

Echo "/usr/local/sbin/amportal start">/etc/rc. Local

 

Chkconfig httpd on

 

Chkconfig mysqld on

 

Open browser

Http: // ipaddressofpbx/admin

 

Click red bar in freepbx

 

7. Fix Ari password:

 

Nano-W/var/www/html/recordings/destdes/Main. conf. php

 

$ Ari_admin_password = "somepassword ";

 

CTRL-X to save, 'y' to confirm

 

8. configure Sendmail:

 

Nano/etc/mail/sendmail. MC

 

Define ('smart _ host', 'relay .domain.com) DNL

 

Masquerade_as ('pbx .domain.com ') DNL

 

Feature ('masquerade _ envelope ') DNL

 

CTRL-X to save, 'y' to confirm

 

Make-C/etc/mail

 

9. Edit sip_nat.conf for proper NAT:

 

Nano/etc/asterisk/sip_nat.conf

 

Localnet = 192.168.1.0/255.255.255.0

Externhost = pbx.domain.com (set your external hostname name here)

Externrefresh = 10

Fromdomain = domain.com (set your external domain name here)

Nat = Yes

Qualify = Yes

Canreinvite = No

 

CTRL-X to save, 'y' to confirm

 

10. add extra codecs to config:

 

Nano/etc/asterisk/sip_custom.conf

 

Allow = GSM

Allow = h261

Allow = h263

Allow = h263p

Videosupport = Yes

 

CTRL-X to save, 'y' to confirm

 

Nano/etc/asterisk/iax_custom.conf

 

Allow = GSM

Allow = h261

Allow = h263

Allow = h263p

Videosupport = Yes

 

CTRL-X to save, 'y' to confirm

 

Asterisk-Rx reload

 

11. Edit voicemail config:

 

Nano/etc/amportal. conf

 

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

 

Ampwebaddress = pbx.domain.com (set your external hostname name here)

 

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

 

Ampwebaddress = internal.hostname.domain.com (set your internal hostname name here)

 

CTRL-X to save, 'y' to confirm

 

Or if your users will not have access to the Web interface:

 

Nano/etc/asterisk/vm_email.inc

 

Remove "visit http: // ampwebaddress/cgi-bin/vmail. cgi? Action = login & mailbox =$ {vm_mailbox} to check your voicemail with a web browser./N"

 

CTRL-X to save, 'y' to confirm

 

Nano/etc/asterisk/vm_general.inc

 

Serveremail = pbx@DOMAIN.com; who the E-mail Notification shoshould appear to come from

Fromstring = domain PBX; Real Name of email sender

 

CTRL-X to save, 'y' to confirm

 

12. Fix MOH directory:

 

Ln-S/var/lib/asterisk/MOH/var/lib/asterisk/mohmp3

 

Asterisk-Rx reload

 

14. open browser

Http: // ipaddressofpbx

Done!

 

 

Optional package:

 

Confcontrol is a partial rewrite of web-meetme which controls des only the conference control page and not all the scheduling options. it includes des a replacement index.html page which adds a link to confcontrol from the freepbx home page.

 

CD/var/www/html

Wget

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

Tar zxvf confcontrol1.0.tar.gz

Rm confcontrol1.0.tar.gz

Related content
  • Installation

If you have any steps that you do not understand or do not know, MSN contact me: yuzg@centware.cn (can also mail)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.