Untitled

From Tiny Lion, 1 Month ago, written in Plain Text, viewed 1 times.
URL https://paste.linuxiarz.pl/view/d6c8c46b Embed
Download Paste or View Raw
  1. cd /tmp/
  2. curl -s https://api.github.com/repos/prometheus/node_exporter/releases/latest | grep browser_download_url|grep linux-amd64|cut -d '"' -f 4|wget -qi -
  3.  
  4. tar -xvf node_exporter*.tar.gz
  5. cd node_exporter*/
  6. cp node_exporter /usr/local/bin
  7. cd
  8. node_exporter --version
  9. useradd node_exporter
  10. tee /etc/systemd/system/node_exporter.service <<EOF
  11. [Unit]
  12. Description=Node Exporter
  13. Wants=network-online.target
  14. After=network-online.target
  15.  
  16. [Service]
  17. User=node_exporter
  18. ExecStart=/usr/local/bin/node_exporter
  19.  
  20. [Install]
  21. WantedBy=default.target
  22. EOF
  23.  
  24. systemctl daemon-reload
  25. systemctl start node_exporter
  26. systemctl enable node_exporter

Reply to "Untitled"

Here you can reply to the paste above

captcha