How to install Piwik 3.5.1 on Ubuntu 18.04


 

To install Piwik 3.5.1 on Ubuntu 18.04
Piwik is an open source project with advanced privacy features that can be executed on your own server. Those who have a own website probably know what “web analytics” refers to. It’s a general term indicating the study of the impact of a website on its users. A business based on Internet services, like e-commerce, needs to find statistical information about people who visit the site, and this data is provided by web analytics software. According to W3Techs, the most used is Google Analytics. But, if you don’t want to use a remote-hosted service, you may want to give Piwik a chance.

Prerequisites


To install LAMP(Apache, MariaDB, php7)
In MariaDB (create database and user and give privileges to that user )

Php installation with required following modules

add-apt-repository ppa:ondrej/php 
apt-get update 
apt-get install php7.0 php7.0-mysql php7.0-curl php7.0-json php7.0-cgi libapache2-mod-php7.0 php7.0-mcrypt php7.0-xmlrpc 
php7.0-gd php7.0-mbstring php7.0  php7.0-common  php7.0-xmlrpc php7.0-soap  php7.0-xml php7.0-intl  php7.0-cli  php7.0-ldap 
php7.0-zip php7.0-readline php7.0-imap php7.0-tidy php7.0-recode php7.0-sq php7.0-intl

Installation

Download a Piwik package using the following URL

root@linuxhelp1:~# wget https://builds.matomo.org/piwik.zip
--2018-06-05 13:35:39--  https://builds.matomo.org/piwik.zip
Resolving builds.matomo.org (builds.matomo.org)... 185.31.40.177, 2a00:b6e0:1:200:177::1
Connecting to builds.matomo.org (builds.matomo.org)|185.31.40.177|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 18907738 (18M) [application/zip]
Saving to: ‘piwik.zip’

piwik.zip               100%[==============================>]  18.03M  1.07MB/s    in 24s     

2018-06-05 13:36:05 (775 KB/s) - ‘piwik.zip’ saved [18907738/18907738]

<ads 1>

Extract the package as follow

root@linuxhelp1:~# unzip piwik.zip 
Archive:  piwik.zip
   creating: piwik/
   creating: piwik/tmp/
   creating: piwik/tests/
  inflating: piwik/tests/README.md   
  inflating: piwik/bower.json        
.
.
  inflating: piwik/js/README.md      
  inflating: piwik/js/piwik.js       
  inflating: piwik/js/LICENSE.txt    
  inflating: piwik/js/tracker.php    
  inflating: piwik/js/index.php      
  inflating: piwik/js/piwik.min.js   
  inflating: How to install Matomo.html

Move the extracted file into the HTML directory

root@linuxhelp1:~# mv piwik /var/www/

Navigate to the apache document root directory

root@linuxhelp1:~# cd /var/www/

Change ownership and permission of the as E107  CMS follows

root@linuxhelp1:/var/www# chown -R www-data.www-data piwik
root@linuxhelp1:/var/www# chmod -R 775 piwik

Create a new virtual host configuration for accessing the Piwik CMS

root@linuxhelp1:/var/www# vim /etc/apache2/sites-available/piwik.conf
<VirtualHost *:80>
ServerName www.linuxhelp1.com
DocumentRoot /var/www/piwik/

<Directory /var/www/piwik/>
AllowOverride All
allow from all
</Directory>

</VirtualHost>

Enable site access

root@linuxhelp1:/var/www# a2ensite piwik.conf
Enabling site piwik.
To activate the new configuration, you need to run:
  systemctl reload apache2

Disable default access

root@linuxhelp1:/var/www# a2dissite 000-default.conf
Site 000-default disabled.
To activate the new configuration, you need to run:
  systemctl reload apache2

Enable  rewrite module

root@linuxhelp1:/var/www# a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
  systemctl restart apache2

Restart the apache service to make the changes effect  

root@linuxhelp1:/var/www# systemctl restart apache2

Now you can proceed the further installation and configuration from the browser by navigating to the following URL: http://<ipaddress or domain name
Snap 1

You will see the Welcome page of Matomo
Snap 2

Verify the compatibility for installing SeoPanel as shown below
Snap 3

Configure the Database setup as follows
Snap 4

Configure the Admin user setup as follows
Snap 6

Configure the Site information setup
Snap 7

You will see the Tracking code of site
Snap 8

After the configuration, you will see the following page as shown below
Snap 9

You can log in using the admin user credentials
Snap 10

After the Successful login, you will see the Admin dashboard of Piwik as shown below

Snap 11

You will see the version of Piwik
Snap 12


With this, the method to install Piwik 3.5.1 on Ubuntu 18.04 comes to an end.


Thank you! for using Linux Help.

You find this tutorial helpful? Share with your friends to keep it alive.
For more help topics browse our website www.linuxhelp.com
Be the first to comment, we value your suggestions. For further queries please comment below.

Tags: Piwik
user image Author :  Jayce