본문 바로가기

분석/Go Access

GoAccess 1.3 설치 - 수동설치

GoAccess란?

GoAccess는 현존하는 거이 모든 웹서버의 로그 분석이 가능하고 터미널 화면과 html 파일등을 통한 웹화면으로 분석결과를 실시간으로 볼수있습니다. 분석 기능으로는 일자별 방문자정보, 요청 URL 정보 , 방문자별 ip 정보 , 접속자 국가별정보등 많은 기능을 지원하고있으며 github 에서도 많은 관심을 주고있는 프로젝트이기때문에 개발자들의  지속적인 개선이 이루어지고있는것이 장점입니다. 최신버전 설치를 하려면 https://goaccess.io/download 에서 다운로드 받아 소스설치할수있습니다.

<출처 : https://idchowto.com/?p=42916>

 

파일 다운로드

$ wget https://tar.goaccess.io/goaccess-1.3.tar.gz
--2019-09-20 21:52:33--  https://tar.goaccess.io/goaccess-1.3.tar.gz
Resolving tar.goaccess.io (tar.goaccess.io)... 107.170.196.4
Connecting to tar.goaccess.io (tar.goaccess.io)|107.170.196.4|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 541374 (529K) [application/x-gzip]
Saving to: ‘goaccess-1.3.tar.gz’


goaccess-1.3.tar.gz   100%[========================>] 528.69K   448KB/s    in 1.2s


2019-09-20 21:52:35 (448 KB/s) - ‘goaccess-1.3.tar.gz’ saved [541374/541374]

 

파일 압축 해제

$ tar -xzvf goaccess-1.3.tar.gz
x goaccess-1.3/
x goaccess-1.3/ChangeLog
x goaccess-1.3/resources/
x goaccess-1.3/resources/tpls.html
x goaccess-1.3/resources/css/
x goaccess-1.3/resources/css/app.css
x goaccess-1.3/resources/css/bootstrap.min.css
x goaccess-1.3/resources/css/fa.min.css
x goaccess-1.3/resources/js/
...
x goaccess-1.3/m4/progtest.m4
x goaccess-1.3/m4/lib-prefix.m4
x goaccess-1.3/m4/iconv.m4
x goaccess-1.3/m4/gettext.m4
x goaccess-1.3/m4/lib-ld.m4
x goaccess-1.3/m4/lib-link.m4
x goaccess-1.3/m4/nls.m4
x goaccess-1.3/m4/po.m4

 

Configure

  • GeoIP 라이브러리로 인한 실패
$ cd goaccess-1.3/

$ ./configure --enable-utf8 --enable-geoip=legacy
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking whether NLS is requested... yes
checking for msgfmt... no
checking for gmsgfmt... :
checking for xgettext... no
checking for msgmerge... no
checking build system type... x86_64-apple-darwin18.7.0
checking host system type... x86_64-apple-darwin18.7.0
checking for ld used by GCC... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking for shared library run path origin... done
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for CFPreferencesCopyAppValue... yes
checking for CFLocaleCopyCurrent... yes
checking for GNU gettext in libc... no
checking for iconv... yes
checking for working iconv... yes
checking how to link with libiconv... -liconv
checking for GNU gettext in libintl... no
checking whether to use NLS... no
checking for libintl_dgettext in -lintl... no
checking for pthread_create in -lpthread... yes
checking whether to build with rdynamic for GNU ld... no
checking for GeoIP_new in -lGeoIP... no
configure: error:
    *** Missing development files for the GeoIP library

 

GeoIP 설치

brew install geoip
==> Downloading https://homebrew.bintray.com/bottles/geoip-1.6.12.mojave.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring geoip-1.6.12.mojave.bottle.1.tar.gz
🍺  /usr/local/Cellar/geoip/1.6.12: 18 files, 553.0KB

 

재실행

$ ./configure --enable-utf8 --enable-geoip=legacy
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
...
checking for strpbrk... yes
checking for strrchr... yes
checking for strspn... yes
checking for strstr... yes
checking for strtol... yes
checking for strtoull... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating po/Makefile.in
config.status: creating src/config.h
config.status: executing depfiles commands
config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile


Your build configuration:


  Prefix         : /usr/local
  Package        : goaccess
  Version        : 1.3
  Compiler flags :  -pthread
  Linker flags   : -lncurses -lGeoIP -lpthread
  Dynamic buffer : no
  Geolocation    : GeoIP Legacy
  Storage method : In-memory Hash Database (Default)
  TLS/SSL        : no
  Bugs           : goaccess@prosoftcorp.com

 

make

$ make
depbase=`echo src/bin2c.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src    -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/bin2c.o -MD -MP -MF 
...
depbase=`echo src/commons.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src    -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/commons.o -MD -MP -MF $depbase.Tpo -c -o src/commons.o src/commons.c &&\
    mv -f $depbase.Tpo $depbase.Po
In file included from src/commons.c:44:
./src/labels.h:33:10: fatal error: 'libintl.h' file not found
#include <libintl.h>
         ^~~~~~~~~~~
1 error generated.
make[2]: *** [src/commons.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

 

문제해결 : https://github.com/allinurl/goaccess/issues/1378

# port install gettext
# brew link gettext --force

$ brew link gettext --force
Linking /usr/local/Cellar/gettext/0.20.1... 171 symlinks created


If you need to have this software first in your PATH instead consider running:
  echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile

 

make

$ make
cat resources/tpls.html | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/tpls.html.tmp
./bin2c resources/tpls.html.tmp src/tpls.h tpls
cat resources/css/bootstrap.min.css | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/css/bootstrap.min.css.tmp
./bin2c resources/css/bootstrap.min.css.tmp src/bootstrapcss.h bootstrap_css
cat resources/css/fa.min.css | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/css/fa.min.css.tmp
./bin2c resources/css/fa.min.css.tmp src/facss.h fa_css
cat resources/css/app.css | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/css/app.css.tmp
./bin2c resources/css/app.css.tmp src/appcss.h app_css
cat resources/js/d3.v3.min.js | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/js/d3.v3.min.js.tmp
./bin2c resources/js/d3.v3.min.js.tmp src/d3js.h d3_js
cat resources/js/hogan.min.js | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/js/hogan.min.js.tmp
./bin2c resources/js/hogan.min.js.tmp src/hoganjs.h hogan_js
cat resources/js/charts.js | sed -E "s@(,|;)[[:space:]]*//..*@\1@g" | sed -E "s@^[[:space:]]*//..*@@g" | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/js/charts.js.tmp
...
gcc -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread   -o goaccess src/base64.o src/browsers.o src/color.o src/commons.o src/csv.o src/error.o src/gdashboard.o src/gdns.o src/gholder.o src/gmenu.o src/goaccess.o src/gslist.o src/gstorage.o src/gwsocket.o src/json.o src/opesys.o src/options.o src/output.o src/parser.o src/settings.o src/sha1.o src/sort.o src/ui.o src/util.o src/websocket.o src/xmalloc.o  src/gkhash.o src/geoip1.o   -lncurses -lGeoIP -lpthread
Undefined symbols for architecture x86_64:
  "_libintl_bindtextdomain", referenced from:
      _main in goaccess.o
  "_libintl_dgettext", referenced from:
      _display_storage in commons.o
      _display_default_config_file in commons.o
      _display_version in commons.o
      _sigsegv_handler in error.o
      _display_content in gdashboard.o
      _render_find_dialog in gdashboard.o
      _set_dash_metrics in gdashboard.o
      ...
  "_libintl_setlocale", referenced from:
      _main in goaccess.o
      _ui_spinner in ui.o
  "_libintl_textdomain", referenced from:
      _main in goaccess.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [goaccess] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

 

gcc 설치

$ brew install gcc
==> Installing dependencies for gcc: gmp, isl, mpfr and libmpc
==> Installing gcc dependency: gmp
==> Downloading https://homebrew.bintray.com/bottles/gmp-6.1.2_2.mojave.bottle.1.tar.gz
==> Downloading from https://akamai.bintray.com/84/84f74594086bccc53bdb141f4d06d7847680374e255ebe016654da1e47db2dfc?__gda__=exp=1568989355~hmac=0e55
######################################################################## 100.0%
==> Pouring gmp-6.1.2_2.mojave.bottle.1.tar.gz
🍺  /usr/local/Cellar/gmp/6.1.2_2: 18 files, 3.1MB
==> Installing gcc dependency: isl
==> Downloading https://homebrew.bintray.com/bottles/isl-0.21.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/f9/f9188b5d486b2a835cd865f219be1a9848ce3926e27089a1538ee989db65447d?__gda__=exp=1568989356~hmac=515d
######################################################################## 100.0%
==> Pouring isl-0.21.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/isl/0.21: 72 files, 4.3MB
==> Installing gcc dependency: mpfr
==> Downloading https://homebrew.bintray.com/bottles/mpfr-4.0.2.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/cf/cfce7ab866e98360c9364cd924da620ae7936d3a224d686aacc209c2107d19aa?__gda__=exp=1568989358~hmac=ef73
######################################################################## 100.0%
==> Pouring mpfr-4.0.2.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/mpfr/4.0.2: 28 files, 4.7MB
==> Installing gcc dependency: libmpc
==> Downloading https://homebrew.bintray.com/bottles/libmpc-1.1.0.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libmpc-1.1.0.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/libmpc/1.1.0: 12 files, 354KB
==> Installing gcc
==> Downloading https://homebrew.bintray.com/bottles/gcc-9.2.0.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/a0/a053832700c5f4d5606929b8101f5bf0fcc6b7b42b4bca73effc3f0316cfb691?__gda__=exp=1568989363~hmac=3f60
######################################################################## 100.0%
==> Pouring gcc-9.2.0.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/gcc/9.2.0: 1,462 files, 291.4MB

 

make

$ make
depbase=`echo src/bin2c.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/bin2c.o -MD -MP -MF $depbase.Tpo -c -o src/bin2c.o src/bin2c.c &&\
    mv -f $depbase.Tpo $depbase.Po
gcc -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread   -o bin2c src/bin2c.o  -lncurses -lGeoIP -lpthread -lintl
cat resources/tpls.html | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/tpls.html.tmp
./bin2c resources/tpls.html.tmp src/tpls.h tpls
cat resources/css/bootstrap.min.css | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/css/bootstrap.min.css.tmp
./bin2c resources/css/bootstrap.min.css.tmp src/bootstrapcss.h bootstrap_css
cat resources/css/fa.min.css | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/css/fa.min.css.tmp
./bin2c resources/css/fa.min.css.tmp src/facss.h fa_css
cat resources/css/app.css | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/css/app.css.tmp
./bin2c resources/css/app.css.tmp src/appcss.h app_css
cat resources/js/d3.v3.min.js | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/js/d3.v3.min.js.tmp
./bin2c resources/js/d3.v3.min.js.tmp src/d3js.h d3_js
cat resources/js/hogan.min.js | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/js/hogan.min.js.tmp
./bin2c resources/js/hogan.min.js.tmp src/hoganjs.h hogan_js
cat resources/js/charts.js | sed -E "s@(,|;)[[:space:]]*//..*@\1@g" | sed -E "s@^[[:space:]]*//..*@@g" | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/js/charts.js.tmp
./bin2c resources/js/charts.js.tmp src/chartsjs.h charts_js
cat resources/js/app.js | sed -E "s@(,|;)[[:space:]]*//..*@\1@g" | sed -E "s@^[[:space:]]*//..*@@g" | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/js/app.js.tmp
./bin2c resources/js/app.js.tmp src/appjs.h app_js
/Library/Developer/CommandLineTools/usr/bin/make  all-recursive
Making all in po
depbase=`echo src/base64.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/base64.o -MD -MP -MF $depbase.Tpo -c -o src/base64.o src/base64.c &&\
    mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/browsers.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/browsers.o -MD -MP -MF $depbase.Tpo -c -o src/browsers.o src/browsers.c &&\
    mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/color.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/color.o -MD -MP -MF $depbase.Tpo -c -o src/color.o src/color.c &&\
    mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/commons.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/commons.o -MD -MP -MF $depbase.Tpo -c -o src/commons.o src/commons.c &&\
    mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/csv.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/csv.o -MD -MP -MF $depbase.Tpo -c -o src/csv.o src/csv.c &&\
    mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/error.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/error.o -MD -MP -MF $depbase.Tpo -c -o src/error.o src/error.c &&\
    mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/gdashboard.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/gdashboard.o -MD -MP -MF $depbase.Tpo -c -o src/gdashboard.o src/gdashboard.c &&\
    mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/gdns.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/gdns.o -MD -MP -MF $depbase.Tpo -c -o src/gdns.o src/gdns.c &&\
    mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/gholder.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/gholder.o -MD -MP -MF $depbase.Tpo -c -o src/gholder.o src/gholder.c &&\
    mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/gmenu.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/gmenu.o -MD -MP -MF $depbase.Tpo -c -o src/gmenu.o src/gmenu.c &&\
    mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/goaccess.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/goaccess.o -MD -MP -MF $depbase.Tpo -c -o src/goaccess.o src/goaccess.c &&\
    mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/gslist.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/gslist.o -MD -MP -MF $depbase.Tpo -c -o src/gslist.o src/gslist.c &&\
    mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/gstorage.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/gstorage.o -MD -MP -MF $depbase.Tpo -c -o src/gstorage.o src/gstorage.c &&\
    mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/gwsocket.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/gwsocket.o -MD -MP -MF $depbase.Tpo -c -o src/gwsocket.o src/gwsocket.c &&\
    mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/json.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/json.o -MD -MP -MF $depbase.Tpo -c -o src/json.o src/json.c &&\
    mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/opesys.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/opesys.o -MD -MP -MF $depbase.Tpo -c -o src/opesys.o src/opesys.c &&\
    mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/options.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/options.o -MD -MP -MF $depbase.Tpo -c -o src/options.o src/options.c &&\
    mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/output.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/output.o -MD -MP -MF $depbase.Tpo -c -o src/output.o src/output.c &&\
    mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/parser.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/parser.o -MD -MP -MF $depbase.Tpo -c -o src/parser.o src/parser.c &&\
    mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/settings.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/settings.o -MD -MP -MF $depbase.Tpo -c -o src/settings.o src/settings.c &&\
    mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/sha1.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/sha1.o -MD -MP -MF $depbase.Tpo -c -o src/sha1.o src/sha1.c &&\
    mv -f $depbase.Tpo $depbase.Po
src/sha1.c:66:11: warning: cast from 'uint8_t *' (aka 'unsigned char *') to 'CHAR64LONG16 *' increases required alignment from 1 to 4 [-Wcast-align]
  block = (CHAR64LONG16 *) buffer;
          ^~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
depbase=`echo src/sort.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/sort.o -MD -MP -MF $depbase.Tpo -c -o src/sort.o src/sort.c &&\
    mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/ui.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/ui.o -MD -MP -MF $depbase.Tpo -c -o src/ui.o src/ui.c &&\
    mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/util.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/util.o -MD -MP -MF $depbase.Tpo -c -o src/util.o src/util.c &&\
    mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/websocket.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/websocket.o -MD -MP -MF $depbase.Tpo -c -o src/websocket.o src/websocket.c &&\
    mv -f $depbase.Tpo $depbase.Po
src/websocket.c:964:15: warning: cast from 'struct sockaddr *' to 'struct sockaddr_in *' increases required alignment from 1 to 4 [-Wcast-align]
    return &(((struct sockaddr_in *) sa)->sin_addr);
              ^~~~~~~~~~~~~~~~~~~~~~~~~
src/websocket.c:966:13: warning: cast from 'struct sockaddr *' to 'struct sockaddr_in6 *' increases required alignment from 1 to 4 [-Wcast-align]
  return &(((struct sockaddr_in6 *) sa)->sin6_addr);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
depbase=`echo src/xmalloc.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/xmalloc.o -MD -MP -MF $depbase.Tpo -c -o src/xmalloc.o src/xmalloc.c &&\
    mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/gkhash.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/gkhash.o -MD -MP -MF $depbase.Tpo -c -o src/gkhash.o src/gkhash.c &&\
    mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/geoip1.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/geoip1.o -MD -MP -MF $depbase.Tpo -c -o src/geoip1.o src/geoip1.c &&\
    mv -f $depbase.Tpo $depbase.Po
gcc -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread   -o goaccess src/base64.o src/browsers.o src/color.o src/commons.o src/csv.o src/error.o src/gdashboard.o src/gdns.o src/gholder.o src/gmenu.o src/goaccess.o src/gslist.o src/gstorage.o src/gwsocket.o src/json.o src/opesys.o src/options.o src/output.o src/parser.o src/settings.o src/sha1.o src/sort.o src/ui.o src/util.o src/websocket.o src/xmalloc.o  src/gkhash.o src/geoip1.o   -lncurses -lGeoIP -lpthread -lintl

 

make install

$ make install
cat resources/tpls.html | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/tpls.html.tmp
./bin2c resources/tpls.html.tmp src/tpls.h tpls
cat resources/css/bootstrap.min.css | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/css/bootstrap.min.css.tmp
./bin2c resources/css/bootstrap.min.css.tmp src/bootstrapcss.h bootstrap_css
cat resources/css/fa.min.css | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/css/fa.min.css.tmp
./bin2c resources/css/fa.min.css.tmp src/facss.h fa_css
cat resources/css/app.css | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/css/app.css.tmp
./bin2c resources/css/app.css.tmp src/appcss.h app_css
cat resources/js/d3.v3.min.js | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/js/d3.v3.min.js.tmp
./bin2c resources/js/d3.v3.min.js.tmp src/d3js.h d3_js
cat resources/js/hogan.min.js | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/js/hogan.min.js.tmp
./bin2c resources/js/hogan.min.js.tmp src/hoganjs.h hogan_js
cat resources/js/charts.js | sed -E "s@(,|;)[[:space:]]*//..*@\1@g" | sed -E "s@^[[:space:]]*//..*@@g" | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/js/charts.js.tmp
./bin2c resources/js/charts.js.tmp src/chartsjs.h charts_js
cat resources/js/app.js | sed -E "s@(,|;)[[:space:]]*//..*@\1@g" | sed -E "s@^[[:space:]]*//..*@@g" | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/js/app.js.tmp
./bin2c resources/js/app.js.tmp src/appjs.h app_js
/Library/Developer/CommandLineTools/usr/bin/make  install-recursive
Making install in po
installing fr.gmo as /usr/local/share/locale/fr/LC_MESSAGES/goaccess.mo
installing es.gmo as /usr/local/share/locale/es/LC_MESSAGES/goaccess.mo
installing zh_CN.gmo as /usr/local/share/locale/zh_CN/LC_MESSAGES/goaccess.mo
installing ja.gmo as /usr/local/share/locale/ja/LC_MESSAGES/goaccess.mo
if test "goaccess" = "gettext-tools"; then \
      .././install-sh -c -d /usr/local/share/gettext/po; \
      for file in Makefile.in.in remove-potcdate.sin quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot   Makevars.template; do \
        /usr/bin/install -c -m 644 ./$file \
                /usr/local/share/gettext/po/$file; \
      done; \
      for file in Makevars; do \
        rm -f /usr/local/share/gettext/po/$file; \
      done; \
    else \
      : ; \
    fi
depbase=`echo src/output.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/output.o -MD -MP -MF $depbase.Tpo -c -o src/output.o src/output.c &&\
    mv -f $depbase.Tpo $depbase.Po
gcc -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread   -o goaccess src/base64.o src/browsers.o src/color.o src/commons.o src/csv.o src/error.o src/gdashboard.o src/gdns.o src/gholder.o src/gmenu.o src/goaccess.o src/gslist.o src/gstorage.o src/gwsocket.o src/json.o src/opesys.o src/options.o src/output.o src/parser.o src/settings.o src/sha1.o src/sort.o src/ui.o src/util.o src/websocket.o src/xmalloc.o  src/gkhash.o src/geoip1.o   -lncurses -lGeoIP -lpthread -lintl
 ./install-sh -c -d '/usr/local/bin'
  /usr/bin/install -c goaccess '/usr/local/bin'
 ./install-sh -c -d '/usr/local/etc/goaccess'
 /usr/bin/install -c -m 644 config/goaccess.conf config/browsers.list '/usr/local/etc/goaccess'
 ./install-sh -c -d '/usr/local/share/man/man1'
 /usr/bin/install -c -m 644 goaccess.1 '/usr/local/share/man/man1'

 

conf 파일 수정

$ mv /usr/local/etc/goaccess/goaccess.conf /usr/local/etc/goaccess/goaccess_bk.conf

$ vi /usr/local/etc/goaccess/goaccess.conf

log-format %h %^ %^ %d:%t %^ %^ "%r" %s %b "%R" "%u"
date-format %d/%b/%Y
time-format %H:%M:%S
output-format html

 

분석 실행

  • GeoIP 오류로 국가 데이터 미노출
$ goaccess --time-format='%H:%M:%S' --date-format='%d/%b/%Y' --log-format='%h - - %d:%^ %^ %T "%r" %s %b "%R" "%u"' -f ./accessLog201909042104.txt -a -o ./accessLog201909042104.html
Error Opening file /usr/local/var/GeoIP/GeoIP.dat

 

make clean

$ make clean
Making clean in po
rm -f *.insert-header
rm -f remove-potcdate.sed
rm -f stamp-poT
...
rm -f src/ui.o
rm -f src/util.o
rm -f src/websocket.o
rm -f src/xmalloc.o

 

Configure

  • geoip : mmdb로 재실행
$ ./configure --enable-utf8 --enable-geoip=mmdb
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking whether NLS is requested... yes
...
checking for strstr... yes
checking for strtol... yes
checking for strtoull... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating po/Makefile.in
config.status: creating src/config.h
config.status: executing depfiles commands
config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile


Your build configuration:


  Prefix         : /usr/local
  Package        : goaccess
  Version        : 1.3
  Compiler flags :  -pthread
  Linker flags   : -lncurses -lmaxminddb -lpthread -lintl
  Dynamic buffer : no
  Geolocation    : GeoIP2
  Storage method : In-memory Hash Database (Default)
  TLS/SSL        : no
  Bugs           : goaccess@prosoftcorp.com

 

make

$ make
cat resources/tpls.html | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/tpls.html.tmp
./bin2c resources/tpls.html.tmp src/tpls.h tpls
cat resources/css/bootstrap.min.css | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/css/bootstrap.min.css.tmp
./bin2c resources/css/bootstrap.min.css.tmp src/bootstrapcss.h bootstrap_css
cat resources/css/fa.min.css | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/css/fa.min.css.tmp
...
depbase=`echo src/geoip2.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/geoip2.o -MD -MP -MF $depbase.Tpo -c -o src/geoip2.o src/geoip2.c &&\
    mv -f $depbase.Tpo $depbase.Po
gcc -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread   -o goaccess src/base64.o src/browsers.o src/color.o src/commons.o src/csv.o src/error.o src/gdashboard.o src/gdns.o src/gholder.o src/gmenu.o src/goaccess.o src/gslist.o src/gstorage.o src/gwsocket.o src/json.o src/opesys.o src/options.o src/output.o src/parser.o src/settings.o src/sha1.o src/sort.o src/ui.o src/util.o src/websocket.o src/xmalloc.o  src/gkhash.o  src/geoip2.o  -lncurses -lmaxminddb -lpthread -lintl

 

make install

$ make install
cat resources/tpls.html | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/tpls.html.tmp
./bin2c resources/tpls.html.tmp src/tpls.h tpls
cat resources/css/bootstrap.min.css | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/css/bootstrap.min.css.tmp
./bin2c resources/css/bootstrap.min.css.tmp src/bootstrapcss.h bootstrap_css
cat resources/css/fa.min.css | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/css/fa.min.css.tmp
./bin2c resources/css/fa.min.css.tmp src/facss.h fa_css
cat resources/css/app.css | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/css/app.css.tmp
./bin2c resources/css/app.css.tmp src/appcss.h app_css
cat resources/js/d3.v3.min.js | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/js/d3.v3.min.js.tmp
./bin2c resources/js/d3.v3.min.js.tmp src/d3js.h d3_js
cat resources/js/hogan.min.js | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/js/hogan.min.js.tmp
./bin2c resources/js/hogan.min.js.tmp src/hoganjs.h hogan_js
cat resources/js/charts.js | sed -E "s@(,|;)[[:space:]]*//..*@\1@g" | sed -E "s@^[[:space:]]*//..*@@g" | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/js/charts.js.tmp
./bin2c resources/js/charts.js.tmp src/chartsjs.h charts_js
cat resources/js/app.js | sed -E "s@(,|;)[[:space:]]*//..*@\1@g" | sed -E "s@^[[:space:]]*//..*@@g" | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/js/app.js.tmp
./bin2c resources/js/app.js.tmp src/appjs.h app_js
/Library/Developer/CommandLineTools/usr/bin/make  install-recursive
Making install in po
installing fr.gmo as /usr/local/share/locale/fr/LC_MESSAGES/goaccess.mo
installing es.gmo as /usr/local/share/locale/es/LC_MESSAGES/goaccess.mo
installing zh_CN.gmo as /usr/local/share/locale/zh_CN/LC_MESSAGES/goaccess.mo
installing ja.gmo as /usr/local/share/locale/ja/LC_MESSAGES/goaccess.mo
if test "goaccess" = "gettext-tools"; then \
      .././install-sh -c -d /usr/local/share/gettext/po; \
      for file in Makefile.in.in remove-potcdate.sin quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot   Makevars.template; do \
        /usr/bin/install -c -m 644 ./$file \
                /usr/local/share/gettext/po/$file; \
      done; \
      for file in Makevars; do \
        rm -f /usr/local/share/gettext/po/$file; \
      done; \
    else \
      : ; \
    fi
depbase=`echo src/output.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I./src   -I/usr/local/include -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT src/output.o -MD -MP -MF $depbase.Tpo -c -o src/output.o src/output.c &&\
    mv -f $depbase.Tpo $depbase.Po
gcc -O2 -DSYSCONFDIR=\"/usr/local/etc\" -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread   -o goaccess src/base64.o src/browsers.o src/color.o src/commons.o src/csv.o src/error.o src/gdashboard.o src/gdns.o src/gholder.o src/gmenu.o src/goaccess.o src/gslist.o src/gstorage.o src/gwsocket.o src/json.o src/opesys.o src/options.o src/output.o src/parser.o src/settings.o src/sha1.o src/sort.o src/ui.o src/util.o src/websocket.o src/xmalloc.o  src/gkhash.o  src/geoip2.o  -lncurses -lmaxminddb -lpthread -lintl
 ./install-sh -c -d '/usr/local/bin'
  /usr/bin/install -c goaccess '/usr/local/bin'
 ./install-sh -c -d '/usr/local/etc/goaccess'
 /usr/bin/install -c -m 644 config/goaccess.conf config/browsers.list '/usr/local/etc/goaccess'
 ./install-sh -c -d '/usr/local/share/man/man1'
 /usr/bin/install -c -m 644 goaccess.1 '/usr/local/share/man/man1'

 

분석 실행

  • 오류는 없으나… 여전히 데이터 미노출
$ goaccess --time-format='%H:%M:%S' --date-format='%d/%b/%Y' --log-format='%h - - %d:%^ %^ %T "%r" %s %b "%R" "%u"' -f ./accessLog201909042104.txt -a -o ./accessLog201909042104.html
Error Opening file /usr/local/var/GeoIP/GeoIP.dat

 

GeoIP.dat 파일 교체

$ cd /usr/local/var/GeoIP

$ ls -ll
total 132312
lrwxr-xr-x  1 ssingssing2  admin        18 Sep 20 22:00 GeoIP.dat -> GeoLiteCountry.dat
lrwxr-xr-x  1 ssingssing2  admin        15 Sep 20 22:00 GeoIPCity.dat -> GeoLiteCity.dat
-rw-r--r--  1 ssingssing2  admin  63565553 Sep 23 11:46 GeoLite2-City.mmdb
-rw-r--r--  1 ssingssing2  admin   3910592 Sep 23 11:45 GeoLite2-Country.mmdb

$ ls -ll
total 133480
-rw-r--r--@ 1 ssingssing2  staff    595714 Sep 23 12:18 GeoIP.dat
lrwxr-xr-x  1 ssingssing2  admin        15 Sep 20 22:00 GeoIPCity.dat -> GeoLiteCity.dat
-rw-r--r--  1 ssingssing2  admin  63565553 Sep 23 11:46 GeoLite2-City.mmdb
-rw-r--r--  1 ssingssing2  admin   3910592 Sep 23 11:45 GeoLite2-Country.mmdb

'분석 > Go Access' 카테고리의 다른 글

GoAccess 1.3 분석  (0) 2020.02.06
GoAccess 1.3 설치 - Homebrew 이용  (0) 2020.02.06