FreeBSD Quickstart
Contributors: [[User:Kevin|Kevin Reiter]], [[User:Jamiew|Jamie Wilkinson]]
This Quickstart guide was first written by Kevin Reiter. See the original here.
This was done on FreeBSD 6.0 with a current Ports tree as of 17May2006, and tested using iTunes v6.0.4.2 on a Windows XP Pro laptop. It has been updated to reflect FreeBSD 6.2 as of 2007 June 21, which does not require any mucking about with mDNSResponder
Overview
It is extremely easy to get mt-daapd running on FreeBSD, and fairly straightforward to then upgrade it to the latest nightlies to keep things interesting.
Ports Required
* audio/mt-daapd
Build Instructions
Build each port with no special options (just a make install will do the trick.)
cd /usr/ports/audio/mt-daapd sudo make install
Add the following lines to your /etc/rc.conf file:
mt_daapd_enable="YES"
Note: have sighted usage of "daapd_enable" and also "mt-daapd_enable", but the above works on my FreeBSD 6.0 system
Building the latest nightly from source
Download the latest nightly tarball & unpack
- Requires sqlite and libid3tag ports (should be installed if you previously installed mt-daapd with ports)
- Recommend installing the port first, which will automagically fetch dependencies and give you a nice rc.d script
./configure --enable-sqlite --with-id3tag=/usr/local --with-gdbm-includes=/usr/local/include --prefix=/usr/local CFLAGS="-O2 -fno-strict-aliasing -pipe" CPPFLAGS=" -I/usr/local/include" sudo make install
If you want to use sqlite3 simply install the databases/sqlite3 port and use '--enable-sqlite3'. You may need to delete your /var/db/mt-daapd or fanangle with directory ownerships -- watch the mt-daapd.log file for more info.
Configure mt-daapd
* Copy mt-daapd.conf.sample to mt-daapd.conf:
root@host# cd /usr/local/etc root@host# cp mt-daapd.conf.sample mt-daapd.conf
* Now edit mt-daapd.conf as appropriate. Here's mine with the comments removed for easier reading:
# $Id: mt-daapd.conf,v 1.9 2004/04/18 20:24:14 rpedde Exp $ web_root /usr/local/share/mt-daapd/admin-root port 3689 admin_pw mypassword # Admin password for the control panel db_dir /usr/local/var/mt-daapd/db mp3_dir /usr/local/music # Change this to wherever your music lives servername Chronos iTunes Server # Name this whatever you want it to show up in iTunes as runas daapd playlist /usr/local/etc/mt-daapd.playlist # Change as appropriate password mypassword # Change this to require users to enter a password extensions .mp3,.m4a,.m4p logfile /var/log/mt-daapd.log # db_type sqlite # sqlite by default, can change to sqlite3
* If you want to have playlists displayed within the server (in iTunes), then create the playlist file (/usr/local/etc/mt-daapd.playlist) and add whatever genres you want. Here's mine as a sample:
- # Playlist for my iTunes server
"Celtic" {
genre includes "Celtic"
}
"Country" {
genre includes "Country"
}
"Soundtracks" {
genre includes "Soundtrack"
}
Start mt-daapd
Now, start the mt-daapd and mDNSReponder servers:
root@host# /usr/local/etc/rc.d/mt-daapd.sh start
In order for iTunes to see the server, you need to configure iTunes to look for shared music. This is done by checking a box within the Preferences menu under "Sharing", as shown here:
<to be filled>
If you remember when editing the mt-daapd.conf file, you were asked to provide a password for the web control panel. In order to access the panel, open a browser and point it to your iTunes server on port 3869:
Login with the username "admin" and your password. From there you can view how many listeners are connected, which songs are being streamed, and even modify your server configuration (provided your mt-daapd.conf file is writable by the daapd user.)
(You don't have to modify any Apache settings, or even have Apache installed for this.)
Set up startup scripts (optional)
<to be filled>
... the Media Server.