How to Install and Configure Piwik on CentOS 6.2

Share this Article :

Piwik is an open source web analytics software that makes it easy to get the information you want from your visitors. It’s free software alternative to Google Analytics.

1. To run Piwik, your host needs to meets the following minimum requirements :

-PHP version 5.1.3 or greater
-MySQL version 4.1 or greater
-Enabled PHP extension pdo and pdo_mysql, or the mysqli extension.(enabled by default)

If not, then install the following :

[[email protected] ~]# yum install php-pdo php-gd php-xml -y

2. Enter apache’ document root directory :

[[email protected] ~]# cd /var/www/html/

3. Download the latest release of Piwik from http://piwik.org/latest.zip :

[[email protected] html]# wget http://piwik.org/latest.zip

4. Unzip the piwik’ zip file to document root :

[[email protected] html]# unzip latest.zip

5. Enter piwik directory :

[[email protected] html]# cd piwik

6. Change the permission for ./piwik/config and ./piwik/tmp as below :

[[email protected] piwik]# chmod 777 config
[[email protected] piwik]# chmod 777 tmp

7. Login to mysql server using root and create the following database and it’s permission. You can create a new user with the command :

mysql> CREATE USER 'piwik'@'localhost' IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON piwik_db.* TO 'piwik'@'localhost' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)

8. Navigate the browser to the piwik portal as below :
http://192.168.1.44/piwik/

9. Complete the piwik installation wizard :

piwik

piwik

piwik

piwik

piwik

piwik

piwik

piwik

piwik

piwik

piwik

Leave a Reply