Quickstart Debian
From MtdWiki
| Table of contents |
Debian Quickstart
Contributors: jxn
Debian (Etch) now have a package in it's distribution. So it is much easier to get a mt-daapd up running. But if you want to run a bleeding edge version of mt-daapd you still need to do an installation from source.
Installing Debian official software
To install mt-daapd in Debian/Etch it is only a few steps to install and set up a server. All steps need to be run as root. I recommend that those are done with the command sudo, as running logged in as root is a realy bad idea.
- If you don't already have sudo, install package
sudoand edit the file/etc/sudoers - Install package
mt-daapdwith apt-get or aptitude.sudo apt-get install mt-daapd - Edit configuration with your favorite editor (emacs) or nano. Change server name and password here (please don't use your user or roots passwords). You could also change which directories to find music files etc.
sudo nano /etc/mt-daapd.conf - Restart mt-daapd.
sudo invoke-rc.d mt-daapd restart
Test the server!
Comments
Now you can manage the server from http://localhost:3689/ unless you have changed it in your configuration.
If you have problems with serving music to Rhythmbox from a small server (Linksys NSLU2), a fast fix is to remove plugin ssc-ffmpeg.so
Installing a nightly build (and getting it running)
Contributers: Underscore
- Download the latest (or another) nightly build from the nightly builds page (http://nightlies.mt-daapd.org/).
- You need to get the .deb that matches your Debian install and architecture. So, if (like me) you are running Debian/Etch on an NSLU2, you need mt-daapd_<version>_etch_arm.deb; if you are running Debian/Sarge on a PC, you need mt-daapd_<version>_sarge_i386.deb
- As root, run dpkg --install <.deb file>
- You will probably be missing a number of dependencies, which will be listed by dpkg; install these by, again as root, running apt-get install <package name>
- mt-daapd should now be installed but is not yet running
Now go to "Configure mt-daapd", below, and come back here if you have problems.
Problems
- If mt-daapd fails to start (as it did for me):
- Invoking it directly (by running mt-daapd), if you used the invoke-rc.d method, to get a "clearer" error message
- If you get something along the lines of Assertion 'client' failed., probably with some mention of avahi, you probably don't have the avahi-daemon package installed. Install this by, as root, running apt-get install avahi-daemon. Now try running mt-daapd again, which should (hopefully) now work
- If you get a different problem, try asking on the forums (http://forums.fireflymediaserver.org/) and, when you've fixed it, come back here and add the solution to this list
- If mt-daapd starts but then exits:
- Check the log file. By default, this uses the syslog; you can output diagnostics to a dedicated file by editing the configuration file. The amount of detail logged to the file can be increased by using the -d parameter followed by a single digit number - the higher the number the more detail - e.g. mt-daapd -d 9 to log everything possible
- If it seems to be having problems accessing the database, check the permissions on /var/cache/mt-daapd and, if it exists, songs.db in that directory. If they are not owned by the runas user (from the configuration file), try chown <runas user> /var/cache/mt-daapd /var/cache/mt-daapd/songs.db, and re-run mt-daapd
- If you get a different problem, try asking on the forums (http://forums.fireflymediaserver.org/) and, when you've fixed it, come back here and add the solution to this list
- Update:
- I had to add vorbis-tools (apt-get install vorbis-tools) to get the transcoding to run correctly. (mt-daapt version 1696) --Rsl360 11:11, 10 Jun 2008 (PDT)
Installing from source
Contributors: thousandrobots and the guy who did the Ubuntu one.
Quick start guide for mt-daapd setup in Debian. Much of this is taken from the quickstart guide for Ubuntu. It works on Debian (Sarge).
Overview
The steps to install mt-daapd are as follows:
- Download and install dependencies
- Download mt-daapd Debian package
- Install mt-daapd package (via dpkg)
- Configure mt-daapd
- Set up startup scripts (optional)
- Start mt-daapd
Download dependencies
Non-standard packages required:
- libsqlite0
- libsqlite0-dev
- gawk
- gcc (this will install gcc-4.0)
- libid3tag0-dev
- libgdbm-dev
Note: others packages may be of use, but it works with just these. You can use "apt-get install" to get each one.
Download and install mt-daapd package
- Download most recent version of mt-daapd from SourceForge (http://sourceforge.net/project/showfiles.php?group_id=98211)
- As root, run:
sudo dpkg --install mt-daapd_0.2.4-1_i386.deb
Configure mt-daapd
- Open the mt-daapd.conf file in a text editor: nano /etc/mt-daapd.conf
- The only value you really need to change is the directory where your music files are stored:
mp3_dir /mnt/Music
- Optionally, make other changes, such as the server name (which will show up in iTunes or wherever) and refresh interval (the interval at which mt-daapd scans for changes to the directory).
- Save your changes and close the file.
Set up startup scripts (optional)
If you want mt-daapd to start automatically when you switch on your server execute this command:
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
If you did the optional automatic startup, you can run in the background with:
sudo invoke-rc.d mt-daapd start
Otherwise, you can run in the background with:
mt-daapd
Access your music
Restart iTunes. The server should show up on the left.
