• linux下支持https的压力测试工具

    测试了linux下的几种压力测试工具,发现有些不支持https,先简单总结如下: 一、apache的ab工具 /home/webadm/bin/ab -c 50 -n 10000 https://2hei.net/mt/index.htmlSSL not compiled in; no https support看样子是说SSL没有编译进来,所以不支持https 二、apache的flood工具 http://httpd.apache.org/test/flood/ wge ...

    阅读全文
    作者:2hei | 分类:linux, OpenSource | 阅读:20,902 views | 标签:, , ,
  • nginx authentication

    今天配置nginx的basic authentication折腾了好半天,开始error_log一直报错:no user/password was provided for basic authentication 我是按照nginx的wiki配置的:location  /  {  auth_basic            “Restricted”;  au ...

    阅读全文
    作者:2hei | 分类:OpenSource | 阅读:4,344 views | 标签:
    nginx authentication已关闭评论
  • [notice] child pid 19818 exit signal Bus error (7)

    apache logs:[Thu Dec 31 12:27:41 2009] [notice] child pid 19818 exit signal Bus error (7) The first error “Bus Error” is caused by someones (possibly CGI) program crashing. A bus error happens when someone wrote a C program for Intel and re-compiled it for another processor like PPC ...

    阅读全文
    作者:2hei | 分类:OpenSource | 阅读:8,169 views | 标签:
  • 使用apache的mod_rewrite模块进行端口重写且保留特殊接口

    需求如下:网站的apache开通80和443端口,整站强制使用https,把所有80端口的访问转到443,新增需求为要针对某个接口单独开放80端口(80、443均可访问),剩下其他接口保持原有规则。 配置一、RewriteRule !^/TestServlet http://%{SERVER_NAME}/$1 [L,R=301] 是有问题的,$1并没取得匹配的部分。 根据apache文档,使用 ...

    阅读全文
    作者:2hei | 分类:OpenSource | 阅读:4,281 views
    使用apache的mod_rewrite模块进行端口重写且保留特殊接口已关闭评论
  • 8.8.8.8-google-public-dns-for-free

    http://code.google.com/speed/public-dns/index.html What is Google Public DNS? Google Public DNS is a free, global Domain Name System (DNS) resolution service, that you can use as an alternative to your current DNS provider. To try it out:     * Configure your network settings to u ...

    阅读全文
    作者:2hei | 分类:OpenSource | 阅读:3,247 views | 标签:
    8.8.8.8-google-public-dns-for-free已关闭评论
  • nagios check_http 处理返回码302的情况

    nagios check_http 处理返回码302的情况 使用nagios监控中发现这样一个问题,nagios的check_http对http返回码302的处理比较特殊,如果参数不当的话会影响监控的效果哦! 实际情况如下:在web服务器配置的errpage页面指定了503跳转,如apache+resin的组合,如果apache找不到resin会返回503,捕获的页面会跳转到指定的页 ...

    阅读全文
    作者:2hei | 分类:others | 阅读:3,795 views
    nagios check_http 处理返回码302的情况已关闭评论
  • xenconsole: Could not read tty from store: No such file or directory

    #xem在配置heartbeat时遇到的一个问题,重启虚拟机出现了问题,系统无法启动,控制台也无法登陆。xm console xm-2hei.netxenconsole: Could not read tty from store: No such file or directory 原来是xenconsoled进程不在了,重启即可#/usr/sbin/xenconsoled 另外一个xen的小tip是,“]”键可以方便的从控制台退出来, ...

    阅读全文
    作者:2hei | 分类:OpenSource | 阅读:3,397 views
    xenconsole: Could not read tty from store: No such file or directory已关闭评论
  • Read-only file system on CentOS5

    We have 5 Dell server collocated running CentOS 4.x and 5.x server operating system. Sometime my file system (ext3) goes read-only. I’d like to know what could be causing such a problem? CentOS 5.x Read-only file system form http://www.cyberciti.biz/tips/linux-filesytem-goes-read-only.html:a) H ...

    阅读全文
    作者:2hei | 分类:OpenSource | 阅读:3,258 views
    Read-only file system on CentOS5已关闭评论
  • mptscsih: ioc0: attempting task abort

    Nov 19 00:03:14 2hei.net kernel: mptscsih: ioc0: attempting task abort! (sc=ffff81004f0c7380)Nov 19 00:03:14 2hei.net kernel: sd 0:0:0:0:Nov 19 00:03:14 2hei.net kernel: command: Read(10): 28 00 00 26 15 d7 00 00 48 00Nov 19 00:03:14 2hei.net kernel: mptbase: ioc0: LogInfo(0x31140000): O ...

    阅读全文
    作者:2hei | 分类:OpenSource | 阅读:6,079 views
    mptscsih: ioc0: attempting task abort已关闭评论
  • linux下用python实现文本menu

    linux用shell实现menu比较简单,今天用python实现了一个,因为python没有switch语法,所以使用了dict来替代,另外调用了linux的clear来清屏,本例只是说明一下简单的实现方法,菜单的命令或者语句可以自由发挥 呵呵。 截个图先: 具体代码如下:#!/usr/bin/evn python# -*- coding: utf-8 -*-#Author: 2hei#2hei.net#Da ...

    阅读全文
    作者:2hei | 分类:OpenSource, python | 阅读:4,631 views | 标签:
    linux下用python实现文本menu已关闭评论
  • python 访问带有web认证的页面

    python 访问带有web认证的页面,经测试方法一可用! #!/usr/bin/env python# -*- coding: utf-8 -*- #方法一#————————————————————–def request_auth_http(url, User = None, Pass = ...

    阅读全文
    作者:2hei | 分类:OpenSource | 阅读:3,994 views | 标签:
    python 访问带有web认证的页面已关闭评论
  • wget访问带认证的web页面

    同样的wget语句在不通的机器上居然执行效果不一样,原因是wget版本的问题: wget –help | headGNU Wget 1.9+cvs-stable (Red Hat modified), a non-interactive network retriever.Usage: wget [OPTION]… [URL]… /usr/bin/wget -O /tmp/2hei.txt –http-user=username –http-passwd=12345 ...

    阅读全文
    作者:2hei | 分类:OpenSource | 阅读:5,726 views | 标签:
    wget访问带认证的web页面已关闭评论
  • ImportError: No module named xen.xm

    xen的其中一个虚拟机无法使用,重启xen后发现无法启动。

    最后发现原因是升级了python版本所致,升级到了2.6.2:

    之前的版本是:python -V
    2.4.3

    降回到原来的python版本,重试OK!

    阅读全文
    作者:2hei | 分类:OpenSource, python | 阅读:3,868 views | 标签:
    ImportError: No module named xen.xm已关闭评论
  • python use BeautifulSoup crawl weather forecast

    python 使用BeautifulSoup(美汤)来抓取天气预报,简单的例子,只当练手 #!/usr/bin/env python# -*- coding: gb2312 -*- #get weather info from internet#http://weather.china.com.cn/city/54511_full.html import urllib,re,unicodedata,string,sys,refrom BeautifulSoup import * if __name__==”__main__&# ...

    阅读全文
    作者:2hei | 分类:OpenSource, python | 阅读:3,038 views | 标签:,
    python use BeautifulSoup crawl weather forecast已关闭评论
  • PYTHON_EGG_CACHE

    在使用python写的cgi是遇到如下问题Can’t extract file(s) to egg cache The following error occurred while trying to extract file(s) to the Python egg cache: [Errno 20] Not a directory: ‘/dev/null/.python-eggs’ The Python egg cache directory is currently set to: /dev/null/.python-e ...

    阅读全文
    作者:2hei | 分类:python | 阅读:5,260 views | 标签:
    PYTHON_EGG_CACHE已关闭评论
  • oracle不同版本对jdbc3.0的支持情况

    Which JDBC drivers support which versions of JDBC?Oracle 9.0.1 supports:    * JDBC 2.0 Extensions except for: using both global and local transactions on the same connection. Oracle 9.2.0 supports:    * Partial support for JDBC 3.0: transaction savepoints   ...

    阅读全文
    作者:2hei | 分类:database | 阅读:4,255 views | 标签:
    oracle不同版本对jdbc3.0的支持情况已关闭评论
  • nginx+Django+memchached环境搭建备忘

    系统环境Kernal:Linux 2.6.9-78nginx-0.7.61pcre-7.9Python version: 2.5.4Django-1.1-py2.5mysql-5.0.84flup-1.0.2-py2.5MySQL_python-1.2.3c1-py2.5-linux-i686python_memcached-1.44-py2.5setuptools-0.6c9-py2.5 1、nginx、python、mysql的安装可参考官方及网上的安装文档 2、安装django  http://www.djangopr ...

    阅读全文
    作者:2hei | 分类:others | 阅读:5,279 views | 标签:,
    nginx+Django+memchached环境搭建备忘已关闭评论
  • nginx 的debug模式

    编译的时候添加: –with-debug  nginx.conf中的配置: error_log  logs/error.log debug; #master_process  off;daemon          off;daemon off;             说明:master_proces ...

    阅读全文
    作者:2hei | 分类:OpenSource | 阅读:6,829 views | 标签:
    nginx 的debug模式已关闭评论
  • Your intltool is too old. You need intltool 0.35.0 or later

    编译rrdtool时,提示这样的错误:checking for intltool >= 0.35.0… 0.31.2 foundconfigure: error: Your intltool is too old.  You need intltool 0.35.0 or later. 解决办法如下:wget http://ftp.gnome.org/pub/gnome/sources/intltool/0.40/intltool-0.40.6.tar.gztar zxvf intltool-0.40.6.tar.gzc ...

    阅读全文
    作者:2hei | 分类:OpenSource | 阅读:5,636 views | 标签:
    Your intltool is too old. You need intltool 0.35.0 or later已关闭评论