Difference between revisions of "Ubuntu 10.10"

From FusionPBX
Jump to: navigation, search
(FusionPBX Setup)
(Download Ubuntu 10.10 Server (Mavric))
 
(46 intermediate revisions by 6 users not shown)
Line 7: Line 7:
 
channel: #fusionpbx #freeswitch-de  
 
channel: #fusionpbx #freeswitch-de  
  
==Download Ubuntu 10.04 LTS Server (lucid)==
+
==Download Ubuntu 10.10 Server (Maverick)==
  
 
  http://www.ubuntu.com/server/get-ubuntu/download and install.
 
  http://www.ubuntu.com/server/get-ubuntu/download and install.
  
==Update you package src list==
+
==Install Script==
 
+
THIS DOES NOT WORK!
Ubuntu Server 10.04 tls add the fallowing lines to /etc/apt/sources.list file.
+
--start-cut-here--
 
+
#!/bin/bash
  deb http://ppa.launchpad.net/freeswitch-drivers/freeswitch-nightly-drivers/ubuntu lucid main
+
#
  deb-src http://ppa.launchpad.net/freeswitch-drivers/freeswitch-nightly-drivers/ubuntu lucid mainte
+
#install add-apt-repository & adding repos
 
+
apt-get install python-software-properties
==update you system==
+
  add-apt-repository ppa:freeswitch-drivers/freeswitch-nightly-drivers  
 
+
add-apt-repository ppa:brianmercer/php
  apt-get update && apt-get upgrade  
+
  add-apt-repository ppa:nginx/development/ubuntu
 
+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C
==list freeswitch pkgs==
+
#
 
+
#Update system
  apt-cache search freeswitch
+
  apt-get update && apt-get upgrade
 
+
  #
==Install Freeswitch pkgs==
+
  #Installing tools
 
 
  apt-get install (freeswitch pkgs from the list)
 
 
 
==Fusionpbx==
 
 
 
Dependencies Subversion
 
 
 
 
  apt-get install subversion
 
  apt-get install subversion
 +
#
 +
#install Freeswitch .deb pkgs
 +
apt-get install freeswitch-codec-passthru-amr freeswitch-codec-passthru-g729 freeswitch-codec-passthru-g7231 \<br>
 +
freeswitch-lang-en freeswitch-lang-ru freeswitch-spidermonkey freeswitch-sounds-en-us-callie-omega \<br>
 +
freeswitch-sounds-music-omega freeswitch freeswitch-lua freeswitch-perl freeswitch-python \<br>
 +
freeswitch monit sox
 +
# this command left a trailing semicolon following www-data. you need to remove...
 +
#sed -i 's|daemon:x:1|daemon:x:1:www-data|g' /etc/group
 +
adduser www-data daemon
 +
#
 +
sed -i 's|FREESWITCH_ENABLED="false"|FREESWITCH_ENABLED="true"|g' /etc/default/freeswitch
 +
#
 +
#service start freeswitch
 +
#this is ubuntu
 +
/etc/init.d/freeswitch restart
 +
#
 +
#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 ug+rwx /var/www/fusionpbx /opt/freeswitch
 +
adduser freeswitch www-data
 +
adduser www-data daemon
 +
#is worldread and worldwrite really a good idea? Doesn't the daemon/www-data group need x permissions on directories?
 +
#find /opt/freeswitch -type d -exec chmod u=rwx,g=srwx,o= {} \;
 +
# NOTE: chmod -R 766 /opt/freeswitch does not work.
 +
# x permissions are required for group.
 +
# even though su - www-data can read and create files in /opt/freeswitch (after using above find command), but not before
 +
# install.php fails when trying to copy the default dialplan.
 +
#
 +
#
 +
#restart nginx & php5-fpm
 +
#service nginx restart
 +
#service php5-fpm restart
 +
#for ubuntu
 +
/etc/init.d/nginx restart
 +
/etc/init.d/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--
  
PHP >= 5.3.3
 
 
apt-get install php5.3
 
 
Install the backend of your choice
 
 
sqlite
 
  
apt-get install sqlite3 php5-sqlite
+
Install just one of mysql, postgresql, or sqlite.
  
 
mysql
 
mysql
Line 54: Line 104:
 
  apt-get install php5-pgsql postgresql-8.4
 
  apt-get install php5-pgsql postgresql-8.4
  
==NginX Deps==
+
sqlite
  
Dependencies
+
apt-get install sqlite
  
  apt-get install nginx php5-fpm
+
== NGinx Setup (10.04 LTS)==
 +
  vim /etc/nginx/sites-enabled/default
  
==Nginx Setup==
+
Find
edit nginx.conf
+
location / {
 +
  # First attempt to serve request as file, then
 +
  # as directory, then fall back to index.html
 +
  try_files $uri $uri/ /index.html;
 +
}
 +
Replace with
 +
location / {
 +
  # First attempt to serve request as file, then
 +
  # as directory, then fall back to index.html
 +
  try_files $uri $uri/ /index.html;
 +
  root /var/www/fusionpbx;
 +
  index index.php index.html index.htm;
 +
  }
  
Replace :<br>
+
Find
        location / {
 
            root  /var/www/nginx;
 
            index  index.html index.htm;
 
        }
 
  
Witch:<br>
 
        location / {
 
            root  /usr/local/www/fusionpbx;
 
            index  index.php index.html index.htm;
 
        }
 
 
Replace :<br>
 
 
         # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
 
         # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
 
         #
 
         #
 
         #location ~ \.php$ {
 
         #location ~ \.php$ {
        #   root          html;
+
                #fastcgi_pass  127.0.0.1:9000;
        #    fastcgi_pass  127.0.0.1:9000;
+
                #fastcgi_index  index.php;
        #   fastcgi_index  index.php;
+
                #fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        #   fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
+
                #include fastcgi_params;
        #   include       fastcgi_params;
 
 
         #}
 
         #}
 
+
Replace with
with:<br>
+
         # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
 
+
         #
         pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
 
          
 
 
         location ~ \.php$ {
 
         location ~ \.php$ {
            root           html;
+
                root           html;
            fastcgi_pass  127.0.0.1:9000;
+
                fastcgi_pass  127.0.0.1:9000;
            fastcgi_index  index.php;
+
                fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /var/www/fusionpbx$fastcgi_script_name;
+
                #fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
            include       fastcgi_params;
+
                fastcgi_param  SCRIPT_FILENAME  /var/www/fusionpbx$fastcgi_script_name;
 +
                include fastcgi_params;
 
         }
 
         }
  
==Apache Setup==
+
Find and edit
Apache
+
        location /images {
 +
                #root  /usr/share;
 +
                root /var/www/fusionpbx;
 +
                autoindex on;
 +
        }
  
  apt-get install apache2
+
  /etc/init.d/nginx restart
 
+
go to your.ip.address in a browser and you should get the setup screen.
==Lighttpd Setup==
 
  
 
== PgSQL Setup ==
 
== PgSQL Setup ==
Line 117: Line 170:
 
  or any passwd you want
 
  or any passwd you want
 
  exit from su back to root
 
  exit from su back to root
 +
 +
#note: above didn't work (ubuntu LTS 10.04).  the postgres user is postgres (not pgsql). creating the fusionpbx user and database does work; however login did not. don't know enough about postgres to fix, so I used sqlite.
  
 
==Mysql Setup==
 
==Mysql Setup==
  
 +
==SQLite Setup ==
 +
apt-get install sqlite
  
 +
no conf necessary. just choose it from the web page during installation.
  
 
==Complete the Setup==
 
==Complete the Setup==

Latest revision as of 18:27, 5 February 2011

Support

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

Download Ubuntu 10.10 Server (Maverick)

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

Install Script

THIS DOES NOT WORK! --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 # this command left a trailing semicolon following www-data. you need to remove... #sed -i 's|daemon:x:1|daemon:x:1:www-data|g' /etc/group adduser www-data daemon # sed -i 's|FREESWITCH_ENABLED="false"|FREESWITCH_ENABLED="true"|g' /etc/default/freeswitch # #service start freeswitch #this is ubuntu /etc/init.d/freeswitch restart # #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 ug+rwx /var/www/fusionpbx /opt/freeswitch adduser freeswitch www-data adduser www-data daemon #is worldread and worldwrite really a good idea? Doesn't the daemon/www-data group need x permissions on directories? #find /opt/freeswitch -type d -exec chmod u=rwx,g=srwx,o= {} \; # NOTE: chmod -R 766 /opt/freeswitch does not work. # x permissions are required for group. # even though su - www-data can read and create files in /opt/freeswitch (after using above find command), but not before # install.php fails when trying to copy the default dialplan. # # #restart nginx & php5-fpm #service nginx restart #service php5-fpm restart #for ubuntu /etc/init.d/nginx restart /etc/init.d/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--


Install just one of mysql, postgresql, or sqlite.

mysql

apt-get install mysql-server php5-mysql

postgresql

apt-get install php5-pgsql postgresql-8.4

sqlite

apt-get install sqlite

NGinx Setup (10.04 LTS)

vim /etc/nginx/sites-enabled/default

Find

location / {
  # First attempt to serve request as file, then
  # as directory, then fall back to index.html
  try_files $uri $uri/ /index.html;
}

Replace with

location / {
 # First attempt to serve request as file, then
 # as directory, then fall back to index.html
 try_files $uri $uri/ /index.html;
 root /var/www/fusionpbx;
 index index.php index.html index.htm;
 }

Find

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

Replace 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  /scripts$fastcgi_script_name;
               fastcgi_param  SCRIPT_FILENAME  /var/www/fusionpbx$fastcgi_script_name;
               include fastcgi_params;
       }

Find and edit

       location /images {
               #root   /usr/share;
               root /var/www/fusionpbx;
               autoindex on;
       }
/etc/init.d/nginx restart

go to your.ip.address in a browser and you should get the setup screen.

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
  1. note: above didn't work (ubuntu LTS 10.04). the postgres user is postgres (not pgsql). creating the fusionpbx user and database does work; however login did not. don't know enough about postgres to fix, so I used sqlite.

Mysql Setup

SQLite Setup

apt-get install sqlite

no conf necessary. just choose it from the web page during installation.

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'