Site icon installvirtual

How to install piwik analytics tools on centos 7

install piwik on centos 7

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 is a full featured PHP MySQL software program that you download and install on your own webserver. At the end of the five minute installation process you will be given a JavaScript code. Simply copy and paste this tag on websites you wish to track and access your analytics reports in real time.

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:

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

Read Also: How to install piwik analytics tool on Ubuntu 16.04?

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.

mysql_secure_installation

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

Installing piwik

Firstly we will download the zip of piwik from their website. You can download zip from here:

cd /var/www/html
wget https://builds.piwik.org/piwik.zip
unzip piwik.zip
chown apache. piwik

Starting Apache

systemctl start httpd
systemctl enable httpd

Web Console

You can go to the following link to get the web console

http://ip-or-hostname/piwik

Now you can configure piwik.

This is how you can install piwik analytics tool on centos7 and RHEL 7.

Read Also: How to install bucardo for postgres replication

If you got some issues installing this tutorial please feel to comment below.

Exit mobile version