-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall-supervisord.txt
49 lines (42 loc) · 1.56 KB
/
install-supervisord.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
## Install gearmand
source /opt/rh/php54/enable
yum install gearmand libgearman-devel
pecl install gearman
echo 'extension=gearman.so' > /opt/rh/php54/root/etc/php.d/gearman.ini
chkconfig gearmand on
## setup gearmand to use MYSQL
CREATE TABLE gearman_queue ( unique_key VARCHAR(64),
function_name VARCHAR(255),
priority INT,
data LONGBLOB,
when_to_run BIGINT,
unique key (unique_key, function_name));
Edit /etc/sysconfig/gearmand and add the following OPTIONS
OPTIONS="--listen=localhost -q MySQL --mysql-host=localhost --mysql-port=3306 --mysql-user=gearman --mysql-password=baabaa --mysql-db=gearman --mysql-table=gearman_queue"
## Install supervisord
yum install python-setuptools
easy_install supervisor
echo_supervisord_conf > /etc/supervisord.conf
## Setup VuFind gearman worker
Appending the following to /etc/supervisor.conf
[program:vufind_gearman_worker]
command=/opt/rh/php54/root/usr/bin/php /usr/local/vufind/util/gearman_worker.php
autostart=true
autorestart=true
stopsignal=KILL
user=apache
log_stdout=true
log_stderr=true
logfile=/usr/local/vufind/log/gearman-worker.log
numprocs=10
process_name = %(program_name)s_%(process_num)02d
## Setup init.d script for supervisord
cp supervisord /etc/init.d/
chkconfig supervisord on
To setup logrotate, add the following /etc/logrotate.d/supervisor
/var/log/supervisor/*.log {
missingok
weekly
notifempty
nocompress
}