Easy Ubuntu 10.04 Old Script Versions

Old fusionpbx_install script Versions. This page is here so that previous Errata and Errors don't clutter up the main page, but the fixes stay in case you need them.

=Project= http://sourceforge.net/projects/fusionpbxinstal/files/ onally starts FreeSWITCH with -nonat for faster startup

Error
groups www-data www-data : www-data daemon groups freeswitch freeswitch : daemon audio www-data Unfortunately FreeSWITCH creates new files with no group rw permissions. Linux ACL's, system UMASK, and init.d/freeswitch UMASK has been tried to work around this. The permissions are hard coded into FreeSWITCH. See jira FS-3016.
 * Permissions are set as follows:

Workaround
Make FreeSWITCH and FusionPBX run as the same user. /etc/init.d/freeswitch stop chown -R www-data.www-data /usr/local/freeswitch sed -i -e s,'USER=freeswitch','USER=www-data', /etc/init.d/freeswitch /etc/init.d/freeswitch start

Error

 * nginx 413 Request Entity Too Large
 * when trying to upload files over 2M (i think).

Fix
Edit vim /etc/nginx/sites-enabled/fusionpbx Add the following settings under 'error_log /var/log/fusionpbx_gui.error_log;' client_max_body_size 10M; client_body_buffer_size 128k;

Error
NGinx and Apache installations are insecure. The FusionPBX database can be pulled with simple http request.

Fix
In /etc/nginx/sites-enabled/fusionpbx add the following. location ~ .ht { deny all; }       location ~^.+.(db)$ { deny all; } For apache: vim /etc/apache2/conf.d/securedb.conf add: # #  Order allow,deny Deny from all Satisfy all 
 * 1) Disable viewing .htaccess & .htpassword & .db
 * 1) The following lines prevent .db files from being
 * 2) viewed by Web clients.

Voicemail to Email doesn't work
Versions prior to 4.3.2 did not install php5-cli by default. This caused the fusionpbx install to miss the "PHP Directory" when it configures FreeSWITCH. The value should be /usr/bin The value was /var/www/fusionpbx

Fix
sudo vim /usr/local/freeswitch/conf/autoload_configs/switch.conf.xml and edit the line:  to be:  install php5-cli sudo apt-get install php5-cli Restart FreeSWITCH /etc/init.d/freeswitch restart
 * 1) Log into FusionPBX
 * 2) Click System -> System Settings
 * 3) Edit the Domain
 * 4) Set "PHP Directory" to /usr/bin
 * 5) Save/Apply Settings.
 * 6) Now apply the fix to FreeSWITCH:

Changelog

 * v4.3.2.1 2011 January 1
 * 1) small problem when selecting nginx and sqlite. php5-fpm needed to restart so FusionPBX could see the FreeSWITCH directory.
 * v4.3.2 2010 December 30
 * 1) logrotate was improperly setup. Needed to send sighup to fs_cli. Caused FS to die the first time it tried to log after rotation.
 * 2) php5-cli is a dependancy for FusionPBX. required for voicemail to email, and fax to email.
 * 3) added an nginx/php-fpm option. You can change a variable (for auto run)or it will prompt you when you install fusionpbx in user mode
 * 4) mysql added as an option.
 * 5) problem with the way ubuntu logs ssh failures [fail2ban].
 * 6) *Failed password for root from 1.2.3.4 port 22 ssh2
 * 7) *last message repeated 5 times
 * 8) *SOLUTION: Turn off RepeatedMsgReduction in rsyslog.
 * 9) fail2ban: previous setup looked for freeswitch log in /var/log/freeswitch.log log is actually /usr/local/freeswitch/log/freeswitch.log
 * 10) Tries to see if you're on a static IP address. If you are, it wants to start FreeSWITCH with the -nonat option to save some time. Also a new variable
 * 11) TODO: Maybe probe cores and to the -b thing for quicker compile/bootstrap
 * 12) TODO: IPTABLES


 * v4.3.1 2010 December 23
 * 1) made a state save file. so if there's an error, don't re-bootstrap, configure, etc. and remove it on a clean exit.
 * 2) requests for modules add/enable for ugrade-freeswitch. DONE
 * 3) mod dingaling needs libgnutls-dev libgnutls26 packages, and change:
 * 4) *"--mode=relink gcc" --> "--mode=relink gcc -lgnutls"
 * 5) *in /usr/src/freeswitch/src/mod/endpoints/mod_dingaling/mod_dingaling.la
 * 6) *appears to be an ubuntu problem....


 * v4.3 2010 December 22
 * 1) under case upgrade-freeswitch, variables were not set properly. It upgraded fusionpbx.. fixed.
 * 2) done: fail2ban error fixed. removed associated text
 * 3) done: have install check for /etc/fail2ban. reinstall (as in from iso) duplicates some txt
 * 4) done: remove or fix fusionpbx upgrade code. it either needs to log in and then update and run the schema upgrade. or get rid of it. Fixed by prompting the user to open a browser window, and warn.
 * 5) done: get logrotate working... let's not fill the disk.
 * 6) stop/start freeswitch for an upgrade, and an install...


 * v4.2 2010 December 17
 * 1) made some changes so the text flows correctly now that we use curl to do install.php.
 * 2) sent curl output to dev null..
 * 3) added apt-get update before we install apache since remastersys removes apt data
 * 4) stopping FS before FusionPBX install, and starting afteward.
 * 5) changed license to WAF v1


 * v4.1 2010 December 15
 * 1) changing cd sounds (48/32/16/8khz) down to hd sounds (16/8Kkhz)


 * v4 2010 December 14
 * 1) now install-fusion|install-freeswitch|upgrade...
 * 2) also adding curl commands to finish fusionpbx install.


 * v3 2010 December 13
 * 1) adding fail2ban et al.


 * v2 2010 December 07
 * 1) adds arrays to process the modules. should make this much easier to edit.
 * 2) *just make additions to modules_add
 * 3) *This should work fine (even on a 2nd run).


 * v1 2010 December 06
 * 1) first cut

Bugs and Getting Help
soapee01 on #fusionpbx (freenode) wrote this script. For help, go there. Bugs and feature requests can be handled on the sourceforge project page:

http://sourceforge.net/projects/fusionpbxinstal/

PgSQL Setup
TO set and configure PgSQL for use with FusionPBX, Follow this line for line. This should be done before fusionpbx install.php gets called. If not, remove /var/www/fusionpbx/includes/config.php and it will re-enable the install.

sudo apt-get install php5-pgsql sudo su postgres createuser -s -e fusionpbx createdb -E UTF8 -O fusionpbx fusionpbx psql -d fusionpbx -U fusionpbx ALTER USER fusionpbx with PASSWORD 'pbx2010'; or any passwd you want exit from su back to root Apache/php sudo /etc/init.d/apache2 restart Nginx/php5-fpm sudo /etc/init.d/php5-fpm restart sudo /etc/init.d/nginx restart Now the install script should recognize postgresql
 * 1) If anyone has an idea on how to script the password creation, please drop a note here, so this process can be scripted as well...
 * 2) *cbillen: for the password creation in one scriptable command you can do: echo "ALTER USER FusionPBX with PASSWORD 'pbx2010';" | psql FusionPB