深圳市宝安区华美居

0086-18665301040

如何在Debian-9 安装FreePBX-15实现阿里云/本地安装

如何在Debian-9 安装FreePBX-15实现阿里云/本地安装

备受瞩目的Asterisk-16 已经发布,同时FreePBX在圣诞节前也支持了Debian-9 操作系统。我们为大家介绍一下如何在Debian-9 环境下安装FreePBX-15。支持阿里云和本地安装方式。安装FreePBX-15 需要经过以下几个步骤:

配置Debian 环境,保证用户访问权限。大家知道,在debian环境下,用户需要以root权限运行。因此,需要打开SSH端口,同时配置root 用户权限。

如何在Debian-9 安装FreePBX-15实现阿里云/本地安装

设置root权限设置:

sed-i's/#PermitRootLogin prohibit-password/PermitRootLogin yes/'/etc/ssh/sshd_config
service sshd restart

更新系统文件:

apt-get update && apt-get upgrade -y

安装系统依赖包:

apt-getinstall-y build-essential linux-headers-`uname-r` openssh-server apache2 mariadb-server
mariadb-client bison flex php php-curl php-cli php-pdo php-mysql php-pear php-gd curl sox
libncurses5-dev libssl-dev mpg123 libxml2-dev libnewt-dev sqlite3
libsqlite3-dev pkg-config automake libtool autoconf git unixodbc-dev uuid uuid-dev
libasound2-dev libogg-dev libvorbis-dev libicu-dev libcurl4-openssl-dev libical-dev libneon27-dev libsrtp0-dev
libspandsp-devsudosubversion libtool-bin python-dev unixodbc dirmngr php-mbstring sendmail

安装node.js

curl -sL https://deb.nodesource.com/setup_11.x |sudo-Ebash-
sudoapt-getinstall-y nodejs

然后reboot 服务器。

安装系统的支持包:

cd/usr/src/
wget https://downloads.mariadb.com/Connectors/odbc/connector-odbc-3.0.7/mariadb-connector-odbc-3.0.7-ga-debian-x86_64.tar.gz
tarvxfzmariadb-connector-odbc-3.0.7-ga-debian-x86_64.tar.gz
cplib/libmaodbc.so/usr/lib/libmaodbc.so

安装 pear 支持包:

pearinstallConsole_Getopt

下载安装Asterisk-16

cd/usr/src
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-16-current.tar.gz

下载安装Dahdi 支持语音板卡,如果没有语音板卡可以忽略此步骤:

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-current.tar.gz

如果无语音板卡,可以忽略。下载支持包以后,开始一步步编译相关软件包:

cd/usr/src
tarxvfz dahdi-linux-complete-current.tar.gz
rm-f dahdi-linux-complete-current.tar.gz
cddahdi-linux-complete-*
makeall
makeinstall
makeconfig
cd/usr/src
tarxvfz libpri-current.tar.gz
rm-f libpri-current.tar.gz
cdlibpri-*
make
makeinstall

编译Asterisk-16,可以选择其他的CORE-SOUNDS and EXTRA-SOUNDS,但是FreePBX无需这些语音包。

cd/usr/src
tarxvfz asterisk-16-current.tar.gz
rm-f asterisk-16-current.tar.gz
cdasterisk-*
contrib/scripts/get_mp3_source.sh
contrib/scripts/install_prereqinstall
./configure--with-pjproject-bundled --with-jansson-bundled
makemenuselect.makeopts
menuselect/menuselect--enableapp_macro --enableformat_mp3menuselect.makeopts
make
makeinstall
makeconfig
ldconfig
update-rc.d -f asterisk remove

安装配置FreePBX,创建用户访问权限:

useradd-m asterisk
chownasterisk./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

修改Apache配置:

sed-i's/(^upload_max_filesize = ).*/120M/'/etc/php/7.0/apache2/php.ini
cp/etc/apache2/apache2.conf/etc/apache2/apache2.conf_orig
sed-i's/^(User|Group).*/1 asterisk/'/etc/apache2/apache2.conf
sed-i's/AllowOverride None/AllowOverride All/'/etc/apache2/apache2.conf
service apache2 restart

配置ODBC 数据库连接:

cat<<EOF >/etc/odbcinst.ini
[MySQL]
Description = ODBCforMySQL (MariaDB)
Driver =/usr/lib/libmaodbc.so
FileUsage = 1
EOF
cat<<EOF >/etc/odbc.ini
[MySQL-asteriskcdrdb]
Description = MySQL connection to'asteriskcdrdb'database
Driver = MySQL
Server = localhost
Database = asteriskcdrdb
Port = 3306
Socket =/var/run/mysqld/mysqld.sock
Option = 3
EOF

下载安装FreePBX:

cd/usr/src
wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-15.0-latest.tgz
tarvxfzfreepbx-15.0-latest.tgz
rm-ffreepbx-15.0-latest.tgz
cdfreepbx
touch/etc/asterisk/{modules,ari,statsd}.conf
./start_asteriskstart
./install-n

重新启动Apache:

a2enmod rewrite
service apache2 restart

安装后就可以访问相应的FreePBX界面来进行具体的IPPBX配置。此文档支持阿里云安装方式,也可以实现本地安装。

联系电话-18665301040
客服-3
客服-2
客服-1