在CentOS5.8下安装RabbitServer和PHP的amp扩展

 由于网站优化改版,对部分功能使用Rabbit消息队列进行处理。现在将Rabbit Server和PHP amp扩展的安装和配置分享一下:

 
1 安装 epel
# wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
# rpm -ivh epel-release-5-4.noarch.rpm
 
2 开启 Erlang 资源库
# wget -O /etc/yum.repos.d/epel-erlang.repo http://repos.fedorapeople.org/repos/peter/erlang/epel-erlang.repo
 
3 安装 erlang
# yum install erlang
 
4 安装 rabbitmq-server
# wget http://www.rabbitmq.com/releases/rabbitmq-server/v2.8.4/rabbitmq-server-2.8.4-1.noarch.rpm
# rpm --import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
# yum install rabbitmq-server-2.8.4-1.noarch.rpm
 
# chkconfig rabbitmq-server on
# service rabbitmq-server start
 
5 安装 simplejson
# yum -y install python-simplejson
 
6 安装 rabbitmq-c
# wget http://hg.rabbitmq.com/rabbitmq-c/archive/489ef9c2ebe1.tar.gz
# tar zxvf 489ef9c2ebe1.tar.gz
 
# wget http://hg.rabbitmq.com/rabbitmq-codegen/archive/6681f5bd40f7.tar.gz
# tar zxvf 6681f5bd40f7.tar.gz
 
# mv rabbitmq-codegen-6681f5bd40f7 rabbitmq-c-489ef9c2ebe1/codegen
# cd rabbitmq-c-489ef9c2ebe1
 
# autoreconf -i && ./configure && make && sudo make install
 
7 安装 amqp
# cd ..
# wget http://pecl.php.net/get/amqp-1.0.3.tgz
# tar zxvf amqp-1.0.3.tgz
# cd amqp-1.0.3
 
# /usr/local/php/bin/phpize 
# ./configure --with-php-config=/usr/local/php/bin/php-config --with-amqp
# make && make install
 
# vi /usr/local/php/etc/php.ini
添加 extension=amqp.so
 

你可能感兴趣的:(rabbitmq,centos,消息队列)