Webtrees - The Missing Manual

Author: Ron Savage
Table of Contents
Introduction
Here is what you will be doing
First Steps
You will be running webtrees as admin
Installing MariaDB
Some general MariaDB commands
Last updated: 2014-09-18

Introduction
Top

I use an Operating System called Debian, a version of Linux, so some instructions below may be done differently under other OSes.

Warning: Keep a written record of all the usernames/passwords and database names in what follows

Some Reference Pages
The webtrees homepage
The webtrees wiki
The webtrees administration pages

Here is what you will be doing
Top
Initialize MariaDB (previously known as MySQL)
Use MariaDB to create a database for use by webtrees, i.e. for use by you
Use MariaDB to create a database username/password
Install and run PHP
Install and run webtrees
Configure webtrees with the database username/password
Configure webtrees with the database name
Configure webtrees with the webtree admin user's username/password
Use webtrees to completely replace the 1 built-in person, Joe Bloggs, with the data for the first real, live person in your new family tree

First Steps
Top
Install MariaDB, and initialize a MariaDB database, and create a user. See Installing MariaDB (below)
Download and unzip webtrees.1.5.3.zip
Move the webtrees/ directory to where you want to keep it:
shell> mv webtrees/ ~/Documents/repos/
Install PHP:
shell> sudo apt-get install php5
Start PHP as a webserver on some port, say 9101:
php -S 127.0.0.1:9101 -t ~/Documents/repos/webtrees &
Start webtrees via your browser:
http://127.0.0.1:9101/setup.php
It starts by checking some of your hardware and software. If everything is OK, click 'Continue'
Fill in the database username/password you chose when using MariaDB, and click 'Continue'
Fill in the database name you chose when using MariaDB, and click 'Continue'
Fill in the details for the webtrees admin account, e.g. My Name and username/password of my.name/seekrit, and click 'Continue'
The setup program will now start webtrees, so go to the first step in the next section

You will be running webtrees as admin
Top
The browser should be pointing to http://127.0.0.1:9101/admin_trees_manage.php
Log in using your.name/seekrit (the username/password from above), and click 'Login'
Search the webtrees admin page for 'new family tree' before proceeding. E.g. the family name is used to name any exported file you create
Warning: The family name you create next is case sensitive and hard to change,
so think carefully, and choose wisely. Then type it in, and click 'Save'
Click on 'My family tree'
Click on 'Joe Bloggs' and edit all the details for the person who will be the starting point for your family tree.
It is not important which person you choose, but make sure they have parent or child connections, since that's how you have to add new people, one at a time
On the left, click 'Facts and Events', and fill it in
On the left, click 'Families' and fill that in too
Have a cup of tea. By now you'll need it!

Installing MariaDB
Top
shell> gpg --keyserver keys.gnupg.net --recv-keys CBCB082A1BB943DB
shell> gpg -a --export CBCB082A1BB943DB | apt-key add -
shell> sudo echo "deb http://mirror2.hs-esslingen.de/mariadb/repo/5.5/debian wheezy main" >> /etc/apt/sources.list
shell> sudo apt-get update
shell> sudo apt-get install mariadb-client mariadb-server mariadb-client-5.5 mariadb-server-5.5 mariadb-server-core-5.5 mariadb-client-core-5.5 libmariadbclient-dev

Initializing MariaDB
Top
Install MariaDB or MySQL. I'm using MariaDB V 5.5.39
Change the root password. Let's use 'newadminpw':
shell> mysql -uroot -e "update user set password=password('newadminpw') where user='root'" mysql
Edit /etc/mysql/my.cnf:
Set 'wait_timeout' to 6000 not 600
Tell MariaDB to reload its configuration file:
shell> mysqladmin -uroot -pnewadminpw reload
Create a database, here called 'webtrees'. You will need this name later:
shell> mysqladmin -uroot -pnewadminpw create webtrees --default-character-set=utf8
Create a user, here called 'my.user' with password 'my.pass', and give them access to that database:
shell> mysql -uroot -pnewadminpw mysql
And (at the 'MariaDB [mysql]' prompt):
MariaDB [mysql]> insert into user (host,user,password) values ('localhost','testuser',password('testpass'));
MariaDB [mysql]> insert into user (host,user,password) values ('%','testuser',password('testpass'));
MariaDB [mysql]> insert into db values ('%','testdb','testuser','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
MariaDB [mysql]> \q
Tell MariaDB to reload the configuration file:
shell> mysqladmin -uroot -pnewadminpw reload
Test your changes:
mysql -umy.user -pmy.pass webtrees
And (at the 'MariaDB [testdb]' prompt):
MariaDB [mysql]> show global variables;
MariaDB [mysql]> \q

Some general MariaDB commands (at the 'MariaDB [mysql]' prompt):
Top
MariaDB [mysql]> show tables
MariaDB [mysql]> show table status
MariaDB [mysql]> show columns in some.table.name
MariaDB [mysql]> show create table some.table.name

My homepage
Debian V 7.6