查看“源代码安装”的源代码
←
源代码安装
跳转至:
导航
、
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:用户
您可以查看并复制此页面的源代码:
'''在Centos 6.5 安装 FreePBX 12''' '''Install Centos 6.5''' * [ Install Centos 6.5] ** [ Initial System Setup] *** [ Disable selinux] *** [ Update Your System] *** [ Install Additional Required Dependencies] *** [ IPTables] *** [ Auto Start MySQL] *** [ Auto Start Apache] *** [ Install PearDB] *** [ Reboot server] ** [ Install Dependencies for Google Voice (If needed/wanted)] *** [ Install iksemel] ** [ Add the Asterisk User] ** [ Install and Configure Asterisk] *** [ Download Asterisk source files.] *** [ Compile and install DAHDI and LibPRI] ** [ Compile and install pjproject] ** [ Compile and Install jansson] ** [ Compile and install Asterisk] ** [ Install Asterisk-Extra-Sounds] ** [ Install and Configure FreePBX] *** [ Download and extract FreePBX.] *** [ Set ownership permissions.] *** [ A few small modifications to Apache.] *** [ Configure Asterisk database in MYSQL. ] *** [ Set permissions on MYSQL database.] *** [ Restart Asterisk and install FreePBX.] *** [ Finally, one last mod and start FreePBX.] ** [ Start FreePBX] *** [ Navigate: ] ** [ Install and Setup Commercial Modules] *** [ Enable the FreePBX Commercial yum repos] *** [ yum clean all to clean out yum cache so it will find out new RPMs] *** [ yum install needed RPMs for Commercial Modules] *** [ Restart Apache and Install Sysadmin] *** [ For Further information see: CentOS and RHEL based systems.] '''Initial System Setup''' 用户必须是root 用户! 必须关闭 selinux. selinux 可能引起安装错误。 '''Disable selinux''' 在 /etc/sysconfig/selinux , 修改以下几行: sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/sysconfig/selinux reboot 启动系统,执行命令 sestatus 查看 selinux 状态。结果应该是: SELinux status: disabled '''Update Your System''' yum -y update yum groupinstall core yum groupinstall base '''Install Additional Required Dependencies''' '''执行以下命令安装系统所需的依赖包''' yum install gcc gcc-c++ lynx bison mysql-devel mysql-server php php-mysql php-pear php-mbstring tftp-server httpd make ncurses-devel libtermcap-devel sendmail sendmail-cf caching-nameserver sox newt-devel libxml2-devel libtiff-devel audiofile-devel gtk2-devel subversion kernel-devel git subversion kernel-devel php-process crontabs cronie cronie-anacron wget vim php-xml uuid-devel libtool sqlite-devel '''IPTables''' 用户必须关闭默认的 iptables,安装完成用户可以重新开启。 查看当前状态: chkconfig iptables --list 关闭 iptables: chkconfig --level 0123456 iptables off 停止系统服务: service iptables stop '''Auto Start MySQL''' 确定mysql 已经运行。通常情况下,需要在系统启动时也同时启动mysql。所以,我们要在系统中添加一个启动任务: chkconfig --level 345 mysqld on 通过命令启动 mysqld : service mysqld start '''Auto Start Apache''' 用户必须确认 Apache 也是正在运行的,所以用户才能访问 FreePBX 管理员界面,在系统启动任务中添加以下命令: chkconfig --level 345 httpd on 手动启动 apache 命令: service httpd start '''Install PearDB''' pear channel-update <nowiki>pear.php.net</nowiki> pear install db-1.7.14 用户可以收到以下告警信息: WARNING: "pear/DB" is deprecated in favor of "pear/MDB2" 此消息现在可以忽略 '''Reboot server''' reboot '''Install Dependencies for Google Voice (If needed/wanted)''' '''安装 iksemel // 如果无需Google 语音服务,则无需安装''' cd /usr/src wget <nowiki>https://iksemel.googlecode.com/files/iksemel-1.4.tar.gz</nowiki> tar xf iksemel-*.<nowiki>tar.gz</nowiki> cd iksemel-* ./configure make make install '''Add the Asterisk User''' '''添加一个Asterisk 用户''' adduser asterisk -M -c "Asterisk User" '''Install and Configure Asterisk''' '''下载Asterisk 源代码:''' cd /usr/src wget <nowiki>http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz</nowiki> wget <nowiki>http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4-current.tar.gz</nowiki> wget <nowiki>http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz</nowiki> git clone <nowiki>https://github.com/akheron/jansson.git</nowiki> wget <nowiki>http://www.pjsip.org/release/2.2.1/pjp</nowiki><nowiki>roject-2.2.1.tar.bz</nowiki>2 '''Compile and install DAHDI and LibPRI''' 注意 如果用户没有安装Asterisk 语音包括,则无需安装这两个软件包,可以忽略此步。. cd /usr/src tar xvfz <nowiki>dahdi-linux-complete-current.tar.gz</nowiki> tar xvfz <nowiki>libpri-1.4-current.tar.gz</nowiki> rm -f <nowiki>dahdi-linux-complete-current.tar.gz</nowiki> <nowiki>libpri-1.4-current.tar.gz</nowiki> cd dahdi-linux-complete-* make all make install make config cd /usr/src/libpri-1.4.* make make install '''Compile and install pjproject''' 注意 如果用户使用的是 64 bit 系统,必须首先执行以下配置: --libdir=/usr/lib64 cd /usr/src tar -xjvf <nowiki>pjproject-2.2.1.tar.bz</nowiki>2 cd pjproject-2.2.1 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 '''Compile and Install jansson''' 注意 如果用户使用的是 64 bit 系统,必须首先执行以下配置命令: --libdir=/usr/lib64 cd /usr/src/jansson autoreconf -i ./configure --libdir=/usr/lib64 make make install '''Compile and install Asterisk''' 注意 如果用户使用的是 64 bit 系统,必须首先执行以下命令: --libdir=/usr/lib64 cd /usr/src tar xvfz <nowiki>asterisk-13-current.tar.gz</nowiki> rm -f <nowiki>asterisk-13-current.tar.gz</nowiki> cd asterisk-* contrib/scripts/install_prereq install ./configure --libdir=/usr/lib64 contrib/scripts<nowiki>/get_mp3_source.sh</nowiki> make menuselect 系统将要求用户检查所需要的软件包。大部分情况下,以下基本的功能包已经默认安装。有一些特别的模块可能需要用户自己添加模块选项。例如,如果用户需要支持mp3 语音格式,则需要开启 'format_mp3' 模块,系统将编译此模块。 [[image:图片 1|624x357px|说明: C:\4ab2827d031c397139b24060d5dd4927]] 选择 'Save & Exit' , 用户可以进行执行以下命令: make make install make config ldconfig '''Install Asterisk-Extra-Sounds''' 注意,我们现在安装的是 (8khz) 'wav' 语音文件和 G722 (High Definition 'Wideband') 语音文件: mkdir -p /var/lib/asterisk/sounds cd /var/lib/asterisk/sounds wget <nowiki>http://downloads.asterisk.org/pub/telephony/sounds/asterisk-extra-sounds-en-wav</nowiki><nowiki>-current.tar.gz</nowiki> tar xfz <nowiki>asterisk-extra-sounds-en-wav-current.tar.gz</nowiki> rm -f <nowiki>asterisk-extra-sounds-en-wav-current.tar.gz</nowiki> <nowiki># Wideband Audio download </nowiki> wget <nowiki>http://downloads.asterisk.org/pub/telephony/sounds/asterisk-extra-sounds-en-g722-current.tar.gz</nowiki> tar xfz <nowiki>asterisk-extra-sounds-en-g722-current.tar.gz</nowiki> rm -f <nowiki>asterisk-extra-sounds-en-g722-current.tar.gz</nowiki> '''Install and Configure FreePBX''' '''下载解压FreePBX 源代码.''' wget <nowiki>http://mirror.freepbx.org/freepbx-12.0.3.tgz</nowiki> tar vxfz <nowiki>freepbx-12.0.3.tg</nowiki>z '''Set ownership permissions. // 设置系统权限,这一步非常重要。''' chown asterisk. /var/run/asterisk chown -R asterisk. /etc/asterisk chown -R asterisk. /var/{lib,log,spool}/asterisk chown -R asterisk. /usr/lib/asterisk chown -R asterisk. /usr/lib64/asterisk mkdir /var/www/html chown -R asterisk. /var/www/ '''A few small modifications to Apache.''' '''修改Apache 配置文件''' sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc<nowiki>/php.in</nowiki>i cp /etc/httpd/conf/<nowiki>httpd.co</nowiki>nf /etc/httpd/conf/<nowiki>httpd.co</nowiki>nf_orig sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/httpd/conf/<nowiki>httpd.co</nowiki>nf service httpd restart '''Configure Asterisk database in MYSQL.''' '''配置创建MYSQL 的asterisk 数据库''' cd /usr/src/freepbx export ASTERISK_DB_PW=amp109 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.''' cd /usr/src/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 如果用户看到错误关于 "Uncaught exception 'RuntimeException' with message 'gpg took too long to run.'" 不用担心,重新执行 "amportal a ma installall" 可以解决此错误. '''Finally, one last mod and start FreePBX.''' ln -s /var/lib/asterisk/moh /var/lib/asterisk/mohmp3 amportal restart '''Start FreePBX''' '''通过浏览器访问PBX 管理员界面: ''' [http://yourlocalipaddress/html http://yourlocalipaddress/html] 或者 [http://localhost/admin http://localhost/admin] '''Install and Setup Commercial Modules''' '''通过yum repos 开启 FreePBX 商业模块''' wget -P /etc/<nowiki>yum.re</nowiki>pos.d/ -N <nowiki>http://yum.schmoozecom.net/schmooze-commercial/schmooze-commercial.repo</nowiki> '''yum 命令将清除所有的yum 缓存,找到新的RPM''' '''yum clean all''' '''通过 yum install 安装所需要的RPM 商业模块''' yum -y install php-5.3-zend-guard-loader sysadmin fail2ban incron ImageMagick '''Restart Apache and Install Sysadmin''' 完成安装后,重新启动Apache 和sysadmin 管理员商业模块 service httpd restart amportal a ma download sysadmin amportal a ma install sysadmin
返回至
源代码安装
。
导航菜单
个人工具
登录
命名空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
合作伙伴
FreePBX官方
IPPBX软硬件
SIP 终端话机
SBC
语音网关,Sangoma语音板卡
工具
链入页面
相关更改
特殊页面
页面信息