summaryrefslogtreecommitdiffstats
path: root/packaging/installer
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--packaging/installer/README.md241
-rw-r--r--packaging/installer/UNINSTALL.md23
-rw-r--r--packaging/installer/UPDATE.md24
-rw-r--r--packaging/installer/functions.sh9
-rwxr-xr-xpackaging/installer/kickstart-static64.sh8
-rwxr-xr-xpackaging/installer/kickstart.sh6
6 files changed, 167 insertions, 144 deletions
diff --git a/packaging/installer/README.md b/packaging/installer/README.md
index 67a7a912..b860b00f 100644
--- a/packaging/installer/README.md
+++ b/packaging/installer/README.md
@@ -7,15 +7,15 @@ The best way to install Netdata is directly from source. Our **automatic install
!!! warning
You can find Netdata packages distributed by third parties. In many cases, these packages are either too old or broken. So, the suggested ways to install Netdata are the ones in this page.
-1. [Automatic one line installation](#one-line-installation), easy installation from source, **this is the default**
-2. [Install pre-built static binary on any 64bit Linux](#linux-64bit-pre-built-static-binary)
-3. [Run Netdata in a docker container](#run-netdata-in-a-docker-container)
-4. [Manual installation, step by step](#install-netdata-on-linux-manually)
-5. [Install on FreeBSD](#freebsd)
-6. [Install on pfSense](#pfsense)
-7. [Enable on FreeNAS Corral](#freenas)
-8. [Install on macOS (OS X)](#macos)
-9. [Install on a Kubernetes cluster](https://github.com/netdata/helmchart#netdata-helm-chart-for-kubernetes-deployments)
+1. [Automatic one line installation](#one-line-installation), easy installation from source, **this is the default**
+2. [Install pre-built static binary on any 64bit Linux](#linux-64bit-pre-built-static-binary)
+3. [Run Netdata in a docker container](#run-netdata-in-a-docker-container)
+4. [Manual installation, step by step](#install-netdata-on-linux-manually)
+5. [Install on FreeBSD](#freebsd)
+6. [Install on pfSense](#pfsense)
+7. [Enable on FreeNAS Corral](#freenas)
+8. [Install on macOS (OS X)](#macos)
+9. [Install on a Kubernetes cluster](https://github.com/netdata/helmchart#netdata-helm-chart-for-kubernetes-deployments)
10. [Install using binary packages](#binary-packages)
See also the list of Netdata [package maintainers](../maintainers) for ASUSTOR NAS, OpenWRT, ReadyNAS, etc.
@@ -25,44 +25,48 @@ Note: From Netdata v1.12 and above, anonymous usage information is collected by
---
## One-line installation
+
![](https://registry.my-netdata.io/api/v1/badge.svg?chart=web_log_nginx.requests_per_url&options=unaligned&dimensions=kickstart&group=sum&after=-3600&label=last+hour&units=installations&value_color=orange&precision=0) ![](https://registry.my-netdata.io/api/v1/badge.svg?chart=web_log_nginx.requests_per_url&options=unaligned&dimensions=kickstart&group=sum&after=-86400&label=today&units=installations&precision=0)
This method is **fully automatic on all Linux distributions**. FreeBSD and MacOS systems need some preparations before installing Netdata for the first time. Check the [FreeBSD](#freebsd) and the [MacOS](#macos) sections for more information.
To install Netdata from source, and keep it up to date with our **nightly releases** automatically, run the following:
-``` bash
+```bash
$ bash <(curl -Ss https://my-netdata.io/kickstart.sh)
```
!!! note
Do not use `sudo` for the one-line installer—it will escalate privileges itself if needed.
- To learn more about the pros and cons of using *nightly* vs. *stable* releases, see our [notice about the two options](#nightly-vs-stable-releases).
+```
+To learn more about the pros and cons of using *nightly* vs. *stable* releases, see our [notice about the two options](#nightly-vs-stable-releases).
+```
<details markdown="1"><summary>Click here for more information and advanced use of the one-line installation script.</summary>
Verify the integrity of the script with this:
-``` bash
-[ "8a2b054081a108dff915994ce77f2f2d" = "$(curl -Ss https://my-netdata.io/kickstart.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
+```bash
+[ "b6d16c171ccad073b86327246151d875" = "$(curl -Ss https://my-netdata.io/kickstart.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
```
-*It should print `OK, VALID` if the script is the one we ship.*
+
+_It should print `OK, VALID` if the script is the one we ship._
The `kickstart.sh` script:
-- detects the Linux distro and **installs the required system packages** for building Netdata (will ask for confirmation)
-- downloads the latest Netdata source tree to `/usr/src/netdata.git`.
-- installs Netdata by running `./netdata-installer.sh` from the source tree.
-- installs `netdata-updater.sh` to `cron.daily`, so your Netdata installation will be updated daily (you will get a message from cron only if the update fails).
-- For QA purposes, this installation method lets us know if it succeed or failed.
+- detects the Linux distro and **installs the required system packages** for building Netdata (will ask for confirmation)
+- downloads the latest Netdata source tree to `/usr/src/netdata.git`.
+- installs Netdata by running `./netdata-installer.sh` from the source tree.
+- installs `netdata-updater.sh` to `cron.daily`, so your Netdata installation will be updated daily (you will get a message from cron only if the update fails).
+- For QA purposes, this installation method lets us know if it succeed or failed.
The `kickstart.sh` script passes all its parameters to `netdata-installer.sh`, so you can add more parameters to customize your installation. Here are a few important parameters:
-- `--dont-wait`: Enable automated installs by not prompting for permission to install any required packages.
-- `--dont-start-it`: Prevent the installer from starting Netdata automatically.
-- `--stable-channel`: Automatically update only on the release of new major versions.
-- `--no-updates`: Prevent automatic updates of any kind.
+- `--dont-wait`: Enable automated installs by not prompting for permission to install any required packages.
+- `--dont-start-it`: Prevent the installer from starting Netdata automatically.
+- `--stable-channel`: Automatically update only on the release of new major versions.
+- `--no-updates`: Prevent automatic updates of any kind.
Example using all the above parameters:
@@ -77,6 +81,7 @@ Once Netdata is installed, see [Getting Started](../../docs/GettingStarted.md).
---
## Linux 64bit pre-built static binary
+
![](https://registry.my-netdata.io/api/v1/badge.svg?chart=web_log_nginx.requests_per_url&options=unaligned&dimensions=kickstart64&group=sum&after=-3600&label=last+hour&units=installations&value_color=orange&precision=0) ![](https://registry.my-netdata.io/api/v1/badge.svg?chart=web_log_nginx.requests_per_url&options=unaligned&dimensions=kickstart64&group=sum&after=-86400&label=today&units=installations&precision=0)
You can install a pre-compiled static binary of Netdata on any Intel/AMD 64bit Linux system (even those that don't have a package manager, like CoreOS, CirrOS, busybox systems, etc). You can also use these packages on systems with broken or unsupported package managers.
@@ -90,38 +95,40 @@ $ bash <(curl -Ss https://my-netdata.io/kickstart-static64.sh)
!!! note
Do not use `sudo` for this installer—it will escalate privileges itself if needed.
- To learn more about the pros and cons of using *nightly* vs. *stable* releases, see our [notice about the two options](README.md#nightly-vs-stable-releases).
+```
+To learn more about the pros and cons of using *nightly* vs. *stable* releases, see our [notice about the two options](README.md#nightly-vs-stable-releases).
- If your system does not have `bash` installed, open the `More information and advanced uses of the kickstart-static64.sh script` dropdown for instructions to run the installer without `bash`.
-
- This script installs Netdata at `/opt/netdata`.
+If your system does not have `bash` installed, open the `More information and advanced uses of the kickstart-static64.sh script` dropdown for instructions to run the installer without `bash`.
+
+This script installs Netdata at `/opt/netdata`.
+```
<details markdown="1"><summary>Click here for more information and advanced use of this command.</summary>
Verify the integrity of the script with this:
```bash
-[ "8779d8717ccaa8dac18d599502eef591" = "$(curl -Ss https://my-netdata.io/kickstart-static64.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
+[ "4415e8c13e529a795abb953a9be14ad5" = "$(curl -Ss https://my-netdata.io/kickstart-static64.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
```
*It should print `OK, VALID` if the script is the one we ship.*
The `kickstart-static64.sh` script passes all its parameters to `netdata-installer.sh`, so you can add more parameters to customize your installation. Here are a few important parameters:
-- `--dont-wait`: Enable automated installs by not prompting for permission to install any required packages.
-- `--dont-start-it`: Prevent the installer from starting Netdata automatically.
-- `--stable-channel`: Automatically update only on the release of new major versions.
-- `--no-updates`: Prevent automatic updates of any kind.
+- `--dont-wait`: Enable automated installs by not prompting for permission to install any required packages.
+- `--dont-start-it`: Prevent the installer from starting Netdata automatically.
+- `--stable-channel`: Automatically update only on the release of new major versions.
+- `--no-updates`: Prevent automatic updates of any kind.
Example using all the above parameters:
-```bash
+```sh
$ bash <(curl -Ss https://my-netdata.io/kickstart-static64.sh) --dont-wait --dont-start-it --no-updates --stable-channel
```
If your shell fails to handle the above one liner, do this:
-```bash
+```sh
# download the script with curl
curl https://my-netdata.io/kickstart-static64.sh >/tmp/kickstart-static64.sh
@@ -132,10 +139,10 @@ wget -O /tmp/kickstart-static64.sh https://my-netdata.io/kickstart-static64.sh
sh /tmp/kickstart-static64.sh
```
-- The static binary files are kept in repo [binary-packages](https://github.com/netdata/binary-packages). You can download any of the `.run` files, and run it. These files are self-extracting shell scripts built with [makeself](https://github.com/megastep/makeself).
-- The target system does **not** need to have bash installed.
-- The same files can be used for updates too.
-- For QA purposes, this installation method lets us know if it succeed or failed.
+- The static binary files are kept in repo [binary-packages](https://github.com/netdata/binary-packages). You can download any of the `.run` files, and run it. These files are self-extracting shell scripts built with [makeself](https://github.com/megastep/makeself).
+- The target system does **not** need to have bash installed.
+- The same files can be used for updates too.
+- For QA purposes, this installation method lets us know if it succeed or failed.
</details>
@@ -153,13 +160,13 @@ You can [Install Netdata with Docker](../docker/#install-netdata-with-docker).
To install the latest git version of Netdata, please follow these 2 steps:
-1. [Prepare your system](#prepare-your-system)
+1. [Prepare your system](#prepare-your-system)
- Install the required packages on your system.
+ Install the required packages on your system.
-2. [Install Netdata](#install-netdata)
+2. [Install Netdata](#install-netdata)
- Download and install Netdata. You can also update it the same way.
+ Download and install Netdata. You can also update it the same way.
---
@@ -167,25 +174,25 @@ To install the latest git version of Netdata, please follow these 2 steps:
Try our experimental automatic requirements installer (no need to be root). This will try to find the packages that should be installed on your system to build and run Netdata. It supports most major Linux distributions released after 2010:
-* **Alpine** Linux and its derivatives
- * You have to install `bash` yourself, before using the installer.
+- **Alpine** Linux and its derivatives
+ - You have to install `bash` yourself, before using the installer.
-* **Arch** Linux and its derivatives
- * You need arch/aur for package Judy.
+- **Arch** Linux and its derivatives
+ - You need arch/aur for package Judy.
-* **Gentoo** Linux and its derivatives
+- **Gentoo** Linux and its derivatives
-* **Debian** Linux and its derivatives (including **Ubuntu**, **Mint**)
+- **Debian** Linux and its derivatives (including **Ubuntu**, **Mint**)
-* **Redhat Enterprise Linux** and its derivatives (including **Fedora**, **CentOS**, **Amazon Machine Image**)
- * Please note that for RHEL/CentOS you need
- [EPEL](http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/).
- In addition, RHEL/CentOS version 6 also need
- [OKay](https://okay.com.mx/blog-news/rpm-repositories-for-centos-6-and-7.html) for package libuv version 1.
+- **Redhat Enterprise Linux** and its derivatives (including **Fedora**, **CentOS**, **Amazon Machine Image**)
+ - Please note that for RHEL/CentOS you need
+ [EPEL](http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/).
+ In addition, RHEL/CentOS version 6 also need
+ [OKay](https://okay.com.mx/blog-news/rpm-repositories-for-centos-6-and-7.html) for package libuv version 1.
-* **SuSe** Linux and its derivatives (including **openSuSe**)
+- **SuSe** Linux and its derivatives (including **openSuSe**)
-* **SLE12** Must have your system registered with Suse Customer Center or have the DVD. See [#1162](https://github.com/netdata/netdata/issues/1162)
+- **SLE12** Must have your system registered with Suse Customer Center or have the DVD. See [#1162](https://github.com/netdata/netdata/issues/1162)
Install the packages for having a **basic Netdata installation** (system monitoring and many applications, without `mysql` / `mariadb`, `postgres`, `named`, hardware sensors and `SNMP`):
@@ -217,48 +224,47 @@ yum install autoconf automake curl gcc git libmnl-devel libuuid-devel openssl-de
# openSUSE
zypper install zlib-devel libuuid-devel libuv-devel liblz4-devel judy-devel libopenssl-devel libmnl-devel gcc make git autoconf autoconf-archive autogen automake pkgconfig curl findutils python
-
```
Once Netdata is compiled, to run it the following packages are required (already installed using the above commands):
-package|description
-:-----:|-----------
-`libuuid`|part of `util-linux` for GUIDs management
-`zlib`|gzip compression for the internal Netdata web server
+| package | description|
+|:-----:|-----------|
+| `libuuid` | part of `util-linux` for GUIDs management|
+| `zlib` | gzip compression for the internal Netdata web server|
*Netdata will fail to start without the above.*
Netdata plugins and various aspects of Netdata can be enabled or benefit when these are installed (they are optional):
-package|description
-:-----:|-----------
-`bash`|for shell plugins and **alarm notifications**
-`curl`|for shell plugins and **alarm notifications**
-`iproute` or `iproute2`|for monitoring **Linux traffic QoS**<br/>use `iproute2` if `iproute` reports as not available or obsolete
-`python`|for most of the external plugins
-`python-yaml`|used for monitoring **beanstalkd**
-`python-beanstalkc`|used for monitoring **beanstalkd**
-`python-dnspython`|used for monitoring DNS query time
-`python-ipaddress`|used for monitoring **DHCPd**<br/>this package is required only if the system has python v2. python v3 has this functionality embedded
-`python-mysqldb`<br/>or<br/>`python-pymysql`|used for monitoring **mysql** or **mariadb** databases<br/>`python-mysqldb` is a lot faster and thus preferred
-`python-psycopg2`|used for monitoring **postgresql** databases
-`python-pymongo`|used for monitoring **mongodb** databases
-`nodejs`|used for `node.js` plugins for monitoring **named** and **SNMP** devices
-`lm-sensors`|for monitoring **hardware sensors**
-`libmnl`|for collecting netfilter metrics
-`netcat`|for shell plugins to collect metrics from remote systems
+| package |description|
+|:-----:|-----------|
+| `bash`|for shell plugins and **alarm notifications**|
+| `curl`|for shell plugins and **alarm notifications**|
+| `iproute` or `iproute2`|for monitoring **Linux traffic QoS**<br/>use `iproute2` if `iproute` reports as not available or obsolete|
+| `python`|for most of the external plugins|
+| `python-yaml`|used for monitoring **beanstalkd**|
+| `python-beanstalkc`|used for monitoring **beanstalkd**|
+| `python-dnspython`|used for monitoring DNS query time|
+| `python-ipaddress`|used for monitoring **DHCPd**<br/>this package is required only if the system has python v2. python v3 has this functionality embedded|
+| `python-mysqldb`<br/>or<br/>`python-pymysql`|used for monitoring **mysql** or **mariadb** databases<br/>`python-mysqldb` is a lot faster and thus preferred|
+| `python-psycopg2`|used for monitoring **postgresql** databases|
+| `python-pymongo`|used for monitoring **mongodb** databases|
+| `nodejs`|used for `node.js` plugins for monitoring **named** and **SNMP** devices|
+| `lm-sensors`|for monitoring **hardware sensors**|
+| `libmnl`|for collecting netfilter metrics|
+| `netcat`|for shell plugins to collect metrics from remote systems|
*Netdata will greatly benefit if you have the above packages installed, but it will still work without them.*
Netdata DB engine can be enabled when these are installed (they are optional):
-|package|description|
+| package | description|
|:-----:|-----------|
-|`libuv`|multi-platform support library with a focus on asynchronous I/O|
-|`liblz4`|Extremely Fast Compression algorithm|
-|`Judy`|General purpose dynamic array|
-|`openssl`|Cryptography and SSL/TLS Toolkit|
+| `libuv` | Multi-platform support library with a focus on asynchronous I/O, version 1 or greater|
+| `liblz4` | Extremely fast compression algorithm, version r129 or greater|
+| `Judy` | General purpose dynamic array|
+| `openssl`| Cryptography and SSL/TLS toolkit|
*Netdata will greatly benefit if you have the above packages installed, but it will still work without them.*
@@ -269,33 +275,32 @@ Netdata DB engine can be enabled when these are installed (they are optional):
Do this to install and run Netdata:
```sh
-
# download it - the directory 'netdata' will be created
git clone https://github.com/netdata/netdata.git --depth=100
cd netdata
# run script with root privileges to build, install, start Netdata
./netdata-installer.sh
-
```
-* If you don't want to run it straight-away, add `--dont-start-it` option.
+- If you don't want to run it straight-away, add `--dont-start-it` option.
-* You can also append `--stable-channel` to fetch and install only the official releases from GitHub, instead of the nightly builds.
+- You can also append `--stable-channel` to fetch and install only the official releases from GitHub, instead of the nightly builds.
-* If you don't want to install it on the default directories, you can run the installer like this: `./netdata-installer.sh --install /opt`. This one will install Netdata in `/opt/netdata`.
+- If you don't want to install it on the default directories, you can run the installer like this: `./netdata-installer.sh --install /opt`. This one will install Netdata in `/opt/netdata`.
-* If your server does not have access to the internet and you have manually put the installation directory on your server, you will need to pass the option `--disable-go` to the installer. The option will prevent the installer from attempting to download and install `go.d.plugin`.
+- If your server does not have access to the internet and you have manually put the installation directory on your server, you will need to pass the option `--disable-go` to the installer. The option will prevent the installer from attempting to download and install `go.d.plugin`.
Once the installer completes, the file `/etc/netdata/netdata.conf` will be created (if you changed the installation directory, the configuration will appear in that directory too).
-You can edit this file to set options. One common option to tweak is `history`, which controls the size of the memory database Netdata will use. By default is `3600` seconds (an hour of data at the charts) which makes Netdata use about 10-15MB of RAM (depending on the number of charts detected on your system). Check **[[Memory Requirements]]**.
+You can edit this file to set options. One common option to tweak is `history`, which controls the size of the memory database Netdata will use. By default is `3600` seconds (an hour of data at the charts) which makes Netdata use about 10-15MB of RAM (depending on the number of charts detected on your system). Check **\[[Memory Requirements]]**.
To apply the changes you made, you have to restart Netdata.
---
### Binary Packages
+
![](https://raw.githubusercontent.com/netdata/netdata/master/web/gui/images/packaging-beta-tag.svg?sanitize=true)
We provide our own flavour of binary packages for the most common operating systems that comply with .RPM and .DEB packaging formats.
@@ -308,8 +313,8 @@ Netdata is committed to support installation of our solution to all operating sy
We provide two separate repositories, one for our stable releases and one for our nightly releases.
-1. Stable releases: Our stable production releases are hosted in [netdata/netdata](https://packagecloud.io/netdata/netdata) repository of package cloud
-2. Nightly releases: Our latest releases are hosted in [netdata/netdata-edge](https://packagecloud.io/netdata/netdata-edge) repository of package cloud
+1. Stable releases: Our stable production releases are hosted in [netdata/netdata](https://packagecloud.io/netdata/netdata) repository of package cloud
+2. Nightly releases: Our latest releases are hosted in [netdata/netdata-edge](https://packagecloud.io/netdata/netdata-edge) repository of package cloud
Visit the repository pages and follow the quick set-up instructions to get started.
@@ -317,8 +322,6 @@ Visit the repository pages and follow the quick set-up instructions to get start
## Other Systems
-
-
##### FreeBSD
You can install Netdata from ports or packages collection.
@@ -338,41 +341,47 @@ cd netdata
```
##### pfSense
+
To install Netdata on pfSense run the following commands (within a shell or under Diagnostics/Command Prompt within the pfSense web interface).
Change platform (i386/amd64, etc) and FreeBSD versions (10/11, etc) according to your environment and change Netdata version (1.10.0 in example) according to latest version present within the FreeSBD repository:-
Note first three packages are downloaded from the pfSense repository for maintaining compatibility with pfSense, Netdata is downloaded from the FreeBSD repository.
-```
+
+```sh
pkg install pkgconf
pkg install bash
pkg install e2fsprogs-libuuid
pkg add http://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/python36-3.6.8_2.txz
pkg add http://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/netdata-1.13.0.txz
```
+
To start Netdata manually run `service netdata onestart`
To start Netdata automatically at each boot add `service netdata onestart` as a Shellcmd within the pfSense web interface (under **Services/Shellcmd**, which you need to install beforehand under **System/Package Manager/Available Packages**).
Shellcmd Type should be set to `Shellcmd`.
![](https://i.imgur.com/wcKiPe1.png)
-Alternatively more information can be found in https://doc.pfsense.org/index.php/Installing_FreeBSD_Packages, for achieving the same via the command line and scripts.
+Alternatively more information can be found in <https://doc.pfsense.org/index.php/Installing_FreeBSD_Packages>, for achieving the same via the command line and scripts.
-If you experience an issue with `/usr/bin/install` absense on pfSense 2.3 or earlier, update pfSense or use workaround from [https://redmine.pfsense.org/issues/6643](https://redmine.pfsense.org/issues/6643)
+If you experience an issue with `/usr/bin/install` absense on pfSense 2.3 or earlier, update pfSense or use workaround from <https://redmine.pfsense.org/issues/6643>
**Note:** In pfSense, the Netdata configuration files are located under `/usr/local/etc/netdata`
##### FreeNAS
+
On FreeNAS-Corral-RELEASE (>=10.0.3), Netdata is pre-installed.
To use Netdata, the service will need to be enabled and started from the FreeNAS **[CLI](https://github.com/freenas/cli)**.
To enable the Netdata service:
-```
+
+```sh
service netdata config set enable=true
```
-To start the netdata service:
-```
+To start the Netdata service:
+
+```sh
service netdata start
```
@@ -392,7 +401,9 @@ or from source:
# install Xcode Command Line Tools
xcode-select --install
```
+
click `Install` in the software update popup window, then
+
```sh
# install HomeBrew package manager
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@@ -414,7 +425,7 @@ The installer will also install a startup plist to start Netdata when your Mac b
Execute these commands to install Netdata in Alpine Linux 3.x:
-```
+```sh
# install required packages
apk add alpine-sdk bash curl zlib-dev util-linux-dev libmnl-dev gcc make git autoconf automake pkgconfig python logrotate
@@ -448,13 +459,13 @@ The documentation previously recommended installing the Debian Chroot package fr
The good news is that the 64-bit static installer works fine if your NAS is one that uses the amd64 architecture. It will install the content into `/opt/netdata`, making future removal safe and simple.
-When Netdata is first installed, it will run as _root_. This may or may not be acceptable for you, and since other installations run it as the _netdata_ user, you might wish to do the same. This requires some extra work:
+When Netdata is first installed, it will run as *root*. This may or may not be acceptable for you, and since other installations run it as the *netdata* user, you might wish to do the same. This requires some extra work:
-1. Creat a group `netdata` via the Synology group interface. Give it no access to anything.
-2. Create a user `netdata` via the Synology user interface. Give it no access to anything and a random password. Assign the user to the `netdata` group. Netdata will chuid to this user when running.
-3. Change ownership of the following directories, as defined in [Netdata Security](../../docs/netdata-security.md#security-design):
+1. Creat a group `netdata` via the Synology group interface. Give it no access to anything.
+2. Create a user `netdata` via the Synology user interface. Give it no access to anything and a random password. Assign the user to the `netdata` group. Netdata will chuid to this user when running.
+3. Change ownership of the following directories, as defined in [Netdata Security](../../docs/netdata-security.md#security-design):
-```
+```sh
$ chown -R root:netdata /opt/netdata/usr/share/netdata
$ chown -R netdata:netdata /opt/netdata/var/lib/netdata /opt/netdata/var/cache/netdata
$ chown -R netdata:root /opt/netdata/var/log/netdata
@@ -462,15 +473,14 @@ $ chown -R netdata:root /opt/netdata/var/log/netdata
Additionally, as of 2018/06/24, the Netdata installer doesn't recognize DSM as an operating system, so no init script is installed. You'll have to do this manually:
-1. Add [this file](https://gist.github.com/oskapt/055d474d7bfef32c49469c1b53e8225f) as `/etc/rc.netdata`. Make it executable with `chmod 0755 /etc/rc.netdata`.
-2. Edit `/etc/rc.local` and add a line calling `/etc/rc.netdata` to have it start on boot:
+1. Add [this file](https://gist.github.com/oskapt/055d474d7bfef32c49469c1b53e8225f) as `/etc/rc.netdata`. Make it executable with `chmod 0755 /etc/rc.netdata`.
+2. Edit `/etc/rc.local` and add a line calling `/etc/rc.netdata` to have it start on boot:
```
# Netdata startup
[ -x /etc/rc.netdata ] && /etc/rc.netdata start
```
-
## Nightly vs. stable releases
The Netdata team maintains two releases of the Netdata agent: **nightly** and **stable**. By default, Netdata's installation scripts will give you **automatic, nightly** updates, as that is our recommended configuration.
@@ -481,16 +491,15 @@ The Netdata team maintains two releases of the Netdata agent: **nightly** and **
**Pros of using nightly releases:**
- - Get the latest features and bugfixes as soon as they're available
- - Receive security-related fixes immediately
- - Use stable, fully-tested code that's always improving
- - Leverage the same Netdata experience our community is using
+- Get the latest features and bugfixes as soon as they're available
+- Receive security-related fixes immediately
+- Use stable, fully-tested code that's always improving
+- Leverage the same Netdata experience our community is using
**Pros of using stable releases:**
- - Protect yourself from the rare instance when major bugs slip through our testing and negatively affect a Netdata installation
- - Retain more control over the Netdata version you use
-
+- Protect yourself from the rare instance when major bugs slip through our testing and negatively affect a Netdata installation
+- Retain more control over the Netdata version you use
## Automatic updates
@@ -504,4 +513,4 @@ bash <(curl -Ss https://my-netdata.io/kickstart.sh) --no-updates
With automatic updates disabled, you can choose exactly when and how you [update Netdata](UPDATE.md).
-[![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Finstaller%2FREADME&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)]()
+[![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Finstaller%2FREADME&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)](<>)
diff --git a/packaging/installer/UNINSTALL.md b/packaging/installer/UNINSTALL.md
index 43d03b00..b8e5bd9e 100644
--- a/packaging/installer/UNINSTALL.md
+++ b/packaging/installer/UNINSTALL.md
@@ -1,6 +1,7 @@
-# Uninstalling netdata
+# Uninstalling Netdata
+
+Our self-contained uninstaller is able to remove Netdata installations created with shell installer. It doesn't need any other Netdata repository files to be run. All it needs is an .environment file, which is created during installation (with shell installer) and put in ${NETDATA_USER_CONFIG_DIR}/.environment (by default /etc/netdata/.environment). That file contains some parameters which are passed to our installer and which are needed during uninstallation process. Mainly two parameters are needed:
-Our self-contained uninstaller is able to remove netdata installations created with shell installer. It doesn't need any other netdata repository files to be run. All it needs is an .environment file, which is created during installation (with shell installer) and put in ${NETDATA_USER_CONFIG_DIR}/.environment (by default /etc/netdata/.environment). That file contains some parameters which are passed to our installer and which are needed during uninstallation process. Mainly two parameters are needed:
```
NETDATA_PREFIX
NETDATA_ADDED_TO_GROUPS
@@ -8,20 +9,24 @@ NETDATA_ADDED_TO_GROUPS
A workflow for uninstallation looks like this:
-1. Find your `.environment` file, which is usually `/etc/netdata/.environment` in a default installation.
-2. If you cannot find that file and would like to uninstall netdata, then create new file with following content:
+1. Find your `.environment` file, which is usually `/etc/netdata/.environment` in a default installation.
+2. If you cannot find that file and would like to uninstall Netdata, then create new file with following content:
+
```
NETDATA_PREFIX="<installation prefix>" # put what you used as a parameter to shell installed `--install` flag. Otherwise it should be empty
-NETDATA_ADDED_TO_GROUPS="<additional groups>" # Additional groups for a user running netdata process
+NETDATA_ADDED_TO_GROUPS="<additional groups>" # Additional groups for a user running the Netdata process
```
-3. Run `netdata-uninstaller.sh` as follows
+
+3. Run `netdata-uninstaller.sh` as follows
+
```
${NETDATA_PREFIX}/usr/libexec/netdata/netdata-uninstaller.sh --yes --env <environment_file>
```
Note: Existing installations may still need to download the file if it's not present.
To execute uninstall in that case, run the following commands:
-```
+
+```sh
wget https://raw.githubusercontent.com/netdata/netdata/master/packaging/installer/netdata-uninstaller.sh
chmod +x ./netdata-uninstaller.sh
./netdata-uninstaller.sh --yes --env <environment_file>
@@ -29,6 +34,6 @@ chmod +x ./netdata-uninstaller.sh
The default `environment_file` is `/etc/netdata/.environment`.
-Note: This uninstallation method assumes previous installation with netdata-installer.sh or kickstart script. Currently using it when netdata was installed by a package manager can work or cause unexpected results.
+Note: This uninstallation method assumes previous installation with `netdata-installer.sh` or the kickstart script. Currently using it when Netdata was installed by a package manager can work or cause unexpected results.
-[![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Finstaller%2FUNINSTALL&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)]()
+[![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Finstaller%2FUNINSTALL&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)](<>)
diff --git a/packaging/installer/UPDATE.md b/packaging/installer/UPDATE.md
index 0903ddb5..083d8da3 100644
--- a/packaging/installer/UPDATE.md
+++ b/packaging/installer/UPDATE.md
@@ -1,9 +1,8 @@
-# Updating netdata after its installation
+# Updating Netdata after its installation
![image8](https://cloud.githubusercontent.com/assets/2662304/14253735/536f4580-fa95-11e5-9f7b-99112b31a5d7.gif)
-
-We suggest to keep your netdata updated. We are actively developing it and you should always update to the latest version.
+We suggest to keep your Netdata updated. We are actively developing it and you should always update to the latest version.
The update procedure depends on how you installed it:
@@ -11,7 +10,7 @@ The update procedure depends on how you installed it:
### Manual update to get the latest git commit
-netdata versions older than `v1.12.0-rc2-52` had a `netdata-updater.sh` script in the root directory of the source code, which has now been deprecated. The manual process that works for all versions to get the latest commit in git is to use the `netdata-installer.sh`. The installer preserves your custom configuration and updates the information of the installation in the `.environment` file under the user configuration directory.
+Netdata versions older than `v1.12.0-rc2-52` had a `netdata-updater.sh` script in the root directory of the source code, which has now been deprecated. The manual process that works for all versions to get the latest commit in git is to use the `netdata-installer.sh`. The installer preserves your custom configuration and updates the information of the installation in the `.environment` file under the user configuration directory.
```sh
# go to the git downloaded directory
@@ -20,18 +19,19 @@ cd /path/to/git/downloaded/netdata
# update your local copy
git pull
-# run the netdata installer
+# run the Netdata installer
sudo ./netdata-installer.sh
```
_Netdata will be restarted with the new version._
-Keep in mind, netdata may now have new features, or certain old features may now behave differently. So pay some attention to it after updating.
+Keep in mind, Netdata may now have new features, or certain old features may now behave differently. So pay some attention to it after updating.
### Manual update to get the latest nightly build
The `kickstart.sh` one-liner will do a one-time update to the latest nightly build, if executed as follows:
-```
+
+```sh
bash <(curl -Ss https://my-netdata.io/kickstart.sh) --no-updates
```
@@ -40,16 +40,14 @@ bash <(curl -Ss https://my-netdata.io/kickstart.sh) --no-updates
_Please, consider the risks of running an auto-update. Something can always go wrong. Keep an eye on your installation, and run a manual update if something ever fails._
Calling the `netdata-installer.sh` with the `--auto-update` or `-u` option will create the `netdata-updater` script under
-either `/etc/cron.daily/`, or `/etc/periodic/daily/`. Whenever the `netdata-updater` is executed, it checks if a newer nightly build is available and then handles the download, installation and netdata restart.
-
-Note that after Jan 2019, the `kickstart.sh` one-liner `bash <(curl -Ss https://my-netdata.io/kickstart.sh)` calls the `netdata-installer.sh` with the auto-update option. So if you just run the one-liner without options once, your netdata will be kept auto-updated.
+either `/etc/cron.daily/`, or `/etc/periodic/daily/`. Whenever the `netdata-updater` is executed, it checks if a newer nightly build is available and then handles the download, installation and Netdata restart.
+Note that after Jan 2019, the `kickstart.sh` one-liner `bash <(curl -Ss https://my-netdata.io/kickstart.sh)` calls the `netdata-installer.sh` with the auto-update option. So if you just run the one-liner without options once, your Netdata will be kept auto-updated.
## You downloaded a binary package
If you installed it from a binary package, the best way is to **obtain a newer copy** from the source you got it in the first place. This includes the static binary installation via `kickstart-base64.sh`, which would need to be executed again.
-If a newer version of netdata is not available from the source you got it, we suggest to uninstall the version you have and follow the [installation](README.md) instructions for installing a fresh version of netdata.
-
+If a newer version of Netdata is not available from the source you got it, we suggest to uninstall the version you have and follow the [installation](README.md) instructions for installing a fresh version of Netdata.
-[![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Finstaller%2FUPDATE&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)]()
+[![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Finstaller%2FUPDATE&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)](<>)
diff --git a/packaging/installer/functions.sh b/packaging/installer/functions.sh
index 6f999690..2e304434 100644
--- a/packaging/installer/functions.sh
+++ b/packaging/installer/functions.sh
@@ -380,10 +380,17 @@ install_netdata_service() {
fi
if [ "${SYSTEMD_DIRECTORY}x" != "x" ]; then
+ ENABLE_NETDATA_IF_PREVIOUSLY_ENABLED="run systemctl enable netdata"
+ IS_NETDATA_ENABLED="$(systemctl is-enabled netdata 2> /dev/null || echo "Netdata not there")"
+ if [ "${IS_NETDATA_ENABLED}" == "disabled" ]; then
+ echo >&2 "Netdata was there and disabled, make sure we don't re-enable it ourselves"
+ ENABLE_NETDATA_IF_PREVIOUSLY_ENABLED="true"
+ fi
+
echo >&2 "Installing systemd service..."
run cp system/netdata.service "${SYSTEMD_DIRECTORY}/netdata.service" &&
run systemctl daemon-reload &&
- run systemctl enable netdata &&
+ ${ENABLE_NETDATA_IF_PREVIOUSLY_ENABLED} &&
return 0
else
echo >&2 "no systemd directory; cannot install netdata.service"
diff --git a/packaging/installer/kickstart-static64.sh b/packaging/installer/kickstart-static64.sh
index a9f11238..34ca116d 100755
--- a/packaging/installer/kickstart-static64.sh
+++ b/packaging/installer/kickstart-static64.sh
@@ -189,7 +189,7 @@ done
# ---------------------------------------------------------------------------------------------------------------------
TMPDIR=$(create_tmp_directory)
-cd "${TMPDIR}" || :
+cd "${TMPDIR}"
set_tarball_urls "${RELEASE_CHANNEL}"
progress "Downloading static netdata binary: ${NETDATA_TARBALL_URL}"
@@ -202,12 +202,14 @@ fi
# ---------------------------------------------------------------------------------------------------------------------
progress "Installing netdata"
-
run ${sudo} sh "${TMPDIR}/netdata-latest.gz.run" ${opts} ${inner_opts}
#shellcheck disable=SC2181
if [ $? -eq 0 ]; then
- rm "${TMPDIR}/netdata-latest.gz.run"
+ run ${sudo} rm "${TMPDIR}/netdata-latest.gz.run"
+ if [ ! "${TMPDIR}" = "/" ] && [ -d "${TMPDIR}" ]; then
+ run ${sudo} rm -rf "${TMPDIR}"
+ fi
else
echo >&2 "NOTE: did not remove: ${TMPDIR}/netdata-latest.gz.run"
fi
diff --git a/packaging/installer/kickstart.sh b/packaging/installer/kickstart.sh
index d396f139..bab95fda 100755
--- a/packaging/installer/kickstart.sh
+++ b/packaging/installer/kickstart.sh
@@ -304,7 +304,7 @@ if [ "${INTERACTIVE}" = "0" ]; then
fi
TMPDIR=$(create_tmp_directory)
-cd ${TMPDIR} || :
+cd "${TMPDIR}"
dependencies
@@ -328,7 +328,9 @@ cd netdata-* || fatal "Cannot cd to netdata source tree"
if [ -x netdata-installer.sh ]; then
progress "Installing netdata..."
run ${sudo} ./netdata-installer.sh ${NETDATA_UPDATES} ${NETDATA_INSTALLER_OPTIONS} "${@}" || fatal "netdata-installer.sh exited with error"
- rm -rf "${TMPDIR}" >/dev/null 2>&1
+ if [ -d "${TMPDIR}" ] && [ ! "${TMPDIR}" = "/" ]; then
+ run ${sudo} rm -rf "${TMPDIR}" >/dev/null 2>&1
+ fi
else
fatal "Cannot install netdata from source (the source directory does not include netdata-installer.sh). Leaving all files in ${TMPDIR}"
fi