|Line 25:||Line 25:|
Latest revision as of 23:16, 15 February 2012
|Files need storage and not every star needs wandering|
As far as polaris is concerned, since you have user administration working they should have SFTP/SCP already. You'll need to make the shares: everything group-writable by group "users", except shuttle which should be world writable. They were all in /data/<sharename>. The other protocols on polaris were HTTP, Webdav (both lighttpd), FTP (vsftpd), NFS and SMB (samba). SInce polaris used to run from the soekris, with a little bit of luck you might find the config files of those servers there. Check /etc/lighttpd, /etc/vsftpd.conf, /etc/exports and /etc/samba/smb.conf. The script to kick mpd when a new file was dropped in the "Music" share didn't exist anywhere else.
The UPNP protocol allows for automatic recognition of shared media files by all compatible media players. Mediatomb seems to be the most complete UPNP server available as open source packet. It can be installed from the repositories. The configuration file can be found at /etc/mediatomb/config.xml. The following things require attention in this file. Mediatomb can make use of inotify to detect changes in the monitored folders. To enable inotify the packet inotify-tools needs to be installed.
<server> <ui enabled="yes" show-tooltips="yes"> ... <name>Polaris</name> <pc-directory upnp-hide="yes" /> ... </server> <import hidden-files="no"> <autoscan use-inotify="yes"> <directory location="/data" mode="inotify" recursive="yes" /> </autoscan> ... </import>
After these changes restart Mediatomb using:
sudo /etc/init.d/mediatomb restart
The configuration we did above will work just fine. However if a lot of files get stored on this server we might be better off using MySQL in stead of SQLite. So we start by installing the packet mysql-server. Then we need to create the database Mediatomb will use and set up the necessary user rights.
mysql -u root mysql> CREATE DATABASE mediatomb; mysql> GRANT ALL ON mediatomb.* TO 'mediatomb'@'localhost';
Now we need to switch the databases to use in the configuration file (/etc/mediatomb/config.xml)
<storage caching="yes"> <sqlite3 enabled="no"> <database-file>mediatomb.db</database-file> </sqlite3> <mysql enabled="yes"> ... </mysql> </storage>
Restart Mediatomb and you're done for the UPNP server.
The UPNP server seems to crash occasionally. This setup needs some inspection to get the last kinks out the cable.
More information on Mediatomb configuration can be found here: http://mediatomb.cc/pages/documentation
A possible alternative for Mediatomb could be MediaGateForJava