If you also have a problem with real-time map in your piwik portal, here is a short description how to make it available in a few points. Let’s do it!
sudo apt-get install php5-geoip php5-dev libgeoip-dev
sudo pecl install geoip
add to php.ini
extension=geoip.so geoip.custom_directory=/path/to/piwik/misc
Then restart webserver andgo to Piwik > Settings > Geolocation, then choose the GeoIP PHP
If you want to know locationsof your visits before you have installed GeoIP feature run this script in /path/to/piwik/misc/others
php ./geoipUpdateRows.php