In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to install supervisor in Linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Supervisor is a set of general process management program developed with Python, which can change an ordinary command line process into background daemon, monitor the process status, and restart automatically when an exception exits.
1, install python,supervisor# apt-get install python supervisor2 Configure supervisor# cat / etc/supervisor/conf.d/mini_breakpad.conf [program:minibreakpad] / / process name directory = / root/error/mini-breakpad-server / / the startup directory of the program command = node lib/app.js / / startup command autostart = true / / also automatically start when supervisord starts startsecs = 5 / / if you do not exit after 5 seconds of startup, you will be deemed to have started autorestart = true / / program. Automatic restart after frequent exit startretries = 5 / failed automatic retries 5 user = root / / with which user to start redirect_stderr = true / / redirect stderr to the stdout default false If it is false, you do not need to set the following log configuration stdout_logfile_maxbytes = 20MB / / stdout log file size. By default, 50MB stdout_logfile_backups = 20 / / number of stdout log file backups / / stdout log file. You need to note that you cannot start normally when the specified directory does not exist, so you need to manually create a directory (supervisord will automatically create log files) stdout_logfile = / root/error/mini-breakpad-server/logs/stdout.log3, and restart supervisor Check status # / etc/init.d/supervisor restart # supervisorctl status minibreakpad RUNNING pid 17655, uptime 2:57:07
Note: if the program running in the background, there are daemons, do not use supervisor, not even with nohup. The following error will be reported
# supervisorctl statusminibreakpad FATAL Exited too quickly (process log may have details)
Thank you for reading! This is the end of the article on "how to install supervisor in Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.