Table of Contents

Ampache on Ubuntu

Ubuntu Specific Changes

XSPF JukeBox Flash Player

Due to no free tools being available in Ubuntu to compile xspf_jukebox.fla from source at build time the XSPF Flash Player has been removed from the Ampache package in the Ubuntu repositories. As a work around in ampache-3.5.4-9ubuntu2 to reinstall the XSPF Flash Player, simply use grab_xspf.sh which can be found in /usr/share/ampache/www/bin. In a terminal simply run

/bin/bash /usr/share/ampache/www/bin/grab_xspf.sh

this will reinstall the flash player and make it available for use.

Logging

In ampache-3.5.4-9ubuntu2 logging support has been added to the Ampache package. The package now creates

/var/log/ampache

with the proper permissions and group ownership. So all the user has to do is turn on logging in ampache.cfg.php. I have also utilized logrotate to rotate the logs daily, and logs older than 7 days old are deleted. These setting can be changed in

/etc/logrotate.d/ampache.

Catalog Update

The Ampache package also sets up a daily cron job to run

/usr/share/ampache/www/bin/catalog_update.inc -a -c

The ”-a” and ”-c” options, clean and add to the catalog daily. Additional options are available, please see

/etc/cron.daily/ampache

for a complete list.

Installation Of Ampache

Installation Directories

When installing Ampache from the repositories the source of Ampache will be installed to:

/usr/share/ampache/www/

Ampache's configuration file (ampache.cfg.php) should be placed in:

/etc/ampache/

Dependencies

The ampache package depends on the following packages to be installed. These packages will be automatically downloaded and installed during this process:

It is also recommended that you install these additional packages if not already installed:

Maverick

Maverick will have Ampache-3.5.4-7ubuntu1 included in the archives. Installing Ampache is as easy as:

UPDATE: An SRU has been submitted so Maverick will have Ampache-3.5.4-7ubuntu2.1.

apt-get install ampache

but the first thing you need to do is to insure that the following lines are uncommented (that means remove the ”#”) in your /etc/apt/sources.list.

deb http://us.archive.ubuntu.com/ubuntu/ maverick main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ maverick main restricted universe multiverse

The Ampache package does not pull in MySQL automatically for two reasons.

  1. Ampache supports using a remote MySQL server.
  2. If an older version of MySQL is already installed, an automatic upgrade may render the MySQL db information unusable.

So, we recommend that you backup before upgrading and in general treat the upgrade with caution. To install mysql-server:

sudo apt-get install mysql-server

Installing Ampache From Source

Installing Ampache from source is fairly easy. These are the basic steps you would use to install Ampache on your etch machine. Apache, PHP5 and MySQL will have to be installed and all their related dependencies before you install Ampache. The first thing we need to do is to go get some needed tools namely dget and debuild which are part of the devscripts and build-essential packages.

apt-get install ubuntu-dev-tools

First let's make a directory we can work in

cd $HOME
mkdir $HOME/ampache
cd $HOME/ampache

Now let's go get Ampache's source package using dget -x.

dget -x http://archive.ubuntu.com/ubuntu/pool/universe/a/ampache/ampache_3.5.4-7ubuntu1.dsc

Now let's build our builder.

pbuilder create

Now let's build the package.

pbuilder build *dsc

Now that we have a nice new binary package let's install it

dpkg -i /var/cache/pbuilder/result/ampache*deb

Ampache is now installed. It still needs configured: Continue to Ampache's Initial Configuration

Bzr Branches

For those folks that like working with bzr branches, Ampache and the Ampache packaging are available on launchpad.

bzr branch lp:~cjsmo/+junk/ampache (packaging branch)
bzr branch lp:~cjsmo/ampache/trunk (source branch)