How to install Logaholic on CentOS

Logaholic is a web analytics software that provides reliable information on traffic, content, keywords, etc. from the websites installed on your CentOS VPS.

This installation guide assumes that Apache, MySQL and PHP are already installed and configured on your server. At the time of this writing, the latest stable version is Logaholic 6.0 and requires:

  • PHP 5 or higher with cURL and Zip extensions enabled. The output_buffering setting must be disabled and allow_url_fopen and display_errors settings must be enabled in php.ini
  • Apache or Nginx web server
  • MySQL 5.0 or higher installed on your Linux VPS.

Let’s start by installing Logaholic SHE (self-contained edition). Download the latest version of Logaholic available at ‘‘to the server and extract it using the following commands:

cd /opt/
wget -O logaholic.tar.gz
tar -xvzf logaholic.tar.gz
mkdir -p /var/www/html/logaholic
mv logaholic_she_600/logaholic /var/www/html

Download GeoLite Legacy Database from and then extract and copy this file to directory ‘/ var / www / html / logaholic / components / geoip / ‘ on server:

gunzip GeoLiteCity.dat.gz
mv GeoLiteCity.dat /var/www/html/logaholic/components/geoip/

Change the file permissions so your web server can write to the ‘/ var / www / html / logaholic’ directory and subdirectories:

chown apache:apache -R /var/www/html/logaholic/

Edit the Apache config file (default ‘/etc/httpd/conf/httpd.conf’) and define the Apache log file in the following format:

CustomLog /your_path/access_log "%h %l %u %t "%r" %s %b "%{Referer}i"

In general, this is enough:

CustomLog /your_path/access_log "combined"

Please note that each Apache virtual host must have its own log file. Find your PHP configuration file using the following command:

#php -i | grep php.ini
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini

Modify the ‘php.ini’ file and add / change the following lines:

allow_url_fopen = On 
display_errors = On 
output_buffering = off

Create a new Apache virtual host directive. For example, edit the Apache config file (‘/etc/httpd/conf/httpd.conf’ by default) and uncomment the following line:

#NameVirtualHost *:80

Then, add the following lines at the end:

<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/logaholic/
<Directory /var/www/html/logaholic/>
    Options FollowSymLinks
    AllowOverride All
    ErrorLog logs/
    CustomLog logs/ combined

Restart the Apache web server again for the changes to take effect:

service httpd restart

Create a new MySQL database for Logaholic on the server:

mysql -u root -p
mysql> CREATE DATABASE logaholicdb;
mysql> GRANT ALL PRIVILEGES ON logaholicdb.* TO 'logaholicuser'@'localhost' IDENTIFIED BY 'свой-пароль' WITH GRANT OPTION;
mysql> quit

Remember to replace your-password with a strong password.

Set MySQL server timezone:

mysql -u root -p
mysql> SET GLOBAL time_zone="-06:00";
mysql> quit

We populate the time zone tables using the following command:

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql

Open in your web browser and follow the simple instructions: enter your database parameters and administrator login credentials, and then click the “Save” button. If all settings in “Database Options” “Mysql Settings”, “File Access Verification” and “PHP Settings” should be highlighted in green, click the “Continue” button.

All. The Logaholic installation is complete. Log in to the admin area at and go to the “global settings” tab to configure post-installation tasks like adding a password, etc.