sintonia/livesupport/doc/install.html

230 lines
11 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<title>LiveSupport installation documentation</title>
<meta content="$Author$" name="author">
</head>
<body>
<h1>Preface</h1>
This document is part of the <a href="http://livesupport.campware.org/">LiveSupport</a>
project, Copyright © 2004 <a href="http://www.mdlf.org/">Media
Development Loan Fund</a>, under the GNU <a
href="http://www.gnu.org/licenses/gpl.html">GPL</a>.<br>
<ul>
<li>Author: $Author$</li>
<li>Version: $Revision$</li>
<li>Location: $URL$</li>
</ul>
<h1>Scope</h1>
This document describes how to compile and install LiveSupport on your
system.<br>
<h1>Introduction</h1>
LiveSupport has an installation procedure to make sure LiveSupport will
work properly on your system. This procedure consists of the following
steps:<br>
<ul>
<li>installing required compilation tools</li>
<li>installing and configuring required external services</li>
<li>obtaining LiveSupport sources</li>
<li>compiling LiveSupport</li>
<li>installing LiveSupport</li>
<li>try it out</li>
</ul>
<h2>For the impatient</h2>
Those who think they know everything, the quick steps to install
LiveSupport are the following. (To run <code>make</code>, you need write
permissions in the <code>prefix</code> directory; to run
<code>make install</code> and <code>postInstallStation.sh</code>,
you need to be root.)
<pre><code>
wget http://switch.dl.sourceforge.net/sourceforge/livesupport/livesupport-&lt;version&gt;.tar.bz2
wget http://switch.dl.sourceforge.net/sourceforge/livesupport/livesupport-libraries-&lt;version&gt;.tar.bz2
tar xfj livesupport-&lt;version&gt;.tar.bz2
tar xfj livesupport-libraries-&lt;version&gt;.tar.bz2
cd livesupport-&lt;version&gt;
./configure --prefix=/usr/local/livesupport --with-apache-group=apache --with-www-docroot=/var/www
make
make install
./bin/postInstallStation.sh -d /usr/local/livesupport -g apache -r /var/www
/usr/local/livesupport/bin/scheduler.sh start
<br></code></pre>
Then try the URL <code>http://localhost/livesupport/</code>
and log in using username: <code>root</code>, password: <code>q</code>.<br>
<br>
Everyone else, please read the lines below carefully.<br>
<h1>Installing required compilation tools</h1>
Make sure that all the <a href="developmentTools.html">required compilation
tools and libraries</a> are installed. You can either install pre-packaged
versions, if they are provided for your distribution; or you can download
them from the URLs listed, and compile them yourself (follow the instructions
included with each tool and library).<br>
<h1>Installing and configuring required external services</h1>
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). <br>
<h2>Database</h2>
LiveSupport expects a <a href="http://www.postgresql.org/">PostgreSQL</a>
database, version 7.4 or later, to be installed on your system. You will
also need a postgresql driver for unixODBC; this may be in the unixODBC
package, or may need to be installed separately.<br>
<br>
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.<br>
<br>
Edit <code>postgresql.conf</code>
(usually <code>/var/lib/postgres/data/postgresql.conf</code>), to have
to following line:<br>
<br>
<pre><code>tcpip_socket = true</code></pre>
<br>
and also edit <code>pg_hba.conf</code> (usually <code>/var/lib/postgres/data/pg_hba.conf</code>)
to include the following line, before any other lines starting with "host":<br>
<br>
<pre><code>host&nbsp;&nbsp;&nbsp; all&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; all&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 127.0.0.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 255.255.255.255&nbsp;&nbsp; password<br><br></code></pre>
These changes will make sure that the PostgreSQL database is accessible
via TCP/IP from localhost.<br>
<h2>Web server</h2>
LiveSupport expects an apache web server with PHP and some additional
PHP modules installed. In particular:
<ul>
<li><a href="http://httpd.apache.org/">Apache</a> httpd server,
either version 1.x or 2.x<br>
</li>
<li><a href="http://www.php.net/">PHP</a> interpreter</li>
<li><a href="http://www.php.net/">PHP</a> apache module</li>
<li><a href="http://www.php.net/domxml">DOMXML</a> PHP extension - an
XMLv2 module for PHP<br>
</li>
<li><a href="http://www.postgresql.org/">PostgreSQL</a> support in PHP</li>
<li><a href="http://pear.php.net/">PEAR</a></li>
</ul>
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".
<br><br>
Please note the user group your apache daemon is running as (usually <code>apache</code>
or <code>www-data</code>), you will need this information later. Later
on in this document, this group will be referred to as <code>&lt;apache-group&gt;</code>. For the automatic install scripts to work, the user
running them must either be <code>root</code>, or belong to
<code>&lt;apache-group&gt;</code>.<br>
<br>
Also note the document root directory for your apache installation
(usually <code>/var/www</code> or <code>/var/www/htdocs</code>
or <code>/var/www/&lt;yourhost&gt;/htdocs</code>). Later on in this
document, this directory will be referred to as <code>&lt;www-root&gt;</code>.<br>
<h2>ALSA</h2>
Please check if ALSA is installed and configured properly.
File /proc/asound/cards should contain entry(s) for your soundcard(s).
<br>
If not, maybe you do not have suitable ALSA module for your soundcard on the system. Search you package manager for "alsa-modules" and figure out which are suitable for your kernel version and architecture.
or one other from <a href="http://packages.debian.org/cgi-bin/search_packages.pl?version=stable&subword=1&exact=&arch=any&releases=all&case=insensitive&keywords=alsa-modules&searchon=names" target="_blank">http://packages.debian.org/cgi-bin/search_packages.pl...</a>.
<br>
Then run "alsaconf" and check /proc/asound/cards again.
<h1>Obtaining LiveSupport sources</h1>
LiveSupport sources come in two different tarballs:<br>
<ul>
<li><code>livesupport-&lt;version&gt;.tar.bz2</code> - the
LiveSupport source files<code><br>
</code></li>
<li><code>livesupport-libraries-&lt;version&gt;.tar.bz2</code> -
external libraries used by LiveSupport<code><br>
</code></li>
</ul>
Both files can be downloaded from <a
href="http://sourceforge.net/projects/livesupport/"><code>http://sourceforge.net/projects/livesupport/</code></a>.
<br>
<br>
After downloading the files, untar them in the same directory:<br>
<br>
<pre><code>tar xfj livesupport-&lt;version&gt;.tar.bz2<br>tar xfj livesupport-libraries-&lt;version&gt;.tar.bz2<br></code></pre>
<br>
which will create a <code>livesupport-&lt;version&gt;</code>
directory, with all the required files to compile and install
LiveSupport.<br>
<h1>Compiling LiveSupport</h1>
To compile LiveSupport, enter the LiveSupport directory, and execute
the following commands:<br>
<br>
<pre><code>cd livesupport-&lt;version&gt;<br>./configure </code><code>--prefix=/usr/local/livesupport --with-apache-group=apache --with-www-docroot=/var/www<br></code><code>make<br></code></pre>
<br>
Note that you need to have write permissions in the <code>prefix</code> directory
when you run <code>make</code>.
The configure options used above are the options most probably used:<br>
<br>
<pre><code>&nbsp; --prefix=PREFIX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install architecture-independent files in PREFIX<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [/usr/local]</code></pre>
The installation directory. Supply the previously
decided LiveSupport installation directory here, <code>&lt;ls-installdir&gt;</code>
(as mentioned above). A sensible value to use here is <code>/usr/local/livesupport</code>.<br>
<pre><code><br> --with-apache-group use apache running in the specified group (apache)<br><br></code></pre>
The user group the apache web server daemon runs at (see the section
above on installing apache). Supply the <code>&lt;apache-group&gt;</code>
value here, as mentioned above, which is usually either <code>apache</code>
or <code>www-data</code>.<br>
<br>
<pre> --with-www-docroot deploy LiveSupport under the specified docroot<br> (/var/www)<br><br></pre>
The document root of your apache installation (see the section above on
installing apache). Supply the <code>&lt;www-root&gt;</code>
value here, as mentioned above, which is usually <code>/var/www</code>
or <code>/var/www/htdocs</code>
or <code>/var/www/&lt;yourhost&gt;/htdocs.</code>
<span style="font-family: monospace;"><br>
<br>
</span>Compilation will take quite a while, so go have a tea, watch a
movie, relax,
etc.<br>
<br>
If you want the installation script to create the database tables used
by LiveSupport, consider using the following configure options:<br>
<br>
<pre> --with-create-database specify whether the LiveSupport database and database<br> user should be created (no)<br> --with-create-odbc-data-source<br> specify whether the ODBC data source for LiveSupport<br> should be created (no)<br> --with-init-database specify whether the LiveSupport database tables<br> should be initialized (no)<br> --with-configure-apache specify whether apache should be configured for<br> LiveSupport through its conf.d directory (no)<br><br><br></pre>
For a full list of options, see <code>./configure --help</code><br>
<h1>Installing LiveSupport<br>
</h1>
After a successful compilation, to install LiveSupport, you can install
LiveSupport by typing:<br>
<br>
<pre><code>make install</code><br></pre>
<br>
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
<code>make install</code> as root.<br>
<br>
<h1>Try it out</h1>
After a successful installation, the LiveSupport scheduler has to be
started. The scheduler has a System V runlevel-style startup script,
under &lt;ls-installdir&gt;/bin/scheduler.sh. To start the scheduler,
simply invoke:<br>
<br>
<pre><code>&lt;ls-installdir&gt;/bin/scheduler.sh start</code><br></pre>
<br>
The only thing left to do is to try out the LiveSupport web interface
or the GUI application.<br>
<br>
For the web interface, point your browser to the following URL: <code>http://&lt;yourhost&gt;/livesupport/</code>
.<br>
<br>
The GUI application can be started by issuing the following command:<br>
<br>
<pre><code>&lt;ls-installdir&gt;/bin/gLiveSupport.sh</code><br></pre>
<br>
For your first login, use the following values:<br>
<ul>
<li>username: root</li>
<li>password: q</li>
</ul>
Have fun!<br>
<br>
<br>
<pre><code></code></pre>
</body>
</html>