Difference between revisions of "Ubuntu ISO"

From FusionPBX
Jump to: navigation, search
(Created page with "== ISO == <u>2011 November 11</u> This is a LiveCD for installing FreeSWITCH/FusionPBX. It's currently in work (64 bit and 32 bit). These are beta. They were created in KV...")
 
(Permissions after Upgrade)
Line 45: Line 45:
  
 
===Permissions after Upgrade===
 
===Permissions after Upgrade===
<del>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. [http://jira.freeswitch.org/browse/FS-3016 See jira FS-3016.]</del>
 
 
 
 
If you upgrade FreeSWITCH, permissions will be changed.  This is due to the way make install is configured.  Your first sign of this is that FreeSWITCH will fail to start. This is due to the /etc/init.d/freeswitch script trying to start FreeSWITCH as user www-data, and www-data doesn't have access to the FreeSWITCH binaries anymore. Post upgrade, run the following:
 
If you upgrade FreeSWITCH, permissions will be changed.  This is due to the way make install is configured.  Your first sign of this is that FreeSWITCH will fail to start. This is due to the /etc/init.d/freeswitch script trying to start FreeSWITCH as user www-data, and www-data doesn't have access to the FreeSWITCH binaries anymore. Post upgrade, run the following:
 
====Fix www-data Permissions====
 
====Fix www-data Permissions====

Revision as of 16:58, 26 April 2012

ISO

2011 November 11

This is a LiveCD for installing FreeSWITCH/FusionPBX. It's currently in work (64 bit and 32 bit). These are beta. They were created in KVM sessions, but the do install on real hardware. Please read Instructions and Errata closely.

Feedback requested: /msg soapee01 on Freenode (#fusionpbx). As of December 30, 2010 it actually functions as a LiveCD. FreeSWITCH and FusionPBX are running so you can test the FusionPBX gui. Please don't connect up to a SIP client and complain about audio quality while you run from a CD-ROM. :)

The latest ISO images can be found here:

http://fusionpbx.googlecode.com/svn/iso/ubuntu/10.04-LTS/i386/fusionpbx_ub_i386-beta-2011-11-11.iso
http://fusionpbx.googlecode.com/svn/iso/ubuntu/10.04-LTS/i386/fusionpbx_ub_i386-beta-2011-11-11.iso.md5

The latest Torrents for the images can be found here (Thanks hyper_ch!)

https://

ISO Major Inclusions

Ubuntu Server version: 10.04 LTS
Freeswitch git number: ISO Date
FusionPBX SVN: ISO Date
web server: Ngnix/php5-fpm (post install you can change to Apache2)
database: sqlite (post install you can change to MySQL or PostgreSQL)
tftp server: not included
Other: logrotate, fail2ban

If you have to compile freeswitch

If you require the use of a module that wasn't included when freeswitch was compiled to create the ISO you will need to re-compile. In order to fit the ISO image onto the CD, the source files have been removed, however the source files that were used to build the ISO are actually available - If you look on the sourceforge page for the iso, there's a tar.gz that is the compiled FreeSWITCH source that built the iso. Get it and xtracat it to /usr/src and then you'll be able to edit the modules.conf and compile.

Instructions


  1. Read Errata List
  2. Download the ISO
  3. Verify the MD5 Sum.
  4. Burn to a CD or run from VMWare/VirtualBOX (testing only)
  5. Boot (be patient... LiveCDs take a while)
  6. Double Click the install icon
  7. Post-install: decide whether or not you want to upgrade FusionBPX.
    • ABOUT THIS UPGRADE:
      • What it really does is completely delete the current version installed on the iso, and grab the latest version of FusionPBX from svn. Then it reruns the installer with your choice of database, web server, etc. This is the preferred method for iso installation. This way the iso will always provide the latest FusionPBX. In a nutshell, it does 'rm -rf /var/www/fusionpbx' and calls the script '/usr/local/bin/install_fusionpbx install-fusionpbx user'
    • The system will not boot with a GUI. If you need one, run startx
  8. Default Username/Password for FusionPBX on LiveCD/post-install
    • username: superadmin
    • password: fusionpbx

Errata


Permissions after Upgrade

If you upgrade FreeSWITCH, permissions will be changed. This is due to the way make install is configured. Your first sign of this is that FreeSWITCH will fail to start. This is due to the /etc/init.d/freeswitch script trying to start FreeSWITCH as user www-data, and www-data doesn't have access to the FreeSWITCH binaries anymore. Post upgrade, run the following:

Fix www-data Permissions

run

install_fusionpbx fix-permissions

or This is a script to make FreeSWITCH and FusionPBX run as the same user again. Save it to a file (ex: fixperms.sh), make it executable (chmod ugo+x ./fixperms.sh) and run it with sudo (sudo ./fixperms.sh).

/bin/echo "setting FreeSWITCH owned by www-dat.www-data"
/bin/chown -R www-data.www-data /usr/local/freeswitch
#remove 'other' permissions on freeswitch
/bin/chmod -R o-rwx /usr/local/freeswitch/
#set FreeSWITCH directories full permissions for user/group with group sticky
/bin/echo "Setting group ID sticky for FreeSWITCH"
/usr/bin/find /usr/local/freeswitch -type d -exec /bin/chmod u=rwx,g=srx,o= {} \;
#make sure FreeSWITCH directories have group write
/bin/echo "Setting Group Write for FreeSWITCH files"
/usr/bin/find /usr/local/freeswitch -type f -exec /bin/chmod g+w {} \;
#make sure FreeSWITCH files have group write
/bin/echo "Setting Group Write for FreeSWITCH directories"
/usr/bin/find /usr/local/freeswitch -type d -exec /bin/chmod g+w {} \;
/bin/echo "setting FusionPBX owned by www-data.www-data just in case"
if [ -e /var/www/fusionpbx ]; then
    /bin/chown -R www-data.www-data /var/www/fusionpbx
fi
/bin/echo "Changing /etc/init.d/freeswitch to start with user www-data"	
/bin/sed -i -e s,'USER=freeswitch','USER=www-data', /etc/init.d/freeswitch
#/etc/init.d/freeswitch start

Older Versions

Please see:Easy_Ubuntu_10.04_Old_CD_Versions

PortAudio

Have fun with your sound card. Make sure the modules are loaded

lsmod |grep snd
lspci

It's already compiled (script and iso), but alsa is not present.

apt-get install alsa alsa-utils alsa-tools

You'll need to add your users to the audio group.

adduser www-data audio

Run alsamixer and unmute the channgels (with M) and crank the volume all the way up.

alsamixer
Reboot is now required (/etc/init.d/alsa might work, didn't for me)

Check that the soundcard is there.

cat /proc/asound/cards

Try playing a file from the CLI

aplay /usr/local/freeswitch/sounds/music/8000/suite-espanola-op-47-leyenda.wav

It should be working. reference with nice alsamixer pics

Enable the module in FusionPBX

  • System->Modules->PortAudio
    • Enable it
    • Start it

Example Port Audio Commands

Tested with VMWare Player 2011/02/27

Certificates

Information on importing the self signed certificates can be found here Self-Signed CA

Wishlist

  • Option to download FreeSWITCH compiled source as tar.gz for iso
  • Option --fix-permissions
    • Needs to check FreeSWITCH init script
  • upgrade-fusionpbx needs to fix permissions, since a FS upgrade kills them.
  • Logrotate for nginx
  • Fail2ban for FusionPBX failed login attempts
    • Need information on attempts/rate/etc
  • Change Fail2ban on FreeSWITCH with attempts/rate/etc in config file (not default settings)
  • Change or have option to download GIT from GitHub repository (It's faster)
    • git://github.com/FreeSWITCH/FreeSWITCH.git
  • Make nginx/apache https by default
    • iso needs to regenerate certificates post install, ideally with 10 year expirations.
  • fix nginx config to not block html files... Don't block ~ .ht
       # Disable viewing .htaccess & .htpassword & .db
       location ~ .htaccess {
               deny all;
       }
       location ~ .htpassword {
               deny all;
       }
  • Install TFTPD, change permissions to www-data.
    • /var/lib/tftpboot is root dir.
    • /etc/default/tftpd-hpa is config file
TFTP_USERNAME="www-data"
TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure"
  • Install NTPD
    • Package in repository is just 'ntp'