-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhow-to-set-up-a-dlna-upnp-media-server-with-minidlna.html
125 lines (98 loc) · 7.45 KB
/
how-to-set-up-a-dlna-upnp-media-server-with-minidlna.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>How to set up a DLNA (UPnP) Media Server with MiniDLNA - kb.haeringer.org</title>
<link href="http://fonts.googleapis.com/css?family=Arimo:400,700|Inika" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="/theme/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="/theme/pastie.css" />
<link href="/" type="application/atom+xml" rel="alternate" title="kb.haeringer.org Atom Feed" />
</head>
<body>
<div class="container">
<div class="row">
<div class="span10">
<div id="content">
<div class="header">
<h1>How to set up a DLNA (UPnP) Media Server with MiniDLNA</h1>
</br>
</div>
<p class="meta"><small><span><a href="/author/ben/">ben</a> - </span><span>Fr 24 Juni 2011</span> - <span class="tags"><a href="/tag/DLNA/">DLNA</a>, <a href="/tag/Media server/">Media server</a>, <a href="/tag/UPNP/">UPNP</a></span></small></p>
<div class="entry-content">
<p>MiniDLNA is a Linux server software with the aim of being fully
compliant with DLNA/UPnP-AV clients. It is developed by a NETGEAR
employee for the ReadyNAS product line. It is a great, lightweight, fast
and simple alternative to older media servers like TwonkyServer or
Mediatomb. This is about how to set up MiniDLNA on a Debian-based
Linux.<br />
</br><br />
Download source code:</p>
<div class="highlight"><pre><span class="n">wget</span> <span class="n">http</span><span class="o">:</span><span class="c1">//sourceforge.net/projects/minidlna/files/minidlna/1.0.23/minidlna_1.0.23_src.tar.gz</span>
</pre></div>
<!--more-->
<p>To compile and run the the software, install the following
prerequisites:</p>
<div class="highlight"><pre><span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">libexif</span><span class="o">-</span><span class="n">dev</span> <span class="n">libjpeg8</span><span class="o">-</span><span class="n">dev</span> <span class="n">libid3tag0</span><span class="o">-</span><span class="n">dev</span> <span class="n">libflac</span><span class="o">-</span><span class="n">dev</span> <span class="n">libvorbis</span><span class="o">-</span><span class="n">dev</span> <span class="n">sqlite3</span> <span class="n">libsqlite3</span><span class="o">-</span><span class="n">dev</span> <span class="n">libavformat</span><span class="o">-</span><span class="n">dev</span> <span class="n">libuuid1</span>
</pre></div>
<p>Unzip the downloaded archive and change into the unzipped directory:</p>
<div class="highlight"><pre><span class="n">tar</span> <span class="o">-</span><span class="n">xzf</span> <span class="n">minidlna_1</span><span class="mf">.0.23</span><span class="n">_src</span><span class="p">.</span><span class="n">tar</span><span class="p">.</span><span class="n">gz</span>
<span class="n">cd</span> <span class="n">minidlna</span><span class="o">-</span><span class="mf">1.0.23</span>
</pre></div>
<p>Compile the program:</p>
<div class="highlight"><pre><span class="n">make</span>
</pre></div>
<p>Copy the binary to /usr/sbin and the configuration file to /etc:</p>
<div class="highlight"><pre><span class="n">cp</span> <span class="n">minidlna</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">sbin</span>
<span class="n">cp</span> <span class="n">minidlna</span><span class="p">.</span><span class="n">conf</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span>
</pre></div>
<p>There's also a start-stop script for the daemon that we copy to
/etc/init.d, rename it and make it executable:</p>
<div class="highlight"><pre><span class="n">cp</span> <span class="n">linux</span><span class="o">/</span><span class="n">minidlna</span><span class="p">.</span><span class="n">init</span><span class="p">.</span><span class="n">d</span><span class="p">.</span><span class="n">script</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="p">.</span><span class="n">d</span><span class="o">/</span>
<span class="n">mv</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="p">.</span><span class="n">d</span><span class="o">/</span><span class="n">minidlna</span><span class="p">.</span><span class="n">init</span><span class="p">.</span><span class="n">d</span><span class="p">.</span><span class="n">script</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="p">.</span><span class="n">d</span><span class="o">/</span><span class="n">minidlna</span>
<span class="n">chmod</span> <span class="mi">755</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="p">.</span><span class="n">d</span><span class="o">/</span><span class="n">minidlna</span>
</pre></div>
<p>Adjust the basic parameters in the config file (there are more of
course; just see through the options):</p>
<div class="highlight"><pre><span class="n">vi</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">minidlna</span><span class="p">.</span><span class="n">conf</span>
<span class="n">media_dir</span><span class="o">=/</span><span class="n">mediadirectory</span>
<span class="n">presentation_url</span><span class="o">=</span><span class="n">http</span><span class="o">:</span><span class="c1">//serverIPaddress:8200</span>
</pre></div>
<p>Start the daemon:</p>
<div class="highlight"><pre><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="p">.</span><span class="n">d</span><span class="o">/</span><span class="n">minidlna</span> <span class="n">start</span>
</pre></div>
<p>If you want the daemon to automatically start after a system reboot, add
minidlna to the start scripts:</p>
<div class="highlight"><pre><span class="n">update</span><span class="o">-</span><span class="n">rc</span><span class="p">.</span><span class="n">d</span> <span class="n">minidlna</span> <span class="n">defaults</span>
</pre></div>
<p></br><br />
MiniDLNA now needs some minutes to build its database with your media
data, and then your UPnP clients are ready to discover the server.<br />
</br></p>
</div><!-- /.entry-content -->
</div>
</div>
<div class="span2">
<div class="well">
<ul class="nav nav-list">
<li class="nav-header">Blog</li>
<!-- <li ><a href="">Home</a></li> -->
<li ><a href="index.html">Home</a></li>
<li ><a href="/tags/">Tags</a></li>
<li ><a href="/archives/">Archive</a></li>
<li class="nav-header">Pages</li>
<li><a href="/pages/about.html">About</a></li>
</ul>
</div><!-- /#menu -->
</div>
</div>
<hr />
<div class="row">
<div class="span12">
<div id="about">
<p>Proudly powered by <a href="http://twitter.github.com/bootstrap/">bootstrap</a>, <a href="http://docs.notmyidea.org/alexis/pelican/">pelican</a>, <a href="http://python.org">python</a> and <a href="http://www.julo.ch/about/">Alex</a></p>
</div><!-- /#about -->
</div><!-- /#contentinfo -->
</div>
</div>
</body>
</html>