#!/bin/bash
sudo aptitude install python-software-properties
sudo add-apt-repository ppa:gearman-developers/ppa
sudo aptitude update
sudo aptitude install libevent-dev gearman libgearman2 libgearman-dev libdrizzle0
echo 'CREATE DATABASE gearman' > /tmp/temp.sql ; mysql -u root -p`cat /data/save/mysql_root` < /tmp/temp.sql ; rm -f /tmp/temp.sql
sudo sed -i 's#$PARAMS#--queue-type=libdrizzle --libdrizzle-host=127.0.0.1 --libdrizzle-user=root --libdrizzle-password=xxxxxx --libdrizzle-db=gearman --libdrizzle-table=gearman_queue --libdrizzle-mysql#g' /etc/init.d/gearman-job-server
sudo service gearman-job-server stop
sudo service gearman-job-server start
sudo aptitude install php5-dev php-pear
sudo pecl install channel://pecl.php.net/gearman-0.7.0
sudo vi /etc/php5/cli/php.ini
[gearman]
extension=gearman.so
阅读(1188) | 评论(0) | 转发(1) |