How to Install Webtrees on Void Linux

Webtrees is a free, open source genealogy software that allows users to manage their family history online. This tutorial will guide you through the process of installing Webtrees on Void Linux.

Prerequisites

Before beginning the installation process, ensure that the following prerequisites have been met:

Step 1: Install Dependencies

The first step is to install the necessary dependencies for Webtrees to function properly. Open a terminal window and run the following command as the root user:

sudo xbps-install -Sy apache2 php mariadb-server php-mysqli php-gd php-xml php-mbstring

This command installs the Apache web server, PHP, the MariaDB database server, and the necessary PHP extensions for Webtrees. You will be prompted to enter your root password.

Step 2: Create a Database

Next, you will need to create a database for Webtrees to use. Open a terminal window and log in to the MariaDB server as the root user by running the following command:

sudo mysql -u root -p

Enter your root password when prompted. Then, create a new database and user for Webtrees by running the following SQL commands:

CREATE DATABASE webtrees;
CREATE USER 'webtrees'@'localhost' IDENTIFIED BY 'yourpassword';
GRANT ALL PRIVILEGES ON webtrees.* TO 'webtrees'@'localhost';
FLUSH PRIVILEGES;

Be sure to replace "yourpassword" with a secure password.

Step 3: Download and Install Webtrees

Now that the dependencies are installed and the database is created, it's time to download and install Webtrees. Change to the Apache web server's document root directory by running the following command:

cd /var/www/htdocs/

Download the latest version of Webtrees by running the following command:

sudo wget https://github.com/fisharebest/webtrees/releases/latest/download/webtrees-2.0.4.tar.gz

This command downloads Webtrees version 2.0.4. Replace the version number with the latest version if it has changed.

Extract the downloaded file by running the following command:

sudo tar xf webtrees-2.0.4.tar.gz

This command extracts the files into a directory named "webtrees-2.0.4".

Next, move the extracted files to the web server's document root directory and rename it to "webtrees":

sudo mv webtrees-2.0.4 /var/www/htdocs/webtrees

Step 4: Configure Webtrees

Create a configuration file for Webtrees by running the following command:

sudo cp /var/www/htdocs/webtrees/config.dist.php /var/www/htdocs/webtrees/config.php

Then, edit the configuration file by running the following command:

sudo nano /var/www/htdocs/webtrees/config.php

Find the following lines and edit them accordingly:

$WT_CONFIG['DB_HOST'] = 'localhost';
$WT_CONFIG['DB_NAME'] = 'webtrees';
$WT_CONFIG['DB_USERNAME'] = 'webtrees';
$WT_CONFIG['DB_PASSWORD'] = 'yourpassword';

Replace "yourpassword" with the password you set earlier.

Step 5: Set Permissions

Set the correct file permissions for Webtrees by running the following commands:

sudo chown -R www-data:www-data /var/www/htdocs/webtrees/
sudo chmod -R 775 /var/www/htdocs/webtrees/

The first command sets the owner of the files to the web server user, while the second command sets the file permissions so that the owner, group, and other users have read, write, and execute permissions.

Step 6: Access Webtrees

Finally, access Webtrees by opening a web browser and navigating to http://localhost/webtrees. You should now see the Webtrees installation screen. Follow the on-screen instructions to complete the installation.

Congratulations! You have successfully installed Webtrees 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!