GNU FM is a free software which provides a web-based system for music collection, hosting, and radio station management. In this tutorial, we will guide you on how to install GNU FM on Alpine Linux.
Before starting with the installation process, make sure you have the following requirements:
The first step is to install the required dependencies on your Alpine Linux system. GNU FM needs several packages to function properly, including Apache web server, MySQL database server, and PHP. Run the following command to install these packages:
sudo apk add mysql mysql-client apache2 apache2-utils php7 php7-apache2 php7-mysqli php7-zlib php7-json php7-xml php7-pdo php7-pdo_mysql
After installing the dependencies, download the latest version of GNU FM from the official website.
wget https://ftp.gnu.org/gnu/gnufm/gnufm-latest.tar.gz
tar -xvf gnufm-latest.tar.gz
cd gnufm-*
After downloading GNU FM, we need to configure the Apache web server. Create a new virtual host configuration file for Apache using the following command:
sudo nano /etc/apache2/conf.d/gnufm.conf
Add the following configuration in the file:
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/gnufm/
ServerName gnufm.example.com
ErrorLog /var/log/apache2/gnufm-error.log
CustomLog /var/log/apache2/gnufm-access.log combined
<Directory /var/www/gnufm/>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Replace the ServerAdmin
, ServerName
, and DocumentRoot
with your own domain name and path where you want to install GNU FM.
GNU FM requires MySQL database to store its data. Use the following command to create a new database and user:
mysql -u root -p
Enter your MySQL root login password when prompted, and then enter the following commands:
CREATE DATABASE gnufm;
CREATE USER 'gnufmuser'@'localhost' IDENTIFIED BY 'yourpassword';
GRANT ALL ON gnufm.* TO 'gnufmuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Remember to replace yourpassword
with your own secure password.
Extract the downloaded GNU FM archive file and move the folder to the Apache document root directory using the following commands:
tar xzf gnufm-latest.tar.gz
sudo mv gnufm-* /var/www/gnufm/
Change the ownership of the GNU FM folder to the Apache user:
sudo chown -R apache:apache /var/www/gnufm/*
After moving the GNU FM folder to the document root directory, go to the GNU FM folder and rename the configuration files using the following commands:
cd /var/www/gnufm/etc
mv gnufm.cfg.example gnufm.cfg
mv radio.cfg.example radio.cfg
Open the gnufm.cfg
file to configure the database settings:
sudo nano /var/www/gnufm/etc/gnufm.cfg
Find the following lines and change them accordingly:
database_password = yourpassword
admin_email = admin@example.com
redirect_base_url = http://gnufm.example.com
base_web_path = http://gnufm.example.com
Again, remember to replace yourpassword
, admin_email
, and redirect_base_url
with your own details.
Finally, execute the GNU FM setup script to set up the database and configure GNU FM:
cd /var/www/gnufm
sudo ./utils/setup.sh
Follow the on-screen instructions to configure your GNU FM installation.
After completing the setup process, restart the Apache web server to apply the changes:
sudo service apache2 restart
Your GNU FM installation is now ready. To access it, open a web browser and navigate to the configured domain name or IP address.
Congratulations! You have successfully installed and configured GNU FM on your Alpine Linux system.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!