下载地址:
安装补丁包
[root@was01 /]# yum install gcc
[root@was01 /]# yum install glib2-devel
[root@was01 /]# yum install ncurses-devel
[root@was01 goaccess]# cd goaccess-0.7.1/
[root@was01 goaccess-0.7.1]# ls
aclocal.m4 configure.ac gdashboard.h INSTALL output.c ui.c
AUTHORS COPYING gdns.c install-sh output.h ui.h
ChangeLog csv.c gdns.h json.c parser.c util.c
commons.c csv.h gmenu.c json.h parser.h util.h
commons.h depcomp gmenu.h Makefile.am README xmalloc.c
config.h.in error.c goaccess.1 Makefile.in settings.c xmalloc.h
config.log error.h goaccess.c missing settings.h
configure gdashboard.c goaccess.h NEWS TODO
[root@was01 goaccess-0.7.1]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
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 for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GLIB2... yes
checking for refresh in -lncurses... yes
checking for pthread_create in -lpthread... yes
checking for g_free in -lglib-2.0... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for an ANSI C-conforming const... yes
checking for off_t... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for ptrdiff_t... yes
checking for working strtod... yes
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for working memcmp... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking whether lstat correctly handles trailing slash... yes
checking whether stat accepts an empty string... no
checking for strftime... yes
checking for regcomp... yes
checking for strtoull... yes
checking for memmove... yes
checking for floor... no
checking for gethostbyaddr... yes
checking for gethostbyname... yes
checking for memset... yes
checking for setlocale... yes
checking for strchr... yes
checking for strdup... yes
checking for strerror... yes
checking for strrchr... yes
checking for strstr... yes
checking for strtol... yes
checking for realpath... yes
checking for malloc... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
[root@was01 goaccess-0.7.1]# make
make all-am
make[1]: Entering directory `/home/goaccess/goaccess-0.7.1'
gcc -DHAVE_CONFIG_H -I. -O2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wundef -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT commons.o -MD -MP -MF .deps/commons.Tpo -c -o commons.o commons.c
mv -f .deps/commons.Tpo .deps/commons.Po
gcc -DHAVE_CONFIG_H -I. -O2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wundef -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT csv.o -MD -MP -MF .deps/csv.Tpo -c -o csv.o csv.c
mv -f .deps/csv.Tpo .deps/csv.Po
gcc -DHAVE_CONFIG_H -I. -O2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wundef -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT error.o -MD -MP -MF .deps/error.Tpo -c -o error.o error.c
mv -f .deps/error.Tpo .deps/error.Po
gcc -DHAVE_CONFIG_H -I. -O2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wundef -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT gdashboard.o -MD -MP -MF .deps/gdashboard.Tpo -c -o gdashboard.o gdashboard.c
mv -f .deps/gdashboard.Tpo .deps/gdashboard.Po
gcc -DHAVE_CONFIG_H -I. -O2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wundef -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT gdns.o -MD -MP -MF .deps/gdns.Tpo -c -o gdns.o gdns.c
mv -f .deps/gdns.Tpo .deps/gdns.Po
gcc -DHAVE_CONFIG_H -I. -O2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wundef -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT gmenu.o -MD -MP -MF .deps/gmenu.Tpo -c -o gmenu.o gmenu.c
mv -f .deps/gmenu.Tpo .deps/gmenu.Po
gcc -DHAVE_CONFIG_H -I. -O2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wundef -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT goaccess.o -MD -MP -MF .deps/goaccess.Tpo -c -o goaccess.o goaccess.c
mv -f .deps/goaccess.Tpo .deps/goaccess.Po
gcc -DHAVE_CONFIG_H -I. -O2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wundef -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT json.o -MD -MP -MF .deps/json.Tpo -c -o json.o json.c
mv -f .deps/json.Tpo .deps/json.Po
gcc -DHAVE_CONFIG_H -I. -O2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wundef -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT output.o -MD -MP -MF .deps/output.Tpo -c -o output.o output.c
mv -f .deps/output.Tpo .deps/output.Po
gcc -DHAVE_CONFIG_H -I. -O2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wundef -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT parser.o -MD -MP -MF .deps/parser.Tpo -c -o parser.o parser.c
mv -f .deps/parser.Tpo .deps/parser.Po
gcc -DHAVE_CONFIG_H -I. -O2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wundef -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT settings.o -MD -MP -MF .deps/settings.Tpo -c -o settings.o settings.c
mv -f .deps/settings.Tpo .deps/settings.Po
gcc -DHAVE_CONFIG_H -I. -O2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wundef -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT ui.o -MD -MP -MF .deps/ui.Tpo -c -o ui.o ui.c
mv -f .deps/ui.Tpo .deps/ui.Po
gcc -DHAVE_CONFIG_H -I. -O2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wundef -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT util.o -MD -MP -MF .deps/util.Tpo -c -o util.o util.c
mv -f .deps/util.Tpo .deps/util.Po
gcc -DHAVE_CONFIG_H -I. -O2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wundef -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -MT xmalloc.o -MD -MP -MF .deps/xmalloc.Tpo -c -o xmalloc.o xmalloc.c
mv -f .deps/xmalloc.Tpo .deps/xmalloc.Po
gcc -O2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -Wno-long-long -Wall -W -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wundef -Wbad-function-cast -Winline -Wcast-align -Wextra -Wdeclaration-after-statement -Wno-missing-field-initializers -pthread -o goaccess commons.o csv.o error.o gdashboard.o gdns.o gmenu.o goaccess.o json.o output.o parser.o settings.o ui.o util.o xmalloc.o -lm -lglib-2.0 -lpthread -lncurses
make[1]: Leaving directory `/home/goaccess/goaccess-0.7.1'
[root@was01 goaccess-0.7.1]# make install
make[1]: Entering directory `/home/goaccess/goaccess-0.7.1'
test -z "/usr/local/bin" || /bin/mkdir -p "/usr/local/bin"
/usr/bin/install -c goaccess '/usr/local/bin'
test -z "/usr/local/share/man/man1" || /bin/mkdir -p "/usr/local/share/man/man1"
/usr/bin/install -c -m 644 goaccess.1 '/usr/local/share/man/man1'
make[1]: Leaving directory `/home/goaccess/goaccess-0.7.1'
使用:
[root@was01 goaccess-0.7.1]# goaccess -f /home/access_log
生成报告:
[root@was01 goaccess-0.7.1]# goaccess -a -f /home/access_log > /home/report.html
阅读(5704) | 评论(0) | 转发(0) |