Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sudo hostnamectl set-hostname prometheus
- 2 exit
- 3 sudo apt update
- 4 wget
- 5 sudo useradd --system --no-create-home --shell /usr/sbin/nologin prometheus
- 6 ls
- 7 tar xvzf prometheus-2.28.0.linux-amd64.tar.gz
- 8 ls
- 9 ls prometheus-2.28.0.linux-amd64
- 10 ls -lh prometheus-2.28.0.linux-amd64
- 11 sudo mv -v prometheus-2.28.0.linux-amd64 /opt/prometheus
- 12 ls
- 13 ls /opt/
- 14 ls -lh /opt/prometheus/
- 15 sudo chown -Rfv root:root /opt/prometheus
- 16 /opt/prometheus
- 17 sudo chmod -Rfv 0755 /opt/prometheus
- 18 sudo vi /opt/prometheus/prometheus.yml
- 19 sudo mkdir -v /opt/prometheus/data
- 20 sudo chown -Rfv prometheus:prometheus /opt/prometheus/data
- 21 sudo vi /etc/systemd/system/prometheus.service
- 22 sudo systemctl daemon-reload
- 23 sudo systemctl start prometheus.service
- 24 sudo systemctl status prometheus.service
- 25 sudo systemctl enable prometheus.service
- 26 netstat -tulno
- 27 netstat -tulnp
- 28 sudo apt install net-tools
- 29 netstat -tulnp
- 30 wget https://github.com/prometheus/node_exporter/releases/download/v1.1.2/node_exporter-1.1.2.linux-amd64.tar.gz
- 31 tar xzf node_exporter-1.1.2.linux-amd64.tar.gz
- 32 ls
- 33 ls -lh node_exporter-1.1.2.linux-amd64
- 34 sudo mv -v node_exporter-1.1.2.linux-amd64/node_exporter /usr/local/bin/
- 35 sudo chown root:root /usr/local/bin/node_exporter
- 36 node_exporter --version
- 37 sudo vi /etc/systemd/system/node-exporter.service
- 38 sudo systemctl daemon-reload
- 39 sudo systemctl start node-exporter.service
- 40 sudo systemctl enable node-exporter.service
- 41 sudo systemctl status node-exporter.service
- 42 sudo netstat -tulnp
- 43 sudo vi /opt/prometheus/prometheus.yml
- 44 sudo systemctl restart prometheus.service
- 45 sudo systemctl status prometheus.service
- 46 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement