Firefly Freelink
From NAS-Central Buffalo - The Linkstation Wiki
(→Building the Debian package: Added: To handle source packages the package "build-essential" must be installed before (dpkg-dev, etc.)) |
|||
| (29 intermediate revisions not shown) | |||
| Line 1: | Line 1: | ||
| - | [[Image:Ff_logo_sm.gif]] | + | {{Articles|Mediaserver}} |
| + | [[Image:Ff_logo_sm.gif ]] | ||
| - | == | + | == About == |
| + | [http://www.fireflymediaserver.org/ Firefly] is a flexible open-source media server, that also supports iTunes. | ||
| - | + | It's technical name is still "mt-daapd", the previous name of the project. | |
| - | + | == Requirements == | |
| + | # Lots of good music | ||
| + | # Something to play lots of your good music on - Like a Roku Soundbridge | ||
| + | # Or iTunes on your pc | ||
| - | + | == Installation == | |
| - | + | === From Debian Repository === | |
| + | The easiest way to get Firefly is to install it from the Debian repository. | ||
| + | Unfortunately the package for Debian 4.0 Etch (=FreeLink 1.0) is quite outdated at version 0.2.4 r1376. | ||
| - | + | <u>It is not recommended to install this version.</u> | |
| - | + | You can try it by using: | |
| - | + | apt-get install mt-daapd | |
| + | === From Debian Package === | ||
| + | A way to get a more up-to-date version is to create a Debian 4.0 Etch package yourself, e.g. from the package source of Debian 4.1 Lenny (=testing as of 2008-01). | ||
| + | |||
| + | Each [http://packages.qa.debian.org/m/mt-daapd.html Debian package has its own homepage] with the package definition. | ||
| + | There you can see which versions are available and for which system platforms (see build logs). | ||
| + | |||
| + | The advantage of this that you get a Debian-compatible configuration including start/stop scripts and that you can use all the package tools for it. | ||
| + | |||
| + | As of 2007-08 the latest version is 0.9 r1586 and this is also the recommended version. | ||
| + | |||
| + | It is recommended to create an extra directory for your self-build packages or packages pre-build by others. | ||
| + | |||
| + | mkdir /mnt/disk1/packages | ||
| + | chown root:root /mnt/disk1/packages | ||
| + | chmod u=rwx,go= /mnt/disk1/packages | ||
| + | |||
| + | ====Building the Debian package==== | ||
| + | To be able to download the source of the updated package via apt add the following line to /etc/apt/sources.list . | ||
| + | |||
| + | deb-src http://ftp.debian.org/debian/ lenny main | ||
| + | |||
| + | To avoid getting other unwanted sources from the other Debian version (here 4.1 Lenny) it is recommend to add the following line to /etc/apt/apt.conf . | ||
| + | |||
| + | APT::Default-Release "stable"; | ||
| + | |||
| + | If the file /etc/apt/apt.conf does not exist, then just create it via the following command and add the line from above. | ||
| + | |||
| + | touch /etc/apt/apt.conf | ||
| + | |||
| + | After these preparations update apt to activate the added repository, get the GPG public key of the package maintainer to be sure that you download only clean non-malicious files, install the build-essential package for handling package sources, then get the package source of Firefly (=mt-daapd) and resolve its build dependencies. | ||
| + | |||
| + | apt-get update | ||
| + | gpg --keyserver hkp://pgpkeys.pca.dfn.de --recv-keys 78446F26 | ||
| + | aptitude install build-essential | ||
| + | |||
| + | cd /mnt/disk1/packages | ||
| + | apt-get -t lenny source mt-daapd | ||
| + | apt-get -t lenny build-dep mt-daapd | ||
| + | |||
| + | Now its time to build the package. | ||
| + | |||
| + | cd mt-daapd-0.9~r1586/ | ||
| + | dpkg-buildpackage | ||
| + | |||
| + | The signing error at the end of the "dh_builddeb" step can be ignored. | ||
| + | |||
| + | ====Installing a self-build/pre-build Debian package==== | ||
| + | Self-build/pre-build packages are installed via "dpkg". | ||
| + | Mostly the first install fails due to missing dependencies, so we let apt fix this for us by just installing again with an apt tool. | ||
| + | |||
| + | cd /mnt/disk1/packages | ||
| + | dpkg --install mt-daapd_0.9~r1586-1_arm.deb | ||
| + | apt-get install mt-daapd | ||
| + | |||
| + | ====Starting/Stopping and Configuration==== | ||
| + | You can start/stop Firefly with | ||
| + | |||
| + | invoke-rc.d mt-daapd start|stop|restart | ||
| + | |||
| + | The configuration is stored in /etc/mt-daapd.conf | ||
| + | |||
| + | === Manually From Source === | ||
| + | |||
| + | apt-get install libid3tag0 libid3tag0-dev | ||
| + | |||
| + | apt-get install sqlite libsqlite0 libsqlite0-dev | ||
| + | |||
| + | apt-get install g++ build-essential | ||
| + | Be careful where you build, as you want to make sure you have room for the compilation. /tmp is too small for building. | ||
| + | cd /usr/src | ||
| + | |||
| + | Download Firefly mediaserver | ||
| + | You will need to check out [http://nightlies.mt-daapd.org/ the nightlies] and change the address below to the latest version | ||
| + | <nowiki>wget http://nightlies.mt-daapd.org/dl.php?FILE=mt-daapd-svn-1696.tar.gz</nowiki> | ||
| + | *Note: I personally had issues with svn-1696 crashing every time Firefly rescanned my library. After discussion with Ron Pedde (Firefly developer) I was advised to use [http://nightlies.mt-daapd.org/dl.php?FILE=mt-daapd-svn-1586.tar.gz version svn-1586] due to it's greater stability. svn-1586 has been working flawlessly for me. | ||
| + | <br /> | ||
| + | Untar and enter folder (replace with whatever latest version is) | ||
| + | tar -zxvf mt-daapd-svn-1696.tar.gz && cd mt-daapd-svn-1696 | ||
| + | |||
| + | |||
| + | |||
| + | Configure it with the following (all one line) | ||
./configure --prefix=/usr/local --enable-browse --enable-query --enable-mdns --with-id3tag=/usr/local --enable-sqlite | ./configure --prefix=/usr/local --enable-browse --enable-query --enable-mdns --with-id3tag=/usr/local --enable-sqlite | ||
--sysconfdir=/etc | --sysconfdir=/etc | ||
| + | Make and install it (if you are not su or root, you will have to add sudo to make install only) | ||
| + | make | ||
make install | make install | ||
mkdir /etc/mt-daapd | mkdir /etc/mt-daapd | ||
| Line 25: | Line 116: | ||
cd /etc/mt-daapd | cd /etc/mt-daapd | ||
| - | + | nano mt-daapd.conf | |
Should only need to change where to look for your music files | Should only need to change where to look for your music files | ||
| - | + | ==== Starting at boot ==== | |
| + | |||
| + | I've nicked the start script from andre's mt-daapd ppc package (if you don't mind andre) | ||
| + | |||
| + | nano /etc/init.d/firefly | ||
| + | |||
| + | and add all this | ||
| + | |||
| + | #! /bin/sh | ||
| + | set -e | ||
| + | |||
| + | # /etc/init.d/firefly: start and stop the DAAP daemon | ||
| + | |||
| + | DAEMON=/usr/local/sbin/mt-daapd | ||
| + | DAAPD_OPTS="" | ||
| + | DAAPD_CONFIG_FILE=/etc/mt-daapd/mt-daapd.conf | ||
| + | |||
| + | test -x $DAEMON || exit 0 | ||
| + | |||
| + | case "$1" in | ||
| + | start) | ||
| + | if ! grep -q /usr/local/lib /etc/ld.so.conf; then | ||
| + | echo /usr/local/lib >> /etc/ld.so.conf | ||
| + | ldconfig | ||
| + | fi | ||
| + | |||
| + | echo -n "Starting DAAP daemon: firefly" | ||
| + | if pidof $DAEMON >/dev/null 2>&1; then | ||
| + | echo " apparently already running." | ||
| + | exit 0 | ||
| + | fi | ||
| + | if [ ! -s "$DAAPD_CONFIG_FILE" ]; then | ||
| + | echo " missing or empty config file $DAAPD_CONFIG_FILE" | ||
| + | exit 1 | ||
| + | fi | ||
| + | start-stop-daemon --start --quiet --background \ | ||
| + | --exec $DAEMON -- -c "$DAAPD_CONFIG_FILE" $DAAPD_OPTS | ||
| + | echo "." | ||
| + | ;; | ||
| + | stop) | ||
| + | echo -n "Stopping DAAP daemon: firefly" | ||
| + | killall $DAEMON >/dev/null 2>&1 | ||
| + | echo "." | ||
| + | ;; | ||
| + | |||
| + | restart) | ||
| + | set +e | ||
| + | echo -n "Restarting DAAP daemon: firefly" | ||
| + | killall $DAEMON >/dev/null 2>&1 | ||
| + | sleep 2 | ||
| + | if ! start-stop-daemon --start --quiet --background \ | ||
| + | --exec $DAEMON -- -c "$DAAPD_CONFIG_FILE" $DAAPD_OPTS | ||
| + | then | ||
| + | echo "start failed?" | ||
| + | fi | ||
| + | echo "." | ||
| + | ;; | ||
| + | |||
| + | *) | ||
| + | echo "Usage: /etc/init.d/firefly {start|stop|restart}" | ||
| + | exit 1 | ||
| + | esac | ||
| + | |||
| + | exit 0 | ||
| + | |||
| + | Then add the links | ||
| + | |||
| + | cd /etc/rc2.d && ln -s /etc/init.d/firefly S20firefly | ||
| + | |||
| + | cd /etc/rc6.d && ln -s /etc/init.d/firefly K20firefly | ||
| + | |||
| + | cd /etc/rc0.d && ln -s /etc/init.d/firefly K20firefly | ||
| + | |||
| + | Think it needs one of these | ||
| + | |||
| + | chmod a+x /etc/init.d/firefly | ||
| + | |||
| + | ==== Run it ==== | ||
| + | |||
| + | Should be able to start it up now | ||
| + | |||
| + | /usr/local/sbin/mt-daapd | ||
| + | or better still use the start/stop script | ||
| + | /etc/init.d/firefly start | ||
| + | |||
| + | This errors because it looks for mt-daapd.conf in /usr/local/etc/mt-daapd.conf ?? | ||
I've just linked to it | I've just linked to it | ||
| Line 34: | Line 210: | ||
mkdir /usr/local/etc | mkdir /usr/local/etc | ||
ln -s /etc/mt-daapd/mt-daapd.conf /usr/local/etc/mt-daapd.conf | ln -s /etc/mt-daapd/mt-daapd.conf /usr/local/etc/mt-daapd.conf | ||
| + | |||
| + | Try it now | ||
| + | |||
| + | /etc/init.d/firefly start | ||
| + | |||
| + | ==Using== | ||
| + | Directly after installation issue "top" and you should see mt-daapd at the top of the list. | ||
| + | |||
| + | top | ||
| + | |||
| + | Once that dissapears (it has finished checking your music library) you should be able to see it via the web interface | ||
| + | |||
| + | <nowiki>http://<LINKSTATION-IP>:3689</nowiki> | ||
| + | |||
| + | You can put whatever you like as user but the passwd is mt-daapd | ||
| + | |||
| + | That should show you something like this | ||
| + | |||
| + | [[Image:Firefly.JPG]] | ||
| + | |||
| + | Run over to your Roku Soundbridge and check if its working - then fire up iTunes on your pc and see all your files | ||
| + | |||
| + | |||
| + | [[User:Bauldrick|Bauldrick]] 09:13, 21 December 2006 (EST) | ||
Latest revision as of 21:30, 11 January 2008
Contents |
About
Firefly is a flexible open-source media server, that also supports iTunes.
It's technical name is still "mt-daapd", the previous name of the project.
Requirements
- Lots of good music
- Something to play lots of your good music on - Like a Roku Soundbridge
- Or iTunes on your pc
Installation
From Debian Repository
The easiest way to get Firefly is to install it from the Debian repository. Unfortunately the package for Debian 4.0 Etch (=FreeLink 1.0) is quite outdated at version 0.2.4 r1376.
It is not recommended to install this version.
You can try it by using:
apt-get install mt-daapd
From Debian Package
A way to get a more up-to-date version is to create a Debian 4.0 Etch package yourself, e.g. from the package source of Debian 4.1 Lenny (=testing as of 2008-01).
Each Debian package has its own homepage with the package definition. There you can see which versions are available and for which system platforms (see build logs).
The advantage of this that you get a Debian-compatible configuration including start/stop scripts and that you can use all the package tools for it.
As of 2007-08 the latest version is 0.9 r1586 and this is also the recommended version.
It is recommended to create an extra directory for your self-build packages or packages pre-build by others.
mkdir /mnt/disk1/packages chown root:root /mnt/disk1/packages chmod u=rwx,go= /mnt/disk1/packages
Building the Debian package
To be able to download the source of the updated package via apt add the following line to /etc/apt/sources.list .
deb-src http://ftp.debian.org/debian/ lenny main
To avoid getting other unwanted sources from the other Debian version (here 4.1 Lenny) it is recommend to add the following line to /etc/apt/apt.conf .
APT::Default-Release "stable";
If the file /etc/apt/apt.conf does not exist, then just create it via the following command and add the line from above.
touch /etc/apt/apt.conf
After these preparations update apt to activate the added repository, get the GPG public key of the package maintainer to be sure that you download only clean non-malicious files, install the build-essential package for handling package sources, then get the package source of Firefly (=mt-daapd) and resolve its build dependencies.
apt-get update gpg --keyserver hkp://pgpkeys.pca.dfn.de --recv-keys 78446F26 aptitude install build-essential
cd /mnt/disk1/packages apt-get -t lenny source mt-daapd apt-get -t lenny build-dep mt-daapd
Now its time to build the package.
cd mt-daapd-0.9~r1586/ dpkg-buildpackage
The signing error at the end of the "dh_builddeb" step can be ignored.
Installing a self-build/pre-build Debian package
Self-build/pre-build packages are installed via "dpkg". Mostly the first install fails due to missing dependencies, so we let apt fix this for us by just installing again with an apt tool.
cd /mnt/disk1/packages dpkg --install mt-daapd_0.9~r1586-1_arm.deb apt-get install mt-daapd
Starting/Stopping and Configuration
You can start/stop Firefly with
invoke-rc.d mt-daapd start|stop|restart
The configuration is stored in /etc/mt-daapd.conf
Manually From Source
apt-get install libid3tag0 libid3tag0-dev
apt-get install sqlite libsqlite0 libsqlite0-dev
apt-get install g++ build-essential
Be careful where you build, as you want to make sure you have room for the compilation. /tmp is too small for building.
cd /usr/src
Download Firefly mediaserver You will need to check out the nightlies and change the address below to the latest version
wget http://nightlies.mt-daapd.org/dl.php?FILE=mt-daapd-svn-1696.tar.gz
- Note: I personally had issues with svn-1696 crashing every time Firefly rescanned my library. After discussion with Ron Pedde (Firefly developer) I was advised to use version svn-1586 due to it's greater stability. svn-1586 has been working flawlessly for me.
Untar and enter folder (replace with whatever latest version is)
tar -zxvf mt-daapd-svn-1696.tar.gz && cd mt-daapd-svn-1696
Configure it with the following (all one line)
./configure --prefix=/usr/local --enable-browse --enable-query --enable-mdns --with-id3tag=/usr/local --enable-sqlite --sysconfdir=/etc
Make and install it (if you are not su or root, you will have to add sudo to make install only)
make make install mkdir /etc/mt-daapd cp contrib/mt-daapd.* /etc/mt-daapd/ cd /etc/mt-daapd
nano mt-daapd.conf
Should only need to change where to look for your music files
Starting at boot
I've nicked the start script from andre's mt-daapd ppc package (if you don't mind andre)
nano /etc/init.d/firefly
and add all this
#! /bin/sh
set -e
# /etc/init.d/firefly: start and stop the DAAP daemon
DAEMON=/usr/local/sbin/mt-daapd
DAAPD_OPTS=""
DAAPD_CONFIG_FILE=/etc/mt-daapd/mt-daapd.conf
test -x $DAEMON || exit 0
case "$1" in
start)
if ! grep -q /usr/local/lib /etc/ld.so.conf; then
echo /usr/local/lib >> /etc/ld.so.conf
ldconfig
fi
echo -n "Starting DAAP daemon: firefly"
if pidof $DAEMON >/dev/null 2>&1; then
echo " apparently already running."
exit 0
fi
if [ ! -s "$DAAPD_CONFIG_FILE" ]; then
echo " missing or empty config file $DAAPD_CONFIG_FILE"
exit 1
fi
start-stop-daemon --start --quiet --background \
--exec $DAEMON -- -c "$DAAPD_CONFIG_FILE" $DAAPD_OPTS
echo "."
;;
stop)
echo -n "Stopping DAAP daemon: firefly"
killall $DAEMON >/dev/null 2>&1
echo "."
;;
restart)
set +e
echo -n "Restarting DAAP daemon: firefly"
killall $DAEMON >/dev/null 2>&1
sleep 2
if ! start-stop-daemon --start --quiet --background \
--exec $DAEMON -- -c "$DAAPD_CONFIG_FILE" $DAAPD_OPTS
then
echo "start failed?"
fi
echo "."
;;
*)
echo "Usage: /etc/init.d/firefly {start|stop|restart}"
exit 1
esac
exit 0
Then add the links
cd /etc/rc2.d && ln -s /etc/init.d/firefly S20firefly
cd /etc/rc6.d && ln -s /etc/init.d/firefly K20firefly
cd /etc/rc0.d && ln -s /etc/init.d/firefly K20firefly
Think it needs one of these
chmod a+x /etc/init.d/firefly
Run it
Should be able to start it up now
/usr/local/sbin/mt-daapd
or better still use the start/stop script
/etc/init.d/firefly start
This errors because it looks for mt-daapd.conf in /usr/local/etc/mt-daapd.conf ??
I've just linked to it
mkdir /usr/local/etc ln -s /etc/mt-daapd/mt-daapd.conf /usr/local/etc/mt-daapd.conf
Try it now
/etc/init.d/firefly start
Using
Directly after installation issue "top" and you should see mt-daapd at the top of the list.
top
Once that dissapears (it has finished checking your music library) you should be able to see it via the web interface
http://<LINKSTATION-IP>:3689
You can put whatever you like as user but the passwd is mt-daapd
That should show you something like this
Run over to your Roku Soundbridge and check if its working - then fire up iTunes on your pc and see all your files
Bauldrick 09:13, 21 December 2006 (EST)

