From 59727ab0eb48802690e47e2920934e1b342894cf Mon Sep 17 00:00:00 2001 From: Levi Harrison Date: Mon, 13 Jun 2022 16:00:27 -0400 Subject: [PATCH] Make clear that `go install` needs to be run in the cloned repo (#10866) * `go install` in cloned repo Signed-off-by: Levi Harrison * Removing cloning to gopath Signed-off-by: Levi Harrison * Change wording Signed-off-by: Levi Harrison --- README.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3a1784f62..6ca98143c 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,14 @@ To build Prometheus from source code, You need: * NodeJS [version 16 or greater](https://nodejs.org/). * npm [version 7 or greater](https://www.npmjs.com/). -You can directly use the `go` tool to download and install the `prometheus` +Start by cloning the repository: + +```bash +git clone https://github.com/prometheus/prometheus.git +cd prometheus +``` + +You can use the `go` tool to build and install the `prometheus` and `promtool` binaries into your `GOPATH`: ```bash @@ -79,14 +86,10 @@ React UI unless it has been built explicitly using `make assets` or `make build` An example of the above configuration file can be found [here.](https://github.com/prometheus/prometheus/blob/main/documentation/examples/prometheus.yml) -You can also clone the repository yourself and build using `make build`, which will compile in -the web assets so that Prometheus can be run from anywhere: +You can also build using `make build`, which will compile in the web assets so that +Prometheus can be run from anywhere: ```bash -mkdir -p $GOPATH/src/github.com/prometheus -cd $GOPATH/src/github.com/prometheus -git clone https://github.com/prometheus/prometheus.git -cd prometheus make build ./prometheus --config.file=your_config.yml ```