“FreePBX-13 Centos-7 源代码安装”的版本间的差异

来自最权威最新完整开源SIP,语音通信,融合通信中文技术文档资料,提供详细的Asterisk Freepbx, FreeSBC, 免费会话边界控制器,网关,语音板卡,IPPBX,SBC配置资料-asterisk,freepbx,freesbc 用户手册 界面配置,呼叫路由,IVR, 网关对接,拨号规则,SIP 分机呼叫,pjsip, IVR, 录音, CDR, 队列呼叫,振铃组,CLI 命令中文资料手册
跳转至: 导航搜索
 
(未显示同一用户的5个中间版本)
第1行: 第1行:
'''Installing FreePBX 13 on CentOS 7'''
+
'''Centos-7 环境下安装 FreePBX 13 用户使用指南'''
  
'''Initial System Setup'''
+
'''初始化系统设置'''
  
 
用户必须是ROOT 用户权限!
 
用户必须是ROOT 用户权限!
  
用户必须关闭 selinux.  selinux 以免引起其他安装问题
+
用户必须关闭 selinux。 以免引起其他安装问题
  
 
'''Disable selinux'''
 
'''Disable selinux'''
  
In /etc/sysconfig/selinux , change the following lines:
+
/etc/sysconfig/selinux 文件中修改以下几行:
 
+
<pre>
 
sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/sysconfig/selinux
 
sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/sysconfig/selinux
  
 
sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/selinux/config
 
sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/selinux/config
 +
</pre>
  
reboot, and verify the selinux status by running 'sestatus'. It should say:
+
重新启动系统,执行命令 'sestatus',结果应该是:<br/>
  
 
SELinux status: disabled
 
SELinux status: disabled
第25行: 第26行:
 
yum -y groupinstall core base "Development Tools"
 
yum -y groupinstall core base "Development Tools"
  
'''''''''安装其他的支持包和依赖包'''
+
'''安装其他的支持包和依赖包'''
 
+
<pre>
 
yum -y install lynx mariadb-server mariadb php php-mysql php-mbstring tftp-server \
 
yum -y install lynx mariadb-server mariadb php php-mysql php-mbstring tftp-server \
  
第34行: 第35行:
  
 
   cronie-anacron wget vim php-xml uuid-devel sqlite-devel net-tools gnutls-devel php-pear
 
   cronie-anacron wget vim php-xml uuid-devel sqlite-devel net-tools gnutls-devel php-pear
 +
</pre>
  
 
'''Install Legacy Pear requirements'''
 
'''Install Legacy Pear requirements'''
第54行: 第56行:
  
 
systemctl start mariadb
 
systemctl start mariadb
 
Now that our MariaDB database is running, we want to run a simple security script that will remove some dangerous defaults and lock down access to our database system a little bit
 
  
 
mysql_secure_installation
 
mysql_secure_installation
第64行: 第64行:
  
 
FreePBX 使用Apache 服务器,所以页面服务器必须是启动状态。
 
FreePBX 使用Apache 服务器,所以页面服务器必须是启动状态。
 +
<pre>
  
 
systemctl enable <nowiki>httpd.se</nowiki>rvice
 
systemctl enable <nowiki>httpd.se</nowiki>rvice
第111行: 第112行:
 
wget <nowiki>http://www.pjsip.org/release/2.4/pjproject-2.4.tar.bz2</nowiki>
 
wget <nowiki>http://www.pjsip.org/release/2.4/pjproject-2.4.tar.bz2</nowiki>
  
 +
</pre>
 
'''Compile and install DAHDI'''
 
'''Compile and install DAHDI'''
  
第157行: 第159行:
 
make install
 
make install
  
'''Compile and Install jansson'''
+
'''编译安装jansson'''
  
 
cd /usr/src
 
cd /usr/src
第193行: 第195行:
 
make menuselect
 
make menuselect
  
You will be prompted at the point to pick which modules to build. Most of them will already be enabled, but if you want to have MP3 support (eg, for Music on Hold), you need to manually turn on 'format_mp3' on the first page.
+
如果用户需要支持MP3语音格式,安装编译
  
[[image:Picture 1|624x357px|C:\4ab2827d031c397139b24060d5dd4927]]
+
http://wiki.freepbx.org/download/attachments/29753688/ubuntu-14.04-enable-mp3.png
  
After selecting 'Save & Exit' you can then continue
+
选择选项,然后保存,进行执行以下步骤:
  
 
make
 
make
第209行: 第211行:
 
chkconfig asterisk off
 
chkconfig asterisk off
  
'''''''''Install Asterisk Soundfiles.'''
+
'''安装高清语音文件'''
 
+
The 'make install' above installs a standard low-quality base sound file by default. This is suitable if you are on a small, underpowered system (such as a Rasberry Pi), but on a larger system you should install higher quality soundfiles. Note that this installs the (8khz) 'wav' soundfiles and G722 (High Definition 'Wideband') audio.
+
  
 +
<pre>
 
cd /var/lib/asterisk/sounds
 
cd /var/lib/asterisk/sounds
  
第241行: 第242行:
 
rm -f <nowiki>asterisk-core-sounds-en-g722-current.tar.gz</nowiki>
 
rm -f <nowiki>asterisk-core-sounds-en-g722-current.tar.gz</nowiki>
  
'''Set Asterisk ownership permissions.'''
+
</pre>
 +
 
 +
'''设置Asterisk 权限'''
  
 
chown asterisk. /var/run/asterisk
 
chown asterisk. /var/run/asterisk
第253行: 第256行:
 
chown -R asterisk. /var/www/
 
chown -R asterisk. /var/www/
  
'''Install and Configure FreePBX'''
+
'''安装配置FreePBX'''
 
+
'''A few small modifications to Apache.'''
+
  
 +
'''安装前修改Apache设置'''
 +
<pre>
 
sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc<nowiki>/php.in</nowiki>i
 
sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc<nowiki>/php.in</nowiki>i
  
第264行: 第267行:
  
 
systemctl restart <nowiki>httpd.se</nowiki>rvice
 
systemctl restart <nowiki>httpd.se</nowiki>rvice
 
+
</pre>
'''Download and install FreePBX.'''
+
'''下载安装FreePBX'''
  
 
cd /usr/src
 
cd /usr/src
第281行: 第284行:
 
./install -n
 
./install -n
  
'''That's it!'''
+
'''搞定!'''
 
+
You can now start using FreePBX. &nbsp;Open up your web browser and connect to the IP address or hostname of your new FreePBX server. &nbsp;You will see the Admin setup page, which is where you set your &nbsp;'admin' account password, and configure an email address to receive update notifications.&nbsp;
+
 
+
We hope you enjoy using FreePBX 13!
+
 
+
'''Automatic Startup'''
+
  
Please note you need to set up FreePBX to start asterisk (and it's associated services) on bootup. [/display/FOP/Example+systemd+startup+script+for+FreePBX You can view an example systemd startup script here].
+
现在用户可以启动FreePBX,访问FreePBX界面,设置管理员帐户和邮箱。

2015年11月3日 (二) 16:59的最新版本

Centos-7 环境下安装 FreePBX 13 用户使用指南

初始化系统设置

用户必须是ROOT 用户权限!

用户必须关闭 selinux。 以免引起其他安装问题

Disable selinux

在 /etc/sysconfig/selinux 文件中修改以下几行:

sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/sysconfig/selinux

sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/selinux/config

重新启动系统,执行命令 'sestatus',结果应该是:

SELinux status: disabled

Update Your System

yum -y update

yum -y groupinstall core base "Development Tools"

安装其他的支持包和依赖包

yum -y install lynx mariadb-server mariadb php php-mysql php-mbstring tftp-server \

  httpd ncurses-devel sendmail sendmail-cf sox newt-devel libxml2-devel libtiff-devel \

  audiofile-devel gtk2-devel subversion kernel-devel git php-process crontabs cronie \

  cronie-anacron wget vim php-xml uuid-devel sqlite-devel net-tools gnutls-devel php-pear

Install Legacy Pear requirements

pear install Console_Getopt

Firewalld Basic Configuration

开放80端口,管理员界面可以访问此端口

firewall-cmd --zone=public --add-port=80/tcp --permanent

firewall-cmd --reload

Enable and Start MariaDB

安装MariaDB,确保正常运行,这样freepbx能够正常工作,自动启动工作。

systemctl enable mariadb.service

systemctl start mariadb

mysql_secure_installation

此提示要求输入当前用户密码。因为用户已经安装了MySQL,此输入为空,按ENTER键。此提示要求用户设置root 密码。请不要设置用户密码。在脚本运行时,我们将会自动创建。其他引导设置可以输入YES。

Enable and Start Apache

FreePBX 使用Apache 服务器,所以页面服务器必须是启动状态。


systemctl enable httpd.service

systemctl start httpd.service

'''Install Dependencies for Google Voice (if required)'''

'''Install iksemel

''' '''

cd /usr/src

wget https://iksemel.googlecode.com/files/iksemel-1.4.tar.gz

tar xf iksemel-*.tar.gz

rm -f iksemel-1.4.tar.gz

cd iksemel-*

./configure

make

make install

'''Add the Asterisk User'''

adduser asterisk -M -c "Asterisk User"

'''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

wget -O jansson.tar.gz https://github.com/akheron/jansson/archive/v2.7.tar.gz

wget http://www.pjsip.org/release/2.4/pjproject-2.4.tar.bz2

Compile and install DAHDI

如果用户没有安装Asterisk 语音卡可以忽略安装Dahdi(特别是虚拟机安装,无需此步骤)。

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.4.tar.bz2

rm -f pjproject-2.4.tar.bz2

cd pjproject-2.4

CFLAGS='-DPJ_HAS_IPV6=1' ./configure --prefix=/usr --enable-shared --disable-sound\

 --disable-resample --disable-video --disable-opencore-amr --libdir=/usr/lib64

make dep

make

make install

编译安装jansson

cd /usr/src

tar vxfz jansson.tar.gz

rm -f jansson.tar.gz

cd jansson-*

autoreconf -i

./configure --libdir=/usr/lib64

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-*

contrib/scripts/install_prereq install

./configure --libdir=/usr/lib64

contrib/scripts/get_mp3_source.sh

make menuselect

如果用户需要支持MP3语音格式,安装编译

ubuntu-14.04-enable-mp3.png

选择选项,然后保存,进行执行以下步骤:

make

make install

make config

ldconfig

chkconfig asterisk off

安装高清语音文件

cd /var/lib/asterisk/sounds

wget http://downloads.asterisk.org/pub/telephony/sounds/asterisk-core-sounds-en-wav-current.tar.gz

wget http://downloads.asterisk.org/pub/telephony/sounds/asterisk-extra-sounds-en-wav-current.tar.gz

tar xvf asterisk-core-sounds-en-wav-current.tar.gz

rm -f asterisk-core-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-core-sounds-en-g722-current.tar.gz

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

tar xfz asterisk-core-sounds-en-g722-current.tar.gz

rm -f asterisk-core-sounds-en-g722-current.tar.gz

设置Asterisk 权限

chown asterisk. /var/run/asterisk

chown -R asterisk. /etc/asterisk

chown -R asterisk. /var/{lib,log,spool}/asterisk

chown -R asterisk. /usr/lib64/asterisk

chown -R asterisk. /var/www/

安装配置FreePBX

安装前修改Apache设置

sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php.ini

sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/httpd/conf/httpd.conf

sed -i 's/AllowOverride None/AllowOverride All/' /etc/httpd/conf/httpd.conf

systemctl restart httpd.service

下载安装FreePBX

cd /usr/src

wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-13.0-latest.tgz

tar xfz freepbx-13.0-latest.tgz

rm -f freepbx-13.0-latest.tgz

cd freepbx

./start_asterisk start

./install -n

搞定!

现在用户可以启动FreePBX,访问FreePBX界面,设置管理员帐户和邮箱。