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安装与配置 ...
随机推荐
- c语言_链表实例讲解(两个经典例子)
建立一个学生成绩的线性链表,对其实现插入,删除,输出,最后销毁. demo1 // lianbiao.cpp : Defines the entry point for the console app ...
- SQL-Server索引漫谈
http://www.cnblogs.com/teroy/archive/2013/05/23/3070547.html
- SQL使用存儲過程訪問不同服務器
用openrowset连接远程SQL或插入数据 --如果只是临时访问,可以直接用openrowset --查询示例 select * from openrowset('SQLOLEDB', 'sql服 ...
- sqlserver2008安装出现跨语言
我在安装sqlserver2008的时候出现了一个问题,安装到一半的时候出现 跨语言安装失败 ,我细细的查了下问题,我装的安装语言绝对没有错的吧,然后我后退几步又是同样的错误,最后我把镜像重新加载到虚 ...
- NSAttributedString用法
以前看到这种字号和颜色不一样的字符串,想出个讨巧的办法就是“¥150”一个UILabel,“元/位”一个UILabel.今天翻看以前的工程,command点进UITextField中看到[attrib ...
- html-----001
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- 转载:Python正则表达式
原文在 http://www.cnblogs.com/huxi/archive/2010/07/04/1771073.html 1. 正则表达式基础 1.1. 简单介绍 正则表达式并不是Python ...
- 【实习记】2014-08-15文档太少看着源码用cgicc+stl库之模板谓词函数对象
总结1: 今天找到了昨天scanf的问题答案,scanf与printf一样的神奇而复杂,稍不留神,就会被坑.scanf函数在读入非空白符分割的多个字符串的解决方法是这个:/* 以 | 分割 * ...
- mysql5.7下载与安装,php5.6与mysql5.7整合
Part1 mysql5.7下载 百度“mysql下载”,打开官网 2. 在页面右上角点击,注册/登录 3. 登录后显示下载页面,选择windows 4. 然后选择MySQL Installer ...
- Activity启动过程简要介绍
无论是通过点击应用程序图标来启动Activity,还是通过Activity内部调用startActivity接口来启动新的Activity,都要借助于应用程序框架层的ActivityManagerSe ...