Fast installation in CentOS 7 for this "helper" to the queues service in laravel or django framework. EPEL package too old so:
- yum install python-setuptools python-pip
- pip install supervisor
- mkdir -p /etc/supervisord
- echo_supervisord_conf > /etc/supervisor.d/supervisord.conf
- forked systemd init script (thx to Jiangge Zhang) in /usr/lib/systemd/system/supervisord.service:
And:
- systemctl enable supervisord
- systemctl start supervisord
User=nginx is useful to run this process as nginx user. You can change it but the user must be in the system.
User=nginx seems like a typo
ReplyDeleteMaybe you ment User=root or smth
Hey Janno,
DeleteAt the end of the post you can read:
User=nginx is useful to run this process as nginx user. You can change it but the user must be in the system.
In my case, supervisord is controlling laravel jobs, laravel is running with nginx, nginx is running as nginx user.
So, there is not any type here.
thx for writing.
typo* sorry.
Deleteyou have another typo:
ReplyDeleteyou write the config in /etc/supervisor.d, but the init script reference /etc/supervisord (without the dot)
Really useful example, thanks!
OP
Where do you store the configuration files for services to be managed by Supervisor, in this context?
ReplyDeleteI followed the same procedure but I am getting below issue:
ReplyDeleteFailed at step EXEC spawning /usr/bin/supervisord: Permission denied
To use Supervisord in CentOS 7 with systemd, Host Bet install it (yum install -y supervisor), enable it (systemctl enable supervisord), and start it (systemctl start supervisord).
ReplyDelete