File matomo-README.SUSE of Package matomo

a) mariadb/mysql
$ mysql -u adminusername -p
mysql> CREATE DATABASE _matomo_db_name_here_;
mysql> CREATE USER 'matomo'@'localhost' IDENTIFIED BY '_password_';
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON _matomo_db_name_here_.* TO 'matomo'@'localhost';

Replace _matomo_db_name_here_ with the name of your MySQL database (if possible, this database should only have the Matomo tables installed).
Replace _password_ with your password.

b) apache
In /etc/apache2/conf.d/matomo.conf you must insert your domain.

  Apache22: Allow from .mydomain.de
  Apache24: Require host mydomain.de

Enable needed modules:
~# for module in php7 headers setenvif ; do
~#	/usr/sbin/a2enmod $module
~# done

If you also want to enable compression, just enable the following modules as well:
~# /usr/sbin/a2enmod deflate
~# /usr/sbin/a2enmod buffer
~# /usr/sbin/a2enmod brotli
~# /usr/sbin/a2enmod filter

And then restart or reload apache
  
~# /usr/bin/systemctl restart apache2

c) installer
Go to http://www.mydomain.de/matomo/

At mysql-setup use mysqli not pod.


d) Attention:
You must disable APC caching for matomo.

Example for APC
   you can insert php_flag apc.cache_by_default Off in /etc/apache2/conf.d/matomo.conf like:

	<Directory "/srv/www/matomo">
    	AllowOverride All
    	Options FollowSymLinks
    
    	php_flag apc.cache_by_default Off
    
    	<IfModule mod_authz_core.c>
        ...

e) php
To prevent some critical issue, you must set the following in your php.ini file: 
  always_populate_raw_post_data=-1
After making this change, restart your web server

f) auto archiving
For autoarchiving you have two options.
With cron or with systemd.timer.
For cron you must uncomment the line in /etc/cron.d/matomo-archive
For systemd.timer you must start and enable matomo-archive.timer:
~# /usr/bin/systemctl enable --now matomo-archive.timer

g) Additional plugins
Please note that the plugins/ directory (beside others) is owned by root:root by intention.

This security feature includes that you will not be able to install plugins via the Web-Installer!
Please consider to either create an own package from your plugin (have a look at other packages named 
matomo-plugin-* to get the idea) or install the plugin by downloading and unzipping it at the right 
place manually before enabling it in the WebUI.

Each Plugin installed manually (either via RPM or via console) needs also to get enabled in the WebUI.
An exception are packaged plugins (like matomo-plugin-LoginLdap for example), which are automatically 
enabled during install by the RPM installer). If in doubt, please visit the WebUI as Matomo admin and 
check the list of available and enabled plugins (which is a good idea in any case).

...and remember to have a lot of fun!

openSUSE Build Service is sponsored by