netdata安裝
安裝環境准備
yum install -y autoconf automake curl gcc git libmnl-devel libuuid-devel lm_sensors make MySQL-python nc pkgconfig python python-psycopg2 PyYAML zlib-devel
netdata 安裝
# 下載源碼,安裝netdata
cd /mnt/tools/
git clone https://github.com/firehol/netdata.git --depth=1
cd netdata
# 使用root用戶執行 進行編譯、安裝和啟動
./netdata-installer.sh
配置服務項
# 復制netdata啟動項到 /etc/init.d
cp system/netdata-init-d /etc/init.d/netdata
# 確保啟動項可執行
chmod +x /etc/init.d/netdata
# 注冊服務
chkconfig --add netdata
# 設置開機啟動
# Centos6
chkconfig netdata on
# Centos7
systemctl enable netdata.service
服務啟動與停止
Centos6
service netdata start
service netdata stop
Centos7
systemctl start netdata.service
systemctl stop netdata.service
訪問網站
http://ip:19999/
http://127.0.0.1:19999/
卸載netdata
腳本netdata-installer.sh
會在安裝時生成netdata-uninstaller.sh
執行腳本來卸載
cd /mnt/netdata
./netdata-uninstaller.sh --force