Merge pull request #14802 from geekpi/translating

translating
This commit is contained in:
geekpi 2019-08-01 08:57:01 +08:00 committed by GitHub
commit 6a75d44ec1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 313 additions and 312 deletions

View File

@ -1,312 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Install NetData Performance Monitoring Tool On Linux)
[#]: via: (https://www.ostechnix.com/netdata-real-time-performance-monitoring-tool-linux/)
[#]: author: (sk https://www.ostechnix.com/author/sk/)
Install NetData Performance Monitoring Tool On Linux
======
![][1]
**NetData** is a distributed, real-time, performance and health monitoring tool for systems and applications. It provides unparalleled insights of everything happening on a system in real-time. You can view the results in a highly interactive web-dashboard. Using Netdata, you can get a clear idea of what is happening now, and what happened before in your systems and applications. You dont need to be an expert to deploy this tool in your Linux systems. NetData just works fine out of the box with zero configuration, and zero dependencies. Just install this utility and sit back, NetData will take care of the rest.
It has its own built-in webserver to display the result in graphical format. NetData is quite fast and efficient, and it will immediately start to analyze the performance of your system in no time after installing it. It is written using **C** programming language, so it is extremely light weight. It consumes less than 3% of a single core CPU usage and a 10-15MB of RAM. We can easily embed the charts on any existing web pages, and also it has a plugin API, so that you can monitor any application.
Here is the list of things that will be monitored by NetData utility in your Linux system.
* CPU usage,
* RAM Usage,
* Swap memory usage,
* Kernel memory usage,
* Hard disks and its usage,
* Network interfaces,
* IPtables,
* Netfilter,
* DDoS protection,
* Processes,
* Applications,
* NFS server,
* Web server (Apache & Nginx),
* Database servers (MySQL),
* DHCP server,
* DNS server,
* Email serve,r
* Proxy server,
* Tomcat,
* PHP,
* SNP devices,
* And many more.
NetData is free, open source tool and it supports Linux, FreeBSD and Mac OS.
### Install NetData On Linux
Netdata can be installed on any Linux distributions that have **Bash** installed.
The easiest way to install Netdata is to run the following one-liner command from the Terminal:
```
$ bash <(curl -Ss https://my-netdata.io/kickstart-static64.sh)
```
This will download and install everything needed to up and run Netdata.
Some users may not want to inject something directly into Bash without investigating it. If you dont like this method, you can follow the steps below to install it on your system.
**On Arch Linux:**
The latest version is available in the Arch Linux default repositories. So, we can install it with [**pacman**][2] using command:
```
$ sudo pacman -S netdata
```
**On DEB and RPM-based systems**
NetData is not available in the default repositories of DEB based (Ubuntu / Debian) or RPM based (RHEL / CentOS / Fedora) systems. We need to install NetData manually from its Git repository.
First install the required dependencies:
```
# Debian / Ubuntu
$ sudo apt-get install zlib1g-dev uuid-dev libuv1-dev liblz4-dev libjudy-dev libssl-dev libmnl-dev gcc make git autoconf autoconf-archive autogen automake pkg-config curl
# Fedora
$ sudo dnf install zlib-devel libuuid-devel libuv-devel lz4-devel Judy-devel openssl-devel libmnl-devel gcc make git autoconf autoconf-archive autogen automake pkgconfig curl findutils
# CentOS / Red Hat Enterprise Linux
$ sudo yum install epel-release
$ sudo yum install autoconf automake curl gcc git libmnl-devel libuuid-devel openssl-devel libuv-devel lz4-devel Judy-devel lm_sensors make MySQL-python nc pkgconfig python python-psycopg2 PyYAML zlib-devel
# openSUSE
$ sudo zypper install zlib-devel libuuid-devel libuv-devel liblz4-devel judy-devel openssl-devel libmnl-devel gcc make git autoconf autoconf-archive autogen automake pkgconfig curl findutils
```
After installing the required dependencies, install NetData on DEB or RPM based systems as shown below.
Git clone the NetData repository:
```
$ git clone https://github.com/netdata/netdata.git --depth=100
```
The above command will create a directory called **netdata** in the current working directory.
Change to the netdata directory:
```
$ cd netdata/
```
Finally, install and start NetData using command:
```
$ sudo ./netdata-installer.sh
```
**Sample output:**
```
Welcome to netdata!
Nice to see you are giving it a try!
You are about to build and install netdata to your system.
It will be installed at these locations:
- the daemon at /usr/sbin/netdata
- config files at /etc/netdata
- web files at /usr/share/netdata
- plugins at /usr/libexec/netdata
- cache files at /var/cache/netdata
- db files at /var/lib/netdata
- log files at /var/log/netdata
- pid file at /var/run
This installer allows you to change the installation path.
Press Control-C and run the same command with --help for help.
Press ENTER to build and install netdata to your system > ## Press ENTER key
```
After installing NetData, you will see the following output at the end:
```
-------------------------------------------------------------------------------
OK. NetData is installed and it is running (listening to *:19999).
-------------------------------------------------------------------------------
INFO: Command line options changed. -pidfile, -nd and -ch are deprecated.
If you use custom startup scripts, please run netdata -h to see the
corresponding options and update your scripts.
Hit http://localhost:19999/ from your browser.
To stop netdata, just kill it, with:
killall netdata
To start it, just run it:
/usr/sbin/netdata
Enjoy!
Uninstall script generated: ./netdata-uninstaller.sh
```
![][3]
Install NetData
NetData has been installed and started.
To install Netdata on other Linux distributions, refer the [**official installation instructions page**][4].
##### Allow NetData default port via Firewall or Router
If your system stays behind any firewall or router, you must allow the default port **19999** to access the NetData web interface from any remote systems on the network,.
**On Ubuntu / Debian:**
```
$ sudo ufw allow 19999
```
**On CentOS / RHEL / Fedora:**
```
$ sudo firewall-cmd --permanent --add-port=19999/tcp
$ sudo firewall-cmd --reload
```
### Starting / Stopping NetData
To enable and start Netdata service on systems that use **Systemd** , run:
```
$ sudo systemctl enable netdata
$ sudo systemctl start netdata
```
To stop:
```
$ sudo systemctl stop netdata
```
To enable and start Netdata service on systems that use **Init** , run:
```
$ sudo service netdata start
$ sudo chkconfig netdata on
```
To stop it:
```
$ sudo service netdata stop
```
### Access NetData via Web browser
Open your web browser, and navigate to **<http://127.0.0.1:19999>** or **<http://localhost:19999/>** or **<http://ip-address:19999>**. You should see a screen something like below.
![][5]
Netdata dashboard
From the dashboard, you will find the complete statistics of your Linux system. Scroll down to view each section.
You can download and/or view NetData default configuration file at any time by simply navigating to **<http://localhost:19999/netdata.conf>**.
![][6]
Netdata configuration file
### Updating NetData
In Arch Linux, just run the following command to update NetData. If the updated version is available in the repository, it will be automatically installed.
```
$ sudo pacman -Syyu
```
In DEB or RPM based systems, just go to the directory where you have cloned it (In our case its netdata).
```
$ cd netdata
```
Pull the latest update:
```
$ git pull
```
Then, rebuild and update it using command:
```
$ sudo ./netdata-installer.sh
```
### Uninstalling NetData
Go to the location where you have cloned NetData.
```
$ cd netdata
```
Then, uninstall it using command:
```
$ sudo ./netdata-uninstaller.sh --force
```
In Arch Linux, the following command will uninstall it.
```
$ sudo pacman -Rns netdata
```
**Resources:**
* [**NetData website**][7]
* [**NetData GitHub page**][8]
--------------------------------------------------------------------------------
via: https://www.ostechnix.com/netdata-real-time-performance-monitoring-tool-linux/
作者:[sk][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.ostechnix.com/author/sk/
[b]: https://github.com/lujun9972
[1]: https://www.ostechnix.com/wp-content/uploads/2016/06/Install-netdata-720x340.png
[2]: https://www.ostechnix.com/getting-started-pacman/
[3]: https://www.ostechnix.com/wp-content/uploads/2016/06/Deepin-Terminal_002-6.png
[4]: https://docs.netdata.cloud/packaging/installer/
[5]: https://www.ostechnix.com/wp-content/uploads/2016/06/Netdata-dashboard.png
[6]: https://www.ostechnix.com/wp-content/uploads/2016/06/Netdata-config-file.png
[7]: http://netdata.firehol.org/
[8]: https://github.com/firehol/netdata

View File

@ -0,0 +1,313 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Install NetData Performance Monitoring Tool On Linux)
[#]: via: (https://www.ostechnix.com/netdata-real-time-performance-monitoring-tool-linux/)
[#]: author: (sk https://www.ostechnix.com/author/sk/)
在 Linux 上安装 NetData 性能监控工具
======
![][1]
**NetData** 是一个用于系统和应用的分布式实时性能和健康监控工具。它提供了对系统中实时发生的所有事情的全面检测。你可以在高度互动的 Web 仪表板中查看结果。使用 Netdata你可以清楚地了解现在发生的事情以及之前系统和应用中发生的事情。你无需成为专家即可在 Linux 系统中部署此工具。NetData 开箱即用,零配置和零依赖。只需安装它然后休息,之后 NetData 将负责其余部分。
它有自己的内置 Web 服务器以图形形式显示结果。NetData 非常快速高效,安装后可立即开始分析系统性能。它是用 **C** 编程语言编写的,所以它非常轻量。它占用的单核 CPU 使用率不到 3内存占用 10-15MB。我们可以轻松地在任何现有网页上嵌入图表并且它还有一个插件 API以便你可以监控任何应用。
以下是 Linux 系统中 NetData 的监控列表。
* CPU 使用率
  * RAM 使用率
  * swap 内存使用率
  * 内核内存使用率
  * 硬盘及其使用率
  * 网络接口
  * IPtables
  * Netfilter
  * DDoS 保护
  * 进程
  * 应用
  * NFS 服务器
  * Web 服务器 Apache 和 Nginx
  * 数据库服务器 MySQL
  * DHCP 服务器
  * DNS 服务器
  * 电子邮件服务
  * 代理服务器
  * Tomcat
  * PHP
  * SNP 设备
  * 等等
NetData 是免费的开源工具,它支持 Linux、FreeBSD 和 Mac OS。
### 在 Linux 上安装 NetData
Netdata 可以安装在任何安装了**Bash** 的 Linux 发行版上。
最简单的安装 Netdata 的方法是从终端运行以下命令:
```
$ bash <(curl -Ss https://my-netdata.io/kickstart-static64.sh)
```
这将下载并安装启动和运行 Netdata 所需的一切。
有些用户可能不想在没有研究的情况下将某些东西直接注入 Bash。如果你不喜欢此方法可以按照以下步骤在系统上安装它。
**在 Arch Linux 上:**
Arch Linux 默认仓库中提供了最新版本。所以,我们可以使用以下 [**pacman**][2] 命令安装它:
```
$ sudo pacman -S netdata
```
**在基于 DEB 和基于 RPM 的系统上**
在基于 DEB Ubuntu / Debian 或基于RPM RHEL / CentOS / Fedora 系统的默认仓库没有 NetData。我们需要从它的 Git 仓库手动安装 NetData。
首先安装所需的依赖项:
```
# Debian / Ubuntu
$ sudo apt-get install zlib1g-dev uuid-dev libuv1-dev liblz4-dev libjudy-dev libssl-dev libmnl-dev gcc make git autoconf autoconf-archive autogen automake pkg-config curl
# Fedora
$ sudo dnf install zlib-devel libuuid-devel libuv-devel lz4-devel Judy-devel openssl-devel libmnl-devel gcc make git autoconf autoconf-archive autogen automake pkgconfig curl findutils
# CentOS / Red Hat Enterprise Linux
$ sudo yum install epel-release
$ sudo yum install autoconf automake curl gcc git libmnl-devel libuuid-devel openssl-devel libuv-devel lz4-devel Judy-devel lm_sensors make MySQL-python nc pkgconfig python python-psycopg2 PyYAML zlib-devel
# openSUSE
$ sudo zypper install zlib-devel libuuid-devel libuv-devel liblz4-devel judy-devel openssl-devel libmnl-devel gcc make git autoconf autoconf-archive autogen automake pkgconfig curl findutils
```
安装依赖项后,在基于 DEB 或基于 RPM 的系统上安装 NetData如下所示。
Git 克隆 NetData 仓库:
```
$ git clone https://github.com/netdata/netdata.git --depth=100
```
上面的命令将在当前工作目录中创建一个名为 **“netdata”** 的目录。
切换到 “netdata” 目录:
```
$ cd netdata/
```
最后,使用命令安装并启动 NetData
```
$ sudo ./netdata-installer.sh
```
**示例输出:**
```
Welcome to netdata!
Nice to see you are giving it a try!
You are about to build and install netdata to your system.
It will be installed at these locations:
- the daemon at /usr/sbin/netdata
- config files at /etc/netdata
- web files at /usr/share/netdata
- plugins at /usr/libexec/netdata
- cache files at /var/cache/netdata
- db files at /var/lib/netdata
- log files at /var/log/netdata
- pid file at /var/run
This installer allows you to change the installation path.
Press Control-C and run the same command with --help for help.
Press ENTER to build and install netdata to your system > ## Press ENTER key
```
安装完成后,你将在最后看到以下输出:
```
-------------------------------------------------------------------------------
OK. NetData is installed and it is running (listening to *:19999).
-------------------------------------------------------------------------------
INFO: Command line options changed. -pidfile, -nd and -ch are deprecated.
If you use custom startup scripts, please run netdata -h to see the
corresponding options and update your scripts.
Hit http://localhost:19999/ from your browser.
To stop netdata, just kill it, with:
killall netdata
To start it, just run it:
/usr/sbin/netdata
Enjoy!
Uninstall script generated: ./netdata-uninstaller.sh
```
![][3]
安装 NetData
NetData 已安装并启动。
要在其他 Linux 发行版上安装 Netdata请参阅[**官方安装说明页面**][4]。
##### 在防火墙或者路由器上允许 NetData 的默认端口
如果你的系统在防火墙或者路由器后面,那么必须允许默认端口 **19999** 以便从任何远程系统访问 NetData 的 web 界面。
**在 Ubuntu/Debian 中:**
```
$ sudo ufw allow 19999
```
**在 CentOS/RHEL/Fedora 中:**
```
$ sudo firewall-cmd --permanent --add-port=19999/tcp
$ sudo firewall-cmd --reload
```
### 启动/停止 NetData
要在使用 **Systemd** 的系统上启用和启动 Netdata 服务,请运行:
```
$ sudo systemctl enable netdata
$ sudo systemctl start netdata
```
要停止:
```
$ sudo systemctl stop netdata
```
要在使用 **Init** 的系统上启用和启动 Netdata 服务,请运行:
```
$ sudo service netdata start
$ sudo chkconfig netdata on
```
要停止:
```
$ sudo service netdata stop
```
### 通过 Web 浏览器访问 NetData
打开 Web 浏览器,然后打开 **<http://127.0.0.1:19999>** 或者 **<http://localhost:19999/>** 或者 **<http://ip-address:19999>**。你应该看到如下页面。
![][5]
Netdata 仪表板
在仪表板中,你可以找到 Linux 系统的完整统计信息。向下滚动以查看每个部分。
你可以随时打开 **<http://localhost:19999/netdata.conf>** 来下载和/或查看 NetData 默认配置文件。
![][6]
Netdata 配置文件
### 更新 NetData
在 Arch Linux 中,只需运行以下命令即可更新 NetData。如果仓库中提供了更新版本那么就会自动安装该版本。
```
$ sudo pacman -Syyu
```
在基于 DEB 或 RPM 的系统中,只需进入已克隆它的目录(此例中是 netdata
```
$ cd netdata
```
拉取最新更新:
```
$ git pull
```
然后,使用命令重新构建并更新它:
```
$ sudo ./netdata-installer.sh
```
### 卸载 NetData
进入克隆 NetData 的文件夹。
```
$ cd netdata
```
然后,使用命令卸载它:
```
$ sudo ./netdata-uninstaller.sh --force
```
在 Arch Linux 中,使用以下命令卸载它。
```
$ sudo pacman -Rns netdata
```
**资源:**
* [**NetData 网站**][7]
* [**NetData 的 GitHub 页面**][8]
--------------------------------------------------------------------------------
via: https://www.ostechnix.com/netdata-real-time-performance-monitoring-tool-linux/
作者:[sk][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.ostechnix.com/author/sk/
[b]: https://github.com/lujun9972
[1]: https://www.ostechnix.com/wp-content/uploads/2016/06/Install-netdata-720x340.png
[2]: https://www.ostechnix.com/getting-started-pacman/
[3]: https://www.ostechnix.com/wp-content/uploads/2016/06/Deepin-Terminal_002-6.png
[4]: https://docs.netdata.cloud/packaging/installer/
[5]: https://www.ostechnix.com/wp-content/uploads/2016/06/Netdata-dashboard.png
[6]: https://www.ostechnix.com/wp-content/uploads/2016/06/Netdata-config-file.png
[7]: http://netdata.firehol.org/
[8]: https://github.com/firehol/netdata