网站首页 > 博客文章 正文
本文章基于Ubuntu16.04系统/Nginx1.10.3日志环境
注:Nginx使用apt-get方式安装,日志格式为默认
源码安装
$ apt-get install gcc g++ libncursesw5-dev
$ wget http://tar.goaccess.io/goaccess-1.2.tar.gz
$ http://tar.goaccess.io/goaccess-1.2.tar.gz
$ tar -xzvf goaccess-1.2.tar.gz
$ cd goaccess-1.2/
$ ./configure --enable-utf8
$ make # make install
配置文件
vim ~/.goaccessrc
time-format %H:%M:%S
date-format %d/%b/%Y
log-format %h %^[%d:%t %^] "%r" %s %b "%R" "%u"
任务设置
$ goaccess -f /var/log/nginx/access.log -p ~/.goaccessrc -a -o /var/www/index.html --real-time-html --daemonize
然而,他喵的不知道是出了什么问题,--daemonize生效了,但是 --real-time-html无法实时刷新。。坑爹了。
最后改用 crontab
$ vim /etc/crontab
* * * * * root goaccess -a -d -f /var/log/nginx/access.log -p /root/.goaccessrc -o /var/www/index.html
相关的目录请自行替换,更详细的内容请自行参考官网https://goaccess.io/
猜你喜欢
- 2024-10-15 英国Access将与马来西亚数字经济发展局合作,加快在亚太地区扩张
- 2024-10-15 霍尼韦尔为香港麗翔公务航空提供GoDirect客舱互联服务|美通社
- 2024-10-15 详解Win10家庭版/专业版/企业版功能区别
- 2024-10-15 Go1.18 快讯:这个新特性太实用了(go1.17新特性)
- 2024-10-15 CentOS中Nginx日志自动分割及日志分析
- 2024-10-15 GO语言(三十):访问关系型数据库(上)
- 2024-10-15 从linux网站搭建到日志服务审计渗透溯源
- 2024-10-15 golang对接阿里云私有Bucket上传图片、授权访问图片
- 2024-10-15 开源的分析web日志工具-Python语言开发,具有灵活的日志格式配置
- 2024-10-15 nginx运维小纪(nginx应用与运维实战 电子版)
你 发表评论:
欢迎- 07-02在线学习在爱奇艺信息流推荐业务中的探索与实践
- 07-02Diallyl Trisulfide(H2S donor)二烯丙基三硫:合成方法与工艺
- 07-02MitoSOX Red Mitochondrial Superoxide Indicator使用方法
- 07-02深度时空网络、记忆网络与特征表达学习在 CTR 预估中的应用
- 07-02iFluor 488标记鬼笔环肽可通过标记F-actin,研究细胞在迁移等
- 07-02快速了解红色线粒体超氧化物荧光探针的基本特性
- 07-02腔肠素400A(Coelenteramine 400a)综合解析,一文掌握所有要点!
- 07-02Chinese doctor Zhang Junqiao's heroic act exemplifies deep China-Africa friendship: FM spokesperson
- 最近发表
-
- 在线学习在爱奇艺信息流推荐业务中的探索与实践
- Diallyl Trisulfide(H2S donor)二烯丙基三硫:合成方法与工艺
- MitoSOX Red Mitochondrial Superoxide Indicator使用方法
- 深度时空网络、记忆网络与特征表达学习在 CTR 预估中的应用
- iFluor 488标记鬼笔环肽可通过标记F-actin,研究细胞在迁移等
- 快速了解红色线粒体超氧化物荧光探针的基本特性
- 腔肠素400A(Coelenteramine 400a)综合解析,一文掌握所有要点!
- Chinese doctor Zhang Junqiao's heroic act exemplifies deep China-Africa friendship: FM spokesperson
- 用Python写了一个上课点名系统(附源码)(自制考勤系统)
- Kubernetes中的PV、PVC、Configmap介绍
- 标签列表
-
- ifneq (61)
- messagesource (56)
- aspose.pdf破解版 (56)
- promise.race (63)
- 2019cad序列号和密钥激活码 (62)
- window.performance (66)
- qt删除文件夹 (72)
- mysqlcaching_sha2_password (64)
- ubuntu升级gcc (58)
- nacos启动失败 (64)
- ssh-add (70)
- jwt漏洞 (58)
- macos14下载 (58)
- yarnnode (62)
- abstractqueuedsynchronizer (64)
- source~/.bashrc没有那个文件或目录 (65)
- springboot整合activiti工作流 (70)
- jmeter插件下载 (61)
- 抓包分析 (60)
- idea创建mavenweb项目 (65)
- vue回到顶部 (57)
- qcombobox样式表 (68)
- vue数组concat (56)
- tomcatundertow (58)
- pastemac (61)
本文暂时没有评论,来添加一个吧(●'◡'●)