Install DLNA server under Debian / Ubuntu Linux (MiniDLNA)

  • warning: Illegal string offset 'files' in /data/web/1/000/027/003/273448/htdocs/panticz.de/modules/upload/upload.module on line 281.
  • warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/web/1/000/027/003/273448/htdocs/panticz.de/includes/unicode.inc on line 349.
  • warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/web/1/000/027/003/273448/htdocs/panticz.de/includes/unicode.inc on line 349.
  • warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/web/1/000/027/003/273448/htdocs/panticz.de/includes/unicode.inc on line 349.
  • warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/web/1/000/027/003/273448/htdocs/panticz.de/includes/unicode.inc on line 349.
  • warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/web/1/000/027/003/273448/htdocs/panticz.de/includes/unicode.inc on line 349.
  • warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/web/1/000/027/003/273448/htdocs/panticz.de/includes/unicode.inc on line 349.
  • warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/web/1/000/027/003/273448/htdocs/panticz.de/includes/unicode.inc on line 349.

# configure domU
[ -z $DOMAIN_NAME ] && DOMAIN_NAME=dlna
[ -z $DOMAIN_MAC ] && DOMAIN_MAC=00:d1:1a:00:00:00
[ -z $DOMAIN_RAM ] && DOMAIN_RAM=256Mb
[ -z $DOMAIN_HDD ] && DOMAIN_HDD=2Gb

# create domU
http://www.panticz.de/DomU-Debian-Sid

# add repository (squezze only)
if [ $(lsb_release -cs) == "squeeze" ]; then
echo "deb http://ftp.de.debian.org/debian sid main" > /etc/apt/sources.list.d/sid.list
apt-get update
fi

# install minidlna
apt-get install -y minidlna

# remove repository (squezze only)
if [ $(lsb_release -cs) == "squeeze" ]; then
rm /etc/apt/sources.list.d/sid.list
apt-get update
fi

# configure
sed -i 's|#friendly_name=|friendly_name=MiniDLNA|g' /etc/minidlna.conf

# rebuild database
/etc/init.d/minidlna stop
minidlna -f /etc/minidlna.conf -R -d
/etc/init.d/minidlna start

# restart
/etc/init.d/minidlna restart

# web interface
http://YOUR_SERVER_IP:8200/

# todo
diff /etc/minidlna.conf.conf /etc/minidlna.conf
14c14,16
< media_dir=/opt
---
> #media_dir=/opt
> media_dir=V,/media/video
> media_dir=A,/media/music

# default media dir
/var/lib/minidlna

# enable debug
sed -i 's|#log_level=warn|log_level=debug|g' /etc/minidlna.conf
sed -i 's|DAEMON_ARGS="-f $CONFIGFILE -P $PIDFILE $DAEMON_OPTS"|DAEMON_ARGS="-d -f $CONFIGFILE -P $PIDFILE $DAEMON_OPTS"|g' /etc/init.d/minidlna

# Links
http://wiki.ubuntuusers.de/MiniDLNA
http://zeldor.biz/2012/01/dlna-minidlna-on-debian/ - DLNA – miniDLNA on Debian