ubuntu安装操作HttpSQS高速队列

HTTPSQS安装

ulimit -SHn 65535

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
cd ../

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/

#这里我遇到个错误configure: error: bzlib.h is required解决方式是升级安装:apt-get install libbz2-dev
make
make install
cd ../

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
cd ../

httpsqs -h 如果有提示说明安装完成

浏览器测试:

加入队列

http://127.0.0.1:1218/?name=xiongwei&opt=put&data=123&auth=mypass123

获取队列

http://127.0.0.1:1218/?name=xiongwei&opt=get&auth=mypass123

参考文档:http://blog.s135.com/httpsqs/

原文地址:https://www.cnblogs.com/xiongwei89/p/2982371.html