3. 重新启动asterisk以加载freeiris设置后的信息
> asterisk -r
cli> restart now
4. 测试freeiris是否安装正确
> cd /usr/local/freeiris/bin/
> ./freeirisd verbose
[WEEK MON DAY HH:MM:SS YYYY] STARTUP ONCE /usr/local/freeiris/bin/freeirisbill.pl &
[WEEK MON DAY HH:MM:SS YYYY] STARTUP DAEMON /usr/local/freeiris/bin/freeirisaamp.pl &
> (ctrl+c) (终止当前进程)
5. 测试web是否工作
> /etc/init.d/httpd restart
> 通过浏览器访问 http://yourhost/freeiris/
6. 重新启动系统
7. 安装完毕
请执行reboot重新启动机器,如果启动完成后,访问地址:http://your ip/freeiris/可以见到登入页表示安装设置成功。本人安装是CentOS 5.2,建议安装英文版,因为做服务器你要用到SSH管理,putty不支持中文。
第一步:安装Asterisk
1、检查系统内核版本
# uname -a
显示:Linux localhost.localdomain 2.6.18-92.el5xen #1 SMP Tue Jun 10 19:55:54 EDT 2008 i686 i686 i386 GNU/Linux
2、检查是否已经安装kernel-devel
显示:kernel-devel-2.6.18-92.1.10.el5,表示已经安装。如果没有安装,要用yum安装一下,
# yum install kernel-devel
我的系统安装完成后就安装完了。
3、检查是否已经安装以下的辅助软件包
# rpm -q bison
# rpm -q bison-devel
# rpm -q ncurses
# rpm -q ncurses-devel
# rpm -q zlib
# rpm -q zlib-devel
# rpm -q openssl
# rpm -q openssl-devel
# rpm -q gnutls-devel
# rpm -q gcc
# rpm -q gcc-c++
# rpm -q mysql-devel
4、如果没有安装则用yum安装
# yum install bison
# yum install bison-devel
# yum install ncurses
# yum install ncurses-devel
# yum install zlib
# yum install zlib-devel
# yum install openssl
# yum install openssl-devel
# yum install gnutls-devel
# yum install gcc
# yum install gcc-c++
# yum install mysql-devel
5、下载libpri,zaptel,asterisk,asterisk-addions,asterisk-sound软件包
http://ftp.digium.com/pub/libpri/releases/libpri-1.4.7.tar.gz
http://ftp.digium.com/pub/zaptel/releases/zaptel-1.4.12.1.tar.gz (zaptel-1.4.11有bug,需要修改,所以下了1.4.12.1)
http://ftp.digium.com/pub/asterisk/releases/asterisk-1.4.22.tar.gz
http://ftp.digium.com/pub/asterisk/releases/asterisk-addons-1.4.7.tar.gz
http://ftp.digium.com/pub/asterisk/releases/asterisk-sounds-1.2.1.tar.gz
将下载的软件包放到自定义的目录下
我一般放在/home/softwarepacket目录下,在/opt/softwarepacket目录下直接wget上述地址即可下载。
6、解压缩软件包
# cd /home/softwarepacket
# tar -xvzf libpri-1.4.7.tar.gz
# tar -xvzf zaptel-1.4.12.1.tar.gz
# tar -xvzf asterisk-1.4.22.tar.gz
# tar -xvzf asterisk-addons-1.4.7.tar.gz
# tar -xvzf asterisk-sounds-1.2.1.tar.gz
7、安装zaptel
# cd zaptel-1.4.12.1
# ./configure
# make -----(make is OK, make26 seems to be useless for recent zaptel versions)
# make install
# make config ------(to add zaptel startup script /etc/init.d/zaptel)
8、安装libpri
# cd ..
# cd libpri-1.4.7
# make
# make install
9、安装asterisk
# cd ..
# cd asterisk-1.4.22
# ./configure
# make
# make install
# make samples
测试一下asterisk是否安装成功,可以执行asterisk的主命令
启动asterisk
# asterisk
# asterisk -r 或 asterisk -vvvvvvvvc
如果这个时候提示cli> 表示已经成功
# cli> stop now
退出asterisk
配置自动启动
# make config
10、安装asterisk-addons
请注意这个步骤需要使用Root身份并且需要你机器已经安装好编译调试工具.另外,这个步骤需要机器已经安装有mysqlclient库,这个库在centos 5.2 系统选择mysql的情况下是默认不安装的,需要yum install mysql-devel
# cd ..
# cd asterisk-addons-1.4.7
# ./configure
# make
# make install
# make samples
11、安装asterisk-sounds
# cd ..
# cd asterisk-sounds-1.2.1
# make install
至此,asterisk安装完毕了,但是还没有安装其他管理工具,现在一般用户还使用不起来。
下面要安装管理工具,安装那种,要看系统要做什么使用了,我的系统是双至强的,外加4e1的tor2卡,自然不是做ippbx的了
第二步:安装 Asterisk web 管理工具 FreeIris
1、启动mysql
# /etc/rc.d/init.d/mysqld start
# 进入mysql
mysql>
我的mysql用户名与密码为:root,123456
新建一个数据库
mysql> create database freeiris;
mysql> quit;
2、下载FreeIris包
FreeIris是一个开源软件
3、安装FreeIris
安装FreeIris前,先要保证Asterisk是运行的
# asterisk
# cd /home/softwarepacket
# tar xvzf freeiris1-1.0.156-stable.tar.gz
# cd freeiris1-1.0.156-stable
# ./setup
Welcome to FreeIris install script 2.0
hoowa.sun<[email protected]>
----------------------------------------------------------
WARNING:
Freeiris is is free Open Source software.
IT COMES WITHOUT WARRANTY OF ANY KIND.
----------------------------------------------------------
[INPUT] Do you agree with License(in COPYING file) (yes/no)?
系统提示您是否接受license,如果不接受就不能安装,请仔细阅读COPYING.确定输入yes
> yes
[STEP] Getting information...
[RESPONSE] Operation System : linux
[RESPONSE] Publish Version : CentOS
[RESPONSE] Linux Kernel : 2.6.18-92.1.10.el5
[RESPONSE] asterisk.conf : /etc/asterisk/asterisk.conf
[RESPONSE] mysql client command : /usr/bin/mysql
[INPUT] Please input install target folder (default /usr/local/freeiris)?
> (默认回车)
[RESPONSE] freeiris target : /usr/local/freeiris
[INPUT] 0. bundled perl
1. customize
Please choose Perl intepreter (default 0)?
> (默认回车) (如果是freebsd系统无法使用捆绑的perl)
[RESPONSE] perl intepreter : (bundled)
[INPUT] Your httpd.conf file at /etc/httpd/conf (yes/no/cancel) (default yes)?
> 输入httpd文件所在的地址,如果是centos并且已经默认安装了httpd就请: (默认回车)
[INPUT] Please input Mysql address (default 127.0.0.1)?
> (默认回车)
[INPUT] Please input Mysql port (default 3306)?
> (默认回车)
[INPUT] Please input Mysql databasename ?freeiris
> (默认回车)
[INPUT] Please input Mysql username ?root
> (默认回车)
[INPUT] Please input Mysql passwd ?123456
> (默认回车)
[RESPONSE] Try to Connect MySQL Server......
[RESPONSE] Connect MySQL Server successfully !......
0 simpchinese
1 english
[INPUT] Please Input NUM of Web Display Language(default 0):
> 0 (显示语言,0中文,1英文)
[RESPONSE]
-----------------------------------------------------------------
Your Configuration :
OS : linux
Publish : CentOS
OS Kernel : 2.6.18-92.1.10.el5
Asterisk config : /etc/asterisk
mysql command line : /usr/bin/mysql
install prefix : /usr/local/freeiris
perl intepreter :
httpd conf : /etc/httpd/conf
mysql db host : 127.0.0.1
mysql db user : root
mysql db pass : (*)
mysql db name : freeiris
mysql db port : 3306
website language : simpchinese
-----------------------------------------------------------------
Continue Will copying all files to your computer(yes/no)
> 以上信息正确继续安装yes
[STEP] Copying files to /usr/local/freeiris...
[RESPONSE] Creating folder /usr/local/freeiris
[RESPONSE] Copying files to /usr/local/freeiris/
[STEP] Setup freeiris...
[RESPONSE] Softlink /usr/local/freeiris/etc/freeiris to /etc/freeiris
[RESPONSE] Softlink /usr/local/freeiris/agi/*.agi to /var/lib/asterisk/agi-bin/*.agi
[RESPONSE] Softlink /usr/local/freeiris/sounds/freeiris to /var/lib/asterisk/sounds/freeiris
[RESPONSE] Overwrite /usr/local/freeiris/etc/voipconf.dist/* to /etc/asterisk/
[RESPONSE] Setting Permission to all config files...
[STEP] database configuration...
[RESPONSE] Auto Create tables......
[RESPONSE] saving database config to freeiris and asterisk !......
[STEP] setting language enviroment...
[RESPONSE] current web display language is english
[STEP] saving freeirisd services...
[RESPONSE] Install Freeiris Stuff Daemon Services into Init.d
[STEP] Install completed!
------------------------------------------------------------------
Installed freeiris to :
Installed bundled perl to : /usr/local/freeiris/perl/
maked link to : /etc/freeiris
maked link to : your asterisk agi-bin / *.agi
maked link to : your asterisk sounds / freeiris
overwrite your asterisk config files
chmod target files permission
initializtion mysql database
Installed freeirisd.sh to chkconfig and 345 on
------------------------------------------------------------------
-----------------------------------------------
- -
- Freeiris Opensource Telephony Project -
- -
- Installed on your system! -
- -
- admin panel : -
- http://yourhost/freeiris/adminp.do -
- default user : admin -
- default password : admin -
- -
- you many need to reboot!!! -
- -
- -
- -
- -
- Freeiris Development Team. hoowa sun -
- -
- www.freeiris.org -
- -
-----------------------------------------------
> 复制完成
4、 重新启动asterisk以加载freeiris设置后的信息
> asterisk -r
cli> restart now
5、 测试freeiris是否安装正确
> cd /usr/local/freeiris/bin/
> ./freeirisd verbose
[WEEK MON DAY HH:MM:SS YYYY] STARTUP ONCE /usr/local/freeiris/bin/freeirisbill.pl &
[WEEK MON DAY HH:MM:SS YYYY] STARTUP DAEMON /usr/local/freeiris/bin/freeirisaamp.pl &
> (ctrl+c) (终止当前进程)
6、 测试web是否工作
> /etc/init.d/httpd restart
> 通过浏览器访问 http://127.0.0.1/freeiris/
7. 重新启动系统
8. 安装完毕
请执行reboot重新启动机器,如果启动完成后,访问地址:http://127.0.0.1/freeiris/可以见到登入页表示安装设置成功。