Piwik - Redhat installation

Piwik - Redhat installation

Posted By: pmietlicki

Published to Dev on Mar 26, 2017

php-ldap is only useful if you want to integrate piwik with your ldap repository thanks to the piwik-ldap plugin

Install the dependencies :

yum install php-xml php-gd php-mysql php-mbstring unzip wget php-ldap

Go to /etc/php.ini :

memory_limit = 128M

Add a specific user /applis/ inside the apache group :

useradd piwik -c 'Utilisateur pour application piwik' -d /appli/piwik -G 

Go to /etc/httpd/conf.d and create the virtual host, for example inside 'piwik-vhost.conf' :


 ServerName piwik.example.com
 ServerAdmin admin@example.com

 DocumentRoot /appli/piwik/public_html
 ErrorLog /appli/piwik/logs/error.log
 CustomLog /appli/piwik/logs/access.log combined

 
 Order allow,deny
 Allow from all
 

Go to /appli/piwik (or whatever is consistend with your virtual host configuration) :

mkdir public_html
mkdir logs

And download the last version of piwik :

 wget http://piwik.org/latest.zip
unzip latest.zip 
mv piwik/* public_html 
rmdir piwik 
chown piwik:apache /appli/piwik
chown -R apache:apache public_html

Make executable some folders that are necessary for the installation :

chmod a+w /appli/piwik/public_html/tmp chmod a+w /appli/piwik/public_html/config

Create the mysql database :

mysql -u root -p
create database piwik
grant usage on *.* to piwik@localhost identified by ‘piwikpasswd’;
grant all privileges on piwik.* to piwik@localhost ;

Then go to the piwik virtual host URL (http://piwik.example.com in our example) and configure everything you need to have piwik working smoothly !

If you don't already have a DNS resolution, you can change /etc/hosts on server side and on the client side (inside C:\Windows\system32\drivers\etc\hosts under Windows), for example :

192.168.0.1 piwik piwik.example.com

Tags: Piwik

Archive