User Tools

Site Tools


Install MySQL and Matomo on Fedora Server 29

Install MySQL

dnf install
dnf install mysql-community-server
systemctl start mysqld

A temporary password was generated automatically. To find it, run

grep 'temporary password' /var/log/mysqld.log

I had to change the temporary password before executing any other SQL statements.

mysql -uroot -p

    alter user 'root'@'localhost' identified by '...';

Install PHP Extensions

dnf install php-mysqli php-curl php-gd php-xml php-mbstring

Download Matomo

mv matomo /var/www/html
chown -R nginx:nginx /var/www/html/matomo

Configure SELinux

semanage fcontext -a -t httpd_sys_content_t '/var/www/html/matomo(/.*)?'
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/matomo/config(/.*)?'
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/matomo/tmp(/.*)?'
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/matomo/piwik.js'
restorecon -v -R matomo

Half way through the installation process, Matomo needs to connect to MySQL, which is blocked by SELinux by default.

getsebool -a | grep httpd
setsebool -P httpd_can_network_connect_db 1

Configure MySQL

On my machine PHP doesn't support MySQL caching_sha2_password. Edit /etc/my.cnf as follows.


Consult for Matomo-specific instructions. To create the Matomo user with proper authentication plugin, use

alter user 'piwik'@'localhost' identified with mysql_native_password by '...';

Configure DokuWiki

cd /var/www/html/wiki/lib/plugins/
git clone matomo
install_mysql_and_matomo_on_fedora_server_29.txt · Last modified: 2019/01/19 20:39 by root