How to Install Webtrees on NetBSD

Introduction

Webtrees is a free, open-source genealogy software. It allows users to create, edit and share family trees online. NetBSD is a free and open-source operating system which is fast, secure and highly portable. This tutorial will guide you through the process of installing Webtrees on NetBSD.

Prerequisites

Before we start with the installation process, you should have the following:

Step 1: Install Apache and PHP

Webtrees is a PHP-based application, which means that it requires PHP and a webserver to run. In this step, we'll install Apache webserver and PHP.

1.1. Update your system package list

# pkgin update

1.2. Install Apache webserver and PHP

# pkgin install apache php74-apache php74-gd

1.3. Start the Apache webserver

# /usr/pkg/sbin/apachectl start

Step 2: Install MariaDB

Webtrees requires a database to store user data. In this tutorial, we'll use the MariaDB database server.

2.1. Install MariaDB

# pkgin install mariadb-server

2.2. Start the MariaDB server

# /usr/pkg/etc/rc.d/mariadb start

2.3. Configure MariaDB

# /usr/pkg/bin/mysql_secure_installation

When prompted for the root password, press Enter to set the root password. Then, answer the following questions:

Step 3: Install Webtrees

In this step, we'll download and install the Webtrees software on your NetBSD server.

3.1. Download the latest Webtrees version

# cd /usr/pkg/htdocs/
# ftp https://github.com/fisharebest/webtrees/releases/latest/download/webtrees-2.0.4.zip

3.2. Extract the downloaded zip file

# unzip webtrees-2.0.4.zip

3.3. Move the extracted files to the Apache webroot

# mv webtrees/* /usr/pkg/htdocs/

3.4. Set the correct permissions for Webtrees

# chown -R www:www /usr/pkg/htdocs/*

Step 4: Configure Webtrees

In this step, we'll configure the Webtrees application by creating a configuration file and setting permissions to some folders.

4.1. Create a webtrees data folder

# mkdir /usr/pkg/htdocs/data
# chown -R www:www /usr/pkg/htdocs/data

4.2. Create a Webtrees configuration file

# cp /usr/pkg/htdocs/library/config_sample.ini.php /usr/pkg/htdocs/data/config.php

4.3. Edit the Webtrees configuration file

# vi /usr/pkg/htdocs/data/config.php

Edit the following parameters according to your setup:

4.4. Open your browser and navigate to http://<ip address>/install.php to complete the installation process.

4.5. Once you complete the installation, remove the install.php file for security reasons

# rm /usr/pkg/htdocs/install.php

Conclusion

Congratulations! You have successfully installed Webtrees on your NetBSD server. You can now start building your family tree and share it with your loved ones.

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!