寻觅生命中的那一片浅草......

xenserver license

1.使用XenCenter工具,连接至Server,Tool–>License Manager–>选择要更新License的服务器,点击Activate….按钮.如果,此服务器可以直接连接到外网,将可以直接获取LIC文件安装,如果不能连接至外网,将会出现更新失败提示,并提示保存申请License文件.选择将申请文件保存.
2.访问:https://activate.vmd.citrix.com, upload申请文件.
3.填写相关信息,主要是MAIL地址,用来接收License 文件.提交.
4.打开邮箱下载License文件.
5.使用Winscp工具将License文件复制到XenServer的/etc/xensource/下,并重新命名为license.
6.重新启动XenServer.
7.License更新完成,可以正常使用.

关于Citrix公司的XenServer免费使用,个人理解,虽然为免费版本,但为了方便管理, 以及获取用户的相关信息,Citrix采用了Free License管理的模式,在到期后,用户只需要再次重复申请新的License文件并进行License安装即可.不会影响XenServer的正常使 用.但是,Citrix公司并未发表声明永久性提供免费使用,至少我没有找到.特别在正式的生产环境,还是建议大家购买正式的服务,以提供更高的性能以及安全的合法的保障.

转载自:http://hi.baidu.com/ts%B4%F3%D1%BC%C0%E6/blog/item/c58976fb885250809f514653%2Ehtml

vi快捷键

h 左
j 下
k 上
l 右
w 词首
e 词末
$ 行末
^ 行首
) 将光标移到下一句句首
( 将光标移到上一句句首
} 将光标移到下一段开始处
{ 将光标移到下一段开始处
M 光标移至屏幕中间行
z. 将光标所在行移至屏幕中部
[[ 条到文件头(gg)
]] 跳到文件尾(G)
:n 跳到第n行(nG)
ctrl+g 显示光标所在信息
Ctrl+u 向上滚动半屏
Ctrl+d 向下滚动半屏
Ctrl+f 向前翻一页
Ctrl+b 向后翻一页

x 删除字符
i 光标前插入
a 光标后插入
A 行末插入
R 替换内容
r 替换所选字符
d 删除
c 修改
dd 删除整行
2dd 删除2整行
u 撤消
U 撤消整行
ctrl+r 重做
p 粘贴最后删除的内容
yw 把光标所在单词移到缓冲区
yy 把当前行整行移到缓冲区
~ 改变光标所在字符大小写
. 重复上一个操作
<< 把当前行左移
>> 把当前行右移
:x 保存退出
:q 退出
:q! 不保存退出

/ 查找内容
? 向上查找内容
n 下一匹配
N 上一匹配
% 匹配下一半“大中小”括号
:%s/a/b/g 替换文件中a为b
:! 执行外部命令,回车返回

:set ic 忽略大小写
:set hls 匹配高亮
:set is 即时匹配输入
:set nu 显示行号
:x 加密文件
:ab c d 以d替代c

shell快捷键

bash
ctrl – a 光标移到行首
ctrl – e 光标移到行尾
ctrl – l  刷新屏幕
ctrl – u 从光标处删除到行首
ctrl – k 从光标处删除到行尾
ctrl – b 光标往后移动一个字符
ctrl – f  光标往前移动一个字符
ctrl – y 恢复被删除的收入
ctrl – p 显示之前执行的命令
ctrl – n 显示之后执行的命令
ctrl – j  执行输入的命令
ctrl – x 光标移动到行首或行尾
ctrl – c 中断程序执行
ctrl – h 删除前一个字符
ctrl – d 删除后一个字符  — 当光标处无输入时,  退出shell
ctrl – s 关闭ssh流缓冲区
ctrl – q 重启ssh流缓冲区
ctrl – r  搜索之前输入过的命令
ctrl – z 是进程暂停

转载自:http://blog.csdn.net/gggxin/archive/2009/07/27/4383481.aspx

Bash shell becomes inactive on Ctrl+S

The Ctrl+S shortcut key sequence activates XOFF which is used to pause the sending of data etc (read more here at Wikipedia about software flow control). In the Bash shell this buffers all your commands and won’t run them until you send XON which is done with Ctrl+Q.

I only learnt about this a few days ago when I accidentally pressed Ctrl+S while doing something on one of my webservers – I was meaning to press Ctrl+D to logout which is the only reason I knew which keystroke I had hit instead. It had baffled me years ago why my Bash shell suddenly became unresponsive when I’d hit what appeared to be some random keystroke combination. When it happened to me a few days ago I decided to work out why it does this and what the solution is. I remember in the past having to kill my CLI session because I didn’t know what else to do.

So in summary, it’s Ctrl+S which suspends the output and you need to hit Ctrl+Q to resume output again

统计几个目录的总大小

for i in ‘awstats www phpmyadmin webconsole’
do
for DX in `du -s $i | awk ‘{print $1}’`
do
let “DD=${DD}+${DX}”
done
let “DDD=${DD}/1024/1024”
echo ${DDD}G
done

2025年七月
« 5月    
 123456
78910111213
14151617181920
21222324252627
28293031