您的位置:首页 > 运维架构 > Linux

CentOS 下 beanstalkd & supervisord & laravel 后台队列环境安装配置

2015-03-27 17:55 681 查看
http://segmentfault.com/a/1190000000532561

4.2 以前的laravel 不支持 redis 队列。

安装 beanstalkd 和 supervisord:

下载:  http://kr.github.io/beanstalkd/download.html
tar zxvf beanstalkd-1.9.tar.gz
cd beanstalkd-1.9
make
mv beanstalkd /usr/local/bin/

yum -y install python-setuptools
easy_install supervisor

mkdir /etc/supervisor/
mkdir /etc/supervisor/conf.d
echo_supervisord_conf > /etc/supervisor/supervisord.conf


编辑配置文件:
vi /etc/supervisor/supervisord.conf


最后面添加 :
[include]
files = /etc/supervisor/conf.d/*.conf


添加 beanstalkd 服务:
vi etc/supervisor/conf.d/beanstalkd.conf


输入:
[program:beanstalkd]
command = /usr/local/bin/beanstalkd -l 127.0.0.1 -c


添加服务
vi /etc/supervisor/conf.d/queue.conf


输入
[program:queue]
user = nobody
command = /usr/local/php5.4/bin/php /home/www/artisan queue:listen --timeout=180


下载你系统的*nux服务脚本: https://github.com/Supervisor/initscripts

PS:我centos 选了 : redhat-init-mingalevme

修改里面的配置文件路径 改成
/etc/supervisor/supervisord.conf


启动服务:
service supervisord start


查看/管理所有服务的状态:
supervisorctl -c /etc/supervisor/supervisord.conf


done!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: