putty ssh连debian,都只有8色,看到putty有xterm 256色选项,告诉我debian因该有可以支持256的方法。
#tput colors
8
1、安装ncurse-term
apt-get install ncurses-term
2、更改环境TERM
export TERM=xterm-256color
# tput colors
256
修改putty window->colours->Allow terminal to use 256-color mode.
成功!
就在1小时前,不小心删除了linux的一个文件夹,里面有5个php文件。网上google下。
Q: How can I recover (undelete) deleted files from my ext3 partition?
Actually, you can’t! This is what one of the developers, Andreas Dilger, said about it:In order to ensure that ext3 can safely resume an unlink after a crash, it actually zeros out the block pointers in the inode, whereas
ext2 just marks these blocks as unused in the block bitmaps and marks the inode as “deleted” and leaves the block pointers alone.
Your only hope is to “grep” for parts of your files that have been deleted and hope for the best. (出自 http://batleth.sapienti-sat.org/projects/FAQs/ext3-faq.html )
开发人员都这么说了,一时找不到北。突然灵感一现,若我直接从硬盘中搜索再复制,文件不多只有5个,且都是文本文件,可能有用。我立刻从网上下了个winhex,winhex是我用到现在最好的hex文件编辑器,看了看那个硬盘文件debian.vdi,不大只有3.9G。
我想,这几个文件都是这两天新建的,那么逆向搜索应该更有效。于是回忆每个文件中的几个函数名function xxx( 逆向搜,发现了不少残本。也不管新旧,都复制过来。就这么不一会,5个文件都原原本本的找了回来。
真是有惊无险。
一模一样的Debian环境与配置Rails production hello world controller测试结果为
VMware: 169 reqs /s
VirtualBox: 140 reqs /s
VirtualBox比VMware慢20%
VirtualBox开启VT-x/AMD-V后,性能提升为 163 reqs /s,但不清楚会不会对稳定性有影响,先不开用一段时间,确认非常稳定后再尝试开启吧。
但VirtualBox比我的VMware冒似稳定很多,至少没有VMware的时间不稳定问题。
测试用,这速度足够了,稳定大于一切嘛。
—2009-02-10 补充—
VirtualBox非常稳定 ,到目前为止没出现过一次问题。
但尝试开启VT-x/AMD-V系统进不去,不过现在的状态足矣。
最近VMWARE变得不稳定,莫名的失去响应,拌随的症状是时钟走得飞快。不得其解,于是打算试试其它的虚拟机。
在wikipedia上面对琳琅满目的虚拟机,最后计划的替代产品为Virtual PC与Virtual Box,一个是Microsoft出的,一个是Sun出的,都是小母牛到北极的公司(牛X到极点)
先试了Virtual PC,不清楚咋搞的,连debian的mini.iso的安装画面都进不去。于是又下了Virtual Box,Sun果然牛,Virtual Box设计也很人性化,功能看似也很强大。现在正在通过网络安装debian,没有任何问题。希望在未来的使用过程中也能让用户满意,让群众放心。
打算抛弃一起走过数年的apache2,选择更快的服务器,在lighttpd和nginx中犹豫了满久,两者速度不分伯仲,最终还是选择了单词比较短的nginx,- -很离谱的选择方式。
nginx静态文件比apache2快很多,但fastcgi比不上apache2内置模块快。因为多了个反向代理过程,现在可能看不出优势,但日后一定会感觉到,因为很容易实现负载均衡。
最近评论