Webtrees is an open-source genealogy application that enables you to create a family tree online. In this tutorial, we will show you how to install Webtrees on POP! OS latest.
First, update the package index to ensure that you install the latest packages available.
sudo apt update
Webtrees is a web-based application that requires a web server. We are going to use Apache web server.
sudo apt install apache2
MariaDB is a community-developed fork of the MySQL database. We are going to use it as the database server for Webtrees.
sudo apt install mariadb-server mariadb-client
We need to configure MariaDB by running the secure installation script.
sudo mysql_secure_installation
Follow the prompts and set a strong password for the root user when asked.
Log in to the MariaDB console using the root user and the password you just set.
sudo mysql -u root -p
Once you are inside the MariaDB console, create a new database called webtrees
.
CREATE DATABASE webtrees;
Then, create a new user called webtreesuser
with a strong password.
CREATE USER 'webtreesuser'@'localhost' IDENTIFIED BY 'password';
Grant full privileges to the webtrees
database to this user.
GRANT ALL ON webtrees.* TO 'webtreesuser'@'localhost' IDENTIFIED BY 'password';
Flush the privileges to apply the changes.
FLUSH PRIVILEGES;
Then, exit the MariaDB console.
EXIT;
Webtrees is a PHP application, so we need to install PHP and some extensions required by Webtrees.
sudo apt install php7.4 php7.4-mysql php7.4-xml php7.4-curl php7.4-gd php7.4-mbstring php7.4-zip
Download the latest stable version of Webtrees from the official website.
wget https://github.com/fisharebest/webtrees/releases/download/2.0.3/webtrees-2.0.3.tar.gz
Extract the downloaded archive file.
tar xzf webtrees-2.0.3.tar.gz
Move the extracted Webtrees files to the document root of Apache. In this example, we will use the default document root /var/www/html
.
sudo mv webtrees-2.0.3 /var/www/html/webtrees
Set the ownership of Webtrees files to www-data
user and group.
sudo chown -R www-data:www-data /var/www/html/webtrees
Create a new configuration file for Webtrees in Apache's available sites directory.
sudo nano /etc/apache2/sites-available/webtrees.conf
Add the following configuration to the file.
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/html/webtrees
ServerName example.com
<Directory /var/www/html/webtrees>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Save and close the file.
Enable the new configuration by creating a symbolic link in Apache's enabled sites directory.
sudo a2ensite webtrees.conf
Restart the Apache web server to apply the changes.
sudo systemctl restart apache2
Open your web browser and navigate to http://example.com/webtrees
.
The installation wizard should start automatically. Follow the prompts to complete the installation.
When prompted for the database connection details, use the following:
After completing the installation, delete the setup
directory from Webtrees's document root.
sudo rm -rf /var/www/html/webtrees/setup
You have successfully installed Webtrees on POP! OS. You can now start building your family tree and sharing it with your relatives.
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!