How to Install Gerbera on Elementary OS Latest
Gerbera is a free, open-source and powerful UPnP media server that allows users to stream their media files to various devices over a network. In this tutorial, we will guide you through the installation process of Gerbera on Elementary OS Latest.
Prerequisites
Before installing Gerbera, make sure that you have the following prerequisites:
- An Elementary OS Latest instance
- A sudo user account
- Internet connectivity
Step 1: Installing Gerbera Dependencies
Firstly, update the package manager and install the following required packages on your system.
sudo apt update
sudo apt install git cmake libavformat-dev libjpeg-dev libsqlite3-dev libcurl4-openssl-dev libmagick++-dev libexif-dev libswscale-dev libavutil-dev
Step 2: Downloading and Installing Gerbera
In this step, we will download Gerbera source code and install it on Elementary OS Latest. To get the latest version of Gerbera, we will clone the repository using git.
git clone https://github.com/gerbera/gerbera.git
Once the repository is cloned successfully, navigate to the gerbera directory.
cd gerbera
Next, create a build directory for Gerbera.
mkdir build
cd build
Now, run the following command to build and install Gerbera.
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_MAGIC=OFF
make -j $(nproc)
sudo make install
Step 3: Configuring Gerbera
After installation, you need to configure Gerbera. First, create a configuration file for Gerbera.
sudo nano /usr/local/etc/gerbera/config.xml
Paste the following content into the file and save it.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE config PUBLIC "-//Gerbera//DTD Gerbera configuration V1.0//EN" "https://gerbera.io/dtd/gerbera-config-1.0.dtd">
<config>
<metadata>
<import_folder>/path/to/media/files</import_folder>
<import_mode>inotify</import_mode>
<import_throttle>120</import_throttle>
<export_force_sort>yes</export_force_sort>
</metadata>
<server>
<port>49152</port>
<root_object>1</root_object>
</server>
<web>
<title>Gerbera</title>
<stylesheet>/usr/local/share/gerbera/web/style.css</stylesheet>
</web>
</config>
Replace /path/to/media/files with the actual path of your media files.
Step 4: Starting Gerbera
Now, start the Gerbera service using the following command.
sudo systemctl start gerbera
To enable Gerbera to start automatically after a system boot, run the following command.
sudo systemctl enable gerbera
Step 5: Accessing Gerbera Web GUI
Gerbera web GUI is available on port 49152. Open your web browser and enter the following URL.
http://localhost:49152/
You should now see the Gerbera web interface.
Conclusion
In this tutorial, we have shown you how to install Gerbera on Elementary OS Latest. You can now easily stream all of your media files to any device on your home network using Gerbera.