Preface
This document is part of the Campcaster
project, Copyright © 2004 Media
Development Loan Fund, under the GNU GPL.
- Author: $Author$
- Version: $Revision$
- Location: $URL$
Scope
This document describes how to compile and install Campcaster on your
system.
Introduction
Campcaster has an installation procedure to make sure Campcaster will
work properly on your system. This procedure consists of the following
steps:
- installing required compilation tools
- installing and configuring required external services
- obtaining Campcaster sources
- compiling Campcaster
- installing Campcaster
- try it out
For the impatient
Those who think they know everything, the quick steps to install
Campcaster are the following. (To run make
, you need write
permissions in the prefix
directory; to run
make install
and postInstallStation.sh
,
you need to be root.)
wget http://switch.dl.sourceforge.net/sourceforge/campcaster/campcaster-<version>.tar.bz2
wget http://switch.dl.sourceforge.net/sourceforge/campcaster/campcaster-libraries-<version>.tar.bz2
tar xfj campcaster-<version>.tar.bz2
tar xfj campcaster-libraries-<version>.tar.bz2
cd campcaster-<version>
./configure --prefix=/usr/local/campcaster --with-apache-group=apache --with-www-docroot=/var/www
make
make install
./bin/postInstallStation.sh -d /usr/local/campcaster -g apache -r /var/www
/usr/local/campcaster/bin/scheduler.sh start
Then try the URL http://localhost/campcaster/
and log in using username: root
, password: q
.
Everyone else, please read the lines below carefully.
Installing required compilation tools
Make sure that all the required compilation
tools and libraries 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).
Installing and configuring required external services
Campcaster 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
Campcaster expects a PostgreSQL
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.
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
Campcaster 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>
. For the automatic install scripts to work, the user
running them must either be root
, or belong to
<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.
File /proc/asound/cards should contain entry(s) for your soundcard(s).
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 http://packages.debian.org/cgi-bin/search_packages.pl....
Then run "alsaconf" and check /proc/asound/cards again.
Obtaining Campcaster sources
Campcaster sources come in two different tarballs:
campcaster-<version>.tar.bz2
- the
Campcaster source files
campcaster-libraries-<version>.tar.bz2
-
external libraries used by Campcaster
Both files can be downloaded from http://sourceforge.net/projects/campcaster/
.
After downloading the files, untar them in the same directory:
tar xfj campcaster-<version>.tar.bz2
tar xfj campcaster-libraries-<version>.tar.bz2
which will create a campcaster-<version>
directory, with all the required files to compile and install
Campcaster.
Compiling Campcaster
To compile Campcaster, enter the Campcaster directory, and execute
the following commands:
cd campcaster-<version>
./configure
--prefix=/usr/local/campcaster --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 Campcaster installation directory here, <ls-installdir>
(as mentioned above). A sensible value to use here is /usr/local/campcaster
.
--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 Campcaster 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 Campcaster, consider using the following configure options:
--with-create-database specify whether the Campcaster database and database
user should be created (no)
--with-create-odbc-data-source
specify whether the ODBC data source for Campcaster
should be created (no)
--with-init-database specify whether the Campcaster database tables
should be initialized (no)
--with-configure-apache specify whether apache should be configured for
Campcaster through its conf.d directory (no)
For a full list of options, see ./configure --help
Installing Campcaster
After a successful compilation, to install Campcaster, you can install
Campcaster by typing:
make install
This will install Campcaster 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 Campcaster 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 Campcaster web interface
or the GUI application.
For the web interface, point your browser to the following URL: http://<yourhost>/campcaster/
.
The GUI application can be started by issuing the following command:
<ls-installdir>/bin/campcaster-studio.sh
For your first login, use the following values:
- username: root
- password: q
Have fun!