Introduction
From Wikipedia:
Piwik is a free and open source web analytics application written by a team of international developers that runs on a PHP/MySQL webserver. Piwik has been translated to more than 45 languages. Piwik tracks online visits to one or more websites and displays reports on these visits for analysis.
Piwik displays reports regarding the geographic location of visits, the source of visits (i.e. whether they came from a website, directly, or something else), the technical capabilities of visitors (browser, screen size, operating system, etc.), what the visitors did (pages they viewed, actions they took, how they left), the time of visits and more.
Requirements
PHP version 5.3.3 or greater
MySQL server version 4.1 or greater
- (enabled by default) PHP extension pdo and pdo_mysql, or the mysqli extension
Note: In second end of 2015 support for PHP 5.3 will be dropped in Piwik 3.0.0. Piwik will then require PHP 5.4. Until then Piwik works well with any PHP >= 5.3.3.
It is recommended to us PHP version 5.5 and up (5.6 is available starting with Debian 8) as it is much more memory efficient than previous PHP versions.
For more details, see Piwik requirements in the official documentation
Installation
There is an unofficial package repository for Piwik Open-source Analytics suitable for all Debian based distributions.
The repository contains the vanilla version of the latest stable version of Piwik.
Download the repository OpenPGP key
wget https://debian.piwik.org/repository.gpg -qO piwik-repository.gpg
Verify the repository OpenPGP key:
sha256sum --binary piwik-repository.gpg
The value returned should be
0d7c880f6c838bba2d02817dcacfc97fc538b1ebcdb41c3106595265c0d371d4 *piwik-repository.gpg
Install the signing key on your computer:
cat piwik-repository.gpg | sudo apt-key add -
Declare this repository by adding the following to /etc/apt/sources.list.d/piwik.list:
deb http://debian.piwik.org/ piwik main deb-src http://debian.piwik.org/ piwik main
Alternatively, you may want to use https. To do so, you will need to instal the apt-transport-https package firstand then add the following lines instead:
deb https://debian.piwik.org/ piwik main deb-src https://debian.piwik.org/ piwik main
Refresh your packages list:
$ sudo apt-get update
Install and configure MySQL server (unless you'll be accessing it from another server, a possible scenario in production environments):
$ sudo apt-get install mysql-server
Note: also see /usr/share/doc/piwik/README.Debian for additional database setup informationInstall Piwik:
$ sudo apt-get install piwik
Check the configuration files in /etc/piwik/
Optionally, enable the cron job in /etc/cron.d/piwik
External links
Please, add links to external documentation. This is not a place for links to non-free commercial products.