• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, June 20, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Linux

Install Piwik on Ubuntu 14.04

How VPS by How VPS
January 1, 2020
in Linux
0
0
SHARES
44
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Requirements
  2. Download Piwik
  3. Setup Stats Domain
  4. Install Piwik
  5. Want to contribute?


Piwik is an open source analytics software system which can be installed on a server to view traffic of its websites in real time. It is an excellent alternative to web-based Analytic solutions like Google Analytics. In this guide, we will learn how to install and setup Piwik on your Ubuntu 14.04 based VULTR Server.

Requirements

Before we can move ahead, make sure that your server has all the required updates. Run the following commands on the terminal for that.

sudo apt-get update
sudo apt-get upgrade

Your server needs to have the LAMP (Linux, Apache, MySQL and PHP) stack installed in order for Piwik to run. If you haven’t done it yet, then you can follow our guide to install and setup the stack. Furthermore, you will need an additional PHP library for Piwik to work. Run the following command to install it.

sudo apt-get install php-gd

That marks the completion of all the steps required for Piwik to work.

Download Piwik

Make sure you are in the user directory first.

cd /var/www/piwik

Grab the latest Piwik release.

wget http://builds.piwik.org/latest.zip

Unzip and move the Piwik release to the user directory.

unzip latest.zip

Setup the proper file permissions to the tmp and config directories.

chmod a+w /var/www/piwik/tmp
chmod a+w /var/www/piwik/config

Setup proper user permissions on the complete piwik directory.

chown -R www-data:wwww-data /var/www/piwik

Setup Stats Domain

To access your Piwik page, you can either install it using your server’s IP address or you can setup a custom domain name. You can skip this process if you are comfortable accessing Piwik via the IP address. If you would like a usable URL for the stats page, then continue reading.

Let’s assume that your domain is domain.com and that you want to access Piwik at stats.domain.com. For that, you would need to setup the “A record” first for stats.domain.com with your DNS provider. If you don’t know how to do that, then contact the support team from where you registered your domain.

After setting up the “A record”, we need to bind the stats domain to the server via the virtual host feature of Apache. We will need to setup a custom vhost entry for the stats domain. Run the following commands on the terminal.

sudo nano /etc/apache2/sites-available/stats.domain.com.conf

Add the following lines to the above file.

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName stats.domain.com
    ServerAlias stats.domain.com
    DocumentRoot /var/www/piwik/
    ErrorLog /var/www/piwik/logs/error.log
    CustomLog /var/www/piwik/logs/access.log combined
</VirtualHost>

Replace the above email address with a working email address of yours. We would also need to create the log directory.

mkdir /var/www/piwik/logs

Now that the virtual host is setup, we need to activate it with the following commands.

sudo a2ensite stats.domain.com.conf

Restart the Apache server for the configuration to take effect.

sudo service apache2 restart

Install Piwik

Now that we have setup Piwik, you can access it either via http://<yourserverIP>/piwik or http://stats.domain.com URL from your web browser. Follow the on-screen instructions to complete the install. Make sure to enter the proper database user which has the permissions to create a table during the installation.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

How to Install and Configure Graphite on Ubuntu 16.04

Next Post

How To Install rkhunter On Ubuntu

Next Post

How To Install rkhunter On Ubuntu

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In