红联Linux门户
Linux帮助

Ubuntu:编译安装Asterisk

发布时间:2016-06-22 10:48:50来源:topspeedsnail.com作者:斗大的熊猫

这里记录了编译安装Asterisk的步骤。


更新软件包列表:

$ sudo apt-get update


安装linux-headers:

$ sudo apt-get install linux-headers-$(uname -r)


安装编译环境及依赖库:

$ sudo apt-get install build-essential wget libssl-dev libncurses5-dev libnewt-dev libxml2-dev libsqlite3-dev uuid-dev


下载Asterisk源代码:

$ cd

$ wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
$ wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4-current.tar.gz
$ wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz

去下载url获得最新源码包。


解压下载的安装包:

$ tar zxvf dahdi-linux-complete*
$ tar zxvf libpri*
$ tar zxvf asterisk*


编译dahdi-linux-complete:

$ cd
$ cd dahdi-linux-complete*
$ make
$ sudo make install
$ sudo make config


编译libpri:

$ cd
$ cd libpri*
$ make
$ sudo make install


编译asterisk:

$ cd
$ cd asterisk*
$ ./configure
$ make menuselect


选择你要编译的模块:

Ubuntu:编译安装Asterisk

$ make
$ sudo make install
$ sudo make config
$ sudo make samples


启动asterisk:

$ sudo /etc/init.d/dahdi start

$ sudo /etc/init.d/asterisk start

$ asterisk -rvvv


本文永久更新地址:http://www.linuxdiyf.com/linux/21740.html