`
zhangcs053
  • 浏览: 32469 次
  • 性别: Icon_minigender_1
  • 来自: 徐州
社区版块
存档分类
最新评论

httpsqs学习笔记

    博客分类:
  • http
阅读更多
在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 显示这个帮助
分享到:
评论
1 楼 hkshadow 2012-12-19  
你这是LINUX下的安装方法吧。

相关推荐

Global site tag (gtag.js) - Google Analytics