Skip to content

Install and configure Redis, Supervisor and Worker for Faveo on Centos 7

Arjunladybird edited this page Jan 24, 2019 · 12 revisions

Introduction

This document will list steps on how to install Redis for faveo.

We will install following dependencies in order to make Redis work:

  • Redis
  • PHP extension for Redis
  • supervisor

Install Redis

sudo yum install redis -y

Install PHP extension

yum install -y php71w-pecl-redis.x86_64

Start Redis

systemctl start redis.service

If you’d like Redis to start on boot, you can enable it with the enable command:

systemctl enable redis

You can check Redis’s status by running the following:

systemctl status redis.service

Once you’ve confirmed that Redis is indeed running, test the setup with this command:

redis-cli ping

This should print PONG as the response. If this is the case, it means you now have Redis running on your server and we can begin configuring it to enhance its security.

Install and Configure Supervisor

yum install -y supervisor

If you’d like Redis to start on boot, you can enable it with the enable command:

systemctl enable supervisord

Start Supervisord

systemctl start supervisord

Copy paste the below content in supervisor configuration.

vi /etc/supervisord.conf

Change the Url according to your faveo configuration.

[program:faveo-Worker]
process_name=%(program_name)s_%(process_num)02d
command=php  /var/www/faveo/faveo-helpdesk/artisan queue:work redis --sleep=3 --tries=3
autostart=true
autorestart=true
numprocs=8
redirect_stderr=true
stdout_logfile=/var/www/faveo/faveo-helpdesk/storage/logs/worker.log

[program:faveo-Recur]
process_name=%(program_name)s_%(process_num)02d
command=php  /var/www/faveo/faveo-helpdesk/artisan queue:work redis --queue=recurring --sleep=3 --tries=3
autostart=true
autorestart=true
numprocs=1
redirect_stderr=true
stdout_logfile=/var/www/faveo/faveo-helpdesk/storage/logs/recur-worker.log

[program:faveo-Reports]
process_name=%(program_name)s_%(process_num)02d
command=php  /var/www/faveo/faveo-helpdesk/artisan queue:work redis --queue=reports --sleep=3 --tries=3
autostart=true
autorestart=true
numprocs=1
user=apache
redirect_stderr=true
stdout_logfile=/var/www/faveo/faveo-helpdesk/storage/logs/reports-worker.log

[program:faveo-Horizon]
process_name=%(program_name)s
command=php /var/www/faveo/faveo-helpdesk/artisan horizon
autostart=true
autorestart=true
user=apache
redirect_stderr=true
stdout_logfile=/var/www/faveo/faveo-helpdesk/storage/logs/horizon-worker.log

Restart the Supervisor to reread configuration

systemctl restart supervisord

sudo supervisorctl reread

sudo supervisorctl update

Start the Worker

start all configured workers

sudo supervisorctl start all

To check the Status use the below command

systemctl status supervisord

Enable Redis in Faveo

After Redis installation is complete, follow these instruction to configure Redis with Faveo. Configuration of Redis with Faveo

Installation and Upgrade Guide

Administrator's Guide

Agent's Guide

Email Integration

Release & Upgrade Notes

Known Issues

Contribute & Feedback

Knowledge Base

Third Party Integration

Plugins

API

Clone this wiki locally