How to install webtrees on Elementary OS Latest

webtrees is a free and open-source genealogy software that allows you to create your family tree and share it online. In this tutorial, we will guide you on how to install webtrees on your Elementary OS Latest system.

Prerequisites

Before we begin, make sure you have the following:

Step 1: Download webtrees

Visit the webtrees website at https://www.webtrees.net and navigate to the Download section. Download the latest version of webtrees to your system.

Step 2: Extract the webtrees archive

Open a terminal window and navigate to the directory where you downloaded the webtrees archive. Extract the archive using the following command:

tar -xzf webtrees-2.x.x.tar.gz

Replace 2.x.x with the version number of the webtrees archive that you downloaded.

Step 3: Move webtrees files to Apache Web Server directory

After the archive has been extracted, move the webtrees directory to the Apache web server directory using the following command:

sudo mv webtrees /var/www/html/

Step 4: Create a database and user for webtrees

Log in to your MySQL/MariaDB database as the root user:

sudo mysql -u root -p

Create a database for webtrees using the following command:

CREATE DATABASE webtrees;

Next, create a user for the webtrees database using the following command:

CREATE USER 'webtreesuser'@'localhost' IDENTIFIED BY 'password';

Replace password with a strong password for the user.

Grant all privileges to the user on the webtrees database using the following command:

GRANT ALL PRIVILEGES ON webtrees.* TO 'webtreesuser'@'localhost';

Flush the privileges table to apply the changes using the following command:

FLUSH PRIVILEGES;

Step 5: Configure webtrees

Navigate to the webtrees directory on your system and make a copy of the sample.htaccess file using the following command:

cd /var/www/html/webtrees
sudo cp sample.htaccess .htaccess

Next, edit the .htaccess file to add the database settings. Look for the following lines:

# === Database configuration ===
# Define the database connections
<IfModule mod_env.c>
SetEnv WBT_DB_HOST localhost
SetEnv WBT_DB_NAME webtrees
SetEnv WBT_DB_USERNAME webtreesuser
SetEnv WBT_DB_PASSWORD password
</IfModule>

Replace localhost,webtrees,webtreesuser, and password with your MySQL/MariaDB database host, database name, database username, and password, respectively.

Step 6: Set file permissions

Change the owner of the webtrees directory to www-data so that Apache can read and write to the directory using the following command:

sudo chown -R www-data:www-data /var/www/html/webtrees

Step 7: Access webtrees

Restart the Apache web server using the following command:

sudo systemctl restart apache2

Open your web browser and navigate to the http://localhost/webtrees URL. You should see the webtrees installation page. Follow the on-screen instructions to complete the installation.

Conclusion

In this tutorial, you learned how to install webtrees on your Elementary OS Latest system. You can now use webtrees to create and maintain your family tree.

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!