Installing FusionPBX 3.2 on CentOS 6.5 and Mysql

柔情只为你懂 2022-08-08 13:39 133阅读 0赞

Installing FusionPBX 3.2 on CentOS 6.5 and Mysql

User:Scristopher

Install Basic CentOS Server Installation

    • Dev SVN Branch can also be installed this way, the only difference is fusionpbx**

Hi there, it seems this guide was hastily thrown together before I happened to stumble upon it with alot of things that might have either hosed your system or made it difficult to use. I’m currently reworking this page to make it a proper installation guide. Any questions feel free to put in the talk page. Alot of the packages listed for installation here may or may not be needed, the list was here before I got here, but its alot better than when I first stumbled upon it. Previously if you tried the old guide it would hose your apache install (I mean majorly, apache would literally stackdump), and majorly screw up other system utilities. This just needs to be a simple and plain freeswitch + fusionpbx installation, nothing more, nothing less.

you can download centOS 6.5 from

http://mirror.sunnyvision.com/centos/6.4/isos/i386/CentOS-6.4-i386-minimal.iso dead link
Use the latest 6.5 Installation, its up to you how you would like to install, best bet is netinstall using the basic server as the base once you get to the package selection: !!Never download ISOs from unknown sources!! (centos 7 will be supported soon!)

64 bit isos:

  1. http://isoredirect.centos.org/centos/6.5/isos/x86_64/

32 bit isos:

  1. http://isoredirect.centos.org/centos/6.5/isos/i386/

Then Do update to up to date

  1. yum update -y

Disabling SELINUX

  1. /bin/sed -i -e s,'SELINUX=enforcing','SELINUX=disabled', /etc/selinux/config

Reboot so selinux is off.

Install Epel:

  1. su -c 'rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm'

Install a bunch of needed packages:

  1. yum -y install autoconf automake gcc-c++ git-core libjpeg-devel libtool make ncurses-devel pkgconfig \
  2. libedit-devel unixODBC-devel openssl-devel gnutls-devel libogg-devel libvorbis-devel curl-devel libtiff-devel \
  3. libjpeg-devel python-devel expat-devel zlib zlib-devel bzip2 which subversion screen vim php php-mysql ntp libX11-devel \
  4. libzrtpcpp-devel alsa-lib-devel libdb-devel uuid-devel @development-tools gdbm-devel db4-devel libjpeg libjpeg-devel \
  5. libtermcap libtermcap-devel ncurses ntp screen sendmail sendmail-cf bison gettext-devel httpd-devel apr-devel apr-util-devel \
  6. cyrus-sasl-devel gettext-libs openldap-devel ldns ldns-devel

Installing Apache webserver

  1. yum install httpd httpd-devel

Install MySQL.

  1. yum install mysql mysql-server mysql-server-devel mysql-devel

Configuring autostart

  1. chkconfig mysqld on

Starting mysql

  1. service mysqld start

Changing mysql root password

  1. /usr/bin/mysqladmin -u root password "yourpassword"

Install Freeswitch Note: this is now obsoleted, please use: https://confluence.freeswitch.org/display/FREESWITCH/CentOS+6 instead.

  1. cd /usr/src
  2. git clone git://git.freeswitch.org/freeswitch.git
  3. cd freeswitch
  4. ./bootstrap.sh

Edit modules.conf to enable or disable desired modules. To enable a few extra features you may want to go ahead and edit modules.conf. Remove the # in front of the lines with these modules:

  1. mod_rtmp
  2. mod_directory
  3. mod_callcenter
  4. mod_tts_commandline
  5. mod_dingaling
  6. mod_flite
  7. mod_shout
  8. mod_pocketsphinx
  9. mod_cidlookup

Installing Freeswitch

  1. configure --enable-core-odbc-support && make && make install
  2. make cd-moh-install && make cd-sounds-install

If you get an error, it will likely be module related, see what module it errored on in the output and comment that module out - or try to fix it.

Add a user for freeswitch

  1. useradd freeswitch

set ownership, perms, and install init scripts

  1. cd /usr/local/
  2. chown -R freeswitch:freeswitch freeswitch
  3. chmod -R g+w freeswitch
  4. cd /usr/src/freeswitch/build
  5. cp freeswitch.init.redhat /etc/init.d/freeswitch
  6. chmod +x /etc/init.d/freeswitch
  7. cp freeswitch.sysconfig /etc/sysconfig/freeswitch

Add Settings to freeswitch sysconfig

  1. cat >> /etc/sysconfig/freeswitch <<EOT
  2. PID_FILE=/var/run/freeswitch/freeswitch.pid
  3. FS_USER=freeswitch
  4. FS_FILE=/usr/local/freeswitch/bin/freeswitch
  5. FS_HOME=/usr/local/freeswitch
  6. EOT

Change permission Add Freeswitch Service to start at boot time

  1. chmod 765 /etc/init.d/freeswitch
  2. /sbin/chkconfig freeswitch on
  3. /sbin/chkconfig --list freeswitch

Move Default Freeswitch config files to noload

  1. cd /usr/local/freeswitch/conf/dialplan/default
  2. mv 00_ladspa.xml 00_ladspa.noload
  3. mv 00_pizza_demo.xml 00_pizza_demo.noload
  4. mv 01_Talking_Clock.xml 01_Talking_Clock.noload

Linking fs_cli

  1. cd /usr/local/bin/
  2. ln -s /usr/local/freeswitch/bin/fs_cli fs_cli

installing Fusion

  1. cd /var/www/html
  2. mkdir fusionpbx
  3. svn co http://fusionpbx.googlecode.com/svn/trunk/fusionpbx fusionpbx

Fix FusionPBX Ownership and Perms

  1. cd /var/www/html
  2. chown -R apache:apache fusionpbx
  3. cd /usr/local/freeswitch/conf/
  4. chmod 770 `find . -type d`
  5. chmod 660 `find . -type f`

Add apache to the freeswitch Group

  1. usermod -a -G freeswitch apache

Add database and odbc configuration:

  1. mysql> create database freeswitch
  2. mysql> grant all privileges on freeswitch.* to 'admin'@'localhost' identified by 'YOUR-DATABASE-PASSWORD';
  3. mysql> exit

edit /etc/odbc.ini:

  1. [freeswitch]
  2. Driver = MySQL
  3. SERVER = localhost
  4. PORT = 3306
  5. DATABASE = freeswitch
  6. OPTION = 67108864
  7. Socket = /var/lib/mysql/mysql.sock

Test your database connection:

  1. [root@testfusion]# isql freeswitch admin YOUR-DATABASE-PASSWORD
  2. +---------------------------------------+
  3. | Connected! |
  4. | |
  5. | sql-statement |
  6. | help [tablename] |
  7. | quit |
  8. | |
  9. +---------------------------------------+
  10. SQL> quit

start up some services and set them to run at boot

  1. service freeswitch start
  2. service httpd restart
  3. chkconfig freeswitch on
  4. chkconfig httpd on
  5. service monit start
  6. chkconfig monit on

Installing FusionPBX from GUI

  1. http://youraddress/fusionpbx

发表评论

表情:
评论列表 (有 0 条评论,133人围观)

还没有评论,来说两句吧...

相关阅读