linux服务器安装NetData图形化监控

开源地址:https://github.com/netdata/netdata

netdata.gif

1.安装netdata所需要的依赖

yum install -y  libuuid-devel zlib-devel gcc make git autoconf autogen automake

2.安装netdata(如果git拉起很慢可以下载安装包传到服务器上)

git clone https://github.com/firehol/netdata.git netdata(汉化版)
或者
git clone https://github.com/netdata/netdata.git(原版)

执行安装
./netdata-installer.sh

3.启动netdata服务

service netdata start

4.访问

默认时ip:19999

为了外网也能访问,我们用nginx配置反向代理

1.打开iptabls

vim /etc/sysconfig/iptables

2.添加端口放行

-A INPUT -p tcp -m tcp --dport 19999 -j ACCEPT

3.重启服务

service iptables restart

4.添加netdata.conf,内容如下:

server {
    listen 80;
    server_name 外网访问的域名;
    location / {
        # 反向代理到 19999 端口
        proxy_pass http://127.0.0.1:19999;
        add_header Access-Control-Allow-Origin *;
    }
}

5.重新加载nginx

service nginx reload

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×