Build from source
Clone the Grafana Loki repository and use the provided Makefile
to build Loki from source.
{{< admonition type="note" >}} Grafana Loki does not come with any included authentication layer. You must run an authenticating reverse proxy in front of your services to prevent unauthorized access to Loki (for example, nginx). Refer to Manage authentication for a list of open-source reverse proxies you can use. {{< /admonition >}}
Prerequisites
- Go, version 1.26 or later (check the
godirective in go.mod for the exact minimum version); set your$GOPATHenvironment variable make- Docker (for updating protobuf and yacc files)
Build locally
-
Clone Loki to
$GOPATH/src/github.com/grafana/loki:git clone https://github.com/grafana/loki $GOPATH/src/github.com/grafana/loki -
With a current working directory of
$GOPATH/src/github.com/grafana/loki:make loki
The built executable will be in $GOPATH/src/github.com/grafana/loki/cmd/loki/loki.
这篇文档对你有帮助吗?
谢谢你的反馈!