宝贝第一句完整表达的话

转眼间宝贝一岁半了,几句话备忘一下。。。
1 猫妈妈带小花猫去钓鱼
2 一二一 一二一 (随着节奏原地踏步)
3 拜拜(边挥手…)
4 床铺、沙发、开始爬上爬下(原本需要扶她)
5 懂得自己划开iphone itouch 之类的手机
6 开始能完整的表达自己的意思,要吃东西、要拿什么、
7 等等~ 还很多

Directadmin网页断开连接的解决办法

如果连接http://IP:2222网页经常性的提示“断开连接”或“该页面无法显示”
是由于用户连接数过多造成的,修改Directadmin的配置文件

  1. 修改/usr/local/directadmin/conf/directadmin.conf
  2. numservers=5
  3. 改成numservers=30
  4. 然后重启Directadmin的服务
  5. [root@Localhost ~]# service directadmin restart
  6. [root@Localhost ~]# killall -USR1 directadmin
  7. 然后就可以看到每次Directadmin运行时的错误输出:
  8. [root@Localhost ~]# tail -f /var/log/directadmin/error.log

Varnish删除http header相关信息

varnish删除http header相关信息

  1. sub vcl_deliver {
  2. remove resp.http.X-Varnish;
  3. remove resp.http.Via;
  4. remove resp.http.Age;
  5. remove resp.http.X-Powered-By;
  6. }

未删除前

  1. HTTP/1.1 200 OK
  2.   Server: Apache/2
  3.   X-Powered-By: PHP/5.2.17
  4.   Vary: Accept-Encoding,User-Agent
  5.   Content-Type: text/html; charset=UTF-8
  6.   Date: Thu, 05 Jul 2012 07:56:45 GMT
  7.   X-Varnish: 491720666
  8.   Age: 0
  9.   Via: 1.1 varnish
  10.   Connection: keep-alive
  11. Length: unspecified [text/html]
  12. Remote file exists and could contain further links,
  13. but recursion is disabled -- not retrieving.

删除后

  1. HTTP/1.1 200 OK
  2.   Server: Apache/2
  3.   Vary: Accept-Encoding,User-Agent
  4.   Content-Type: text/html; charset=UTF-8
  5.   Date: Thu, 05 Jul 2012 09:03:28 GMT
  6.   Connection: keep-alive
  7. Length: unspecified [text/html]
  8. Remote file exists and could contain further links,
  9. but recursion is disabled -- not retrieving.

vmware workstation 8 开启嵌套虚拟

在vmware workstation 8里安装虚拟机,在这基础上再虚拟一次,实现多次虚拟。
从性能上这样做没什么意义,但是利用有限的资源来模拟网络拓扑或规划,或者做一些网络测试就很有用了。

  1. 打开某个要开启的嵌套虚拟功能的虚拟机的配置文件,文件名以*.vmx为例
  2. 添加一行
  3. vhv.allow = "TRUE"
  4. 保存退出

未开启前:

  1. [root@xen ~]# perl -ne 'print if /vmx/||/svm/' /proc/cpuinfo
  2. [root@xen ~]#

开启后:

  1. [root@xen ~]# perl -ne 'print if /vmx/||/svm/' /proc/cpuinfo
  2. flags           : fpu tsc msr pae cx8 apic mtrr cmov pat clflush mmx fxsr sse sse2 nx mmxext fxsr_opt 3dnowext 3dnow nonstop_tsc pni popcnt svm abm sse4a misalignsse 3dnowprefetch
  3. flags           : fpu tsc msr pae cx8 apic mtrr cmov pat clflush mmx fxsr sse sse2 nx mmxext fxsr_opt 3dnowext 3dnow up nonstop_tsc pni popcnt svm abm sse4a misalignsse 3dnowprefetch
  4. flags           : fpu tsc msr pae cx8 apic mtrr cmov pat clflush mmx fxsr sse sse2 nx mmxext fxsr_opt 3dnowext 3dnow up nonstop_tsc pni popcnt svm abm sse4a misalignsse 3dnowprefetch
  5. flags           : fpu tsc msr pae cx8 apic mtrr cmov pat clflush mmx fxsr sse sse2 nx mmxext fxsr_opt 3dnowext 3dnow up nonstop_tsc pni popcnt svm abm sse4a misalignsse 3dnowprefetch

测试网页是否开启了gzip或deflate压缩

  1. [root@Nagios ~]# curl -I -H 'Accept-Encoding: gzip,deflate' baiqiuyi.com 2>/dev/null|perl -ne 'print if /gzip/||/deflate/'
  2. Content-Encoding: gzip
2 12»