VictoriaMetrics is an open-source and fast Prometheus compatible distributed TSDB and query engine. This tutorial will guide you through the installation process of VictoriaMetrics on Debian Linux.
Before proceeding with the installation, ensure that you have the following prerequisites:
Before installing VictoriaMetrics on your system, it is recommended to update your Debian Linux system to the latest version. To update your Debian system, use the following commands:
sudo apt update
sudo apt upgrade
VictoriaMetrics requires Go to be installed on the system. To install Go, follow the below steps:
Download the latest version of Go from the official website. You can download the tar file from the following link:
https://golang.org/dl/
Extract the downloaded file to the /usr/local directory:
sudo tar -C /usr/local -xzf go*.tar.gz
Set the environment variables for Go:
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc
echo 'export GOPATH=$HOME/go' >> ~/.bashrc
echo 'export PATH=$PATH:$GOPATH/bin' >> ~/.bashrc
source ~/.bashrc
Verify the Go installation by running the following command:
go version
If Go is installed properly, the output should be similar to the following:
go version go1.17.2 linux/amd64
To install VictoriaMetrics on Debian Linux, follow the below steps:
Download the latest version of VictoriaMetrics from the Github repository:
wget https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v1.64.0/victoria-metrics-1.64.0.tar.gz
Ensure that you have downloaded the latest release version from the repository.
Extract the downloaded file to the installation directory:
tar -xvf victoria-metrics-*.tar.gz
cd victoria-metrics-*
Run the following command to build VictoriaMetrics:
make
This will build the VictoriaMetrics binary executable.
Create a systemd unit file to run VictoriaMetrics:
sudo nano /etc/systemd/system/victoria-metrics.service
Paste the following contents into the file:
[Unit]
Description=VictoriaMetrics
[Service]
User=root
Group=root
Restart=always
ExecStart=/path/to/victoria-metrics-*/victoria-metrics
[Install]
WantedBy=multi-user.target
Replace /path/to with the actual path where VictoriaMetrics is installed.
Reload the systemd daemon:
sudo systemctl daemon-reload
Enable and start VictoriaMetrics to run on system boot:
sudo systemctl enable victoria-metrics
sudo systemctl start victoria-metrics
Verify the VictoriaMetrics installation by accessing the following URL via a web browser:
http://your-server-ip:8428
If VictoriaMetrics is installed correctly, you should see the VictoriaMetrics web user interface.
That's it! You have successfully installed VictoriaMetrics on your Debian Linux system. You can now start ingesting data into VictoriaMetrics and start querying it using the Prometheus Query Language.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!