httpsqs学习笔记

在windows上安装httpsqs:
httpsqs官方网站:http://code.google.com/p/httpsqs/
参考blog:http://blog.s135.com/httpsqs/
安装tokyocabinet-1.4.47.tar.gz时,提示:
tcutest.c:31: error: conflicting types for ‘iprintf’
\cygwin\usr\include/stdio.h:259: error: previous declaration of ‘iprintf’ was
here
修改iprintf为_iprintf
static void _iprintf(const char *format, ...);
make报错:
tcutest.c:117: error: conflicting types for ‘iprintf’
\cygwin\usr\include/stdio.h:259: error: previous declaration of ‘iprintf’ was
here
修改方法iprintf为_iprintf
/* print formatted information string and flush the buffer */
static void _iprintf(const char *format, ...){
va_list ap;
va_start(ap, format);
vprintf(format, ap);
fflush(stdout);
va_end(ap);
}
需要修改文件:
tcutest.c
tcumttest.c
tcucodec.c
tchtest.c
tchmttest.c
tcbtest.c
tcbmttest.c
tcftest.c
tcfmttest.c
tcttest.c
tctmttest.c
tcatest.c
tcamttest.c
之后安装成功!
安装httpsqs时报错:
install -m 4755 -o root httpsqs /usr/bin
install: invalid user `root'
修改Makefile
install $(INSTALL_FLAGS) -m 4755 -o Administrator httpsqs $(DESTDIR)/usr/bin
httpsqs安装成功!
$ make install
install -m 4755 -o Administrator httpsqs /usr/bin!

输入httpsqs -h
$ httpsqs -h
--------------------------------------------------------------------------------
------------------
HTTP Simple Queue Service - httpsqs v1.7 (April 14, 2011)

Author: Zhang Yan (http://blog.s135.com), E-mail: net@s135.com
This is free software, and you are welcome to modify and redistribute it under t
he New BSD License

-l <ip_addr> interface to listen on, default is 0.0.0.0
-p <num> TCP port number to listen on (default: 1218)
-x <path> database directory (example: /opt/httpsqs/data)
-t <second> keep-alive timeout for an http request (default: 60)
-s <second> the interval to sync updated contents to the disk (default: 5)
-c <num> the maximum number of non-leaf nodes to be cached (default: 1024)
-m <size> database memory cache size in MB (default: 100)
-i <file> save PID in <file> (default: /tmp/httpsqs.pid)
-a <auth> the auth password to access httpsqs (example: mypass123)
-d run as a daemon
-h print this help and exit

Use command "killall httpsqs", "pkill httpsqs" and "kill `cat /tmp/httpsqs.pid`"
to stop httpsqs.
Please note that don't use the command "pkill -9 httpsqs" and "kill -9 PID of ht
tpsqs"!

Please visit "http://code.google.com/p/httpsqs" for more help information.

--------------------------------------------------------------------------------
------------------
-l <ip_addr> 监听的IP地址,默认值为 0.0.0.0
-p <num> 监听的TCP端口(默认值:1218)
-x <path> 数据库目录,目录不存在会自动创建(例如:/opt/httpsqs/data)
-t <second> HTTP请求的超时时间(默认值:3)
-s <second> 同步内存缓冲区内容到磁盘的间隔秒数(默认值:5)
-c <num> 内存中缓存的最大非叶子节点数(默认值:1024)
-m <size> 数据库内存缓存大小,单位:MB(默认值:100)
-i <file> 保存进程PID到文件中(默认值:/tmp/httpsqs.pid)
-a <auth> 访问HTTPSQS的验证密码(例如:mypass123)
-d 以守护进程运行
-h 显示这个帮助
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值