42 lines
774 B
Markdown
42 lines
774 B
Markdown
# Install and Build
|
|
|
|
## Prerequisites
|
|
- Go 1.25+
|
|
- Git
|
|
- SSH client access to managed hosts
|
|
|
|
## Clone and build
|
|
```bash
|
|
git clone https://git.datacoria.com/endssh/pxmon.git
|
|
cd pxmon
|
|
go mod tidy
|
|
go test ./...
|
|
go build -o bin/pxmon ./cmd/pxmon
|
|
go build -o bin/pxmon-agent ./cmd/pxmon-agent
|
|
```
|
|
|
|
## Run
|
|
```bash
|
|
./bin/pxmon
|
|
```
|
|
|
|
## Build with explicit agent version metadata
|
|
`pxmon-agent` exposes build-time version in API responses.
|
|
|
|
```bash
|
|
go build -ldflags "-X pxmon/internal/agent.Version=v0.2.0" -o bin/pxmon-agent ./cmd/pxmon-agent
|
|
```
|
|
|
|
## Optional install to PATH
|
|
```bash
|
|
install -m 0755 bin/pxmon /usr/local/bin/pxmon
|
|
install -m 0755 bin/pxmon-agent /usr/local/bin/pxmon-agent
|
|
```
|
|
|
|
## Verify
|
|
```bash
|
|
pxmon cluster help
|
|
pxmon bot telegram --help
|
|
pxmon config --help
|
|
```
|