Create a home music server with Centos8 + Universal Media Server

Constitution

Virtual machine creation

$ sudo dnf install virt-manager
$ systemctl is-enabled libvirtd
enabled

Start virtual machine manager with gui Create a new virtual machine

Local installation media (ISO image or CD-ROM drive) -> ISO image selection downloaded from here ^ 1

UMS installation on virtual machine

dependencies installation [^ 2]

$ sudo dnf install epel-release
$ sudo dnf install java-1.8.0-openjdk

PowerTools repository must be enabled to include mediainfo

$ dnf repolist all
 repo id repo name state
 AppStream CentOS-8 --AppStream enabled
 AppStream-source CentOS-8 --Disable AppStream Sources
 BaseOS CentOS-8 --Base enabled
....
 PowerTools CentOS-8 --PowerTools disabled
....

$ sudo vi /etc/yum.repos.d/CentOS-PowerTools.repo 
....
enabled=0
enabled=1
....
$ dnf repolist all
 repo id repo name state
 AppStream CentOS-8 --AppStream enabled
 AppStream-source CentOS-8 --Disable AppStream Sources
 BaseOS CentOS-8 --Base enabled
....
 PowerTools CentOS-8 --PowerTools enabled
....

$ sudo dnf install mediainfo

The options DCRaw, VLC, tsMuXeR, P7Zip are reserved because I do not know the contents. Think if something goes wrong.

UMS installation [^ 3]

Download UMS from the official website Universal Media Server

Expand, place in / opt

$ tar -zxvf UMS-9.8.0-x86_64.tgz ums-9.8.0/
$ sudo mv ums-9.8.0/ /opt/

Symbolic link

$ sudo ln -s /opt/ums-9.8.0/ /opt/ums

Create / etc / ums and copy the config file

$ sudo mkdir /etc/ums
$ sudo cp /opt/ums/UMS.conf /opt/ums/WEB.conf /etc/ums

Create user, change file owner

$ sudo useradd -s /sbin/nologin ums
$ sudo chown -R ums:ums /opt/ums-9.8.0/
$ sudo chown -R ums:ums /etc/ums/

Create shared folder, change ownership

$ sudo mkdir /home/ums/Music
$ sudo mkdir /home/ums/Videos
$ sudo mkdir /home/ums/Picture
$ sudo chown -R ums:ums /home/ums/

Service registration file

$ sudo vi /etc/systemd/system/ums.service
[Unit]
Description=Universal Media Server

[Service]
Type=simple
Environment="UMS_PROFILE=/etc/ums/UMS.conf"
User=ums
Group=ums
ExecStart=/bin/bash /opt/ums/UMS.sh

[Install]
WantedBy=multi-user.target

Edit config file

$ sudo vi /etc/ums/UMS.conf 
# (Edit only 4 lines)
....
# (Name to display to client)
server_name = xxx xxx xxx  
....
minimized = true
....
# Interface name. enp1s0 etc.
network_interface = xxxxxx  
....
# Folder to publish
folders = /home/ums/Music, /home/ums/Pictures, /home/ums/Videos  
....

Service start, registration

$ sudo systemctl start ums
$ sudo systemctl enable ums

Register the service in the firewall. The port used is 5001, 9001.

$ sudo vi /usr/lib/firewalld/services/ums.xml 
<?xml version="1.0" encoding="utf-8"?>
<service>
  <short>UMS</short>
  <description>Universal Media Server</description>
  <port protocol="tcp" port="5001"/>
  <port protocol="tcp" port="9001"/>
</service>
$ sudo firewall-cmd --add-service=ums --zone=public --permanent
$ sudo firewall-cmd --reload              

Prepare a config file for the client you want to use

config file for foobar2000 mobile

Create foobar2000_mobile.conf by copying the appropriate files in / opt / ums / renderers / The details are appropriate. Think if something goes wrong.

$ sudo cp /opt/ums/renderers/xxx.conf /opt/ums/renderers/foobar2000_mobile.conf
$ sudo vi /opt/ums/renderers/foobar2000_mobile.conf
----------------------------------------------------------------------------
 Profile for foobar2000 mobile.
 See DefaultRenderer.conf for descriptions of all the available options.


RendererName = foobar2000-mobile 
 Use the built-in factory icon
RendererIcon =

 ============================================================================
 This renderer has sent the following string/s:

 User-Agent: foobar2000-mobile/1.x
 ============================================================================


UserAgentSearch = foobar2000-mobile
UpnpDetailsSearch = foobar2000-mobile

Video = false
Audio = true
Image = false

DefaultVBVBufSize = true
H264Level41Limited = false
MediaInfo = true
MuxDTSToMpeg = true
TranscodeAudio = WAV
TranscodeFastStart = true

 Supported audio formats:
Supported = f:aiff                      m:audio/aiff
Supported = f:flac                      m:audio/flac
Supported = f:m4a|3ga   a:alac          m:audio/x-m4a
 Supported = f:m4a|3ga   a:aac-lc|he-aac m:audio/x-m4a
Supported = f:m4a|mp4                   m:audio/mp4
Supported = f:mpc                       m:audio/x-musepack
Supported = f:mp3                       m:audio/mpeg
Supported = f:opus                      m:audio/opus
Supported = f:wav                       m:audio/wav
Supported = f:wavpack                   m:audio/x-wavpack
Supported = f:adts      a:aac-lc|he-aac m:audio/aac
$ sudo chown ums:ums /opt/ums/renderers/foobar2000_mobile.conf

config file for regza

[https://sourceforge.net/projects/pmsforregza/files/Config/for%20UMS/] (https://sourceforge.net/projects/pmsforregza/files/Config/for%20UMS/) Download REGZA.conf from and place it in renderers

$ sudo mv Downloads/REGZA.conf /opt/ums/renderers/
$ sudo chown -R ums:ums /opt/ums/renderers/

Recommended Posts

Create a home music server with Centos8 + Universal Media Server
Create a "Hello World" (HTTP) server with Tornado
Create a fake Minecraft server in Python with Quarry
Create a (simple) REST server
Create a homepage with django
Create a heatmap with pyqtgraph
Create a simple textlint server
Create a directory with python
Set up a web server with CentOS7 + Anaconda + Django + Apache
Build a python environment on CentOS 7.7 for your home server
Creating a Flask server with Docker
Create a virtual environment with Python!
Server construction with CONOHA VPS (CentOS)
Create a python environment on centos
Create a poisson stepper with numpy.random
Create a file uploader with Django
Build a CentOS Linux 8 environment with Docker and start Apache HTTP Server
Create a dummy image with Python + PIL.
Set up a Samba server with Docker
Create a GUI app with Python's Tkinter
A memo with Python2.7 and Python3 on CentOS
Create a large text file with shellscript
Create a star system with Blender 2.80 script
Create a virtual environment with Python_Mac version
Create a VM with a YAML file (KVM)
Create a simple web app with flask
Create a word frequency counter with Python 3.4
How to create a repository from media
Create a Connecting Nearest Neighbor with NetworkX
Create a web service with Docker + Flask
Create a private repository with AWS CodeArtifact
Create a car meter with raspberry pi
Create a devilish picture with Blender scripts
Create a matrix with PythonGUI (text box)
Create a graph with borders removed with matplotlib
Put Docker in Windows Home and run a simple web server with Python
[Python] How to create a local web server environment with SimpleHTTPServer and CGIHTTPServer
Start a temporary http server locally with Pytest
Create a frame with transparent background with tkinter [Python]
Build a local server with a single command [Mac]
Set up a simple HTTPS server with asyncio
Install Windows 10 from a Linux server with PXE
Set up a local server with Go-File upload-
Create a GUI executable file created with tkinter
Create a LINE BOT with Minette for Python
Build a python environment with ansible on centos6
Create a game UI from scratch with pygame2!
Create a PDF file with a random page size
Create a virtual environment with conda in Python
Create a page that loads infinitely with python
Start a simple Python web server with Docker
[Note] Create a one-line timezone class with python
You can easily create a GUI with Python
Create a bulletin board with Heroku, Flask, SQLAlchemy
Create a dashboard for Network devices with Django!
Create a matrix with PythonGUI (tkinter combo box)
Pretend to be a server with two PCs
Create a color bar with Python + Qt (PySide)
Set up a local server with Go-File download-
Launch a web server with Python and Flask
Create a decision tree from 0 with Python (1. Overview)