阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

在CentOS 6.4中使用HTTPSQS搭建队列服务器

112次阅读
没有评论

共计 1356 个字符,预计需要花费 4 分钟才能阅读完成。

一、安装过程
  1、下载 libevent-2.0.12-stable, 并编译安装
wget http://httpsqs.googlecode.com/files/libevent-2.0.12-stable.tar.gz
tar zxvf libevent-2.0.12-stable.tar.gz
cd libevent-2.0.12-stable/
./configure –prefix=/usr/local/libevent-2.0.12-stable/
make
make install

  2、下载 tokyocabinet-1.4.47.tar.gz, 并编译安装
wget http://httpsqs.googlecode.com/files/tokyocabinet-1.4.47.tar.gz
tar zxvf tokyocabinet-1.4.47.tar.gz
cd tokyocabinet-1.4.47/
./configure –prefix=/usr/local/tokyocabinet-1.4.47/
# 注:在 32 位 Linux 操作系统上编译 Tokyo cabinet,请使用./configure –enable-off64 代替./configure,可以使数据库文件突破 2GB 的限制。
#./configure –enable-off64 –prefix=/usr/local/tokyocabinet-1.4.47/
make
make install

  3、下载 httpsqs-1.7.tar.gz, 并编译安装
wget http://httpsqs.googlecode.com/files/httpsqs-1.7.tar.gz
tar zxvf httpsqs-1.7.tar.gz
cd httpsqs-1.7/
make
make install

二、安装过程中出现的相关问题
  1、编译 httpsqs 时候出现 event.h 文件, 解决方法:
yum install libevent libevent-devel

三、启动 httsqs 服务,并加入到 /etc/rc.local 中:
vim /etc/rc.local

  添加如下内容:
httpsqs -d -p 1218 -x /opt/httpsqs/data

四、测试 (查看是否安装成功)
  在浏览器中执行如下操作:
  http://localhost:1218/?name=test&opt=put&data= 测试        – 向队列中添加一条数据
  http://localhost:1218/?name=test&opt=status                – 查看队列的状态
  http://localhost:1218/?name=test&opt=get                – 从队列中获取一条数据

相关阅读

Fedora 安装 HTTPSQS 所遇各种问题解决汇总 http://www.linuxidc.com/Linux/2011-04/35164.htm

Httpsqs 的安装以及安装过程错误的解决方法 http://www.linuxidc.com/Linux/2011-08/39902.htm

更多 CentOS 相关信息见 CentOS 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=14

正文完
星哥说事-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-20发表,共计1356字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中