|
|
(99 intermediate revisions by 9 users not shown) |
Line 1: |
Line 1: |
− | Easy_Ubuntu_10.04
| + | This page is deprecated. |
| | | |
− | ==Download Ubuntu 10.04 Server LTS (Lucid)==
| + | *script: [[Easy_FusionPBX]] |
− | http://www.ubuntu.com/server/get-ubuntu/download
| |
− | Select Ubuntu 10.04 LTS Long Term Support
| |
− | Choose 32 bit or 64 bit depending on your hardware
| |
| | | |
− | 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.
| + | *Iso: [[Ubuntu_ISO]] |
| | | |
− | == Get the latest install script ==
| |
− | ===Project===
| |
− | http://sourceforge.net/projects/fusionpbxinstal/files/
| |
− | ===Features===
| |
− | *FreeSWITCH
| |
− | **It installs all necessary dependencies.
| |
− | **It grabs the latest FreeSWITCH git and compile it, including dealing with a mod_dingaling issue.
| |
− | **It sets permissions properly for FreeSWITCH.
| |
− | **Sets up Fail2Ban (for FreeSWITCH)
| |
− | **Sets up LogRotate (for FreeSWITCH)
| |
− | **Checks for public IP address, optionally starts FreeSWITCH with -nonat for faster startup
| |
| | | |
− | *FusionPBX (optional)
| + | ==Older Versions== |
− | **It sets permissions properly FusionPBX to edit FreeSWITCH config files
| + | Please see [[Easy_Ubuntu_10.04_Old_Script_Versions]] for Errata, errors, and fixes. |
− | **Grabs the latest FusionPBX from SVN and dependencies (php5-cli, php5-sqlite, sqlite)
| |
− | **OPTION: Installs and configures: apache2 with mod-php5 OR nginx with php5-fpm.
| |
− | **OPTION: Install MySQL for the FusionPBX database (instead of default sqlite).
| |
− | ***If using odbc for voicemail, FusionPBX requires php5-odbc!
| |
| | | |
− | Everything should automatically configured!
| |
| | | |
− | ===Notes===
| |
− | To download with wget:
| |
− | #Find the latest script on sourceforge
| |
− | #Get the 'download direct' link from sourceforge.
| |
| | | |
− | example:
| + | * Old ISO's Please see:[[Easy_Ubuntu_10.04_Old_CD_Versions]] |
− | cd /usr/local/bin
| |
− | wget "https://downloads.sourceforge.net/random_sourceforge_bits" -O install_fusionpbx
| |
− | chmod 744 install_fusionpbx
| |
− | /usr/local/bin/install_fusionpbx
| |
| | | |
− | ===Errata=== | + | == PortAudio == |
− | *version 4.3.2.1
| + | Have fun with your sound card. |
− | ====Error====
| + | Make sure the modules are loaded |
− | *Permissions are set as follows:
| + | lsmod |grep snd |
− | groups www-data
| + | lspci |
− | www-data : www-data daemon | + | It's already compiled (script and iso), but alsa is not present. |
− | groups freeswitch
| + | apt-get install alsa alsa-utils alsa-tools |
− | freeswitch : daemon audio www-data | + | You'll need to add your users to the audio group. |
− | 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.]
| + | 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. |
| + | [http://howto.blbosti.com/2010/03/ubuntu-server-install-alsa-sound-and-moc-music-on-console/ reference with nice alsamixer pics] |
| | | |
− | *Workaround:
| + | Enable the module in FusionPBX |
− | Make FreeSWITCH and FusionPBX run as the same user.
| + | *System->Modules->PortAudio |
− | /etc/init.d/freeswitch stop
| + | **Enable it |
− | chown -R www-data.www-data /usr/local/freeswitch
| + | **Start it |
− | sed -i -e s,'USER=freeswitch','USER=www-data', /etc/init.d/freeswitch
| |
− | /etc/init.d/freeswitch start
| |
| | | |
| + | [http://wiki.freeswitch.org/wiki/FreeSwitch_Enpoint_Portaudio#Example_commands Example Port Audio Commands] |
| | | |
| + | Tested with VMWare Player 2011/02/27 |
| | | |
− | ====Error==== | + | ==Certificates== |
− | *nginx 413 Request Entity Too Large
| + | Information on importing the self signed certificates can be found here [[Self-Signed CA]] |
− | **when trying to upload files over 2M (i think).
| |
| | | |
− | ====Fix==== | + | ==TFTPD== |
− | Edit
| + | *Install TFTPD, change permissions to www-data. |
− | vim /etc/nginx/sites-enabled/fusionpbx
| + | **/var/lib/tftpboot is root dir. |
− | Add the following settings under 'error_log /var/log/fusionpbx_gui.error_log;'
| + | **/etc/default/tftpd-hpa is config file |
− | client_max_body_size 10M;
| + | <pre>TFTP_USERNAME="www-data" |
− | client_body_buffer_size 128k;
| + | TFTP_DIRECTORY="/var/lib/tftpboot" |
− | ====Error====
| + | TFTP_ADDRESS="0.0.0.0:69" |
− | NGinx and Apache installations are insecure. The FusionPBX database can be pulled with simple http request.
| + | TFTP_OPTIONS="--secure" |
− | ====Fix====
| + | </pre> |
− | In /etc/nginx/sites-enabled/fusionpbx add the following.
| + | *Install NTPD |
− | # Disable viewing .htaccess & .htpassword & .db
| + | **Package in repository is just 'ntp' |
− | location ~ .ht {
| |
− | deny all;
| |
− | }
| |
− | location ~^.+.(db)$ {
| |
− | deny all;
| |
− | }
| |
− | For apache:
| |
− | vim /etc/apache2/conf.d/securedb.conf
| |
− | add:
| |
− | #
| |
− | # The following lines prevent .db files from being
| |
− | # viewed by Web clients.
| |
− | #
| |
− | <Files ~ "^.*\.db">
| |
− | Order allow,deny
| |
− | Deny from all
| |
− | Satisfy all
| |
− | </Files>
| |
− | | |
− | ===Options===
| |
− | sudo install_fusionpbx
| |
− | 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!
| |
− | | |
− | sudo install_fusionpbx --version
| |
− | Version 4.3.2.1 - 2011 January 1. WAF License
| |
− | | |
− | ===Install===
| |
− | sudo install_fusionpbx install-both user
| |
− | | |
− | ===Variables===
| |
− | These are included to make the auto mode more flexible. Open the script and set them however you wish.
| |
− | *for apache set to a, for nginx/php-fpm set to n -> for an auto install, user mode will prompt
| |
− | :APACHENGINX=a
| |
− | *for mysql set to m. for sqlite set to s -> for an auto install, user mode will prompt.
| |
− | :SQLITEMYSQL=s
| |
− | *for -nonat option set PUBLICIP to yes -> for an auto install, user mode should detect and prompt.
| |
− | :PUBLICIP=no
| |
− | ===Changelog===
| |
− | *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 for FusionPBX. 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 | |
− | #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 2010 December 13
| |
− | #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
| |
− | | |
− | == 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/
| |
− | | |
− | ===Voicemail to Email===
| |
− | 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
| |
− | | |
− | #Log into FusionPBX
| |
− | #Click System -> System Settings
| |
− | #Edit the Domain
| |
− | #Set "PHP Directory" to /usr/bin
| |
− | #Save/Apply Settings.
| |
− | #Now apply the fix to FreeSWITCH:
| |
− | sudo vim /usr/local/freeswitch/conf/autoload_configs/switch.conf.xml
| |
− | and edit the line:
| |
− | <param name="mailer-app" value="/var/www/fusionpbx /var/www/fusionpbx/secure/v_mailto.php"/>
| |
− | to be:
| |
− | <param name="mailer-app" value="/usr/bin/php /var/www/fusionpbx/secure/v_mailto.php"/>
| |
− | install php5-cli
| |
− | sudo apt-get install php5-cli
| |
− | Restart FreeSWITCH
| |
− | /etc/init.d/freeswitch restart
| |
− | == 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
| |
− | #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...
| |
− | #*cbillen: for the password creation in one scriptable command you can do: echo "ALTER USER FusionPBX with PASSWORD 'pbx2010';" | psql FusionPBX
| |
− | | |
− | == ISO == | |
− | <u>2011 January 1</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 VMPlayer sessions, but the do install on real hardware. Please read [[Easy_Ubuntu_10.04#Instructions|Instructions]] and [[Easy_Ubuntu_10.04#Errata_2|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:
| |
− | :https://sourceforge.net/projects/fusionpbxinstal/files/ISOs/
| |
− | | |
− | The latest Torrents for the images can be found here (Thanks hyper_ch!)
| |
− | :https://sourceforge.net/projects/fusionpbxinstal/files/Torrent/
| |
− | | |
− | ===Instructions===
| |
− | # Read [[Easy_Ubuntu_10.04#Errata_2|Errata List]]
| |
− | # Download the ISO
| |
− | # Verify the MD5 Sum.
| |
− | # Burn to a CD or run from VMWare/VirtualBOX (testing only)
| |
− | # Boot (be patient... LiveCDs take a while)
| |
− | # Double Click the install icon
| |
− | # Post-install: decide whether or not you want to upgrade FusionBPX.
| |
− | #* The system will not boot with a GUI. If you need one, run startx
| |
− | # Default Username/Password for FusionPBX on LiveCD/post-install
| |
− | #* username: superadmin
| |
− | #* password: fusionpbx
| |
− | | |
− | ===64 bit beta 2011-01-01===
| |
− | :Download ISO: [http://sourceforge.net/projects/fusionpbxinstal/files/ISOs/beta-2011-01-01/fusionpbx_ub_x86_64-beta-2011-01-01.iso/download fusionpbx_ub_x86_64-beta-2011-01-01.iso]
| |
− | :Download using BitTorrent: [http://sourceforge.net/projects/fusionpbxinstal/files/Torrent/beta-2011-01-01/fusionpbx_ub_x86_64-beta-2011-01-01.iso.torrent/download .torrent File] | [magnet:?xt=urn:btih:50F2D7F43A4B739A1CE9F168D6C919B560923412&dn=fusionpbx_ub_x86_64-beta-2011-01-01.iso&tr=udp://tracker.openbittorrent.com:80/announce Magnet Link]
| |
− | :MD5: [http://sourceforge.net/projects/fusionpbxinstal/files/ISOs/beta-2011-01-01/fusionpbx_ub_x86_64-beta-2011-01-01.iso.md5/download 6137762e2e280140a179cfaaaa0057e4]
| |
− | *Script Build
| |
− | Version 4.3.2.1 - 2011 January 1. WAF License
| |
− | | |
− | ===32 bit beta 2011-01-01===
| |
− | :Download ISO: [http://sourceforge.net/projects/fusionpbxinstal/files/ISOs/beta-2011-01-01/fusionpbx_ub_i386-beta-2011-01-01.iso/download fusionpbx_ub_i386-beta-2011-01-01.iso]
| |
− | :Download using BitTorrent: [http://sourceforge.net/projects/fusionpbxinstal/files/Torrent/beta-2011-01-01/fusionpbx_ub_i386-beta-2011-01-01.iso.torrent/download .torrent File] | [magnet:?xt=urn:btih:24A982E2680E385825F95E5F167E253A679585FF&dn=fusionpbx_ub_i386-beta-2011-01-01.iso&tr=udp://tracker.openbittorrent.com:80/announce Magnet Link]
| |
− | :MD5: [http://sourceforge.net/projects/fusionpbxinstal/files/ISOs/beta-2011-01-01/fusionpbx_ub_i386-beta-2011-01-01.iso.md5/download f10f6963c22cef4686e207146fb47cbf]
| |
− | *Script Build
| |
− | Version 4.3.2.1 - 2011 January 1. WAF License
| |
− | | |
− | ===Errata===
| |
− | for beta-2011-01-01 32 bit and 64 bit ISOs
| |
− | ====Error #1====
| |
− | *Post install it will ask you to upgrade. Please do so, HOWEVER: select nginx as your http server. The script currently does not remove nginx (what's installed) if you choose apache.
| |
− | ====Error #2====
| |
− | *If the iso doesn't boot after installation on real hw.
| |
− | =====Fix #2=====
| |
− | *It has been reported that this doesn't happen... Author has only seen this issue one time.
| |
− | *It can be fixed if you have an Ubuntu Server 10.04 LTS cd though.
| |
− | **run rescue to a console, apt-get update && apt-get dist-upgrade && grub-install /dev/sda
| |
− | | |
− | ====Error #3====
| |
− | *nginx 413 Request Entity Too Large
| |
− | **when trying to upload files over 2M (i think).
| |
− | =====Fix #3=====
| |
− | 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 #4====
| |
− | *VMWare Tools are installed, and this affects performance on real hardware
| |
− | =====Fix #4=====
| |
− | *Remove VMWare Tools
| |
− | sudo vmware-uninstall-tools.pl
| |
− | ====Error #5====
| |
− | NGinx and Apache installations are insecure. The FusionPBX database can be pulled with simple http request.
| |
− | ====Fix #5====
| |
− | In /etc/nginx/sites-enabled/fusionpbx add the following.
| |
− | # Disable viewing .htaccess & .htpassword & .db
| |
− | location ~ .ht {
| |
− | deny all;
| |
− | }
| |
− | location ~^.+.(db)$ {
| |
− | deny all;
| |
− | }
| |
− | For apache:
| |
− | vim /etc/apache2/conf.d/securedb.conf (This file does not seem to exist on current installs on Ubuntu 10.04.1 . Should it be added?)
| |
− | add:
| |
− | #
| |
− | # The following lines prevent .db files from being
| |
− | # viewed by Web clients.
| |
− | #
| |
− | <Files ~ "^.*\.db">
| |
− | Order allow,deny
| |
− | Deny from all
| |
− | Satisfy all
| |
− | </Files>
| |
− | | |
− | ===Older Versions===
| |
− | Old version links are removed due to limited dropbox space constraints, sorry.
| |
− | | |
− | ====64 bit beta 2010-12-31====
| |
− | *Script Build | |
− | Version 4.3.2 - 2010 December 31. WAF License
| |
− | *Issues | |
− | **Post install it will ask you to upgrade. Please do so, HOWEVER: select nginx as your http server. The script currently does not remove nginx (what's installed) if you choose apache. | |
− | **Older version of script, won't upgrade/install FusionPBX properly if the nginx/sqlite combination is chosen.
| |
− | ** Make sure that if you do select MySQL that your machine is accessible over the http interface or you can not complete the install. If you are installing on a VM and using a NATed connection you may not be able to compkete this step.
| |
− | | |
− | ====Beta1====
| |
− | <u>Issues with Beta1 ISO</u>
| |
− | # openssh key problem. first boot after install should run 'dpkg-reconfigure openssh-server'
| |
− | | |
− | <u>Issues with FusionPBX install script on the iso [v4.2]</u>
| |
− | # under case upgrade-freeswitch, variables were not set properly. It upgraded fusionpbx...
| |
− | # fail2ban error fixed in latest FS git. remove associated text
| |
− | # have install check for /etc/fail2ban. reinstall (as in from iso) duplicates some txt
| |
− | # 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.
| |
− | # get logrotate working... let's not fill the disk.
| |
− | | |
− | ;32 Bit Beta1
| |
− | links removed
| |
− | | |
− | ;64 Bit Beta1
| |
− | links removed
| |
This page is deprecated.
It's already compiled (script and iso), but alsa is not present.
You'll need to add your users to the audio group.
Run alsamixer and unmute the channgels (with M) and crank the volume all the way up.
Check that the soundcard is there.