GoAccess是一款在web页面展示的日志分析工具,页面十分酷炫
我的配置环境是:OS:CentOS 7 web server:Nginx
配置步骤:
1、关闭防火墙和selinux
[root@www ~]# iptables -X
[root@www ~]# iptables -F
[root@www ~]# iptables -Z
[root@www ~]# systemctl disable firewalld
[root@www ~]#
[root@www ~]# setenforce 0
setenforce: SELinux is disabled
[root@www ~]#
2、配置阿里源的yum仓库
[root@www yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
--2019-03-29 13:17:59-- http://mirrors.aliyun.com/repo/Centos-7.repo
Resolving mirrors.aliyun.com (mirrors.aliyun.com)... 116.211.153.233, 116.211.153.231, 116.211.153.232, ...
Connecting to mirrors.aliyun.com (mirrors.aliyun.com)|116.211.153.233|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2523 (2.5K) [application/octet-stream]
Saving to: ‘/etc/yum.repos.d/CentOS-Base.repo’
100%[============================================================================>] 2,523 --.-K/s in 0s
2019-03-29 13:17:59 (130 MB/s) - ‘/etc/yum.repos.d/CentOS-Base.repo’ saved [2523/2523]
[root@www yum.repos.d]# vim CentOS-Base.repo
[base]
name=CentOS-$releasever - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/os/$basearch/
[root@www yum.repos.d]# yum repolist all
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
jyy | 3.6 kB 00:00:00
(1/2): jyy/primary_db | 2.8 MB 00:00:00
(2/2): jyy/group_gz | 155 kB 00:00:00
repo id repo name status
base/x86_64 CentOS-7 - Base - mirrors.aliyun.com enabled: 10,019
jyy jyy enabled: 3,723
repolist: 13,742
[root@www yum.repos.d]#
3、安装编译GoAccess时所需要的软件包
[root@www goaccess-0.9.8]# yum install gcc gcc-c++ -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.8.5-36.el7 will be installed
--> Processing Dependency: cpp = 4.8.5-36.el7 for package: gcc-4.8.5-36.el7.x86_64
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.5-36.el7.x86_64
--> Processing Dependency: libmpfr.so.4()(64bit) for package: gcc-4.8.5-36.el7.x86_64
--> Processing Dependency: libmpc.so.3()(64bit) for package: gcc-4.8.5-36.el7.x86_64
---> Package gcc-c++.x86_64 0:4.8.5-36.el7 will be installed
--> Processing Dependency: libstdc++-devel = 4.8.5-36.el7 for package: gcc-c++-4.8.5-36.el7.x86_64
--> Running transaction check
---> Package cpp.x86_64 0:4.8.5-36.el7 will be installed
---> Package glibc-devel.x86_64 0:2.17-260.el7 will be installed
--> Processing Dependency: glibc-headers = 2.17-260.el7 for package: glibc-devel-2.17-260.el7.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-260.el7.x86_64
---> Package libmpc.x86_64 0:1.0.1-3.el7 will be installed
---> Package libstdc++-devel.x86_64 0:4.8.5-36.el7 will be installed
---> Package mpfr.x86_64 0:3.1.1-4.el7 will be installed
--> Running transaction check
---> Package glibc-headers.x86_64 0:2.17-260.el7 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-260.el7.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.17-260.el7.x86_64
--> Running transaction check
---> Package kernel-headers.x86_64 0:3.10.0-957.el7 will be installed
--> Finished Depen