安装gearmand小计

系统:centos 6.4 (32bit)+nginx+php5.5


#install check
yum -y install yum-fastestmirror
yum -y install patch make gcc gcc-c++ gcc-g77
yum -y install libevent libevent-devel
yum -y install boost-devel uuidd

wget -c https://launchpad.net/gearmand/1.2/1.1.6/+download/gearmand-1.1.6.tar.gz
tar zxvf gearmand-1.1.6.tar.gz
cd gearmand-1.1.6
./configure
make
#编译的时候可能会出现错误,主要是由于源码中的for循环变量定义和初始化写在了里面,gcc是98的编译模式
#所以需要修改源文件(function.c&poll.c)的两处for循环,然后继续 
make install

cd ..

#install php extension
wget -c  http://pecl.php.net/get/gearman-1.1.1.tgz
tar zxvf gearman-1.1.1.tgz
cd gearman-1.1.1
phpize
#这里可能会出错 因为之前装php的时候修改过 REMI repo
#
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
#现在需要改回来:
# wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
# rpm -Uvh remi-release-6.rpm
# vim /etc/yum.repos.d/remi.repo
#
-> enabled=1
#执行yum --enablerepo=remi install php-devel
# php-devel安装成功
 ./configure make make install cd ../ #edit php.ini #extension = gearman.so #start server /usr/local/sbin/gearmand


你可能感兴趣的:(安装gearmand小计)