How to install and Configure Daemon for Supervisor on Linux mint 20
To Install and configure daemon for supervisor on Linux mint 20.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: Linuxmint
Description: Linux Mint 20.3
Release: 20.3
Codename: una
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.
After this operation, 18.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 libpython2.7-minimal amd64 2.7.18-1~20.04.1 [335 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 python2.7-minimal amd64 2.7.18-1~20.04.1 [1,285 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal/universe amd64 python2-minimal amd64 2.7.17-2ubuntu4 [27.5 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 libpython2.7-stdlib amd64 2.7.18-1~20.04.1 [1,887 kB]
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for desktop-file-utils (0.24+linuxmint1) ...
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.ubuntu.com/ubuntu focal/universe amd64 supervisor all 4.1.0-1ubuntu1 [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-1ubuntu1_all.deb ...
Unpacking supervisor (4.1.0-1ubuntu1) ...
Setting up supervisor (4.1.0-1ubuntu1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/supervisor.service → /lib/systemd/system/supervisor
.service.
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for systemd (245.4-4ubuntu3.15) ...
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
Apr 02 05:16:04 linuxhelp systemd[1]: Started Supervisor process control system for UNIX.
Apr 02 05:16:04 linuxhelp supervisord[54984]: 2022-04-02 05:16:04,789 CRIT Supervisor is running as root. Pri>
Apr 02 05:16:04 linuxhelp supervisord[54984]: 2022-04-02 05:16:04,790 WARN No file matches via include "/etc/s>
Apr 02 05:16:04 linuxhelp supervisord[54984]: 2022-04-02 05:16:04,796 INFO RPC interface 'supervisor' initiali>
Apr 02 05:16:04 linuxhelp supervisord[54984]: 2022-04-02 05:16:04,796 CRIT Server 'unix_http_server' running w>
Apr 02 05:16:04 linuxhelp supervisord[54984]: 2022-04-02 05:16:04,797 INFO supervisord started with pid 54984
With this the process of installing and configuring daemon for supervisor on Linux mint 20.3 has come to an end.