centOS 5.5 下安装asterisk

一、安装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

# rpm -q kernel-devel

例如:kernel-devel-2.6.18-92.1.10.el5,表示已经安装,如果没有安装,要用yum安装一下,

如下 yum install kernel-devel

 

3.检查是否已经安装以下的辅助软件包

rpm -q bison bison-devel ncurses ncurses-devel zlib zlib-devel openssl openssl-devel gnutls-devel gcc gcc-c++ mysql-devel

最少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++

 

5.其他依赖软件安装

Software dependencies for Asterisk on Ubuntu Server and CentOS Server

Ubento:

Sudo apt-get install build-essential subversion libncurses5-dev libssl-dev libxml2-dev vim-nox

CentOS

Sudo yum install gcc gcc-c++ make wget subversion libxml2-devel ncurses-devel openssl-devel vim-enhanced

 

二、从网上下载asterisk源代码

先创建文件夹存放文件

$ mkdir -p ~/src/asterisk-complete/asterisk

两种方法下载源代码

Svn:

$ cd ~/src/asterisk-complete/asterisk

$ svn co http://svn.asterisk.org/svn/asterisk/branches/1.8

Wget:

$ cd ~/src/asterisk-complete/asterisk

$ wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.8-current.tar.gz

$ tar zxvf asterisk-1.8-current.tar.gz

我使用的是SVN方法

 

三、安装asterisk

1.安装libpri

$ cd ~/src/asterisk-complete/

$ mkdir libpri

$ cd libpri/

$ svn co http://svn.asterisk.org/svn/libpri/tags/1.4.11.5(按照svn上的最新版本填写http://downloads.asterisk.org/pub/telephony/libpri/)

$ cd 1.4.11.5

$ make

$ sudo make install

 

2.安装DAHDI

$ cd ~/src/asterisk-complete/

$ mkdir dahdi

$ cd dahdi/

$ svn co http://svn.asterisk.org/svn/dahdi/linux-complete/tags/2.4.1.2+2.4.1(按照svn上的最新版本填写http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/)

$ cd 2.4.1.2+2.4.1

$ make

$ sudo make install

$ sudo make config

 

3.安装asterisk

$ cd ~/src/asterisk-complete/asterisk/1.8

$ ./configure

$ make

$ sudo make install

$ sudo make config

 

4.安装文档

Make progdocs

 

5.安装示例配置文件

Make samples

 

6.关闭SELinux

$ cd /etc/selinux/

$ sudo vim config

Change the SELINUX option from enforcing to disabled.(SELINUX=disabled)

$ sudo reboot

 

安装完成


你可能感兴趣的:(asterisk安装)