Preface

This document is part of the LiveSupport project, Copyright © 2004 Media Development Loan Fund, under the GNU GPL.

Scope

This document describes how to compile and install LiveSupport on your system.

Introduction

LiveSupport has an installation procedure to make sure LiveSupport will work properly on your system. This procedure consists of the following steps:

For the impatient

Those who think they know everything, the quick steps to install LiveSupport are the following. (To run make, you need write permissions in the prefix directory; to run make install, you need to be root.)
wget http://switch.dl.sourceforge.net/sourceforge/livesupport/livesupport-<version>.tar.bz2
wget http://switch.dl.sourceforge.net/sourceforge/livesupport/livesupport-libraries-<version>.tar.bz2
tar xfj livesupport-<version>.tar.bz2
tar xfj livesupport-libraries-<version>.tar.bz2
cd livesupport-<version>
./configure
--prefix=/usr/local/livesupport --with-apache-group=apache --with-www-docroot=/var/www
make
make install
/usr/local/livesupport/bin/scheduler.sh start
Then try the URL http://localhost/livesupport/ , and log in using username: root, password: q.

Everyone else, please read the lines below carefully.

Installing required compilation tools

This steps makes sure that all the required compilation tools and libraries are installed.  Please refer to your systems package management or the appropriate tools documentation for installation instructions for the tools and libraries listed below.

Tools

The following tools are expected on the system.

Libraries

Required libraries

The following development libraries are expected on the system. Please note that for all the libraries below, the development packages are expected to be installed as well.

Recommended libraries

The following libraries are used by LiveSupport. If they are not found on the system, LiveSupport will compile them from sources on its own. While having these libraries is not necessary, Compiling takes longer without them, and the generated LiveSupport directory will be larger as well.

Installing and configuring required external services

LiveSupport depends on some external services to be able to run, most importantly a PHP-capable web server (we assume apache), and a database server (we assume PostgreSQL).

Database

LiveSupport expects a PostgreSQL database, version 7.4 or later, to be installed on your system. The database will be accessed through TCP/IP, usually via the localhost interface. To achieve this, make sure to make the following changes to the PostgreSQL configuration files.

Edit postgresql.conf (usually /var/lib/postgres/data/postgresql.conf), to have to following line:

tcpip_socket = true

and also edit pg_hba.conf (usually /var/lib/postgres/data/pg_hba.conf) to include the following line, before any other lines starting with "host":

host    all         all         127.0.0.1         255.255.255.255   password

These changes will make sure that the PostgreSQL database is accessible via TCP/IP from localhost.

Web server

LiveSupport expects an apache web server with PHP and some additional PHP modules installed. In particular: Check php.ini file if "upload_max_filesize" fits the needs of an radio-station. On our experience, soundfiles can be up to 100MB. If you changed this setting, increase "post_max_size" to something bigger than "upload_max_filesize".

Please note the user group your apache daemon is running as (usually apache or www-data), you will need this information later. Later on in this document, this group will be referred to as <apache-group>. Also note the document root directory for your apache installation (usually /var/www or /var/www/htdocs or /var/www/<yourhost>/htdocs). Later on in this document, this directory will be referred to as <www-root>.

Alsa

Please check if alsa is installed and configured properly.
cat /proc/asound/cards
should show entry for your soundcard.
If not, maybee you do not have suitable alsa module for your soundcard on the system. Try to
apt-get install alsa-modules-2.4.27-2-386
or one other from http://packages.debian.org/cgi-bin/search_packages.pl....
Then run
alsaconf
and check
cat /proc/asound/cards
again.

Obtaining LiveSupport sources

LiveSupport sources come in two different tarballs:
Both files can be downloaded from http://sourceforge.net/projects/livesupport/.

After downloading the files, untar them in the same directory:

tar xfj livesupport-<version>.tar.bz2
tar xfj livesupport-libraries-<version>.tar.bz2

which will create a livesupport-<version> directory, with all the required files to compile and install LiveSupport.

Compiling LiveSupport

To compile LiveSupport, enter the LiveSupport directory, and execute the following commands:

cd livesupport-<version>
./configure
--prefix=/usr/local/livesupport --with-apache-group=apache --with-www-docroot=/var/www
make

Note that you need to have write permissions in the prefix directory when you run make. The configure options used above are the options most probably used:

  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local]
The installation directory. Supply the previously decided LiveSupport installation directory here, <ls-installdir> (as mentioned above). A sensible value to use here is /usr/local/livesupport.

--with-apache-group use apache running in the specified group (apache)

The user group the apache web server daemon runs at (see the section above on installing apache). Supply the <apache-group> value here, as mentioned above, which is usually either apache or www-data.

  --with-www-docroot      deploy LiveSupport under the specified docroot
(/var/www)

The document root of your apache installation (see the section above on installing apache). Supply the <www-root> value here, as mentioned above, which is usually /var/www or /var/www/htdocs or /var/www/<yourhost>/htdocs.

Compilation will take quite a while, so go have a tea, watch a movie, relax, etc.

If you want the installation script to create the database tables used by LiveSupport, consider using the following configure options:

  --with-create-database  specify whether the LiveSupport database and database
user should be created (no)
--with-create-odbc-data-source
specify whether the ODBC data source for LiveSupport
should be created (no)
--with-init-database specify whether the LiveSupport database tables
should be initialized (no)
--with-configure-apache specify whether apache should be configured for
LiveSupport through its conf.d directory (no)


For a full list of options, see ./configure --help

Installing LiveSupport

After a successful compilation, to install LiveSupport, you can install LiveSupport by typing:

make install

This will install LiveSupport into the directory specified to the configure script. It will also create necessary database tables, depending on the invocation of the configure script. You need to run make install as root.

Try it out

After a successful installation, the LiveSupport scheduler has to be started. The scheduler has a System V runlevel-style startup script, under <ls-installdir>/bin/scheduler.sh. To start the scheduler, simply invoke:

<ls-installdir>/bin/scheduler.sh start

The only thing left to do is to try out the LiveSupport web interface or the GUI application.

For the web interface, point your browser to the following URL: http://<yourhost>/livesupport/ .

The GUI application can be started by issuing the following command:

<ls-installdir>/bin/gLiveSupport.sh

For your first login, use the following values:
Have fun!