CentOS 5.3上Asterisk安装及配置

[Asterisk安装及配置]

以下没有特殊注明,所有操作都是在命令行中

[前期准备]安装依赖软件和环境

yum –y upgrade                   (更新软件列表和部分软件)

yum –y update                            (升级现有软件)

yum install kernel-devel         (安装devel版的内核,asterisk安装需要)

yum install kernel-PAE-devel  (IntelCPU的服务器上超过4G内存是需要用到)

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 newt-devel

yum install curl

yum install curl-devel

yum install mysql-devel

以上软件的安装可以用以下命令一起安装

yum –y install kernel-devel kernel-PAE-devel bison bison-devel ncurses ncurses-devel zlib zlib-devel openssl openssl-devel gnutls-devel gcc gcc-c++ newt-devel curl curl-devel mysql-devel

reboot            安装完这些软件需要重启一下

[准备所需软件]

Asterisk 1.4.26.2

Dahdi-linux-complete-2.2.0.2+2.2.0            (包含dahdi-linux 2.2.0.2和dahdi-tools 2.2.0)

Libpri 1.4.10.1

Asterisk-addons 1.4.9

asterisk-sounds 1.2.1

[安装过程]

tar -xvzf libpri-1.4.10.1.tar.gz

tar -xvzf dahdi-linux-complete-current.tar.gz

tar -xvzf asterisk-1.4.26.2.tar.gz

tar -xvzf asterisk-addons-1.4.9.tar.gz

tar -xvzf asterisk-sounds-1.2.1.tar.gz

cd libpri-1.4.10.1

make && make install

cd ../dahdi-linux-complete-2.2.0.2+2.2.0

make all

make install

make config

cd ../asterisk-1.4.26.2

./configure

make menuselect    (编译选项选择)

make && make install

make samples

make config

cd ../asterisk-addons-1.4.9

cd cdr

修改cdr_addon_mysql.c,具体操作如下

输入命令”vi cdr_addon_mysql.c”

移动光标到开头的一个空白行,按下键”i”

输入”#define MYSQL_LOGUNIQUEID”

按”esc”键,输入”:wq”回车

cd ..

./configure

make menuselect

make && make install

make samples

cd ../asterisk-sounds-1.2.1

make && make install

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://127.0.0.1/wyyfxp.html