Quickstart Ubuntu

From MtdWiki

Table of contents

Ubuntu Quickstart

Contributors: SpacePony,Osiris


Quick start guide for mt-daapd setup under Ubuntu. Much of this is taken from the Tarball guide. Logic suggests it's just as useful for Debian. I hope to make Ron a deb package one day and depreciate this.

Note that this quickstart is one that does a full build. If you just want to install binaries, this is probably a better link (http://dotnet.org.za/matt/articles/48417.aspx).

Ubuntu 7.10: The easy way, is to install the mt-daapd package and open localhost:3689 in a browser to configure. The username is blank the password is mt-daapd. Here is a complete guide. (http://jamiedumbill.com/index.php?page=28)


Overview


The steps to install mt-daapd are as follows:

  • Download and install dependencies
  • Build/install mt-daapd
  • Configure mt-daapd
  • Set up startup scripts (optional)
  • Start mt-daapd


Downloading Dependencies


Non-standard packages required:

libsqlite0

libsqlite0-dev

gawk

gcc (this will install gcc-3.3)

g++ (install c++ compiler)

libid3tag0-dev

libgdbm-dev

avahi-client

make

Note: I may be missing some here, feel free to add packages.

  • Additional Note - Chris; 20Aug07

While installing nightly svn-1586, I installed the list of packages above, but continued to have avahi errors until I installed the following packages:

avahi-daemon avahi-discover libnss-mdns

  • Flac/Ogg Note - Stephanie; 20Sept07

If you are planning to transcode Ogg or Flac, make sure to install the regular and development libraries.

Build/install mt-daapd


1) Download mt-daapd from [1] (http://mt-daapd.org)

2) Extract source to a directory (e.g. "/opt/src/mt-daapd[version]")

sudo tar -zxvf /opt/src/mt-daapd[version]


3) Build/install

cd /opt/src/mt-daapd[version]

sudo ./configure; make; make install

sudo mkdir /var/cache/mt-daapd (needed for the db_dir mentioned in mt-daapd.conf file - see mt-daapd.conf file comments for more information)

sudo chmod a+wrx /var/cache/mt-daapd/ (allows "nobody" user to write to this directory - see mt-daapd.conf file comments for more information)


Note: I found that when building the nightly release (svn-1586) for 7.04 (feisty fawn) I had to use the following switches with configure:

./configure -prefix=/usr --enable-sqlite --enable-avahi

Then "make" and "sudo make install"

-Kenelm July 14, 2007

Configure mt-daapd


Copy mt-daapd.conf from the src contrib directory

cp /opt/src/mt-daapd[version]/contrib/mt-daapd.conf /usr/local/etc/

sudo nano /usr/local/etc/mt-daapd.conf

Change web_root variable to read /usr/local/share/mt-daapd/admin-root

Change other variables as needed.

Make sure to create the mp3 directory and put some mp3 files in there.

Set up startup scripts (optional)


cd /etc/init.d/

sudo ln -s /usr/local/sbin/mt-daapd mt-daapd

sudo update-rc.d mt-daapd defaults


See http://www.debian.org/doc/debian-policy/ for more info on startup scripts and such.


Start mt-daapd


Chris Hill in his Mandrake guide says:

mt-daapd -f

This will show you what the daemon is doing and if it encounters errors

If you're happy with that, run in the background with

mt-daapd start


Or restart your computer as you have already set up fancy startup scripts

Troubleshooting

For some windows formatted drives (i.e. an external hard drive formatted for windows) only user permissions are available.

You must go to /etc/mt-daapd.conf and change runas to be the same user that has rights to the files on the drive.

If you are having trouble with source, the debian package is always available (for stable)

Other resources

See http://dotnet.org.za/matt/articles/48417.aspx for another very simple Ubuntu setup guide.

Using apt on Feisty Fawn (Ubuntu 7.04)

Contributed by Chris

As of now (2007-08-22) there is a package in the universe - Repository of Ubuntu (7.04), once you have Universe enabled, the installation can be done as following:

Installation

sudo apt-get install mt-daapd

Configuration file is at /etc/mt-daapd.conf, so make your changes there.

Also you have to remember to add the Avahi Daemon to your startup scripts with

sudo update-rc.d avahi-daemon defaults

that provides mt-daapd the Apple ZeroConf services (also known as "Rendezvous" or "Bonjour"). Otherwise your iTunes machines won't be able to discover the mt-daapd server even thou the server itself is running properly.

To enable smart playlists you have to use the administration WebUI (default: http://localhost:3689). You can edit smart playlists under the smart playlists tab either directly as logic script or using the wizard (provided) to fill the rules for playlist generation point-n-click way.

Note: The wizard is illogical in the sense that when you enter the expression they are updated into main configuration window and there is no button for OK, Save or Close to close the wizard window. You'll just have to close the window as you were killing it. (With regards to version 0.2.4+r1376-2 of the deb package)

other Ubuntu versions

I haven't looked into it, but it is likely, that mt-daapd is available in the Universe repository for other versions than 7.04 as well.

Also available for 7.10 / the Gutsy Gibbon.

--- okay seems like it is not in universe for edgy (6.10)