Difference between revisions of "Ubuntu 10.10"

From FusionPBX
Jump to: navigation, search
m (update your system)
Line 6: Line 6:
 
server: irc.freenode.net
 
server: irc.freenode.net
 
channel: #fusionpbx #freeswitch-de  
 
channel: #fusionpbx #freeswitch-de  
 +
 +
== Install Script==
 +
--start-cut-here--
 +
#!/bin/bash
 +
#
 +
#install add-apt-repository & adding repos
 +
apt-get install python-software-properties
 +
add-apt-repository ppa:freeswitch-drivers/freeswitch-nightly-drivers
 +
add-apt-repository ppa:brianmercer/php
 +
add-apt-repository ppa:nginx/development/ubuntu
 +
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C
 +
#
 +
#Update system
 +
apt-get update && apt-get upgrade
 +
#
 +
#Installing tools
 +
apt-get install subversion
 +
#
 +
#install Freeswitch .deb pkgs
 +
apt-get install freeswitch-codec-passthru-amr freeswitch-codec-passthru-g729 freeswitch-codec-passthru-g7231 \
 +
freeswitch-lang-en freeswitch-lang-ru freeswitch-spidermonkey freeswitch-sounds-en-us-callie-omega \
 +
freeswitch-sounds-music-omega freeswitch freeswitch-lua freeswitch-perl freeswitch-python \
 +
freeswitch monit sox
 +
#
 +
#add pizza demo
 +
#wget http://files.freeswitch.org/pizza_gram.tar.gz
 +
#wget http://files.freeswitch.org/pizza_sounds.tar.gz
 +
#mkdir /opt/freeswitch/grammar
 +
#tar xzvf pizza_gram.tar.gz -C /opt/freeswitch/grammar
 +
#mkdir /opt/freeswitch/sounds/en/us/callie/pizza
 +
#mkdir /opt/freeswitch/sounds/en/us/callie/pizza/8000
 +
#tar xzvf pizza_sounds.tar.gz -C /opt/freeswitch/sounds/en/us/callie/pizza/8000
 +
#
 +
sed -i 's|daemon:x:1|daemon:x:1:www-data|g' /etc/group
 +
#
 +
sed -i 's|FREESWITCH_ENABLED="false"|FREESWITCH_ENABLED="true"|g' /etc/default/freeswitch
 +
#
 +
service start freeswitch
 +
#
 +
#install webserver and needed libs
 +
apt-get install nginx php5-cli php5-sqlite php5-fpm sqlite3
 +
#
 +
svn checkout http://fusionpbx.googlecode.com/svn/trunk/fusionpbx /var/www/fusionpbx
 +
#
 +
wget http://dl.dropbox.com/u/152504/nginx-default
 +
cp nginx-default /etc/nginx/sites-enabled/default
 +
#
 +
chown -R www-data:www-data /var/www/fusionpbx
 +
chmod -R 766 /var/www/fusionpbx
 +
chmod -R 766 /opt/freeswitch
 +
#
 +
#restart nginx & php5-fpm
 +
service nginx restart
 +
service php5-fpm restart
 +
#
 +
#Removing dhclient and setting ip
 +
apt-get purge dhcpcd
 +
#
 +
#network config
 +
echo -e "\nEnter Server Ip"
 +
read serverip
 +
echo -e "\nEnter  Server Netmask"
 +
read netmask
 +
echo -e "\nEnter Router Ip"
 +
read routerip
 +
#
 +
/sbin/ifdown --force eth0
 +
/sbin/ifconfig eth0 up
 +
/sbin/ifconfig eth0 $serverip
 +
/sbin/ifconfig eth0 netmask $netmask
 +
/sbin/route add default gw $routerip
 +
#
 +
mv /etc/init.d/fusion-install /root
 +
#
 +
exit 0
 +
--end-cut-here--
  
 
==Download Ubuntu 10.04 LTS Server (lucid)==
 
==Download Ubuntu 10.04 LTS Server (lucid)==
Line 13: Line 89:
 
==Add the freeswitch nightly drivers repo to apt==
 
==Add the freeswitch nightly drivers repo to apt==
  
For Ubuntu Server 10.04 LTS, make sure add-apt-repository is installed ( via apt-get install python-software-properties ) and then:
+
For Ubuntu Server 10.10, make sure add-apt-repository is installed ( via apt-get install python-software-properties ) and then:
  
 
  add-apt-repository ppa:freeswitch-drivers/freeswitch-nightly-drivers
 
  add-apt-repository ppa:freeswitch-drivers/freeswitch-nightly-drivers

Revision as of 16:52, 23 October 2010

Support

For basic support on this install Contact: witchdoc on server: irc.freenode.net channel: #fusionpbx #freeswitch-de

Install Script

--start-cut-here--

  1. !/bin/bash
  2. install add-apt-repository & adding repos

apt-get install python-software-properties add-apt-repository ppa:freeswitch-drivers/freeswitch-nightly-drivers add-apt-repository ppa:brianmercer/php add-apt-repository ppa:nginx/development/ubuntu apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C

  1. Update system

apt-get update && apt-get upgrade

  1. Installing tools

apt-get install subversion

  1. install Freeswitch .deb pkgs

apt-get install freeswitch-codec-passthru-amr freeswitch-codec-passthru-g729 freeswitch-codec-passthru-g7231 \ freeswitch-lang-en freeswitch-lang-ru freeswitch-spidermonkey freeswitch-sounds-en-us-callie-omega \ freeswitch-sounds-music-omega freeswitch freeswitch-lua freeswitch-perl freeswitch-python \ freeswitch monit sox

  1. add pizza demo
  2. wget http://files.freeswitch.org/pizza_gram.tar.gz
  3. wget http://files.freeswitch.org/pizza_sounds.tar.gz
  4. mkdir /opt/freeswitch/grammar
  5. tar xzvf pizza_gram.tar.gz -C /opt/freeswitch/grammar
  6. mkdir /opt/freeswitch/sounds/en/us/callie/pizza
  7. mkdir /opt/freeswitch/sounds/en/us/callie/pizza/8000
  8. tar xzvf pizza_sounds.tar.gz -C /opt/freeswitch/sounds/en/us/callie/pizza/8000

sed -i 's|daemon:x:1|daemon:x:1:www-data|g' /etc/group

sed -i 's|FREESWITCH_ENABLED="false"|FREESWITCH_ENABLED="true"|g' /etc/default/freeswitch

service start freeswitch

  1. install webserver and needed libs

apt-get install nginx php5-cli php5-sqlite php5-fpm sqlite3

svn checkout http://fusionpbx.googlecode.com/svn/trunk/fusionpbx /var/www/fusionpbx

wget http://dl.dropbox.com/u/152504/nginx-default cp nginx-default /etc/nginx/sites-enabled/default

chown -R www-data:www-data /var/www/fusionpbx chmod -R 766 /var/www/fusionpbx chmod -R 766 /opt/freeswitch

  1. restart nginx & php5-fpm

service nginx restart service php5-fpm restart

  1. Removing dhclient and setting ip

apt-get purge dhcpcd

  1. network config

echo -e "\nEnter Server Ip" read serverip echo -e "\nEnter Server Netmask" read netmask echo -e "\nEnter Router Ip" read routerip

/sbin/ifdown --force eth0 /sbin/ifconfig eth0 up /sbin/ifconfig eth0 $serverip /sbin/ifconfig eth0 netmask $netmask /sbin/route add default gw $routerip

mv /etc/init.d/fusion-install /root

exit 0 --end-cut-here--

Download Ubuntu 10.04 LTS Server (lucid)

http://www.ubuntu.com/server/get-ubuntu/download and install.

Add the freeswitch nightly drivers repo to apt

For Ubuntu Server 10.10, make sure add-apt-repository is installed ( via apt-get install python-software-properties ) and then:

add-apt-repository ppa:freeswitch-drivers/freeswitch-nightly-drivers

Update your system

apt-get update && apt-get upgrade

list freeswitch pkgs

apt-cache search freeswitch

Install Freeswitch pkgs

apt-get install (freeswitch pkgs from the list)

Fusionpbx

Dependencies Subversion

apt-get install subversion

PHP >= 5.3.3

apt-get install php5.3

Install the backend of your choice

sqlite

apt-get install sqlite3 php5-sqlite

mysql

apt-get install mysql-server php5-mysql

postgresql

apt-get install php5-pgsql postgresql-8.4

NginX Deps

Dependencies

apt-get install nginx php5-fpm

Nginx Setup

edit nginx.conf

Replace :

       location / {
           root   /var/www/nginx;
           index  index.html index.htm;
       }

Witch:

       location / {
           root   /usr/local/www/fusionpbx;
           index  index.php index.html index.htm;
       }

Replace :

       # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
       #
       #location ~ \.php$ {
       #    root           html;
       #    fastcgi_pass   127.0.0.1:9000;
       #    fastcgi_index  index.php;
       #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
       #    include        fastcgi_params;
       #}

with:

       pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
       
       location ~ \.php$ {
           root           html;
           fastcgi_pass   127.0.0.1:9000;
           fastcgi_index  index.php;
           fastcgi_param  SCRIPT_FILENAME  /var/www/fusionpbx$fastcgi_script_name;
           include        fastcgi_params;
       }

Apache Setup

Apache

apt-get install apache2

Lighttpd Setup

PgSQL Setup

TO set and configure PgSQL for use with FusionPBX, Follow this line for line.

su pgsql
createuser -s -e FusionPBX
createdb -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

Mysql Setup

Complete the Setup

  • Load fusionpbx in the browser choose Postgres for the database.
  • Then press next put in the user account and password from that was created from the previous command.
  • Make sure 'Create database User and 'Create Database Password' are empty and then submit the form.
  • Login with 'superadmin' and 'fusionpbx'