Installation configuration MiniDLNA under Fedora

Source: Internet
Author: User
Tags inotify aliyun

It is easy to build DLNA servers as a complement to samba. Windows 7 has its own streaming media share, and the settings are simple and can be searched online.
The main purpose of the Linux building is as a home media sharing server, the mobile phone and smart TV access is more convenient.
I did not use CentOS and the Fedora system, mainly because in the notebook only add rpmfusion this repo is enough, install the driver what is more convenient, all use DNF installation do not need to compile their own, other distributions are similar.


If you do not have to install the Rpmfusion-free-release rpmfusion-nofree-release these two packages, and then refresh the DNF cache on the line.
In the domestic words according to the following operation, to modify the corresponding operating system version, I use Fedora 22.

[Email protected] ~]# wget http://mirrors.aliyun.com/rpmfusion/free/fedora/rpmfusion-free-release-22.noarch.rpm[[ Email protected] ~]# wget http://mirrors.aliyun.com/rpmfusion/nonfree/fedora/ Rpmfusion-nonfree-release-22.noarch.rpm[[email protected] ~]# RPM-IVH rpmfusion-free-release-22.noarch.rpm Rpmfusion-nonfree-release-22.noarch.rpm[[email protected] ~]# DNF Update

All the repo files under/etc/yum.repos.d/, if the speed is not fast enough to configure the use of domestic mirror site, how to modify the Internet to check, update the first restart.


First search for DLNA-related software.

[[Email protected] ~]# dnf search dlna Last meta data expiration check was performed at  mon before  2:58:13   dec 21 13:13:02 2015. =========================n/s  Matching: dlna ========================================== gupnp-dlna-docs.noarch : development package for gupnp-dlnagupnp-dlna-devel.i686  : development package for gupnp-dlnagupnp-dlna-devel.x86_64 : development  package for gupnp-dlnaminidlna.x86_64 : lightweight dlna/upnp-av server  targeted at embedded systemsgupnp-dlna.i686 : A collection of  helpers for building upnp av applicationsgupnp-dlna.x86_64 : a  collection of helpers for building upnp av applicationsrygel.i686 :  a collection of upnp/dlna servicesrygel.x86_64 : a collection of  upnp/dlna services 


Installing MiniDLNA Software

[Email protected] ~]# DNF Install minidlna.x86_64


View a list of package files

[Email Protected]ora ~]# RPM-QL minidlna.x86_64/etc/minidlna.conf/run/minidlna/usr/lib/systemd/system/ Minidlna.service/usr/lib/tmpfiles.d/minidlna.conf/usr/sbin/minidlnad ....... To omit the/usr/share/man/man5/minidlna.conf.5.gz/usr/share/man/man8/minidlnad.8.gz/var/cache/minidlna/var/log/of .... MiniDLNA

The software file is very simple.

You can take a look at Minidlnad's manual.

[email protected] ~]# man Minidlnad



Running Minidlnad-h is about the same.

[Email protected] ~]# minidlnad-h



You can also look at the MINIDLNA.CONF Handbook.

[email protected] ~]# man minidlna.conf



Then look at the service file for Minidlnad.

[[email protected] ~]# Cat/usr/lib/systemd/system/minidlna.service[unit]description=minidlna is a DLNA/UPNP-AV server Softwareafter=syslog.target Local-fs.target network.target[service]user=minidlnagroup=minidlnatype= Simpleexecstart=/usr/sbin/minidlnad-s[install]wantedby=multi-user.target

It seems that the main thing is to execute the/usr/sbin/minidlnad-s command. Before running Minidlnad-h, "-S" means to run the service in a systemd manner.
It seems to be a relatively simple service.

The profile path is typically in/etc/minidlna.conf, and is modified using a common editor.
We can basically understand that all of the settings can be modified in the minidlna.conf configuration file, focusing primarily on the minidlna.conf configuration options.


Next, modify the configuration file minidlna.conf.

[[email protected] ~]# vi /etc/minidlna.conf#  custom Web page access for the port, for status information, and so on. The default port number is 8200, then access  http://127.0.0.1:8200, you can see the relevant status information (in fact, a very simple Web page). port=8200#  Specifies the service network interface, which is the default for all interfaces. Multiple interfaces are separated by "commas", such as  network_interface=eth0,enp3s0. #network_interface =eth0#  Specifies which system user to use to run the service. User name or  UID  can be. systemd  mode does not need to modify this, has been specified in  /usr/lib/systemd/system/minidlna.service . #user =jmaggard#  set up the shared directory. Multiple directories need to be specified more than once. #  can limit the type of media that the directory holds by #   +  "A"   for music    (for example: media_dir=a,/home/jmaggard/ Music) #   +  "V"   for video    (example: Media_dir=v,/home/jmaggard/videos) #    +  "P"   represent photo    (e.g. Media_dir=p,/home/jmaggard/pictures) #   +  "PV"   represents photos and videos   (ex: Media_dir=pv,/home/jmaggard/digital_camera) # media_dir=/opt    There are several types of files in the   representative  /opt  directory. #  whether to merge more than one  media_dir=  into one root directory. The default is  merge_media_dirs=no  not merged, if   media_dir=  compare more chaotic can choose to merge. #merge_media_dirs =no#  the host name displayed by the custom client, it can be understood as the name of your own network neighbor, and the current hostname will be used if not set. #friendly_name =my dlna server#  Specifies the path to storing cached data such as album art, and generally does not need to be modified. Make sure that you have write access to this directory. #db_dir =/var/cache/minidlna#  the designated day to the storage directory, generally do not need to modify. Make sure that you have write access to this directory. #log_dir =/var/log/minidlna#  Specifies the logging level, each  section  can use a different level:off, fatal, error,  Warn, info, debug. It's not very important to look at it, not to study it carefully. #log_level =general,artwork,database,inotify,scanner,metadata,http,ssdp,tivo=warn#  using slashes   "/"   Separates the file names that may exist for the album art. If other documents are found, add them. The following settings are provided by default. album_art_names=cover.jpg/cover.jpg/albumartsmall.jpg/albumartsmall.jpg/albumart.jpg/albumart.jpg/album.jpg/ album.jpg/folder.jpg/folder.jpg/thumb.jpg/thumb.jpg#  whether to use  inotify  notifications to automatically discover new files. Default  inotify=yes. #  General  linux  release set  inotify  for  8196, start the service will error, the actual does not affect the use, this article finally attached to the solution. inotify=yes#  seems to be the support of digital video recorder. Default  enable_tivo=no. # set this to yes to enable support for&nbSp;streaming .jpg and .mp3 files to a tivo supporting hmoenable_ tivo=no#  strict adherence to  DLNA  standards, default  strict_dlna=no. #  This allows the server to automatically scale very large images, which can affect the quality of the picture being saved (at least) in the  Sony DLNA  product. #  whether the image files on the hard disk are affected to be tested. It is also recommended for  strict_dlna=no. strict_dlna=no# default presentation url is http address on port  80#presentation_url=http://www.mylan/index.php#  notification interval, default 895 seconds. #notify_interval =900# serial and model number the daemon will report  to clients# in its XML descriptionserial=12345678model_number=1#  designation   The path of the minissdpd socket  seems to have been useless. #minissdpdsocket =/var/run/minissdpd.sock# use different container as root of  the tree# possible values:#   +  "."  - use standard container  (This is the default) #   +  "B"  -  "Browse directory" #   +  "M"  -  " Music "#   + " V " - " Video "#   + " P " - " Pictures "#    + Or, you can specify the ObjectID of your  desired root container  (eg. 1$f for music/playlists) # if you  specify  "B"  and client device is audio-only then  "Music/folders"   The will be used as root#root_container=.#  is performed according to the specified sorting criteria, ignoring the client's requirements. #force_sort_criteria =+upnp:class,+upnp:originaltracknumber,+dc:title#  allows the maximum number of simultaneous connections, note that one client will open multiple connections. #max_connections =50


Set boot auto-start

[Email protected] ~]# Systemctl enable Minidlnad.service



Start the service

[Email protected] ~]# systemctl start Minidlnad.service



Restart Service

[Email protected] ~]# systemctl restart Minidlnad.service



Disable Boot auto-start

[Email protected] ~]# systemctl disenable Minidlnad.service




If you encounter this warning:

Warning:inotify max_user_watches [8192] is low or close to the number of used watches [4] and I does not have a permission to  Increase this limit. Manually by writing a higher value into/proc/sys/fs/inotify/max_user_watches.


All of the following can be done.

[[email protected] ~]# echo 65538 >/proc/sys/fs/inotify/max_user_watches[[email protected] ~]# sysctl Fs.inotify.max _user_watches=66538

New edit/etc/sysctl.d/90-inotify.conf required for permanent entry

[[email protected] ~]# vi/etc/sysctl.d/90-inotify.conffs.inotify.max_user_watches = 66538

If you encounter this warning:

Upnphttp.c:1054:warn:http Connection closed unexpectedly


Please check the power management software settings including but not limited to powertop, tuned, etc., is generally in the electricity-saving consideration to turn off the network card.

MiniDLNA is suitable for server installation, very few dependencies, just change the configuration file.
Other similar software:
Rygel is suitable for GUI users, has a special graphical interface configuration, is also very simple.
Mediatomb with Web interface configuration, suitable for server installation.

Looking for found a Kodi software, search for a moment immediately before the light, and so there is time to play again.


This article is from "Lao Ding's Linux" blog, please be sure to keep this source http://laoding.blog.51cto.com/980622/1727488

Installation configuration MiniDLNA under Fedora

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.