Centos netdata 的安裝及配置


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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM