How to Install Webtrees on POP! OS
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.
Prerequisites
- You should have a running POP! OS latest instance with sudo privileges.
Step 1: Update Package Index
First, update the package index to ensure that you install the latest packages available.
sudo apt update
Step 2: Install Apache Web Server
Webtrees is a web-based application that requires a web server. We are going to use Apache web server.
sudo apt install apache2
Step 3: Install MariaDB
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
Step 4: Configure MariaDB
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.
Step 5: Create a Database for Webtrees
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;
Step 6: Install PHP and Required Extensions
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
Step 7: Download and Install Webtrees
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
Step 8: Configure Apache for 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 [email protected]
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
Step 9: Complete the Webtrees Installation via Web Interface
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:
- Database Server: localhost
- User Name: webtreesuser
- Password: password
- Database Name: webtrees
After completing the installation, delete the setup directory from Webtrees's document root.
sudo rm -rf /var/www/html/webtrees/setup
Conclusion
You have successfully installed Webtrees on POP! OS. You can now start building your family tree and sharing it with your relatives.