Archives for posts tagged ‘tip’

A simple buildbot buildsavle for STAF/STAX

In order to integrate STAF with buildbot, you need a function that parses the result. One odd thing is it doesn’t matter how many test cases fail in a STAX task, it always shows “NORMAL” in STAF result as long as the syntax is okay. So the failed test case number is only thing that [...]

Vmware 6.5在Ubuntu 10.04上不能运行的处理

升级到ubuntu 10.04后发现Vmware自动编译内核编译不了了,总会出现错误。用vmware-mod-config编译会发现: # vmware-modconfig –console –install-all … … … make: *** /tmp/vmware-root/modules/vmnet-only: No such file or directory. Stop Unable to install vmnet # 主要是Vmware6.5缺少vmware7的一个patch的缘故,网上有牛人提出了解决方法。把下面的命令贴到你的终端里,对了,贴前别忘了sudo -s。 tar xvf /usr/lib/vmware/modules/source/vmnet.tar -C /tmp tar xvf /usr/lib/vmware/modules/source/vmci.tar -C /tmp 然后到/tmp目录里找到刚刚解压的代码, 在vmnet-only/vnetUserListener.c文件里加入: #include “compat_sched.h” 在vmci-only/include/pgtbl.h文件理加入: #include “compat_sched.h” 或者用一下命令 perl -pi -e ‘s,(“vnetInt.h”),\1\n#include “compat_sched.h”,’ /tmp/tmp/vmnet-only/vnetUserListener.c perl -pi -e ‘s,(“compat_page.h”),\1\n#include “compat_sched.h”,’ /tmp/tmp/vmci-only/include/pgtbl.h [...]

给Squid添加密码验证

在Linux上配置代理服务squid也不止一次两次了,每次查文献怪麻烦的,在这里记录一下。 安装基本squid服务我就不说了,网上多得是。要加密码验证的话需要一个包,我安装Apache 2以后系统里就会有了。 建立一个新密码文件,然后确认一下它的属性。 touch /etc/squid/squid_passwd chmod o+r /etc/squid/squid_passwd 然后建立一个新用户 sudo htpasswd /etc/squid/squid_passwd test 然后在/etc/squid.conf下加入: auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squid_passwd 在acl那堆配置里最后一行加入 acl ncsa_users proxy_auth REQUIRED 在http_access那堆里最上一行加入 http_access allow ncsa_users