这里记录了编译安装Asterisk的步骤。
更新软件包列表:
1 |
$ sudo apt-get update |
安装linux-headers:
1 |
$ sudo apt-get install linux-headers-$(uname -r) |
安装编译环境及依赖库:
1 |
$ sudo apt-get install build-essential wget libssl-dev libncurses5-dev libnewt-dev libxml2-dev libsqlite3-dev uuid-dev |
下载Asterisk源代码:
1 |
$ cd |
1 2 3 |
$ 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获得最新源码包。
解压下载的安装包:
1 2 3 |
$ tar zxvf dahdi-linux-complete* $ tar zxvf libpri* $ tar zxvf asterisk* |
编译dahdi-linux-complete:
1 2 3 4 5 |
$ cd $ cd dahdi-linux-complete* $ make $ sudo make install $ sudo make config |
编译libpri:
1 2 3 4 |
$ cd $ cd libpri* $ make $ sudo make install |
编译asterisk:
1 2 3 4 |
$ cd $ cd asterisk* $ ./configure $ make menuselect |
选择你要编译的模块:
1 2 3 4 |
$ make $ sudo make install $ sudo make config $ sudo make samples |
启动asterisk:
1 |
$ sudo /etc/init.d/dahdi start |
1 |
$ sudo /etc/init.d/asterisk start |
1 |
$ asterisk -rvvv |