Follow these steps to install Drupal on Void Linux:
Update your system:
sudo xbps-install -S
sudo xbps-install -Syu
Install Apache, MariaDB/MySQL, and PHP:
sudo xbps-install -S apache mariadb php php-fpm
Start and enable Apache and MariaDB/MySQL:
sudo ln -s /etc/sv/httpd /var/service/
sudo ln -s /etc/sv/mariadb /var/service/
sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
sudo chown -R mysql:mysql /var/lib/mysql
sudo mysql_secure_installation
Create a new database and user for Drupal:
sudo mysql -u root -p
CREATE DATABASE drupal;
CREATE USER 'drupaluser'@'localhost' IDENTIFIED BY 'yourpassword';
GRANT ALL PRIVILEGES ON drupal.* TO 'drupaluser'@'localhost';
FLUSH PRIVILEGES;
exit
Install and configure Drupal:
sudo xbps-install -S drupal
sudo ln -s /etc/sv/php-fpm /var/service/
sudo cp /usr/share/doc/drupal/nginx.conf.sample /etc/nginx/conf.d/drupal.conf
sudo sed -i "s/drupal.example.com/YOUR_DOMAIN_NAME_HERE/g" /etc/nginx/conf.d/drupal.conf
sudo sed -i "s/\/var\/www\/html/\/usr\/share\/webapps\/drupal/g" /etc/nginx/conf.d/drupal.conf
sudo systemctl start nginx
sudo systemctl enable nginx
Access Drupal by going to http://localhost/install.php in your web browser.
Follow the installation wizard to finish installing Drupal.
Congratulations, you have successfully installed Drupal on Void Linux!
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!