How to Install webtrees on Ubuntu Server
webtrees is an open-source genealogy software that allows users to create and manage their family tree online. This tutorial will guide you through the process of installing webtrees on an Ubuntu Server.
Prerequisites
Before we begin the installation process, make sure that you have the following:
- Ubuntu Server with root access
- LAMP (Linux, Apache, MySQL, and PHP) stack installed, including PHP version 8.0 or later
- A web server configured with a virtual host for your domain or IP address.
Installation
Update package repository:
sudo apt update && sudo apt upgrade -yInstall required packages:
sudo apt install -y unzip curlDownload webtrees archive (use the latest version):
curl -o webtrees.zip -L https://github.com/fisharebest/webtrees/archive/2.0.16.zipExtract the archive to the root directory of the web server:
sudo unzip webtrees.zip -d /var/www/html/Rename the extracted directory and set permissions:
sudo mv /var/www/html/webtrees-2.0.16 /var/www/html/webtrees sudo chown -R www-data:www-data /var/www/html/webtrees sudo chmod -R 775 /var/www/html/webtreesCreate a new MySQL user and database:
mysql -u root -p mysql> CREATE DATABASE webtrees_db; mysql> CREATE USER 'webtrees_user'@'localhost' IDENTIFIED BY 'yourpassword'; mysql> GRANT ALL PRIVILEGES ON webtrees_db.* TO 'webtrees_user'@'localhost'; mysql> FLUSH PRIVILEGES; mysql> EXIT;Create a configuration file:
cd /var/www/html/webtrees/data/ cp config.sample.ini config.iniModify the configuration file with your MySQL details:
nano config.iniReplace the following lines with your MySQL details:
; host = "localhost" ; dbname = "webtrees" ; username = "webtrees" ; password = "yourpassword"Save and exit the file.
Restart Apache:
sudo systemctl restart apache2Access webtrees via your domain or IP address on your web browser:
http://yourdomain.com/webtrees
Conclusion
Congratulations! You have successfully installed webtrees on your Ubuntu Server. You can now start using webtrees to create and manage your family tree.