Home > Backend Development > PHP Tutorial > How to install laravel5.6 and use supervisor under centos7

How to install laravel5.6 and use supervisor under centos7

不言
Release: 2023-04-02 22:42:02
Original
1727 people have browsed it

This article mainly introduces the method of installing and using supervisor in laravel5.6 under centos7. It has a certain reference value. Now I share it with you. Friends in need can refer to it.

centos7 安装supervisor
yum install python-setuptools
easy_install supervisor
cd /etc/
mkdir supervisord.d
echo_supervisord_conf > supervisord.conf
vim /etc/supervisord.conf
#加入以下配置信息
[include]
files = /etc/supervisord.d/*.conf
#创建文件
[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02dcommand=/usr/local/php7.1/bin/php  /home/wwwroot/XXX/artisan queue:work redis --queue=emailautostart=trueautorestart=true
#注意运行的用户,可能会造成用户无权限写入日志,报错,退出进程
user=root
#运行几个进程
numprocs=8redirect_stderr=true
#日志记入地址
stdout_logfile=/home/wwwlogs/laravel-work.log
#关闭
/usr/bin/supervisorctl stop all    
#先关闭supervisor启动脚本,之后再关闭supervisord服务
ps ax | grep supervisor
kill pid
#启动
supervisord -c /etc/supervisord.conf
#查看进程ps ax | grep supervisor
ps ax | grep artisan
Copy after login

The above is this article The entire content, I hope it will be helpful to everyone's study. For more related content, please pay attention to the PHP Chinese website!

Related recommendations:

Detailed steps for data migration and data filling in Laravel

laravel5.6 and thinkphp3. 2. Solution to use redis to share session

The above is the detailed content of How to install laravel5.6 and use supervisor under centos7. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template