我是靠谱客的博主 呆萌羽毛,最近开发中收集的这篇文章主要介绍同我一起安装dahdi、asterisk的最新版本(转),觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

转自:http://www.asteriskcn.com/index.php?q=content/%E5%90%8C%E6%88%91%E4%B8%80%E8%B5%B7%E5%AE%89%E8%A3%85dahdi%E3%80%81asterisk%E7%9A%84%E6%9C%80%E6%96%B0%E7%89%88%E6%9C%AC

闲话少叙,让我们开始迈出第一步,安装asterisk基本环境:

安装CentOS 5.4 DVD 光盘版,选择costom安装方式,不安装无用的,如果想方便那不选上x-windows .
进到#号下,一般我们选择/usr/src目录进行下载及安装:
cd /usr/src
//进行环境配置:
//更换语言:
vi /etc/sysconfig/i18n
//将LANG="zh_CN.UTF-8" 换成 LANG="en_US.UTF-8"
//增加DNS解晰:
vi /etc/resolv.conf
//添加 nameserver 202.97.224.68
//安装YUM环境:
http://www.afuns.cn/index.php?p=36&a=view&r=23
//安装开发环境及编绎环境:
yum -y groupinstall 'Development Tools'
yum -y install libtool*
yum -y install kernel-heads*
yum -y install ncurses-dev*
yum -y install kernel-devel
yum install -y kernel kernel-devel
//安装apache、PHP、MYSQL环境:
yum -y install httpd php mysql mysql-server php-mysql
/sbin/chkconfig httpd on
/sbin/chkconfig --add mysqld
/sbin/chkconfig mysqld on
/sbin/service httpd start
/sbin/service mysqld start
//设置mysql数据库root帐号密码。
mysqladmin -u root password 'newpassword' [引号内填密码]
//让mysql数据库更安全
mysql -u root -p [此时会要求你输入刚刚设置的密码,输入后回车即可]
mysql> DROP DATABASE test; [删除test数据库]
mysql> DELETE FROM mysql.user WHERE user = ''; [删除匿名帐户]
mysql> FLUSH PRIVILEGES; [重载权限]
//安装apache扩展 //安装php的扩展//安装mysql扩展
yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql
yum -y install php-gd
yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc
yum -y install mysql-connector-odbc mysql-devel libdbi-dbd-mysql
//下载最新的ver:1.6版本
wget http://downloads.asterisk.org/pub/telephony/libpri/old/libpri-1.4.10.2.tar.gz
wget http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/asterisk-1.6.2.8-rc1.tar.gz
wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-addons-1.6.2.1.tar.gz
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux/releases/dahdi-linux-2.3.0.tar.gz
wget http://downloads.asterisk.org/pub/telephony/dahdi-tools/releases/dahdi-tools-2.3.0.tar.gz
//安装libpri:
tar zxvf libpri-1.4.10.2.tar.gz
cd libpri-1.4.10.2
make
make install
cd ..
//安装dahdi驱动:
tar zxvf dahdi-linux-2.3.0.tar.gz
cd dahdi-linux-2.3.0
make
make install
cd ..
//安装dahdi-tools工具:
tar zxvf dahdi-tools-2.3.0.tar.gz
cd dahdi-tools-2.3.0
./configure
make
make install
make config
cd ..
//安装asterisk:
tar zxvf asterisk-1.6.2.8-rc1.tar.gz
cd asterisk-1.6.2.8-rc1
./configure
make
make install
make config
make samples
cd ..
//安装asterisk扩展包(H323/mysql支持):
tar zxvf asterisk-addons-1.6.2.1.tar.gz
cd asterisk-addons-1.6.2.1
./configure
make
make install
make samples
至此asterisk的基本环境安装完毕!

另:安装asterisk的yum方式:

Use the text editor of your choice to create a new file named "centos-asterisk.repo" in the "/etc/yum.repos.d" folder. Add the following text to the file:
[asterisk-tested]
name=CentOS-$releasever - Asterisk - Tested
baseurl=http://packages.asterisk.org/centos/$releasever/tested/$basearch/
enabled=0
gpgcheck=0
#gpgkey=http://packages.asterisk.org/RPM-GPG-KEY-Digium
[asterisk-current]
name=CentOS-$releasever - Asterisk - Current
baseurl=http://packages.asterisk.org/centos/$releasever/current/$basearch/
enabled=1
gpgcheck=0
#gpgkey=http://packages.asterisk.org/RPM-GPG-KEY-Digium
Save the new file and create another named "centos-digium.repo" and insert the following text:
[digium-tested]
name=CentOS-$releasever - Digium - Tested
baseurl=http://packages.digium.com/centos/$releasever/tested/$basearch/
enabled=0
gpgcheck=0
#gpgkey=http://packages.digium.com/RPM-GPG-KEY-Digium
[digium-current]
name=CentOS-$releasever - Digium - Current
baseurl=http://packages.digium.com/centos/$releasever/current/$basearch/
enabled=1
gpgcheck=0
#gpgkey=http://packages.digium.com/RPM-GPG-KEY-Digium
At this point your system has been updated to use the Asterisk and Digium repositories in addition to the base CentOS repositories. You are now ready to install Asterisk. To star the installation, execute the following at the Linux command line:
[root@localhost~]# yum install asterisk16 asterisk16-configs asterisk16-voicemail dahdi-linux dahdi-tools libpri
The system will respond with something like:

yum方式安装参考链接:http://www.vpsee.com/2010/02/install-and-configure-asterisk-and-digium-card-on-centos-5/

Powered by Zoundry Raven

最后

以上就是呆萌羽毛为你收集整理的同我一起安装dahdi、asterisk的最新版本(转)的全部内容,希望文章能够帮你解决同我一起安装dahdi、asterisk的最新版本(转)所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(43)

评论列表共有 0 条评论

立即
投稿
返回
顶部