Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to enable geoip on a Mac #426

Closed
godsmustbcrazy opened this issue Jun 9, 2016 · 11 comments
Closed

How to enable geoip on a Mac #426

godsmustbcrazy opened this issue Jun 9, 2016 · 11 comments

Comments

@godsmustbcrazy
Copy link

godsmustbcrazy commented Jun 9, 2016

Once I have installed it on a Mac using
brew install goaccess

is it possible to enable geoIP ?

@allinurl
Copy link
Owner

allinurl commented Jun 9, 2016

From the formula, it looks like you can pass with-geoip

@godsmustbcrazy
Copy link
Author

Yes ,
brew uninstall goaccess

then

brew install goaccess --with-geoip

Thanks again

@godsmustbcrazy
Copy link
Author

Make sure you run

xcode-select install

if you get an error while doing this that says "homebrew cannot run c compiled programs" when you run brew install goacess --with-geoip

Mac OsX El-Capitan

@buluxan
Copy link

buluxan commented Jul 27, 2016

hi sir ,

i got this error earlier im enable geoip that mention above

sudo goaccess -f access_log  > report5.html
Password:
Error Opening file /usr/local/var/GeoIP/GeoIP.dat

Resolved :

i just download this file GeoLiteCity.dat.gz and then extract to the specific path and i just setup the config like in below

######################################
# GeoIP Options
# Only if configured with --enable-geoip
######################################

# Standard GeoIP database for less memory usage.
#
#std-geoip false

# Specify path to GeoIP database file. i.e., GeoLiteCity.dat
# .dat file needs to be downloaded from maxmind.com.
#
# For IPv4 City database:
# wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
# gunzip GeoLiteCity.dat.gz
#
# For IPv6 City database:
# wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz
# gunzip GeoLiteCityv6.dat.gz
#
# For IPv6 Country database:
# wget -N http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz
# gunzip GeoIPv6.dat.gz
#
# Note: `geoip-city-data` is an alias of `geoip-database`
#
#geoip-database /usr/local/share/GeoIP/GeoLiteCity.dat
geoip-database /usr/local/var/GeoIP/GeoLiteCity.dat

@sayan-sibyl
Copy link

I am having this issue with GeoIP

According to the last error ettercap was not able to open the geoip file so I ran these commands
brew install geoip
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
imagemagick imagemagick@6 kubernetes-cli node-build

Warning: geoip 1.6.11 is already installed
Sayans-iMac:~ sayan$ sudo ettercap -G
Password:

ettercap 0.8.2 copyright 2001-2015 Ettercap Development Team

(process:12046): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.

(:12046): Gtk-CRITICAL **: gtk_image_get_pixbuf: assertion 'image->storage_type == GTK_IMAGE_PIXBUF || image->storage_type == GTK_IMAGE_EMPTY' failed
Error Opening file /usr/local/var/GeoIP/GeoIP.dat
Error Opening file /path/to/GeoIP.dat

But still I get the same error and when I click on the GeoIP.dat file in finder according to this path
/usr/local/var/GeoIP/GeoIP.dat & this path
/path/to/GeoIP.dat

Finder shows me this error see the attached screenshot
https://user-images.githubusercontent.com/29756523/28931846-1d2568b8-7895-11e7-91d1-ba62a18bab69.png

@allinurl
Copy link
Owner

allinurl commented Aug 3, 2017

@sayan-sibyl are you using goaccess and specifying the path of the .dat file in your config file? e.g., geoip-database /usr/local/var/GeoIP/GeoLiteCity.dat

@crapthings
Copy link

crapthings commented Jun 20, 2018

goaccess nginx.access.log -o report.html --log-format=COMBINED --enable-geoip=mmdb
goaccess nginx.access.log -o report.html --log-format=COMBINED --enable-geoip=legacy

doesnt work, what's wrong?

image

@allinurl
Copy link
Owner

Please configure with GeoIP support:

./configure --enable-utf8 --enable-geoip=legacy

and then

goaccess nginx.access.log -o report.html --log-format=COMBINED

@dkolitha
Copy link

dkolitha commented Dec 2, 2018

When I try brew install goaccess --with-geoip

I get below warning

Warning: goaccess: this formula has no --with-geoip option so it will be ignored!

@allinurl
Copy link
Owner

allinurl commented Dec 3, 2018

@dkolitha according to the formula, brew install goaccess should default to mmdb. Otherwise, feel free to open an issue in homebrew-core.

@electricpocket
Copy link

Had to install the free GeoLite2-City mmdb on my Mac to get this to work

brew install goaccess

(N.B. now uses mmdb format of GeoLite)

then visit

https://dev.maxmind.com/geoip/geoip2/geolite2/, signup and download the mmdb version
uncompress the gzipped tar file.
and then tell goaccess where to find it with the --geoip-database option

goaccess ............--geoip-database ~/Downloads/GeoLite2-City_20200901/GeoLite2-City.mmdb

or even better put it in e.g. /usr/local/share set it up permanently using geoaccess.conf

e.g. /usr/local/shareGeoIP/GeoLite2-City.mmdb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants