Installing supervisord on amazon linux 2023 on EC2

0

I have a script that runs continuously 24h on an EC2 instance. In a case of server breakdown or restart , i want that script to be restarted automatically. So im considering using tmux and supervisord . I could install tmux but when i try to install sudo yum install supervisor , get this error .

No match for argument: supervisor
Error: Unable to find a match: supervisor

Is supervisord not available in the default Amazon Linux 2023 repositories? That supervisord has a feature which can restart the script in a system restart/reboot. If it is not possible to install supervisord , what are the other alternatives to achieve this ?

TIA

bessei
asked 3 months ago1208 views
2 Answers
0

Hi bessei,

More generic approach to Linux no matter what kind of distro you are using

The best option is to make systemd service and threat this process as service with checking that is alive and restart if needed

https://linuxhandbook.com/create-systemd-services/

Another option could be use cron and execute command at boot

https://phoenixnap.com/kb/crontab-reboot

Thanks,

profile picture
answered 3 months ago
0

Is supervisord not available in the default Amazon Linux 2023 repositories?

That's correct, this page lists all the packages in AL2023, and supervisord isn't one of them https://docs.aws.amazon.com/linux/al2023/release-notes/all-packages-AL2023.3.html

Other installation options, such as using pip, are discussed here http://supervisord.org/installing.html

profile picture
EXPERT
Steve_M
answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions