Airtime for Broadcasters

Automated installation

This installation method is intended for computers running Ubuntu or Debian GNU/Linux, and is the recommended method for new Airtime users.

After setting up the Sourcefabric package repository and installing PostgreSQL, as described in the previous chapter, you can install the Airtime packages with:

$ sudo mkdir -p /tmp/pear/cache
$ sudo apt-get install airtime airtime-audio-samples

This command will install all of the Airtime components, plus many other packages that Airtime requires in order to run.
 

The airtime package contains the Airtime web interface, while the airtime-audio-samples package contains some media files that you can use to test the playout system, and follow the chapters in this book. For a production Airtime server, you do not need the airtime-audio-samples package.

Once all the packages have been downloaded and installed, you will be asked a few questions about the configuration of the Airtime system. You can accept the default settings by pressing the Enter key, or use the Tab key to change your selection.

Firstly, you will asked if you wish to create an Apache virtual host web server configuration automatically.

If so, you will need to enter the domain name that your station staff will use to access Airtime. For a test server that will only be accessed directly from the same machine, you can use the setting of 'localhost' here.

Next, set the contact email address of the server administrator, which is good practice in case of any server problems. For a test server, using an address at the localhost is acceptable.

Debian and Ubuntu servers are set up with a default Apache configuration, which might block station staff from accessing Airtime. If you wish, this default configuration can be removed automatically for you.

You may also be warned about upgrading the rabbitmq-server package. If you do not have an existing installation of RabbitMQ, it is safe to press the Enter key to continue.


The Airtime installer will then run a script to check that your server environment is set up correctly.


Configure PHP

Edit the php.ini file to change PHP settings for the server to those that Airtime requires.

$ sudo nano /etc/php5/apache2/php.ini 

 

This is a long file, so use the search tool (press Ctrl+W) to find the particular lines that you're looking for. The recommended initial settings for Airtime are:

memory_limit = 256M
magic_quotes_gpc = Off
file_uploads = On
upload_tmp_dir = /tmp
phar.readonly = Off

If any of the above lines are commented out with a semi-colon at the beginning, you will need to remove that semi-colon for the setting to work.

You will also need to set the time zone that Airtime will display to match local time at your station. Find the line in the php.ini file which begins date.timezone, remove the semi-colon comment if present, and add the required time zone to the end of the line. For example:

date.timezone = "America/Toronto"

The time zone value should be in quotes, as above. You can find the correct value for your station's time zone in the appendix of this book.

Press Ctrl+O to save the php.ini file, then Ctrl+X to exit the nano editor.

Secure and enable Icecast

If you have installed the Icecast streaming media server, before running it for the first time you should edit the file /etc/icecast2/icecast.xml to change the default <source-password>, <relay-password> and <admin-password> values from 'hackme' to something more secure.

$ sudo nano /etc/icecast2/icecast.xml

Then set up the Icecast server to start automatically:

$ sudo nano /etc/default/icecast2

by setting the value of ENABLE to true on the last line of the /etc/default/icecast2 file:

ENABLE=true

Save and close the file with Ctrl+O and Ctrl+X, then start Icecast:

$ sudo service icecast2 start

The server should respond:

Starting icecast2: Starting icecast2
Detaching from the console
icecast2.

Configure Liquidsoap

Before running Airtime, you need to edit the Liquidsoap configuration file to tell the system what kind of output you require: to the soundcard, direct Ogg Vorbis streaming, direct MP3 streaming, or all three. Open the Liquidsoap configuration file with:

$ sudo nano /etc/airtime/liquidsoap.cfg

For soundcard output, change the value of output_sound_device to true. You can also set the values of output_icecast_vorbis, output_icecast_mp3 to true or false, and several other configuration options in this file.

In the stream settings section, configure icecast_host and icecast_pass for  your Icecast server, if you are using the direct streaming option. The IP address 127.0.0.1 is the standard address of localhost, which you would use if Airtime and Icecast were installed on the same machine. The port number 8000 is the default server port for Icecast.

For a production server, you will probably want to change the webstream mountpoint names and webstream metadata settings to suit your station.


Configure Airtime

Optionally, you may wish to edit the file /etc/airtime/airtime.conf to set the directory where Airtime media files are stored. For example, you may wish to store media on a RAID array which is not part of the server's root filesystem.

$ sudo nano /etc/airtime/airtime.conf

Find the line which begins base_files_dir and change the directory path to the one that you require, for example:

base_files_dir = /mnt/raid10/media

You can also set the PostgreSQL database host, and the username and password to connect to the database with in this file. Save and close the file with Ctrl+O and Ctrl+X.


Finally, reboot the server so that the software can be initialized correctly. After that, you should be able to log in to the Airtime administration interface, as shown in the Getting started chapter.