<\/span><\/h2>\n\n\n\nFirst of all, we need to log in to our Debian 12 server through SSH:<\/p>\n\n\n\n
ssh root@IP_Address -p Port_number<\/pre>\n\n\n\nReplace “root” with a user that has sudo privileges or root if necessary. Additionally, replace “IP_Address” and “Port_Number” with your server’s respective IP address and SSH port number. Next, let’s make sure that we’re on Debian 12. You can do that like this:<\/p>\n\n\n\n
# lsb_release -a<\/pre>\n\n\n\nThe command should return an output like this:<\/p>\n\n\n\n
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU\/Linux 12 (bookworm)
Release: 12
Codename: bookworm<\/pre>\n\n\n\nNow that we are signed in and confirmed on Debian 12, let’s start with the installation.<\/p>\n\n\n\n
<\/span>Step 2. Install Dependencies<\/span><\/h2>\n\n\n\nNetdata installation requires some packages. So, before starting, we will install the dependencies on our Debian 12 system. Let’s execute the command below to proceed.<\/p>\n\n\n\n
# apt install dirmngr gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm libassuan0 libksba8 libnpth0 pinentry-curses<\/pre>\n\n\n\n<\/span>Step 3. Install Netdata<\/span><\/h2>\n\n\n\nThere are several ways to install Netdata on a Debian 12 system. We can install it using their native DEB packages through their repository, in a docker container, or use its static binary Linux package. But, in this tutorial, we will show you how to install netdata using the kickstart.sh script. This is the recommended way to install Netdata. To install it this way, simply execute the following command and answer the questions with YES when prompted.<\/p>\n\n\n\n
# wget -O \/tmp\/netdata-kickstart.sh https:\/\/my-netdata.io\/kickstart.sh && sh \/tmp\/netdata-kickstart.sh --stable-channel<\/pre>\n\n\n\nThe option –stable-channel<\/strong> means we are going to install the stable version of netdata. If we do not use this option, the installation script will install the nightly version, which can be unstable or have more bugs.<\/p>\n\n\n\nAt the end of the installation, you should see a successful message as follows:<\/p>\n\n\n\n
Successfully installed the Netdata Agent.\n\nOfficial documentation can be found online at https:\/\/learn.netdata.cloud\/docs\/.\n\nLooking to monitor all of your infrastructure with Netdata? Check out Netdata Cloud at https:\/\/app.netdata.cloud.\n\nJoin our community and connect with us on:\n - GitHub: https:\/\/github.com\/netdata\/netdata\/discussions\n - Discord: https:\/\/discord.gg\/5ygS846fR6\n - Our community forums: https:\/\/community.netdata.cloud\/\n[\/root]# rm -rf \/tmp\/netdata-kickstart-alOGF95w3O \n OK <\/pre>\n\n\n\nOn the Debian system, Netdata will automatically start upon installation, and it’s configured to run after reboot. Let’s check the service’s status.<\/p>\n\n\n\n
# systemctl status netdata<\/pre>\n\n\n\nYou will see an output similar to this:<\/p>\n\n\n\n
\u25cf netdata.service - Real time performance monitoring\n Loaded: loaded (\/lib\/systemd\/system\/netdata.service; enabled; preset: enabled)\n Active: active (running) since Fri 2023-09-15 05:06:31 CDT; 59s ago\n Main PID: 3802 (netdata)\n Tasks: 88 (limit: 2306)\n Memory: 139.9M\n CPU: 6.033s\n CGroup: \/system.slice\/netdata.service\n \u251c\u25003802 \/usr\/sbin\/netdata -D -P \/var\/run\/netdata\/netdata.pid\n \u251c\u25003839 \/usr\/sbin\/netdata --special-spawn-server\n \u251c\u25004154 bash \/usr\/libexec\/netdata\/plugins.d\/tc-qos-helper.sh 1\n \u251c\u25004156 \/usr\/libexec\/netdata\/plugins.d\/nfacct.plugin 1\n \u251c\u25004166 \/usr\/libexec\/netdata\/plugins.d\/ebpf.plugin 1\n \u251c\u25004169 \/usr\/bin\/python3 \/usr\/libexec\/netdata\/plugins.d\/python.d.plugin 1\n \u251c\u25004173 \/usr\/libexec\/netdata\/plugins.d\/systemd-journal.plugin 1\n \u251c\u25004182 \/usr\/libexec\/netdata\/plugins.d\/go.d.plugin 1\n \u251c\u25004189 \/usr\/libexec\/netdata\/plugins.d\/debugfs.plugin 1\n \u2514\u25004199 \/usr\/libexec\/netdata\/plugins.d\/apps.plugin 1\n\nSep 15 05:06:32 debian12.rosehosting.com ebpf.plugin[4166]: set name of thread 4230 to EBPF FD\nSep 15 05:06:32 debian12.rosehosting.com ebpf.plugin[4166]: thread created with task id 4231\nSep 15 05:06:32 debian12.rosehosting.com ebpf.plugin[4166]: set name of thread 4231 to EBPF SOFTIRQ\nSep 15 05:06:32 debian12.rosehosting.com ebpf.plugin[4166]: thread created with task id 4232\nSep 15 05:06:32 debian12.rosehosting.com ebpf.plugin[4166]: set name of thread 4232 to EBPF OOMKILL\nSep 15 05:06:32 debian12.rosehosting.com ebpf.plugin[4166]: thread created with task id 4233\nSep 15 05:06:32 debian12.rosehosting.com ebpf.plugin[4166]: set name of thread 4233 to EBPF SHM\nSep 15 05:06:33 debian12.rosehosting.com apps.plugin[4199]: Using now_boottime_usec() for uptime (dt is 0 ms)\nSep 15 05:06:33 debian12.rosehosting.com debugfs.plugin[4189]: Zswap is disabled\nSep 15 05:06:33 debian12.rosehosting.com debugfs.plugin[4189]: Failed to find powercap zones.<\/pre>\n\n\n\nThat’s it! Netdata is running and you should be able to access it at http:\/\/YOUR_SERVER_IP_ADDRESS:19999<\/p>\n\n\n\n
<\/span>Step 4. Configure Netdata<\/span><\/h2>\n\n\n\nBy default, Netdata is listening on all interfaces on your server. Due to security reasons, it is recommended to configure netdata to listen only on localhost, and you will need to use a reverse proxy to access it. Let’s proceed with this now.<\/p>\n\n\n\n
# nano \/etc\/netdata\/netdata.conf<\/pre>\n\n\n\nAdd this line to the file under the [global] section:<\/p>\n\n\n\n
bind to = 127.0.0.1<\/pre>\n\n\n\nIt should look like this:<\/p>\n\n\n\n
[global]\n run as user = netdata\n\n # default storage size - increase for longer data retention\n page cache size = 32\n dbengine multihost disk space = 256\n bind to = 127.0.0.1<\/code><\/pre>\n\n\n\nSave the file, then exit from the file editor. Then, let’s restart netdata to apply the changes we made.<\/p>\n\n\n\n
# systemctl restart netdata<\/pre>\n\n\n\nNow, Netdata is no longer accessible when you access http:\/\/YOUR_SERVER_IP_ADDRESS:19999<\/p>\n\n\n\n