In this tutorial I will show you how to install piwik on centos 7 /RHEL 7.
Piwik is the leading Free/Libre open analytics platform.
Piwik aims to be a Free software alternative to Google Analytics, and is already used on more than 1,000,000 websites. Privacy is built-in!
Prequisites for piwik
There are some requirements that we need before installing piwik analytics tool. Let’s see what we need.
From Piwik website:
- Webserver such as Apache, Nginx, etc.
- PHP version 5.5.9 or greater
- MySQL version 5.5 or greater, or MariaDB
- (enabled by default) PHP extension pdo and pdo_mysql, or the mysqli extension.
Install Apache, php and mariadb
In this step I will install install apache if it is not installed before.
yum install -y php-pdo php-gd php-xml php-mysql php-mbstring php mariadb mariadb-server
Setting up database
Start the services of database
systemctl start mariadb
systemctl enable mariadb
Now, I will setup database (Initialize) in this step. I accepted all the default.
Read Also: Useful s3 commands
Create database for piwik
mysql -u root -p mysql> CREATE DATABASE piwik; Query OK, 1 row affected (0.00 sec) mysql> CREATE USER 'piwik'@'localhost' IDENTIFIED BY 'password'; Query OK, 0 rows affected (0.00 sec) mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON piwik.* TO 'piwik'@'localhost'; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> quit Bye
Firstly we will download the zip of piwik from their website. You can download zip from here:
chown apache. piwik
systemctl start httpd
systemctl enable httpd
You can go to the following link to get the web console
Now you can configure piwik.
This is how you can install piwik analytics tool on centos7 and RHEL 7.
If you got some issues installing this tutorial please feel to comment below.