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: [email protected]
This is free software, and you are welcome to modify and redistribute it under t
he New BSD License

-l   interface to listen on, default is 0.0.0.0
-p       TCP port number to listen on (default: 1218)
-x      database directory (example: /opt/httpsqs/data)
-t    keep-alive timeout for an http request (default: 60)
-s    the interval to sync updated contents to the disk (default: 5)
-c       the maximum number of non-leaf nodes to be cached (default: 1024)
-m      database memory cache size in MB (default: 100)
-i      save PID in (default: /tmp/httpsqs.pid)
-a      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地址,默认值为 0.0.0.0
-p 监听的TCP端口(默认值:1218)
-x 数据库目录,目录不存在会自动创建(例如:/opt/httpsqs/data)
-t HTTP请求的超时时间(默认值:3)
-s 同步内存缓冲区内容到磁盘的间隔秒数(默认值:5)
-c 内存中缓存的最大非叶子节点数(默认值:1024)
-m 数据库内存缓存大小,单位:MB(默认值:100)
-i 保存进程PID到文件中(默认值:/tmp/httpsqs.pid)
-a 访问HTTPSQS的验证密码(例如:mypass123)
-d 以守护进程运行
-h 显示这个帮助

你可能感兴趣的:(httpsqs)