一,Loki是什么?
1, Loki 是 Grafana 团队开源的一款高可用、高拓展、多租户的日志聚合系统,
和 ELK 的组件功能一样,Loki 有负责日志存储查询的主服务,有在客户端负责收集日志并推送的代理服务,
还有 Grafana 最拿手的可视化面板展示。
2,官方网站
https://grafana.com/oss/loki/
下载地址:
https://github.com/grafana/loki/releases/
二,下载
用wget从命令行下载
# wget https://github.com/grafana/loki/releases/download/v3.2.1/loki-3.2.1.x86_64.rpm
三,安装
用rpm命令执行安装
# rpm -ivh loki-3.2.1.x86_64.rpm
warning: loki-3.2.1.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 10458545: NOKEY
Verifying... ################################# [100%]
Preparing... ################################# [100%]
Updating / installing...
1:loki-0:3.2.1-1 ################################# [100%]
Post Install of a clean install
Reload the service unit from disk
Unmask the service
Set the preset flag for the service unit
Set the enabled flag for the service unit
Created symlink /etc/systemd/system/multi-user.target.wants/loki.service → /etc/systemd/system/loki.service.
四,配置
1,查看状态
安装完成后已经处理运行状态,
因为是rpm包装,已默认支持用systemctl管理服务
# systemctl status loki.service
● loki.service - Loki service
Loaded: loaded (;;file://backup/etc/systemd/system/loki.service/etc/systemd/system/loki.service;;; enabled; preset: disabled)
Active: active (running) since Tue 2024-10-29 16:41:49 CST; 1min 42s ago
Main PID: 471546 (loki)
Tasks: 13 (limit: 97114)
Memory: 52.9M
CPU: 414ms
CGroup: /system.slice/loki.service
└─471546 /usr/bin/loki -config.file /etc/loki/config.yml
2,查看端口:
可以看到已经绑定了两个端口: 3100/9096
# ss -lntp | grep loki
LISTEN 0 4096 *:3100 *:* users:(("loki",pid=471546,fd=9))
LISTEN 0 4096 *:9096 *:* users:(("loki",pid=471546,fd=10))
标签:v3.2,service,system,Loki,etc,loki,rpm From: https://www.cnblogs.com/architectforest/p/18513824