1.安装libevent-2.0.12-stable.tar.gz
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 ../
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
cd ../
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
cd ../
4. 设置启动脚本
vi httpsqs.sh
内容如下:
#! /bin/sh
ulimit -SHn 65535
#带密码
# /usr/bin/httpsqs -d -p 1218 -t 10 -c 20000 -m 512 -x /usr/local/httpsqs_queue -a pwd123
# 无密码
/usr/bin/httpsqs -d -p 1218 -t 10 -c 20000 -m 512 -x /usr/local/httpsqs_queue
# 干掉的方法
# killall httpsqs
5. 安装php扩展
wget http://php-httpsqs-client.googlecode.com/files/php_httpsqs_client_0.2.1.tar.gz
tar vzxf php_httpsqs_client_0.2.1.tar.gz
/opt/local/php/bin/phpize
./configure --enable-httpsqs --with-php-config=/opt/local/php/bin/php-config
make && make install
vi php.ini 添加extension = "httpsqs.so"