本文介绍在FreeBSD 12系统上安装Netdata的方法,FreeBSD运行在Linux虚拟机VMware里,安装参考在Ubuntu 18.04系统下安装VMware Workstation Player的方法。
在FreeBSD 12上安装Netdata 首先,请更新FreeBSD 12系统包索引: $ sudo pkg update Updating FreeBSD repository catalogue… FreeBSD repository is up to date. All repositories are up to date. 然后在FreeBSD系统上安装Netdata: # pkg install netdata Updating FreeBSD repository catalogue… FreeBSD repository is up to date. All repositories are up to date. The following 4 package(s) will be affected (of 0 checked): New packages to be INSTALLED: netdata: 1.11.1_2 bash: 4.4.23_1 e2fsprogs-libuuid: 1.44.5 pkgconf: 1.5.4,1 Number of packages to be installed: 4 The process will require 15 MiB more space. 3 MiB to be downloaded. Proceed with this action? [y/N]: y 安装完成后,启动该服务并将其设置为在系统引导时启动: # sysrc netdata_enable="YES" netdata_enable: -> YES 启动netdata服务: # /usr/local/etc/rc.d/netdata start Starting netdata. 检查是否有端口19999监听: # sockstat -4 -6 | grep 19999 netdata netdata 1321 3 tcp4 127.0.0.1:19999 : 从输出中,你可以确认它正在侦听localhost IP 127.0.0.1,我们将其更改为服务器IP: sudo vim /usr/local/etc/netdata/netdata.conf 将绑定更改为服务器IP地址: [global] # hostname = %%HOSTNAME%% history = 86400 bind to = 192.168.1.10 disconnect idle web clients after seconds = 3600 你还可以使用0.0.0.0绑定到所有接口,在进行更改后重新启动netdata: # /usr/local/etc/rc.d/netdata restart Stopping netdata. Waiting for PIDS: 1565. Starting netdata. 通读配置文件/usr/local/etc/netdata/netdata.conf以自定义监控体验。 访问服务器IP地址和端口19999上的Netdata Web控制面板:
至此,安装Netdata全部完成。
相关主题 |