How to Install Airsonic Media Server on CentOS 7
Airsonic is a free, open source and cross platform web-based media streamer, forked from Subsonic and Libresonic, provides ubiquitious access to your music, that you can share with your family, friends or listen to music while at work.
It is optimized for efficient browsing through large music collections (hundreds of gigabytes), and also works very well as a local jukebox. It runs on most platforms, including Unix-like operating systems such as Linux and Mac OS and Windows.
- A intuitive web interface with search and index functionality.
- An integrated Podcast receiver.
- Supports streaming to multiple players simultaneously.
- Supports any audio or video format that can stream over HTTP.
- Supports on-the-fly conversion and streaming of virtually any audio format and much more.
Recommended System Requirements:
For the purpose of this article, I will be installing Airsonic Media Streaming Server on a Linode CentOS 7 VPS with a static IP address 192.168.0.100 and hostname media.tecmint.com.
How to Install Airsonic Media Streaming Server in CentOS 7
1. First start by installing the latest version of prebuilt OpenJDK 8 package using the yum package manager as shown.
# yum install java-1.8.0-openjdk-devel
2. Next, create a dedicated airsonic user, directories (store media server files) and assign ownership to the user that will run Airsonic using following commands.
# useradd airsonic # mkdir /var/airsonic # mkdir /var/media_files # chown airsonic /var/airsonic # chown airsonic /var/media_files
# wget https://github.com/airsonic/airsonic/releases/download/v10.1.2/airsonic.war --output-document=/var/airsonic/airsonic.war
4. To make Airsonic to work with systemd, you need to download its unit file under the directory /etc/systemd/system/ and reload the systemd manager configuration to start airsonic service, enable it to start at boot time, and check whether its up and running using following commansds.
# wget https://raw.githubusercontent.com/airsonic/airsonic/master/contrib/airsonic.service -O /etc/systemd/system/airsonic.service # systemctl daemon-reload # systemctl start airsonic.service # systemctl enable airsonic.service # systemctl status airsonic.service
● airsonic.service - Airsonic Media Server Loaded: loaded (/etc/systemd/system/airsonic.service; enabled; vendor preset: disabled) Active: active (running) since Tue 2018-09-04 04:17:12 EDT; 14s ago Main PID: 12926 (java) CGroup: /system.slice/airsonic.service └─12926 /usr/bin/java -Xmx700m -Dairsonic.home=/var/airsonic -Dserver.context-pa... Sep 04 04:17:12 tecmint.com systemd: Starting Airsonic Media Server... Sep 04 04:17:20 tecmint.com java: _ _ Sep 04 04:17:20 tecmint.com java: /\ (_) (_) Sep 04 04:17:20 tecmint.com java: / \ _ _ __ ___ ___ _ __ _ ___ Sep 04 04:17:20 tecmint.com java: / /\ \ | | '__|/ __|/ _ \| '_ \| |/ __| Sep 04 04:17:20 tecmint.com java: / ____ \| | | \__ \ (_) | | | | | (__ Sep 04 04:17:20 tecmint.com java: /_/ \_\_|_| |___/\___/|_| |_|_|\___| Sep 04 04:17:20 tecmint.com java: 10.1.2-RELEASE Sep 04 04:17:21 tecmint.com java: 2018-09-04 04:17:21.526 INFO --- org.airsonic.... /) Sep 04 04:17:21 tecmint.com java: 2018-09-04 04:17:21.573 INFO --- org.airsonic....acy Hint: Some lines were ellipsized, use -l to show in full.
Also, you need to setup the config file where you can review/modify any startup settings, as follows. Note that everytime you make any changes in this file, you need to restart the airsonic service to apply the changes.
# wget https://raw.githubusercontent.com/airsonic/airsonic/master/contrib/airsonic-systemd-env -O /etc/sysconfig/airsonic
5. Once everything in place, you can access Airsonic at the following URLs, login with username and password “admin”, then change the password.
http://localhost:8080/airsonic http://IP-address:8080/airsonic http://domain.com:8080/airsonic
6. After login, you will land in the admin dashboard, click on “Change administrator password”, and change the default password for the administrator account to secure your server.
7. Next, setup media folder(s) where Airsonic will keep your music and videos. Go to Settings > Media folders to add folders. For test purposes, we have used
/var/media_files which we created earlier on. Once you have set the correct directory, click on Save.
- Airsonic will organize your music according to how they are organized on your disk, in the media folder you have added.
- It’s recommended that the music folders you add are organized in an “artist/album/song” manner.
- You can use music managers such as MediaMonkey to organize your music.
You can also create new user accounts with different privileges, and do more with your Airsonic setup. For more information, read the Airsonic documentation from: https://airsonic.github.io
That’s all! Airsonic is a simple, cross platform free media server to stream your music and video. If you have any thoughts about the article, do share with us in the commment secetion below.