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
gefragt vor 4 Monaten1361 Aufrufe
2 Antworten
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
beantwortet vor 4 Monaten
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
EXPERTE
Steve_M
beantwortet vor 4 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen