Configuration and testing.

Some of the instructions here are a bit sketchy, because I'd only be duplicating information available elsewhere.

The first job to do is to create the mysql database. There is an SQL script you can import in the interface/sql directory. Be sure to change the password in the script first. You will need to alter the php script 'interface/config.php' to reflect the password you choose. The variable INSTALL_ROOT should also be set to the filesystem location where you have installed rivulet (e.g. '/usr/local/rivulet').

The next thing is to get apache, mysql and php4 working with the front end php interface. You do this as you would for any other php application. Firstly add lines to your apache config files to create a new directory rooted at rivulet/interface, then make sure apache is working OK with php4 and mysql. There is a sample apache config file at rivulet/misc/rivulet.conf. This is for a virtual server setup with the hostname (ServerName) 'rivulet', so you may have to adapt it to your own system. Then try out the page 'schedule.php' and see if it comes up. If not, you have some kind of problem with the way you have set up apache, php4, and mysql. If it comes up, you can try adding programs to the schedule by clicking on empty time slots. This should work without the rest of the system, apart from the 'reload' button.

The next thing to configure is the stream output. The config files for this are in rivulet/etc/streams.d, in separate directories for each stream client you want to run. The jackout stream does not need configuring. The icecast one does, which is what I'll explain next. (The darkice and oddcast stream types are experimental, so I will leave them out of this documentation.) If you go into the 'icecast' directory, you will see two files: 'config' and 'ices-jack.xml'. The second of these is just a standard config file for ices - you can read up on how to write this here http://www.icecast.org/docs/ices-2.0.0/. Try commenting out the 'savefile' part to start with. It might be a good idea at this point to fire up jackd (use qjackctl for an easy interface to the server) and check that ices will start and stream to the server you're using with this config file. 'config' is a file read by the stream script to tell it how the ices client has been set up. It's in option=''value'' form, with comments to explain each option. The main thing is to make sure that the options in this file match the ones you have set in the ices config file. (The reason for having this file is to give the stream script quick access to the few parameters it actually needs to know, rather than having to parse an xml file every time it runs).

The next thing is to try starting the back end system by running 'rivulet/bin/system start' as your normal user. You should get something back like this:

$ ./system start

Starting scheduler ... OK

Starting jack daemon ... OK

Starting ecastream ... OK

System started

OK
If it finishes with an error, look at the commands that are being used to start the various programs (in the 'system' script), and see if you can replicate the error. You can stop it again by running 'rivulet/bin/system stop'.

The final thing to do is to create a user to run rivulet as, and move the init script ('rivulet/misc/rivulet-init') to /etc/init.d. Edit the file to set the user name you want to run rivulet under. You may also need to change the rivuletroot variable to reflect the location where you installed it. You should then be able to start and stop rivulet as root by running '/etc/init.d/rivulet-init start/stop'. You can make symbolic links to start the system on bootup, as for any other init script.

Having started the system, you should be able to view the 'rivulet/interface/controller.php' page in a web browser.

andy 2006-03-26