freepbx 安装和配置
首先参见 asterisk manager api 的配置,然后根据freepbx的官方文档:
http://wiki.freepbx.org/display/HTGS/Installing+FreePBX+12+on+Ubuntu+Server+14.10
http://wiki.freepbx.org/display/L1/amportal+commands#amportalcommands-Chown
Initial System Setup
When installing the machine, at package selection make sure you pick - at least - OpenSSH Server, and LAMP Server. You may install others, if wanted.
Configure your root password.
sudo passwd root |
Switch to the Root User
sudo -i |
Update Your System
apt-get update && sudo apt-get upgrade -y |
Install Required Dependencies
apt-get install -y build-essential linux-headers-` uname -r` openssh-server apache2 mysql-server\ mysql-client bison flex php5 php5-curl php5-cli php5-mysql php-pear php-db php5-gd curl sox\ libncurses5-dev libssl-dev libmysqlclient-dev mpg123 libxml2-dev libnewt-dev sqlite3\ libsqlite3-dev pkg-config automake libtool autoconf git subversion unixodbc-dev uuid uuid-dev\ libasound2-dev libogg-dev libvorbis-dev libcurl4-openssl-dev libical-dev libneon27-dev libsrtp0-dev\ libspandsp-dev libiksemel-dev libiksemel-utils libiksemel3 |
Reboot server
This is to ensure you're running the kernel version that you're going to be building your kernel modules against. You may skip this step if you're sure your running kernel is the latest.
reboot |
Install PearDB
pear uninstall db pear install db-1.7.14 |
Install and Configure Asterisk
Download Asterisk source files.
cd /usr/src 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-13-current . tar .gz git clone https: //github .com /akheron/jansson .git wget http: //www .pjsip.org /release/2 .2.1 /pjproject-2 .2.1. tar .bz2 |
Compile and install DAHDI and LibPRI
If you don't have any physical hardware you don't need to run these commands, however, it is still suggested to compile the modules, to allow you to add hardware later.
cd /usr/src tar xvfz dahdi-linux-complete-current. tar .gz tar xvfz libpri-1.4-current. tar .gz rm -f dahdi-linux-complete-current. tar .gz libpri-1.4-current. tar .gz cd dahdi-linux-complete-* make all make install make config cd /usr/src/libpri-1 .4.* make make install |
Compile and install pjproject
cd /usr/src tar -xjvf pjproject-2.2.1. tar .bz2 cd pjproject-2.2.1 CFLAGS= '-DPJ_HAS_IPV6=1' . /configure --prefix= /usr -- enable -shared --disable-sound\ --disable-resample --disable-video --disable-opencore-amr make dep make make install |
Compile and Install jansson
cd /usr/src/jansson autoreconf -i . /configure make make install |
Compile and install Asterisk
cd /usr/src tar xvfz asterisk-13-current. tar .gz rm -f asterisk-13-current. tar .gz cd asterisk-* . /configure contrib /scripts/get_mp3_source .sh make menuselect |
You will be prompted at the point to pick which modules to build. Most of them will be enabled, but if you want to have MP3 support, you need to manually turn on 'format_mp3' on the first page.
After selecting 'Save & Exit' you can then continue
make make install make config ldconfig |
Install Asterisk-Extra-Sounds
Note that this installs the (8khz) 'wav' soundfiles and G722 (High Definition 'Wideband') audio.
mkdir -p /var/lib/asterisk/sounds cd /var/lib/asterisk/sounds wget http: //downloads .asterisk.org /pub/telephony/sounds/asterisk-extra-sounds-en-wav-current . tar .gz tar xfz asterisk-extra-sounds-en-wav-current. tar .gz rm -f asterisk-extra-sounds-en-wav-current. tar .gz # Wideband Audio download wget http: //downloads .asterisk.org /pub/telephony/sounds/asterisk-extra-sounds-en-g722-current . tar .gz tar xfz asterisk-extra-sounds-en-g722-current. tar .gz rm -f asterisk-extra-sounds-en-g722-current. tar .gz |
Install and Configure FreePBX
Download and extract FreePBX.
wget http: //mirror .freepbx.org /modules/packages/freepbx/freepbx-12 .0-latest.tgz tar vxfz freepbx-12-latest.tgz |
Now create the Asterisk user and set ownership permissions.
useradd -m asterisk chown asterisk. /var/run/asterisk chown -R asterisk. /etc/asterisk chown -R asterisk. /var/ {lib,log,spool} /asterisk chown -R asterisk. /usr/lib/asterisk rm -rf /var/www/html |
A few small modifications to Apache.
sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php5/apache2/php .ini cp /etc/apache2/apache2 .conf /etc/apache2/apache2 .conf_orig sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/apache2/apache2 .conf service apache2 restart |
Prepare MySQL
You now need to generate a secure password for FreePBX to use to talk to MySQL.
export ASTERISK_DB_PW=` dd if = /dev/urandom bs=1 count=32 2> /dev/null | base64 - | cut -c2-18` |
That will generate a quasi-random 16 character long password, which should be secure enough for most things. If you had set the MySQL 'root' password to be something when you were installing the machine, you will need to add a -pyourpassword flag to the following lines
Configure Asterisk database in MYSQL.
mysqladmin -u root create asterisk mysqladmin -u root create asteriskcdrdb |
Set permissions on MYSQL database.
mysql -u root -e "GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY '${ASTERISK_DB_PW}';" mysql -u root -e "GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY '${ASTERISK_DB_PW}';" mysql -u root -e "flush privileges;" |
Restart Asterisk and install FreePBX.
. /start_asterisk start . /install_amp --installdb --username=asteriskuser --password=${ASTERISK_DB_PW} amportal chown amportal a ma installall amportal a reload amportal a ma refreshsignatures amportal chown |
Finally, one last mod and start FreePBX.
ln -s /var/lib/asterisk/moh /var/lib/asterisk/mohmp3 amportal restart |
Start FreePBX
Navigate:
Now FreePBX is installed, it will be available via Apache. Open up your web browser and visit:
http://Address.Of.FreePBX.Server/admin
freepbx 安装和配置的更多相关文章
- Asterisk 安装与配置
如果用来管理 1.4 版本的 Asterisk ,可能会存在未知的问题.通过集成 CentOS . Asterisk 和 FreePBX , Fonality 公司提供了一个完全傻瓜式的 Asteri ...
- JDK安装与配置
JDK安装与配置 一.下载 JDK是ORACLE提供免费下载使用的,官网地址:https://www.oracle.com/index.html 一般选择Java SE版本即可,企业版的选择Java ...
- Node.js 教程 01 - 简介、安装及配置
系列目录: Node.js 教程 01 - 简介.安装及配置 Node.js 教程 02 - 经典的Hello World Node.js 教程 03 - 创建HTTP服务器 Node.js 教程 0 ...
- 烂泥:redis3.2.3安装与配置
本文由ilanniweb提供友情赞助,首发于烂泥行天下 想要获得更多的文章,可以关注我的微信ilanniweb 前一段时间写过一篇codis集群的文章,写那篇文章主要是因为当时的项目不支持redis自 ...
- mysql源码包手动安装、配置以及测试(亲测可行)
笔记编者:小波/qq463431476博客首页:http://www.cnblogs.com/xiaobo-Linux/ 记下这篇mysql笔记,望日后有用! redhat6采用centos yum源 ...
- 环境搭建系列-系统安装之centos 6.5安装与配置
按照国际惯例,系列目录先奉上: 系列一:系统安装之centos 6.5安装与配置 系列二:准备工作之Java环境安装 系列三:数据为先之MySQL读写集群搭建 系列四:谈分布式之RabbitMQ集群搭 ...
- ZooKeeper安装与配置
一. 单机安装.配置: 1. 下载zookeeper二进制安装包下载地址:http://apache.dataguru.cn/zookeeper/zookeeper-3.4.3/zookeeper-3 ...
- mac 下JDK 与 tomcat 的安装与配置
一.Mac下JDK的安装 1.先检测Mac是否已经安装过JDK,在终端中输入java 或者 javac 显示说明,表明已经安装过JDK,JDK版本查询终端键入java -version,终端会返回JD ...
- 烂泥:zabbix3.0安装与配置
本文由ilanniweb提供友情赞助,首发于烂泥行天下 想要获得更多的文章,可以关注我的微信ilanniweb 这个月又快过完了,最近也比较忙,没时间写文章,今天挤点时间把zabbix3.0安装与配置 ...
随机推荐
- objective-c中字符串长度计算
我们知道,在c语言中,使用sizeof ()计算在内存中占用的字节数, 引用string.h后,使用strlen()计算字符串的长度(不包含\0). 而在object-c中, "length ...
- _BLOCK_TYPE_IS_VALID 问题解析及处理
直接原因: 释放内存时,内存已经被修改或释放. 产生可能: 1.内存越界操作,踩了待释放指针头信息. 2.重复释放指针. 处理: 采用排除法,逐步屏蔽掉一些代码,当屏蔽某些代码时,不抛此异常,说明问题 ...
- mouseover和mouseout事件在鼠标经过子元素时也会触发
JavaScript的mouseover和mouseout事件,在绑定元素内部有子元素的情况下, 经过绑定元素时会多次触发mouseover和mouseout事件. jQuery解决办法: jquer ...
- 利用XPath解析带有xmlns的XML文件
在.net中,编写读取xml 的程序中提示"未将对象引用设置到对象的实例",当时一看觉得有点奇怪.为什么在读取xml数据的时候也要实例化一个对象.google了才知道,xml文件中 ...
- PHP开发APP接口---返回数据的封装类
参考视频http://www.imooc.com/learn/163 <?php /** * app返回数据类 * 1.接受多维,缺少键名的数组, * 2.可由输入的format参数决定返回数据 ...
- yii2源码学习笔记(八)
Action是所有控制器的基类,接下来了解一下它的源码.yii2\base\Action.php <?php /** * @link http://www.yiiframework.com/ * ...
- php约瑟夫环
<?php function popChar($str , $m , $current = 0){ $number = count($str); $num = 1; if(count($str) ...
- thinkphp使用问题
下面总结一些,我在使用中遇到的问题,以后遇到了再补充 一.<a>标签的跳转问题 问题:我在控制器Home/Index/index里面使用了Public里面的index.html模板,ind ...
- JavaScript 自定义单元测试
<!doctype html> <html> <head> <meta charset="utf-8"> <script> ...
- Sevlet局部变量初始化
//java 代码部分package com.servlet; import java.io.IOException; import java.io.PrintWriter; import java. ...