GNU FM is a free/libre server software that allows you to run your own music community website. If you're an EndeavourOS user and you want to install GNU FM on your system, then this tutorial is for you. We'll guide you through the process of installing and configuring GNU FM on EndeavourOS Latest.
Before we can start the installation process, there are a few prerequisites that need to be met:
Install required dependencies:
sudo pacman -S apache mariadb php php-apache php-gd php-intl php-mysql php-pear php-xml wget git
Clone the GNU FM repository:
git clone https://code.gnu.io/gnu/gnufm.git
Create a new virtual host in Apache:
cd /etc/httpd/conf/extra/
sudo cp httpd-vhosts.conf httpd-vhosts.conf.original
sudo nano httpd-vhosts.conf
Add the following lines at the bottom of the file:
<VirtualHost *:80>
ServerName your-domain.com
DocumentRoot /path/to/gnufm/www
<Directory /path/to/gnufm/www>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Replace your-domain.com with your own domain name, and /path/to/gnufm/www with the absolute path to the www folder in the GNU FM repository.
Enable the php and rewrite modules in Apache:
sudo nano /etc/httpd/conf/httpd.conf
Uncomment the following lines:
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule php7_module modules/libphp7.so
Create a new database in MariaDB:
sudo mysql -u root
CREATE DATABASE gnufm;
CREATE USER 'gnufm'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON gnufm.* TO 'gnufm'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Replace password with a strong password of your choice.
Import the SQL schema:
cd /path/to/gnufm
mysql -u gnufm -p gnufm < db/sql/schema.sql
It will prompt you for the password you set for the gnufm user.
Configure GNU FM:
cd /path/to/gnufm/www
cp config.php.sample config.php
nano config.php
Edit the following lines according to your configuration:
define('SITE_NAME', 'Your Site Name');
define('MYSQL_HOST', 'localhost');
define('MYSQL_PORT', '3306');
define('MYSQL_USER', 'gnufm');
define('MYSQL_PASS', 'password');
define('MYSQL_DB', 'gnufm');
Replace Your Site Name, localhost, gnufm, password, and gnufm with your own values.
Set the correct file permissions:
cd /path/to/gnufm/www
sudo chown -R http:http .
find . -type d -print0 | xargs -0 chmod 775
find . -type f -print0 | xargs -0 chmod 664
chmod 775 bin
chmod 775 htdocs/index.php
Restart Apache:
sudo systemctl restart httpd
Access your GNU FM website:
Open your web browser and navigate to http://your-domain.com. You should see the GNU FM welcome page.
Congratulations! You have successfully installed and configured GNU FM on EndeavourOS Latest.
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!