How to Install Piwik on CentOS7?

Posted on October 24th, 2018

How to Install Piwik on CentOS7?

Piwik is a free and open source web analytics tool written in PHP. Piwik uses MySQL/MariaDB to store its data. Piwik is an alternative to Google analytics providing nearly as many features as Google analytics provides. Piwik helps to gather and analyze important information about the visitors to the website providing important performance indicators such as visits, goal conversion rates, downloads, keywords and many more. It also gives extended analytics for eCommerce software such as orders, conversion rates, average order values, and detailed product statistics. Piwik is used by more than 1 million websites including Wikimedia, Forbes, Sharp and T mobiles. In this tutorial let’s have a look into how we can install Piwik on a Centos 7 server with LAMP environment.

1) Login to your server via SSH as root.

 #  ssh root@IPaddress

2) Always it is a good practice to follow before any new installations make sure that the currently installed packages are up to date.

#  yum clean all

# yum update

3) Now navigate the /opt directory and download Piwik.

#  cd /opt

#  wget

4) After the downloading completes unzip the file and move it into the document root of your domain.

#  unzip

# mv piwik /var/www/html/

5) Since Piwik uses MySQL database to store its data, a new database and user must be created for Piwik.

# mysql -u root -p


# GRANT ALL PRIVILEGES ON piwik.* to ‘piwik’@’localhost’ IDENTIFIED BY ‘Password’;

Don’t forget to replace ‘Password’ with a strong desired password.

6) Now open your favorite web browser and navigate to http://yourserverIP/piwik and complete the rest of the installation. You will see a welcome page first, by clicking next you can complete the remaining steps. Enter or localhost as the database server and then enter the database name, username, and password which you have created previously for Piwik.

Install Piwik


Finally, the Piwik dashboard.

Install Piwik


Hence the Piwik installation has been successfully completed.


Please do reach our support department if you have any doubt regarding this.



Leave a Reply