How to install and configure daemon for supervisor on Linux Debian 11
To Install And Configure Daemon For Supervisor On Linux Debian 11.3
Introduction:
Supervisor is a client/server system that allows its users to monitor and control a number of processes on UNIX-like operating systems. It shares some of the same goals of programs like launchd, daemon tools, and runit.
Installation Procedure:
Step 1: Check the current OS version by using the below command
root@linuxhelp:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
Step 2: Install the python dependency packages by using the below command
root@linuxhelp:~# apt install python-setuptools
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libpython2-stdlib libpython2.7-minimal libpython2.7-stdlib python-pkg-resources python2 python2-minimal
python2.7 python2.7-minimal
Suggested packages:
python-setuptools-doc python2-doc python-tk python2.7-doc binfmt-support
The following NEW packages will be installed:
libpython2-stdlib libpython2.7-minimal libpython2.7-stdlib python-pkg-resources python-setuptools python2
python2-minimal python2.7 python2.7-minimal
0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
Need to get 4,275 kB of archives.
Step 3: Install the supervisor package by using the below command
root@linuxhelp:~# apt install supervisor
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
supervisor-doc
The following NEW packages will be installed:
supervisor
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 281 kB of archives.
After this operation, 1,682 kB of additional disk space will be used.
Get:1 http://archive.Debian.com/Debian focal/universe amd64 supervisor all 4.1.0-1debian1 [281 kB]
Fetched 281 kB in 1s (247 kB/s)
Selecting previously unselected package supervisor.
(Reading database ... 314162 files and directories currently installed.)
Preparing to unpack .../supervisor_4.1.0-1debian1_all.deb ...
Step 4: Check the version of supervisor by running the below command
root@linuxhelp:~# supervisord -version
4.1.0
Step 5: Configure the Supervisor by using the below command
root@linuxhelp:~# echo_supervisord_conf > /etc/supervisor/supervisord.conf
Step 6: Configure the daemon service by using the below command
root@linuxhelp:~# nano /usr/lib/systemd/system/supervisor.service
Step 7: Reload the daemons service by running the below command
root@linuxhelp:~# systemctl daemon-reload
Step 8: Enable the supervisor by using the below command
root@linuxhelp:~# systemctl enable supervisor
Synchronizing state of supervisor.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable supervisor
Step 9: Start the Supervisor service by using the below command
root@linuxhelp:~# systemctl start supervisor.service
Step 10: Finally check the status of the service by using the below command
root@linuxhelp:~# systemctl status supervisor.service
â— supervisor.service - Supervisor process control system for UNIX
Loaded: loaded (/lib/systemd/system/supervisor.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2022-04-02 05:16:04 IST; 3min 17s ago
Docs: http://supervisord.org
Main PID: 54984 (supervisord)
Tasks: 1 (limit: 4579)
Memory: 17.9M
CGroup: /system.slice/supervisor.service
└─54984 /usr/bin/python3 /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf
Conclusion:
We have reached the end of this article. In this guide, we have walked you through the steps required to Install and configure daemon for supervisor on Linux Debian 11.3. Your feedback is much welcome.