How to Install GNU FM on EndeavourOS Latest
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.
Prerequisites
Before we can start the installation process, there are a few prerequisites that need to be met:
- A running installation of EndeavourOS Latest
- Access to a terminal with sudo privileges
Installation Steps
Install required dependencies:
sudo pacman -S apache mariadb php php-apache php-gd php-intl php-mysql php-pear php-xml wget gitClone the GNU FM repository:
git clone https://code.gnu.io/gnu/gnufm.gitCreate a new virtual host in Apache:
cd /etc/httpd/conf/extra/ sudo cp httpd-vhosts.conf httpd-vhosts.conf.original sudo nano httpd-vhosts.confAdd 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.comwith your own domain name, and/path/to/gnufm/wwwwith the absolute path to thewwwfolder in the GNU FM repository.Enable the
phpandrewritemodules in Apache:sudo nano /etc/httpd/conf/httpd.confUncomment the following lines:
LoadModule rewrite_module modules/mod_rewrite.so LoadModule php7_module modules/libphp7.soCreate 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
passwordwith a strong password of your choice.Import the SQL schema:
cd /path/to/gnufm mysql -u gnufm -p gnufm < db/sql/schema.sqlIt will prompt you for the password you set for the
gnufmuser.Configure GNU FM:
cd /path/to/gnufm/www cp config.php.sample config.php nano config.phpEdit 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, andgnufmwith 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.phpRestart Apache:
sudo systemctl restart httpdAccess 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.