<a href="http://fusionpbx.googlecode.com/svn/trunk/scripts/install/ubuntu/install_fusionpbx.sh">Latest now migrated to googlecode and merged into the FusionPBX project (2011-11-10)</a>
<br>
<br>
------------------------------------------------------------------------------
"THE WAF LICENSE" (version 1)
This is the Wife Acceptance Factor (WAF) License.
jamesdotfsatstubbornrosesd0tcom wrote this file. As long as you retain this
notice you can do whatever you want with it. If you appreciate the work,
please consider purchasing something from my wife's wishlist. That pays
bigger dividends to this coder than anything else I can think of ;). It also
keeps her happy while she's being ignored; so I can work on this stuff.
James Rose
latest wishlist: http://www.stubbornroses.com/waf.html
Credit: Based off of the BEER-WARE LICENSE (REVISION 42) by Poul-Henning Kamp
------------------------------------------------------------------------------
---------
NOTES
---------
This Script installs or upgrades FreeSWITCH and/or FusionPBX on a fresh install of Ubuntu 10.04 LTS [lucid]. It tries to edit all appropriate files, set the permissions correctly, and installs any necessary dependencies.
When you install ubuntu, you should select the "Manual package selection" option. This way we can keep the install to the bare minimum. Just quit tasksel during the install.
This script will install everything you need (and nothing) - hopefully, you don't.
This script should be called as:
install_fusionpbx option1 option2
option1:
install-freeswitch
install-fusionpbx
install-both
upgrade-freeswitch
upgrade-fusionpbx
version|--version|-v
option2:
user: option waits in certain places for the user to check for errors
auto: tries an automatic install. Get a cup of coffee, this will
take a while. FOR THE BRAVE!
EXAMPLE
install_fusionpbx install-both user
---------
CHANGELOG
---------
v4.4.0pre 2011 April 12
Added mod_spandsp for fax and g722
Added NTP
TODO: maybe run sudo ntpdate ntp.ubuntu.com to make suer date is correct.
prevents make from dying (date in the future crap).
Added Option --fix-permissions
checks FreeSWITCH init script
Added: upgrade-fusionpbx needs to fix permissions, since a FS upgrade kills them.
FIXED Logrotate for nginx
logfiles were: /var/log/fusionpbx_gui.*_log;
logfiles now: /var/log/nginx/*.log
Added: Fail2ban for FusionPBX failed login attempts
Need information on attempts/rate/etc
Added: Fail2ban for FusionPBX on failed provision attempts
Need information on attempts/rate/etc
Needs Testing!
FIXED: RepeatedMsgReduction wasn't getting set correctly in rsyslog.conf
Added Change Fail2ban on FreeSWITCH with attempts/rate/etc in config file (not default settings)
Added: Option to download GIT from GitHub repository (It's faster), see DEFINES
Added: nginx/apache https by default (uses snakeoil certs)
FIXED nginx config to not block html files... Don't do block ~ .ht
Added FreeTDM, and Dahdi
v4.3.3 2011 January 31
Added: smp compile support. Script works, make -j doesn't. see jira FS-3005
Fixed: NGinx file size error
Added: Remove Nginx/php/apache properly
FIXED removing nginx removes gnome/x.
Added: Postgres (seems good)
Fixed: Set up apache properly (fusionpbx file instead of default, use heredoc)
TODO: look into setting up FS for mysql/pgsql
Fixed: sqlite http request issue for nginx/apache
Added: now doing ppa's the ubuntu way with apt-add-repository
Added: set up auto install for nginx/apache, mysql/postgresql/sqlite, setnonat.
Added: now prompts for rm -Rf /opt (or variable for auto-install).
There's a bug in either ppa-purge or apt-add-repository (likely latter).
if you install nginx, change your mind, install apache, change your mind again
and re-install nginx, the repository for nginx/php5-fpm gets removed proerly
[a '#' covers repo], but when re-enabling, the '#' gets replaced, and an 'n'
is left on a newline afterward, preventing update/install from that repo.
Fixed: Checking for nginx/apache2 binary instead of init scripts for if[x] restart
v4.3.2.1 2011 January 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
logrotate was improperly setup. Needed to send sighup to fs_cli
Caused FS to die the first time it tried to log after rotation.
php5-cli is a dependancy. required for voicemail to email, and fax to email.
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
mysql added as an option.
problem with the way ubuntu logs ssh failures [fail2ban]
Failed password for root from 1.2.3.4 port 22 ssh2
last message repeated 5 times
SOLUTION: Turn off RepeatedMsgReduction in rsyslog.
fail2ban: previous setup looked for freeswitch log in /var/log/freeswitch.log
log is actually /usr/local/freeswitch/log/freeswitch.log
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
TODO: Maybe probe cores and to the -b thing for quicker compile/bootstrap
TODO: IPTABLES
v4.3.1 2010 December 23
look into make -j cores option
made a state save file. so if there's an error, don't re-bootstrap, configure, etc.
and remove it on a clean exit.
requests for modules add/enable for ugrade-freeswitch. DONE
mod dingaling needs libgnutls-dev libgnutls26 packages, and change:
"--mode=relink gcc" --> "--mode=relink gcc -lgnutls"
in /usr/src/freeswitch/src/mod/endpoints/mod_dingaling/mod_dingaling.la
appears to be an ubuntu problem....
v4.3 2010 December 22
under case upgrade-freeswitch, variables were not set properly. It upgraded fusionpbx.. fixed.
done: fail2ban error fixed. removed associated text
done: have install check for /etc/fail2ban. reinstall (as in from iso) duplicates some txt
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.
done: get logrotate working... let's not fill the disk.
stop/start freeswitch for an upgrade, and an install...
v4.2 2010 December 17
made some changes so the text flows correctly now that we use curl
to do install.php.
sent curl output to dev null..
added apt-get update before we install apache since remastersys removes apt data
stopping FS before FusionPBX install, and starting afteward.
changed license to WAF v1
v4.1 2010 December 15
changing cd sounds (48/32/16/8khz) down to hd sounds (16/8Kkhz)
v4 2010 December 14
now install-fusion|install-freeswitch|upgrade...
also adding curl commands to finish fusionpbx install.
v3 adding fail2ban et al.
v2 2010 December 07
adds arrays to process the modules. should make this much easier to edit.
just make additions to modules_add
This should work fine (even on a 2nd run).
v1 2010 December 06
first cut