move to github

main
AhFei 2023-07-24 20:55:38 +08:00
parent b5883e379b
commit 4b0c4658c9
1 changed files with 0 additions and 30 deletions

View File

@ -1,30 +0,0 @@
wget https://github.com/prometheus/node_exporter/releases/download/v1.6.1/node_exporter-1.6.1.linux-amd64.tar.gz && \
tar xvfz node_exporter-*.tar.gz && \
rm node_exporter-*.tar.gz
sudo mv node_exporter-*.linux-amd64/node_exporter /usr/local/bin
rm -r node_exporter-*.linux-amd64*
sudo useradd -rs /bin/false node_exporter
sudo cat > /etc/systemd/system/node_exporter.service <<EOF
[Unit]
Description=Node Exporter
Wants=network-online.target
After=network-online.target
[Service]
User=node_exporter
Group=node_exporter
Type=simple
Restart=on-failure
RestartSec=5s
ExecStart=/usr/local/bin/node_exporter
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now node_exporter
sudo systemctl status node_exporter