How to install Asterisk 14 and FreePBX 231 in Ubuntu Linux.docx
《How to install Asterisk 14 and FreePBX 231 in Ubuntu Linux.docx》由会员分享,可在线阅读,更多相关《How to install Asterisk 14 and FreePBX 231 in Ubuntu Linux.docx(15页珍藏版)》请在冰豆网上搜索。
HowtoinstallAsterisk14andFreePBX231inUbuntuLinux
HowtoinstallAsterisk1.4andFreePBX2.3.1inUbuntuLinux
1.HowToInstallstepbystepAsteriskinUbuntuServer
1.LinuxVersion:
UbuntuServer
2.LinuxKernel:
2.6.22
3.AsteriskVersion:
AsteriskV.1.4.13
4.FreePBXVersion:
FreePBX2.3.1
1.Linuxfilesystempartitionexample
1./boot100MB
2./var4GB
3./home6GB
4./usr12GB
5./6GB
6.Swap600MB
1.RAMMemory:
512MB
2.CPU:
Intel(R)Pentium(R)4CPU3.06GHz
3.Ethernet:
10/100VT6102Rhine-II
4.FXOCard:
1FXOTigerJetNetworkInc.Tiger3XXModem/ISDNinterface
5.FXScard:
6.Sound:
VT8233/A/8235/8237AC97AudioController
7.Bluetooth:
8.WiFi:
1.OtherDevices:
1.************************************************************************************************
2.************************************************************************************************
3.********************************PackagesInstall
4.************************************************************************************************
5.************************************************************************************************
1.AfterofinstallUbuntuLinuxthefirstthingthatweneedtodoischangetherootpassword
sudopasswdroot
password
1.Editthenextfile/etc/apt/sources.listanduncommentthenextpackagesrepositories
sudoeditor/etc/apt/sources.list
1.uncommentandaftersavetheeditedfile
debdapperuniverse
deb-srcdapperuniverse
1.FirstweneedtoinstallOpenSSHtocommunicatefromotherPCusingSSH.
sudoapt-getinstallopenssllibssl-devssh
1.Afterweneedtoinstallcompilationlibrary
sudoapt-getinstallgccmakeg++
1.ViewwhatkernelversionhasinstalledourUbuntuLinux
uname-a
1.afterofrunthecommandunameIcanseesomethinglikethat
Linux MexRom 2.6.22-14-generic #1 SMP Sun Oct 14 23:
05:
12 GMT 2007 i686 GNU/Linux
1.ThenIneedtosearchtheheaders,imagesandsourcesforkernel
apt-cachesearch2.6.22
1.weneedtoinstalltheheaders,imageandsourcesforthekernel
sudoapt-getinstalllinux-headers-2.6.22-14-genericlinux-image-2.6.22-14-genericlinux-source-2.6.22
1.tooweneedinstallthenextapplicationsnmapispracticetoviewwhatporsthaveopenourlinuxsystmen,lynxtoseeanywebsitefromCLIandemacstofilesedit
sudoapt-getinstallnmaplynxemacs21
1.WewillinstallfestivalbeacuseisveryimportantformakeAGIswithasteriskandanyprogramminglanguage
sudoapt-getinstallfestivalfestival-dev
1.WeneedthenextlibrarytoAsterisk
sudoapt-getinstallncurses-basencurses-binncurses-termlibncurses5libncursesw5libncurses5-devlibncursesw5-dev
1.Tooisnecessarytoinstallthenextlibrary
sudoapt-getinstallzlib1gzlib1g-dev
1.ThislibraryarerequiredbyFreePBX
sudoapt-getinstallbisonbison-doc
1.libraryrequiredforFreePBX
sudoapt-getinstalllibxml2libxml2-dev
1.libraryrequiredforFreePBX
sudoapt-getinstalllibtiff4libtiff4-dev
1.libraryrequiredforFreePBXforaudioprocessing
sudoapt-getinstalllibasound2libgsm1libltdl3libpq4libspeex1libsqlite0libtonezone1libaudiofile0libaudiofile-dev
1.ifyouwillinstallaSangomaCardthenyouwillneedinstallthenext
sudoapt-getinstallflex
1.ThislibraryarenecessarytoAsteriskDocumentationandinstallnewversionsofAsteriskandFreePBX
sudoapt-getinstallsubversioncurldoxygen
1.libraryrequiredforFreePBX
sudoapt-getinstalllibnet-telnet-perlmime-constructlibipc-signal-perllibmime-types-perllibproc-waitstat-perl
1.InstallApachewebservertoaccesfromanycomputertoFreePBXGUI
sudoapt-getinstallapache2
1.PHPLibrarysrequiredforFreePBX
sudoapt-getinstallphp5php5-cliphp5-mysqlphp-pearlibapache2-mod-php5php5-curlphp5-gdphp-db
1.WeneedinstallMySQLDatabaseservertomanagethecdrinformationandasteriskconfigurationfromFreePBX.
sudoapt-getinstallmysql-client-5.0mysql-server-5.0libmysqlclient15-dev
1.AfterofInstallMySQLmaybeweneedmakeanychangesthese
WeneedentertherootpasswordtoMySQLServer
ChangetheinformationofInternetSiteandselectoftypelikethis
localhost.localdomain
1.************************************************************************************************
2.************************************************************************************************
3.********************************AsteriskPackageCompilations****************************
4.************************************************************************************************
5.************************************************************************************************
1.inthissecondstepweneedcreateanewfoldertoputtheasteriskpackagesdownloaded
mkdir~/asterisk
cdasterisk
1.Downloadthenextfilesandsaveinthenewfoldercreated
1.Downloadasterisk-perlthismodulewillallowusprocesstheAsteriskConfiguration
wgethttp:
//www.cpan.org/modules/by-category/25_Bundles/Asterisk/asterisk-perl-0.10.tar.gz
1.Thesefilesarerequirestocontrolthemp3andotheraudiofilessuchasGSM,Ulaw,alawfilesetc.
wgethttp:
//superb-
wget
1.DownloadFreePBXPackagethatisthemainapplicationtoconfigureasteriskfromawebnavigator
wget
1.AsteriskPackages
wget
1.Ifwehaveadigiumcardtoconnectthepstntoourvoipnetworkthenweneeddownloadandinstallthenextpackage
wget
wget
wget
1.voicesinenglishforAsterisk
wget
wget
wget
1.wegothefollowingdirectory
cd/usr/src/
1.wedecompressthelamepackageandwecompileandtoinstall
sudotar-xvzf~/asterisk/lame-3.97.tar.gz
cdlame-3.97
sudo./configure--prefix=/usr--sysconfdir=/etc
sudomake&&sudomakeinstall
1.wedecompresssoxpackageandweinstallthislibrarytoprocessmultimediafiles
cd/usr/src/
sudotar-xzvf~/asterisk/sox-14.0.0.tar.gz
cdsox-14.0.0
sudo ./configure
sudo make
sudo make install
1.WeneedtoinstallAsterisk-PerltoprocesstheAsteriskFileConfiguration
cd/usr/src/
sudotar-xzvf~/asterisk/asterisk-perl-0.10.tar.gz
cdasterisk-perl-0.10
sudoperlMakefile.PL
sudomakeall
sudomakeinstall
1.TodescompressFreePBX
cd/usr/src
sudotar-xzvf~/asterisk/freepbx-2.3.1.tar.gz
cd/usr/src/freepbx-2.3.1
1.BegintoinstallthedatabaseforAsteriskinMySQL
2.FirstWeneedtoaccesstoMySQLCLI,enterthepasswordroot,ifyoudon'thaveconfigurethepasswordrootformysqlthenisveryimportantthatyomakethisstep.
mysql-uroot-p
ENTER
show databases;
use mysql ;
1.Changetherootpasswordifyoudonthavemakeit
update user set password = password("PaSsWoRd") where user = "root";
1.Createtheasteriskuserformysql
grant all privileges on *.* to asterisk@localhost identified by "4st3r1sk";
flush privileges;
exit
1.Entettomysqlusingtheasteriskusercreated
mysql -u asterisk -p
1.createthedatabaseforAsteriskConfigurationandCDRinformation
create database asteriskcdrdb;
create database asterisk;
exit
1.dumpthedatabaseschemathatisinSQLFolderofFreePBXinstallationdirectory
mysql -u asterisk -p asterisk < /usr/src/freepbx-2.3.1/SQL/newinstall.sql
mysql -u asterisk -p asteriskcdrdb < /usr/src/freepbx-2.3.1/SQL/cdr_mysql_table.sql
1.FinishtheMySQLConfiguration
1.CreatetheuserforAsteriskandchangehimpassword
sudogroupaddasterisk
sudouseradd-c"PBXasterisk"-d/var/lib/asterisk-gasteriskasterisk
sudopasswdasterisk
1.CreatethenextdirectorywhereAsteriskwillputthePIDAsteriskRun
sudomkdir/var/run/asterisk
sudochownasterisk:
asterisk/var/run/asterisk
1.AddtheAsteriskuserforApache
sudoemacs/etc/group
www-data:
x:
33:
asterisk
1.pressctrl+xctrl+s,parasalirctr+x,ctr+ctosaveandquit
1.Searchtheapacheconfigurationusingthefindcommand
find/etc/apache2/-typef|xargsgrepGroup
1.Editthenextfile
sudoemacs/etc/apache2/apache2.conf
1.tosearchenEmacspressCtrl+sandenterthetexttosearch
2.ChangedefaultuserforApachebyasteriskuser
User www-data
Group www-data
1.changeby
User asterisk
Group asterisk
1.saverandquit(tosavectrl+xctrl+s,toquitctr+x,ctr+c)
1.executethenextcommandtochangethepermissionsofphplibsessions
sudochown-Rasterisk/var/lib/php5
1.Editthephpfileconfigurationandmodifythefollowingphpproperties
sudo emacs /etc/php5/apache2/php.ini
upload_max_filesize=32M
max_execution_time=120
max_input_time=120
1.createtheAsteriskdirectroryin/usr/src
sudo mkdir /usr/src/asterisk
cd /usr/src/asterisk
1.decompressthelibprilibrary
sudotarzvxf~/asterisk/libpri-1.4.1.tar.gz
1.decompressthezaptellibrary
sudotarzvxf~/asteri