Piwik is free and open source web analytics software for your websites.It helps to give insight details of your website visitors activity. Likewise google analytics it is also capable of providing the Live website visitors information. It comes with many default features,apps and plugin which enhance the Piwik as one of the best analytics software we have in current web world. It has nice dashboard which gives clear details on first sight.
Website URL : http://piwik.org
Demo of Piwik: http://demo.piwik.org
Here in this tutorial we will install the Piwik in Ubuntu 12.04. Whereas the installation hardly takes 5 minutes if your server has all the package dependency.
Details of Server
IP address: 10.0.0.21
Operating System: Ubuntu 12.04 LTS n l
Software to install: Piwik
Follow the step by step guide to install Piwik in Ubuntu and Debian
In this tutorial,since starting I will login as root user or superuser.Hence login with superuser first.
Step 1: Login with superuser or root
sudo su - or su -
Step 2: Install apache,mysql and php5 with other modules.
While installing of mysql server,it will ask to set the mysql root password. If you already have mysql server you can skip with the installation.
apt-get install apache2 mysql-server php5 php5-cli php5-gd php5-mysql php5-common
Step 3: Login into mysql-server and create a database,mysql user and grant privileges to the mysql user only for newly created database. See below how it is done.
# mysql -h localhost -u root -p mysql> create user 'piwikuser'@'localhost' IDENTIFIED BY 'GivePassword'; mysql> GRANT ALL ON piwik.* TO 'piwikuser'@'localhost'; mysql> flush privileges; mysql> exit;
Step 4: Download the latest package of Piwik
wget http://builds.piwik.org/latest.zip
Note: If wget command do not found then install with this command apt-get install wget
Step 5: Unzip the piwik compressed file into the /var/www .
unzip latest.zip -d /var/www
Note: If unzip command do not found then install with this command apt-get install unzip
Step 6: Create the all directories and change ownership as per given below method.Now restart the apache2 once to check if all things are fine.
mkdir -p /var/www/piwik/tmp mkdir -p /var/www/piwik/tmp/templates_c/ mkdir -p /var/www/piwik/tmp/cache/ mkdir -p /var/www/piwik/tmp/assets/ mkdir -p /var/www/piwik/tmp/tcpdf/ chown -R www-data:www-data /var/www/piwik chmod -R 0755 /var/www/piwik/tmp chmod -R 0755 /var/www/piwik/tmp/templates_c/ chmod -R 0755 /var/www/piwik/tmp/cache/ chmod -R 0755 /var/www/piwik/tmp/assets/ chmod -R 0755 /var/www/piwik/tmp/tcpdf/ /etc/init.d/apache2 restart
Step 7: Now open the web browser and start the installation via web interface.
Here my server ip is 10.0.0.21 . Replace the ip address with your server IP address.And if you are try installing in your local system,you can use 127.0.0.1 or http://localhost.
Syntax http://ip-address-of-server/piwik
Below is screenshot how it looks on first time login. Explore the piwik ,visit its site ,explore more. It is very nice project and many features it has.
To explore and for more learning about Piwik,visit its Video tutorial page.