Kr1s77 / Kr1s77.github.io

Good as water, light as chrysanthemum.
https://kr1s77.github.io/
Other
8 stars 3 forks source link

Install prometheus node_exporter #8

Open Kr1s77 opened 3 years ago

Kr1s77 commented 3 years ago

on Centos/RHEL 7:


curl -Lo /etc/yum.repos.d/_copr_ibotty-prometheus-exporters.repo https://copr.fedorainfracloud.org/coprs/ibotty/prometheus-exporters/repo/epel-7/ibotty-prometheus-exporters-epel-7.repo

yum -y install node_exporter

cat > /etc/systemd/system/node_exporter.service << 'EOF'
[Unit]
Description=Node Exporter
Wants=network-online.target
After=network-online.target

[Service]
Type=simple
ExecStart=/usr/sbin/node_exporter

[Install]
WantedBy=multi-user.target
EOF

systemctl daemon-reload && systemctl enable --now node_exporter && systemctl status node_exporter
Kr1s77 commented 3 years ago

Install haproxy new version

on Centos/RHEL 7:

Install Lua

wget http://www.lua.org/ftp/lua-5.3.5.tar.gz

tar xf lua-5.3.5.tar.gz

cd lua-5.3.5

make linux

make install INSTALL_TOP=/usr/local/lua

Install Haproxy

http://download.openpkg.org/components/cache/haproxy/

make TARGET=linux-glibc PREFIX=/usr/local/haproxy USE_OPENSSL=1 USE_ZLIB=1 USE_PCRE=1 USE_SYSTEMD=1 SSL_INC=/usr/local/openssl/include SSL_LIB=/usr/local/openssl/lib USE_LUA=1 LUA_LIB=/usr/local/lua-5.4.3/lib LUA_INC=/usr/local/lua-5.4.3/include

make install PREFIX=/usr/local/haproxy

/usr/local/haproxy/sbin/haproxy