??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲中文字幕久久精品无码2021,亚洲欧洲国产综合AV无码久久,国产∨亚洲V天堂无码久久久http://www.tkk7.com/ldwblog/category/49576.html态度军_一?/description>zh-cnTue, 07 Jan 2020 10:50:19 GMTTue, 07 Jan 2020 10:50:19 GMT60个h公众受Java爱好者社区」高质量原创文章持箋输出Q欢q各位小d?/title><link>http://www.tkk7.com/ldwblog/archive/2019/10/30/434887.html</link><dc:creator>David1228</dc:creator><author>David1228</author><pubDate>Wed, 30 Oct 2019 06:10:00 GMT</pubDate><guid>http://www.tkk7.com/ldwblog/archive/2019/10/30/434887.html</guid><wfw:comment>http://www.tkk7.com/ldwblog/comments/434887.html</wfw:comment><comments>http://www.tkk7.com/ldwblog/archive/2019/10/30/434887.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/ldwblog/comments/commentRss/434887.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/ldwblog/services/trackbacks/434887.html</trackback:ping><description><![CDATA[blogjava|站与博客园合ƈ了,对blogjavaq是有感情的?br />q且blogjava|站发布的文章是在博客园首页看不到的?br />blogjava|站首页能看刎ͼ你可以点?yn)L题进入可以看到图片二l码信息?br /><br /><strong style="color: red; font-size: 14pt;">Java爱好者社?/strong><br />公众号内容简介:(x)<br /><p><span style="background-color: yellow; color: red;">专注于分享Java后端相关技术、老司机实战干货,不限于JVM、ƈ发、设计模式、性能优化、分布式&微服务、云原生、大数据相关主题?/span><br style="color: red;" /><span style="background-color: yellow; color: red;">希望x的你停下脚步Q定有所收获?/span><br style="color: red;" /><br />以前的个人博客内容不好迁U,所以我打算Ҏ(gu)自己的多q经验,不断整理输出有h(hun)值的内容?br />目前公众号内Ҏ(gu)关于<span style="background-color: yellow; color: red;">SpringCloudQ微服务框架Q、SkywalkingQAPM监控调用链)、JVMQGC分析、内存泄漏分析)、ƈ发编E?/span>相关原创实战文章已出炉?br /><br />最q刚开始已l有不少伙伴关注了Q期待能有幸搜烦到本博客的同学,可以扫码x一下,不胜感激?br />大家有Q何技术、职场、面试上的问题都可以与我交流?br /><br /><span style="background-color: yellow;"><strong>方式一Q?/strong></span><span style="color: red; background-color: yellow;"><strong>扫码以下公众号二l码Q?/strong></span><br /><img src="http://www.tkk7.com/images/blogjava_net/ldwblog/Java%E7%88%B1%E5%A5%BD%E8%80%85%E7%A4%BE%E5%8C%BA%E4%BA%8C%E7%BB%B4%E7%A0%81.png" border="0" alt="" /><br /><br />方式二:(x)<span style="color: red;">在微信上直接搜烦Q?nbsp;</span><span style="color: red; background-color: yellow;">javatech_cbo</span><br /><br />感谢各位伙伴的支持Q后l会(x)在该公众号上输出大量的有价值的实战q货 Q期待与你一同进步与成长?br /></p><img src ="http://www.tkk7.com/ldwblog/aggbug/434887.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/ldwblog/" target="_blank">David1228</a> 2019-10-30 14:10 <a href="http://www.tkk7.com/ldwblog/archive/2019/10/30/434887.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>多服务器自动化部|脚?/title><link>http://www.tkk7.com/ldwblog/archive/2015/07/29/426487.html</link><dc:creator>David1228</dc:creator><author>David1228</author><pubDate>Wed, 29 Jul 2015 05:48:00 GMT</pubDate><guid>http://www.tkk7.com/ldwblog/archive/2015/07/29/426487.html</guid><wfw:comment>http://www.tkk7.com/ldwblog/comments/426487.html</wfw:comment><comments>http://www.tkk7.com/ldwblog/archive/2015/07/29/426487.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/ldwblog/comments/commentRss/426487.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/ldwblog/services/trackbacks/426487.html</trackback:ping><description><![CDATA[     摘要:   <a href='http://www.tkk7.com/ldwblog/archive/2015/07/29/426487.html'>阅读全文</a><img src ="http://www.tkk7.com/ldwblog/aggbug/426487.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/ldwblog/" target="_blank">David1228</a> 2015-07-29 13:48 <a href="http://www.tkk7.com/ldwblog/archive/2015/07/29/426487.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>OpenNebula中无法部|虚拟机原因http://www.tkk7.com/ldwblog/archive/2013/06/24/400917.htmlDavid1228David1228Mon, 24 Jun 2013 10:01:00 GMThttp://www.tkk7.com/ldwblog/archive/2013/06/24/400917.htmlhttp://www.tkk7.com/ldwblog/comments/400917.htmlhttp://www.tkk7.com/ldwblog/archive/2013/06/24/400917.html#Feedback0http://www.tkk7.com/ldwblog/comments/commentRss/400917.htmlhttp://www.tkk7.com/ldwblog/services/trackbacks/400917.html执行$onehost list LCPU、内存资源可以正常被监控到。但是,创徏虚拟机后Q虚拟机状态很长一D|间一直处于pend状态。而OpenNebula的mm_sched调度虚拟机的周期是缺?0U调度一ơ,Ҏ(gu)调度法适配一台合适的LQ主机是新添加的而且是有_资源的,Z么不能部|呢Q?br />我们可以通过查看虚拟机的调度日志$ONE_LOCATION/var/sched.log发现如下错误信息Q?br />
Tue Feb 21 [HOST][E]: Exception raised: Unable to transport XML to server and get XML response back.
 HTTP response: 504 Tue Feb 22 14:27:39 2011 [POOL][E]: Could not retrieve pool info from ONE?br />解决Ҏ(gu)Q?br />在OpenNebula官方的Wiki中可以找到原因,原因是所d的主Z用了HTTP代理上网了,所以OpenNebulad了系l的http_proxy环境变量Q此时就需要关闭h(hun)ttp_proxy?br />

I can create VMs, but sched.log shows the error "Could not retrieve pool info from ONE". What's wrong?

If the scheduler does not deploy the pending VMs, and messages like these are found in sched.log

[HOST][E]: Exception raised: Unable to transport XML to server and get XML response back.  HTTP response code is 404, not 200 [POOL][E]: Could not retrieve pool info from ONE

Then you need to unset the http_proxy environment variable, or set the no_proxy accordingly.

wiki参考地址(q里汇M使用或部|oneq程中可能遇到的问题以及(qing)解决办法)Q?a >http://wiki.opennebula.org/faq#listing_vms_takes_a_lot_of_time_why

大家对于Opennebula的安装部|感兴趣的话Q可以参考vpsee的博客(在Centos上安装和部vOpennebulaQ,讲解的很详细?a >

vpsee已经试玩了下OpenNebula4.0Q由于项目原因,目前我们q在用OpenNebula3.8.1Q后面也?x)测试升U到OpenNebula4.0看看新功能?br />升q程同样也参考下vpsee?a >OpenNebula3.x升到OpenNebula4.0Q^^ q么好的资源优先借鉴?br />


David1228 2013-06-24 18:01 发表评论
]]>
(?KVM环境下虚拟机q移p|问题解决http://www.tkk7.com/ldwblog/archive/2013/03/08/396187.htmlDavid1228David1228Fri, 08 Mar 2013 04:03:00 GMThttp://www.tkk7.com/ldwblog/archive/2013/03/08/396187.htmlhttp://www.tkk7.com/ldwblog/comments/396187.htmlhttp://www.tkk7.com/ldwblog/archive/2013/03/08/396187.html#Feedback0http://www.tkk7.com/ldwblog/comments/commentRss/396187.htmlhttp://www.tkk7.com/ldwblog/services/trackbacks/396187.html使用开源云工具OpenNebula3.8.1在KVM环境下虚拟机q移p|问题解决?br />1、虚拟机q移p|1日志Q?/div>
Fri Mar  8 17:57:18 2013 [LCM][I]: New VM state is SAVE_MIGRATE
Fri Mar  8 17:57:30 2013 [VMM][I]: ExitCode: 0
Fri Mar  8 17:57:30 2013 [VMM][I]: Successfully execute virtualization driver operation: save.
Fri Mar  8 17:57:30 2013 [VMM][I]: ExitCode: 0
Fri Mar  8 17:57:30 2013 [VMM][I]: Successfully execute network driver operation: clean.
Fri Mar  8 17:58:14 2013 [LCM][I]: New VM state is PROLOG_MIGRATE
Fri Mar  8 17:58:14 2013 [TM][I]: mv: -------------------------/one_images_3.8.1/0/42/disk.0
Fri Mar  8 17:58:14 2013 [TM][I]: ExitCode: 0
Fri Mar  8 18:02:28 2013 [TM][I]: mv: Moving bcec162:/one_images_3.8.1/0/42 to node153:/one_images_3.8.1/0/42
Fri Mar  8 18:02:28 2013 [TM][I]: ExitCode: 0
Fri Mar  8 18:02:29 2013 [LCM][I]: New VM state is BOOT
Fri Mar  8 18:02:30 2013 [VMM][I]: ExitCode: 0
Fri Mar  8 18:02:30 2013 [VMM][I]: Successfully execute network driver operation: pre.
Fri Mar  8 18:02:33 2013 [VMM][I]: Command execution fail: /var/tmp/one/vmm/kvm/restore /one_images_3.8.1/0/42/checkpoint node153 42 node153
Fri Mar  8 18:02:33 2013 [VMM][E]: restore: Command "virsh --connect qemu:///system restore /one_images_3.8.1/0/42/checkpoint" failed: error: Failed to restore domain from /one_images_3.8.1/0/42/checkpoint
Fri Mar  8 18:02:33 2013 [VMM][I]: error: unable to set user and group to '0:0' on '/one_images_3.8.1/0/42/disk.1': No such file or directory
Fri Mar  8 18:02:33 2013 [VMM][E]: Could not restore from /one_images_3.8.1/0/42/checkpoint
Fri Mar  8 18:02:33 2013 [VMM][I]: ExitCode: 1
Fri Mar  8 18:02:33 2013 [VMM][I]: Failed to execute virtualization driver operation: restore.
Fri Mar  8 18:02:33 2013 [VMM][E]: Error restoring VM: Could not restore from /one_images_3.8.1/0/42/checkpoint
Fri Mar  8 18:02:34 2013 [DiM][I]: New VM state is FAILED
Sat Mar  9 09:23:46 2013 [DiM][I]: New VM state is DONE.
Sat Mar  9 09:23:46 2013 [TM][W]: Ignored: LOG I 42 ExitCode: 0
Sat Mar  9 09:23:47 2013 [TM][W]: Ignored: LOG I 42 delete: Deleting /one_images_3.8.1/0/42
Sat Mar  9 09:23:47 2013 [TM][W]: Ignored: LOG I 42 ExitCode: 0
Sat Mar  9 09:23:47 2013 [TM][W]: Ignored: TRANSFER SUCCESS 42 -
解决Ҏ(gu)Q?/div>
在mv脚本中TAR拯命o(h)前面增加$SUDO命o(h).
$ONE_LOCATION/var/remotes/tm/ssh/mv
#!/bin/bash
# -------------------------------------------------------------------------- #
# Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org)             #
#                                                                            #
# Licensed under the Apache License, Version 2.0 (the "License"); you may    #
# not use this file except in compliance with the License. You may obtain    #
# a copy of the License at                                                   #
#                                                                            #
# http://www.apache.org/licenses/LICENSE-2.0                                 #
#                                                                            #
# Unless required by applicable law or agreed to in writing, software        #
# distributed under the License is distributed on an "AS IS" BASIS,          #
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
# See the License for the specific language governing permissions and        #
# limitations under the License.                                             #
#--------------------------------------------------------------------------- #
# MV <hostA:system_ds/disk.i|hostB:system_ds/disk.i> vmid dsid
#    <hostA:system_ds/|hostB:system_ds/>
#   - hostX is the target host to deploy the VM
#   - system_ds is the path for the system datastore in the host
#   - vmid is the id of the VM
#   - dsid is the target datastore (0 is the system datastore)
SRC=$1
DST=$2
VMID=$3
DSID=$4
if [ -z "${ONE_LOCATION}" ]; then
    TMCOMMON=/var/lib/one/remotes/tm/tm_common.sh
else
    TMCOMMON=$ONE_LOCATION/var/remotes/tm/tm_common.sh
fi
. $TMCOMMON
#-------------------------------------------------------------------------------
# Return if moving a disk, we will move them when moving the whole system_ds
# directory for the VM
#-------------------------------------------------------------------------------
SRC=`fix_dir_slashes $SRC`
DST=`fix_dir_slashes $DST`
SRC_PATH=`arg_path $SRC`
DST_PATH=`arg_path $DST`
SRC_HOST=`arg_host $SRC`
DST_HOST=`arg_host $DST`
DST_DIR=`dirname $DST_PATH`
SRC_DS_DIR=`dirname  $SRC_PATH`
SRC_VM_DIR=`basename $SRC_PATH`
if [ `is_disk $DST_PATH` -eq 1 ]; then
    log "-------------------------$DST_PATH"
exit 0
fi
if [ "$SRC" == "$DST" ]; then
    exit 0
fi
ssh_make_path "$DST_HOST" "$DST_DIR"
log "Moving $SRC to $DST"
ssh_exec_and_log "$DST_HOST" "rm -rf '$DST_PATH'" \
    "Error removing target path to prevent overwrite errors"
TAR_COPY="$SSH $SRC_HOST '$SUDO $TAR -C $SRC_DS_DIR -cf - $SRC_VM_DIR'"
TAR_COPY="$TAR_COPY | $SSH $DST_HOST '$TAR -C $DST_DIR -xf -'"
exec_and_log "eval $TAR_COPY" "Error copying disk directory to target host"
exec_and_log "$SSH $SRC_HOST rm -rf $SRC_PATH"
exit 0
-------------------------------------------------------------------------------------------
2、虚拟机q移p|2日志Q?/div>
Sat Mar  9 09:34:12 2013 [LCM][I]: New VM state is SAVE_MIGRATE
Sat Mar  9 09:34:24 2013 [VMM][I]: ExitCode: 0
Sat Mar  9 09:34:24 2013 [VMM][I]: Successfully execute virtualization driver operation: save.
Sat Mar  9 09:34:24 2013 [VMM][I]: ExitCode: 0
Sat Mar  9 09:34:24 2013 [VMM][I]: Successfully execute network driver operation: clean.
Sat Mar  9 09:34:25 2013 [LCM][I]: New VM state is PROLOG_MIGRATE
Sat Mar  9 09:34:25 2013 [TM][I]: mv: -------------------------/one_images_3.8.1/0/43/disk.0
Sat Mar  9 09:34:25 2013 [TM][I]: ExitCode: 0
Sat Mar  9 09:36:38 2013 [TM][I]: mv: Moving node153:/one_images_3.8.1/0/43 to bcec162:/one_images_3.8.1/0/43
Sat Mar  9 09:36:38 2013 [TM][I]: mv: -------------------target copyy
Sat Mar  9 09:36:38 2013 [TM][I]: mv: ++++++++++++++++++++++end copy
Sat Mar  9 09:36:38 2013 [TM][I]: ExitCode: 0
Sat Mar  9 09:36:38 2013 [LCM][I]: New VM state is BOOT
Sat Mar  9 09:36:38 2013 [VMM][I]: ExitCode: 0
Sat Mar  9 09:36:38 2013 [VMM][I]: Successfully execute network driver operation: pre.
Sat Mar  9 09:36:42 2013 [VMM][I]: Command execution fail: /var/tmp/one/vmm/kvm/restore /one_images_3.8.1/0/43/checkpoint bcec162 43 bcec162
Sat Mar  9 09:36:42 2013 [VMM][E]: restore: Command "virsh --connect qemu:///system restore /one_images_3.8.1/0/43/checkpoint" failed: error: Failed to restore domain from /one_images_3.8.1/0/43/checkpoint
Sat Mar  9 09:36:42 2013 [VMM][I]: error: internal error process exited while connecting to monitor: Supported machines are:
Sat Mar  9 09:36:42 2013 [VMM][I]: pc         RHEL 6.0.0 PC (alias of rhel6.0.0)
Sat Mar  9 09:36:42 2013 [VMM][I]: rhel6.0.0  RHEL 6.0.0 PC (default)
Sat Mar  9 09:36:42 2013 [VMM][I]: rhel5.5.0  RHEL 5.5.0 PC
Sat Mar  9 09:36:42 2013 [VMM][I]: rhel5.4.4  RHEL 5.4.4 PC
Sat Mar  9 09:36:42 2013 [VMM][I]: rhel5.4.0  RHEL 5.4.0 PC
Sat Mar  9 09:36:42 2013 [VMM][E]: Could not restore from /one_images_3.8.1/0/43/checkpoint
Sat Mar  9 09:36:42 2013 [VMM][I]: ExitCode: 1
Sat Mar  9 09:36:42 2013 [VMM][I]: Failed to execute virtualization driver operation: restore.
Sat Mar  9 09:36:42 2013 [VMM][E]: Error restoring VM: Could not restore from /one_images_3.8.1/0/43/checkpoint
Sat Mar  9 09:36:42 2013 [DiM][I]: New VM state is FAILED
登陆到节点:(x)
[root@bcec162 43]# virsh restore checkpoint 
错误Q从 checkpoint 恢复域失?/div>
错误Qinternal error process exited while connecting to monitor: Supported machines are:
pc         RHEL 6.0.0 PC (alias of rhel6.0.0)
rhel6.0.0  RHEL 6.0.0 PC (default)
rhel5.5.0  RHEL 5.5.0 PC
rhel5.4.4  RHEL 5.4.4 PC
rhel5.4.0  RHEL 5.4.0 PC
修改了bcec162节点?etc/libvirt/qemu.conf文g:
# The user ID for QEMU processes run by the system instance
user = "root"
# The group ID for QEMU processes run by the system instance
group = "root"
# Whether libvirt should dynamically change file ownership
# to match the configured user/group above. Defaults to 1.
# Set to 0 to disable file ownership changes.
#dynamic_ownership = 0
bcec162节点q移到node153节点成功?/div>
[root@node153 43]# ll
total 5075464
-rw-r--r-- 1 root     root  287215779 Mar  8 11:11 checkpoint
-rw-r--r-- 1 oneadmin kvm   283538737 Mar  9 09:34 checkpoint.1362712278
-rw-r--r-- 1 oneadmin kvm         920 Mar  9 09:26 deployment.0
-rw-r--r-- 1 root     root 4621008896 Mar  9 10:14 disk.0
-rw-r----- 1 root     root     401408 Mar  9 09:26 disk.1
lrwxrwxrwx 1 oneadmin kvm          29 Mar  9 10:09 disk.1.iso -> /one_images_3.8.1/0/43/disk.1
--------------------------------------------------------------------------------------------------------
3、仅修改node152节点?etc/libvirt/qemu.conf文gQ?/div>
# The user ID for QEMU processes run by the system instance
#user = "root"
# The group ID for QEMU processes run by the system instance
#group = "root"
# Whether libvirt should dynamically change file ownership
# to match the configured user/group above. Defaults to 1.
# Set to 0 to disable file ownership changes.
dynamic_ownership = 0
从bcec162节点q移到node152不成功,日志如下Q?/div>
Sat Mar  9 10:31:47 2013 [LCM][I]: New VM state is SAVE_MIGRATE
Sat Mar  9 10:31:54 2013 [VMM][I]: save: Moving old checkpoint file /one_images_3.8.1/0/43/checkpoint
Sat Mar  9 10:31:54 2013 [VMM][I]: ExitCode: 0
Sat Mar  9 10:31:54 2013 [VMM][I]: Successfully execute virtualization driver operation: save.
Sat Mar  9 10:31:54 2013 [VMM][I]: ExitCode: 0
Sat Mar  9 10:31:54 2013 [VMM][I]: Successfully execute network driver operation: clean.
Sat Mar  9 10:31:55 2013 [LCM][I]: New VM state is PROLOG_MIGRATE
Sat Mar  9 10:31:55 2013 [TM][I]: mv: -------------------------/one_images_3.8.1/0/43/disk.0
Sat Mar  9 10:31:55 2013 [TM][I]: ExitCode: 0
Sat Mar  9 10:35:02 2013 [TM][I]: mv: Moving bcec162:/one_images_3.8.1/0/43 to node152:/one_images_3.8.1/0/43
Sat Mar  9 10:35:02 2013 [TM][I]: mv: -------------------target copyy
Sat Mar  9 10:35:02 2013 [TM][I]: mv: ++++++++++++++++++++++end copy
Sat Mar  9 10:35:02 2013 [TM][I]: ExitCode: 0
Sat Mar  9 10:35:02 2013 [LCM][I]: New VM state is BOOT
Sat Mar  9 10:35:03 2013 [VMM][I]: ExitCode: 0
Sat Mar  9 10:35:03 2013 [VMM][I]: Successfully execute network driver operation: pre.
Sat Mar  9 10:35:07 2013 [VMM][I]: Command execution fail: /var/tmp/one/vmm/kvm/restore /one_images_3.8.1/0/43/checkpoint node152 43 node152
Sat Mar  9 10:35:07 2013 [VMM][E]: restore: Command "virsh --connect qemu:///system restore /one_images_3.8.1/0/43/checkpoint" failed: error: Failed to restore domain from /one_images_3.8.1/0/43/checkpoint
Sat Mar  9 10:35:07 2013 [VMM][I]: error: operation failed: failed to retrieve chardev info in qemu with 'info chardev'
Sat Mar  9 10:35:07 2013 [VMM][E]: Could not restore from /one_images_3.8.1/0/43/checkpoint
Sat Mar  9 10:35:07 2013 [VMM][I]: ExitCode: 1
Sat Mar  9 10:35:07 2013 [VMM][I]: Failed to execute virtualization driver operation: restore.
Sat Mar  9 10:35:07 2013 [VMM][E]: Error restoring VM: Could not restore from /one_images_3.8.1/0/43/checkpoint
Sat Mar  9 10:35:07 2013 [DiM][I]: New VM state is FAILED
登陆到node152节点执行restore命o(h)Q?/div>
[root@node152 43]# virsh restore checkpoint
error: Failed to restore domain from checkpoint
error: internal error process exited while connecting to monitor: qemu: could not open disk image /one_images_3.8.1/0/43/disk.0: Permission denied
?etc/libvirt/qemu.conf文g中注释掉dynamic_ownership=0Q开启user=root和group=root. 
如果开启dynamic_ownership则恢复虚拟机也会(x)报出上面的错误信息?/div>
在node152节点上恢复虚拟机Q?/div>
[root@node152 43]# virsh restore checkpoint
Domain restored from checkpoint
[root@node152 43]# virsh list
 Id Name                 State
----------------------------------
117 one-43               running
参考文章:(x)
https://wiki.archlinux.org/index.php/QEMU_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)
http://hi.baidu.com/juacm/item/f1fc3f98d8428ad07a7f01e2

转蝲请保持原链接Qhttp://www.tkk7.com/ldwblog/archive/2013/03/08/396187.html


David1228 2013-03-08 12:03 发表评论
]]>使用httpd时候碰?443端口占用问题解决http://www.tkk7.com/ldwblog/archive/2013/01/18/394389.htmlDavid1228David1228Fri, 18 Jan 2013 03:22:00 GMThttp://www.tkk7.com/ldwblog/archive/2013/01/18/394389.htmlhttp://www.tkk7.com/ldwblog/comments/394389.htmlhttp://www.tkk7.com/ldwblog/archive/2013/01/18/394389.html#Feedback0http://www.tkk7.com/ldwblog/comments/commentRss/394389.htmlhttp://www.tkk7.com/ldwblog/services/trackbacks/394389.html使用httpd时候碰C个问题,׃n一下?/div>
BC-EC配置tomcat的时候占?443端口Q如果tomcat服务器又作ؓ(f)http服务器,启动httpd服务的时候就报错Q?443端口被占用。反q来httpd占用8443Qtomcat启动报错?/div>
解决办法Q?/div>
~辑 /etc/httpd/conf.d/nss.conf配置文gQ将该文件中?/div>
nss.conf:Listen 8443
nss.conf:<VirtualHost _default_:8443>
Ҏ(gu)
nss.conf:Listen 8444
nss.conf:<VirtualHost _default_:8444>
 
q样启动httpd和tomcat׃不媄响了?/div>

David1228 2013-01-18 11:22 发表评论
]]>不启动虚机的情况下,修改虚机盘文g的方?/title><link>http://www.tkk7.com/ldwblog/archive/2013/01/18/394388.html</link><dc:creator>David1228</dc:creator><author>David1228</author><pubDate>Fri, 18 Jan 2013 03:21:00 GMT</pubDate><guid>http://www.tkk7.com/ldwblog/archive/2013/01/18/394388.html</guid><wfw:comment>http://www.tkk7.com/ldwblog/comments/394388.html</wfw:comment><comments>http://www.tkk7.com/ldwblog/archive/2013/01/18/394388.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/ldwblog/comments/commentRss/394388.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/ldwblog/services/trackbacks/394388.html</trackback:ping><description><![CDATA[<div style="font-family: 微Y雅黑; font-size: 16px; line-height: normal; text-align: -webkit-auto; ">--------------------------- 下面是在不启动虚机的情况下,修改虚机盘文g的方法(增加一U调试的手段Q?---------------------------------</div><div style="font-family: 微Y雅黑; font-size: 16px; line-height: normal; text-align: -webkit-auto; ">-- 首先关闭虚机</div><div style="font-family: 微Y雅黑; font-size: 16px; line-height: normal; text-align: -webkit-auto; "># losetup /dev/loop100 /one_images/5/images/disk.0</div><div style="font-family: 微Y雅黑; font-size: 16px; line-height: normal; text-align: -webkit-auto; "># kpartx -a /dev/loop100</div><div style="font-family: 微Y雅黑; font-size: 16px; line-height: normal; text-align: -webkit-auto; ">-- 通过以上两个命o(h)后,可以?dev/mapper/目录下看到虚机的两个分区讑֤ loop100p1、loop100p2 Q一般loop100p1是根分区Q(loop讑֤找一个空闲的卛_Q我q里写的是loop100Q?/div><div style="font-family: 微Y雅黑; font-size: 16px; line-height: normal; text-align: -webkit-auto; "># mount /dev/mapper/loop100p1 /mnt</div><div style="font-family: 微Y雅黑; font-size: 16px; line-height: normal; text-align: -webkit-auto; ">-- 虚机根分区挂蝲?mnt目录Q这时虚机的文gpȝl构都?mnt目录下了Q可以进行读写操作)</div><div style="font-family: 微Y雅黑; font-size: 16px; line-height: normal; text-align: -webkit-auto; "># umount /mnt</div><div style="font-family: 微Y雅黑; font-size: 16px; line-height: normal; text-align: -webkit-auto; "># kpartx -d /dev/loop100</div><div style="font-family: 微Y雅黑; font-size: 16px; line-height: normal; text-align: -webkit-auto; "># losetup -d /dev/loop100</div><div style="font-family: 微Y雅黑; font-size: 16px; line-height: normal; text-align: -webkit-auto; ">-- 通过以上三个命o(h)卸蝲Q重新启动虚机,修改都生效了。(试虚机pȝcentos-5.5-x86_64Q?/div><img src ="http://www.tkk7.com/ldwblog/aggbug/394388.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/ldwblog/" target="_blank">David1228</a> 2013-01-18 11:21 <a href="http://www.tkk7.com/ldwblog/archive/2013/01/18/394388.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>(?安装 log.io 实时日志监控工具http://www.tkk7.com/ldwblog/archive/2012/11/06/390886.htmlDavid1228David1228Tue, 06 Nov 2012 07:49:00 GMThttp://www.tkk7.com/ldwblog/archive/2012/11/06/390886.htmlhttp://www.tkk7.com/ldwblog/comments/390886.htmlhttp://www.tkk7.com/ldwblog/archive/2012/11/06/390886.html#Feedback0http://www.tkk7.com/ldwblog/comments/commentRss/390886.htmlhttp://www.tkk7.com/ldwblog/services/trackbacks/390886.html个h说明Q?/strong>以下作者应该是在Ubuntu OS上做的测试?感谢作者vpsee?br />               本h在公司的Red Hat Enterprise Linux Server release 6.1 (Santiago) 服务器上做的试Q可参见最下面截图Q监控Tomcat和其他日志信息。很是方便哈^^.
               ׃Redhat OS上没有apt-getQ如果缺相应Y件包Q可以通过yum或者iso源方式安装缺的软g?br />

转自Q?a >http://www.vpsee.com/2012/11/install-real-time-log-monitoring-tool-log-io/#comments 
日志是个好东西,Ҏ(gu)术h员来说写日志能纪录成长,分nl验Q对机器来说U录日志能及(qing)时发现错误,为日后的排错提供信息。如果还在一台机器上?/span> tail -f 监听单个日志或?/span>?/span> multitail 监听多个日志也太 out 了,我们需要一U工兯U录上百台机器、不同类型的日志Qƈ最好能汇集C个界面里方便查看Q最好还是实时的?/span>log.io 是q样一个实时日志监控工P采用 node.js + socket.io 开发,使用览器访问,每秒可以处理过5000条日志变动消息。有一点要指出来的?/span> log.io 只监视日志变动ƈ不存储日志,不过q个没关p,我们知道日志存储在哪个机器上?/span>

和其他的监控工具一Plog.io 也采用服务器Q客L(fng)的模式?/span>log.io ׃部分l成Q?/span>server ?/span> harvester, server q行在机?/span> AQ服务器Q上监视和纪录其他机器发来的日志消息Q?/span>log harvester q行在机?/span> BQ客L(fng)Q上用来监听和收集机?/span> B 上的日志改动Qƈ改动发送给机器 AQ每个需要纪录日志的机器都需要一?/span> harvester.

在机?/span> A ?/span> B ?/span>

因ؓ(f) log.io Z node.jsQ所以在服务器和客户端都要安?/span> node.jsQ这里采用编译安装的办法Q首先安装需要的依赖包:(x)

$ sudo apt-get install g++ make git libssl-dev pkg-config

下蝲 node.js 源代码,~译q安装:(x)

$ wget http://nodejs.org/dist/v0.8.14/node-v0.8.14.tar.gz

$ tar zxvf node-v0.8.14.tar.gz

$ cd node-v0.8.14/

$ ./configure

$ make

$ sudo make install

安装 NPMQ?/span>

$ curl https://npmjs.org/install.sh | sudo sh

安装 log.ioQ包含了 log server ?/span> log harvesterQ?/span>

$ sudo npm config set unsafe-perm true

$ sudo npm install -g --prefix=/usr/local log.io

在机?/span> A 上启?/span> server

$ sudo log.io server start

在机?/span> B 上配|和启动 harvester

server 用来监听各个机器发来的日志消息,harvester 用来把本机的日志发给 serverQ所?/span> harvester 配置的时候需要指?/span> server 的主机地址Q或域名Q。如何告?/span> harvester 哪些日志需要监控呢Q?/span>log_file_paths 是指定日志路径的地斏V下面的配置?/span> harvester ?/span> auth.log ?/span> harvester.log q两个日志的改动发送给 serverQ?/span>

$ sudo vi /etc/log.io/harvester.conf

exports.config = {

  // Log server host & port

  server: {

    host: 'log.vpsee.com', // 也可以用 IP 地址

    port: 8998,

  },

 

  // Watch the following log files, defined by label:path mappings

  log_file_paths: {

    logio_auth: '/var/log/auth.log',

    logio_harvester: '/var/log/log.io/harvester.log',

  },

 

  instance_name : 'log_node_1'

}

启动 harvesterQ?/span>

$ sudo log.io harvester start

打开览器访?/span> log server 所在的机器 AQ域名是 log.vpsee.comQ也可以?/span> IP 地址Q,端口?/span> 8998Q?br />======================================================================================
本h试时harvester.conf文g配置如下Q?/p>

/* Log.io log harvester configuration */
exports.config = {
  // Log server host & port
  server: {
    host: '192.168.32.92',
    port: 8998,
  },
  // Watch the following log files, defined by label:path mappings
  log_file_paths: {
    logio_tomcat: '/usr/local/tomcat6/logs/catalina.out',
logio_oned: '/opt/nebula/ONE/var/oned.log',    
logio_harvester: '/var/log/log.io/harvester.log',
  },
  // Define name of current machine.
  // Alternatively, you can set this name in /etc/profile:
  // export LOGIO_HARVESTER_INSTANCE_NAME='my_log_machine'
  // If so, comment out the line below
  instance_name : 'log_node_1'
}



David1228 2012-11-06 15:49 发表评论
]]>
转:(x)qcow2、raw、vmdk{镜像格?/title><link>http://www.tkk7.com/ldwblog/archive/2012/10/11/389401.html</link><dc:creator>David1228</dc:creator><author>David1228</author><pubDate>Thu, 11 Oct 2012 07:43:00 GMT</pubDate><guid>http://www.tkk7.com/ldwblog/archive/2012/10/11/389401.html</guid><wfw:comment>http://www.tkk7.com/ldwblog/comments/389401.html</wfw:comment><comments>http://www.tkk7.com/ldwblog/archive/2012/10/11/389401.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/ldwblog/comments/commentRss/389401.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/ldwblog/services/trackbacks/389401.html</trackback:ping><description><![CDATA[<p style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 19px; background-color: #ffffff; ">云计用一个朋友的话来?”<em>做云计算最苦逼的是得时时刻Mؓ(f)一些可能一辈子都碰不到的事做好准备。更苦逼的是刚以Z个问题不?x)遇刎ͼ立刻发生了。。?/em>“。这个还真的没有办法Q谁让哥我是搞云计算的呢Q简单一个虚拟化搞的你蛋疼Q你q能惛_它的吗?一直纠l在做虚拟化使用什么镜像格式,刚刚开始用了raw的fileQ后来发现LVM的很多特性对于虚拟化q是有比较理想的能力Q而且性能也很不错q了LVM。后来被VMware骗了跑去搞Esxi接触了VMDKQ最q研Iopenstack发现了qcow2格式Q貌似现在很行呀。也说不上分析这些镜像格式的能力Q就单说说自q一些用心得?/p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 19px; background-color: #ffffff; ">目前主要有那些格式来作ؓ(f)虚拟机的镜像Q?br /><strong>raw</strong><br />(default) the raw format is a plain binary image of the disc image, and is very portable. On filesystems that support sparse files, images in this format only use the space actually used by the data recorded in them.<br />老牌的格式了Q用一个字来说是裸,也就是赤裸裸Q你随便dd一个file模拟了一个raw格式的镜像。由于裸的彻底,性能上来说的话还是不错的。目前来看,KVM和XEN默认的格式好像还是这个格式。因为其原始Q有很多原生的特性,例如直接挂蝲也是一件简单的事情?br />裸的好处q有是单,支持转换成其它格式的虚拟机镜像对裔R的它来说q是很简单的Q如果其它格式需要{换,有时候还是需要它做ؓ(f)中间格式Q,I间使用来看Q这个很像磁盘,使用多少是多少Q?span style="color: #ff0000; ">du -h看到的大就是用大?/span>Q,但如果你要把整块盘都拿走的话得全盘拿了Qcopy镜像的时候)Q会(x)比较消耗网l带宽和I/O。接下来q有个有的问题Q如果那天你的硬盘用着用着不够用了Q你咋办Q在C块盘。但raw格式的就比较犀利了Q可以在原来的盘上追加空_(d)(x)<br />dd if=/dev/zero of=zeros.raw bs=1024k count=4096Q先创徏4G的空_(d)<br />cat foresight.img zeros.raw > new-foresight.imgQ追加到原有的镜像之后)<br />当然Q好东西是吹出来的,谁用谁知道,q是有挺多问题的。由于原生的裸格式,不支持snapshot也是很正常的。传说有朋友用版本管理Y件对raw格式的文件做版本理从而达到snapshot的能力,估计可行Q但没试q,q里也不妄加评论。但如果你用LVM的裸讑֤Q那另当别论。说到LVMq是十分的犀利的Q当q用LVM做虚拟机的镜像,那性能杠杠的。而且现在好多兄弟用虚拟化都采用LVM来做的。在LVM上做了很多的优化Q国外听说也有朋友在LVM增量备䆾斚w做了很多的工作。目前来LVM的snapshot、性能、可扩展性方面都q是有相当的效果的。目前来看的话,备䆾的话也问题不大。就是在虚拟UL面还是有很大的限制。但目前虚拟化的现状来看Q真正需要热q移的情늛前需求还不是是否的强烈。虽然用LVM做虚拟机镜像的相兛_开资料比较?yu),但目前来看牺牲一点灵zL,换取性能和便于管理还是不错的选择?/p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 19px; background-color: #ffffff; ">对于LVM相关的特性及(qing)使用可以参考如下链接:(x)</p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 19px; background-color: #ffffff; "><a style="color: #133257; ">http://www.ibm.com/developerworks/linux/library/l-lvm2/index.html</a></p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 19px; background-color: #ffffff; "><strong>cow</strong><br />copy-on-write format, supported for historical reasons only and not available to QEMU on Windows<br />曄qemu的写时拷贝的镜像格式Q目前由于历史遗留原因不支持H口模式。从某种意义上来说是个弃_(d)q没得它成熟死在腹中,后来被qcow格式所取代?/p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 19px; background-color: #ffffff; "><strong>qcow</strong><br />the old QEMU copy-on-write format, supported for historical reasons and superseded by qcow2</p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 19px; background-color: #ffffff; ">一代的qemu的cow格式Q刚刚出现的时候有比较好的Ҏ(gu),但其性能和raw格式Ҏ(gu)q是有很大的差距Q目前已l被新版本的qcow2取代。其性能可以查看如下链接Q?br /><a style="color: #133257; ">http://www.linux-kvm.org/page/Qcow2</a></p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 19px; background-color: #ffffff; "><strong>qcow2</strong><br />QEMU copy-on-write format with a range of special features, including the ability to take multiple snapshots, smaller images on filesystems that don’t support sparse files, optional AES encryption, and optional zlib compression<br />现在比较L的一U虚拟化镜像格式Q经q一代的优化Q目前qcow2的性能上接qraw裸格式的性能Q这个也是redhat的官Ҏ(gu)道了Q哈哈,希望有朋友能拍他们砖Q?/p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 19px; background-color: #ffffff; ">https://fedoraproject.org/wiki/Features/KVM_qcow2_Performance</p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 19px; background-color: #ffffff; ">对于qcow2的格式,几点q是比较H出的,qcow2的snapshotQ可以在镜像上做N多个快照Q?/p><ul style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 19px; background-color: #ffffff; "><li>更小的存储空_(d)即是不支持<em>holes</em>的文件系l也可以<span style="color: #ff0000; ">Q这下du -h和ls -lh看到的就一样了Q?/span></li><li>Copy-on-write support, where the image only represents changes made to an underlying disk imageQ这个特性SUN ZFS表现的淋漓尽_(d)</li><li>支持多个snapshotQ对历史snapshotq行理</li><li>支持zlib的磁盘压~?/li><li>支持AES的加?/li></ul><p style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 19px; background-color: #ffffff; "><strong>vmdk </strong><br /><a style="color: #133257; ">VMware</a> 3 & 4, or 6 image format, for exchanging images with that product<br />VMware的格式,q个格式说的蛋疼一点就有点牛XQ原本VMware是做虚拟化起家Q自己做了一个集的VMDK的poolQ做了自q虚拟机镜像格式。又拉着一些公司搞了一个OVF的统一包。从性能和功能上来说Qvmdk应该最的,׃vmdkl合了VMware的很多能力,目前来看QKVM和XEN使用q种格式的情况不是太多。但VMware的Esxi来看Q它的稳定性和各方面的能力q是可圈可点?/p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 19px; background-color: #ffffff; "><strong>vdi</strong><br /><a style="color: #133257; ">VirtualBox</a> 1.1 compatible image format, for exchanging images with VirtualBox.<br />SUN收购了VirtualBoxQOracle又收购了SUNQ这么说呢,vdi也算虚拟化这斚w的一朵奇葩,可惜的是入主的两家公司。SUN太专注于技术(可以说是IT技术最前端也不Q,Oracle又是开源杀手(<span style="color: #ff0000; "><strong>mysql的没?/strong></span>Q。单U从能力上来说vdi在VirtualBox上的表现q是不错的。也是不错的workstationU别的品?/p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 19px; background-color: #ffffff; ">说了q么多虚拟机镜像格式Q这么多虚拟化,做云计算的伤不v呀Q得为长期发展考虑Q也有朋友对镜像的{换做了很多事情,单看看几U镜像的转化Q?/p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 19px; background-color: #ffffff; ">VMDK–>qcow2:</p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 19px; background-color: #ffffff; ">kevin@kevin:~# qemu-img convert -f vmdk -O qcow2 SLES11SP1-single.vmdk SLES11SP1-single.img</p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 19px; background-color: #ffffff; "><a style="color: #133257; ">http://www.ibm.com/developerworks/cn/linux/l-cn-mgrtvm3/index.html</a></p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 19px; background-color: #ffffff; ">qcow2–>raw:</p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 19px; background-color: #ffffff; ">kevin@kevin:~$ qemu-img convert -O qcow2 image-raw.raw image-raw-converted.qcow</p>转蝲自:(x)<a >http://www.prajnagarden.com/?p=248</a> <img src ="http://www.tkk7.com/ldwblog/aggbug/389401.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/ldwblog/" target="_blank">David1228</a> 2012-10-11 15:43 <a href="http://www.tkk7.com/ldwblog/archive/2012/10/11/389401.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>KVM通过virt-managerq程理guest旉盘错px?/title><link>http://www.tkk7.com/ldwblog/archive/2012/08/06/384899.html</link><dc:creator>David1228</dc:creator><author>David1228</author><pubDate>Mon, 06 Aug 2012 04:10:00 GMT</pubDate><guid>http://www.tkk7.com/ldwblog/archive/2012/08/06/384899.html</guid><wfw:comment>http://www.tkk7.com/ldwblog/comments/384899.html</wfw:comment><comments>http://www.tkk7.com/ldwblog/archive/2012/08/06/384899.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/ldwblog/comments/commentRss/384899.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/ldwblog/services/trackbacks/384899.html</trackback:ping><description><![CDATA[<p style="padding: 0px 0px 15px; margin: 0px; color: #2c2c2c; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; background-color: #ffffff; "><strong style="padding: 0px; margin: 0px; ">一、命令行方式</strong></p><p style="padding: 0px 0px 15px; margin: 0px; color: #2c2c2c; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; background-color: #ffffff; ">关闭要调整的虚拟机,~辑虚拟机配|文?/p><p style="padding: 0px 0px 15px; margin: 0px; color: #2c2c2c; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; background-color: #ffffff; "><span style="padding: 0px; margin: 0px; color: #0000ff; ">#virsh edit 'your vm name'</span></p><p style="padding: 0px 0px 15px; margin: 0px; color: #2c2c2c; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; background-color: #ffffff; ">扑ֈ配置文g中的以下字段Q?/p><p style="padding: 0px 0px 15px; margin: 0px; color: #2c2c2c; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; background-color: #ffffff; "><span style="padding: 0px; margin: 0px; color: #00ccff; "><graphics type='vnc' port='-1'/></span></p><p style="padding: 0px 0px 15px; margin: 0px; color: #2c2c2c; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; background-color: #ffffff; ">加入键盘的语a布局后如下:(x)</p><p style="padding: 0px 0px 15px; margin: 0px; color: #2c2c2c; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; background-color: #ffffff; "><span style="padding: 0px; margin: 0px; color: #00ccff; "><graphics type='vnc' port='-1' keymap='en-us'/></span></p><p style="padding: 0px 0px 15px; margin: 0px; color: #2c2c2c; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; background-color: #ffffff; ">保存退出后Q重新蝲入虚拟机配置文g</p><p style="padding: 0px 0px 15px; margin: 0px; color: #2c2c2c; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; background-color: #ffffff; "><span style="padding: 0px; margin: 0px; color: #0000ff; ">#virsh create /etc/libvirt/qemu/'your vm name'.xml</span></p><p style="padding: 0px 0px 15px; margin: 0px; color: #2c2c2c; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; background-color: #ffffff; ">如果要避免这U情况,在用virt-install安装的时候,加入键盘布局的字D?/p><p style="padding: 0px 0px 15px; margin: 0px; color: #2c2c2c; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; background-color: #ffffff; ">--keymap=en-us </p><p style="padding: 0px 0px 15px; margin: 0px; color: #2c2c2c; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; background-color: #ffffff; "><strong style="padding: 0px; margin: 0px; ">二、virt-manager方式</strong></p><p style="padding: 0px 0px 15px; margin: 0px; color: #2c2c2c; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; background-color: #ffffff; ">在虚拟关闭的状态下Q通过virt-manager界面选中相应的虚拟机:</p><p style="padding: 0px 0px 15px; margin: 0px; color: #2c2c2c; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; background-color: #ffffff; "><u style="padding: 0px; margin: 0px; ">open-->Details-->Display VNC-->keymap-->en-us</u></p><p style="padding: 0px 0px 15px; margin: 0px; color: #2c2c2c; font-family: 宋体, 'Arial Narrow', arial, serif; line-height: 28px; background-color: #ffffff; ">保存后再启动虚拟机就可以?br />转蝲自:(x)<a >http://cncto.blog.51cto.com/blog/235831/886946</a></p><img src ="http://www.tkk7.com/ldwblog/aggbug/384899.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/ldwblog/" target="_blank">David1228</a> 2012-08-06 12:10 <a href="http://www.tkk7.com/ldwblog/archive/2012/08/06/384899.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Centos6.0制作镜像|卡问题ȝ-zhgphttp://www.tkk7.com/ldwblog/archive/2012/06/15/380842.htmlDavid1228David1228Fri, 15 Jun 2012 03:07:00 GMThttp://www.tkk7.com/ldwblog/archive/2012/06/15/380842.htmlhttp://www.tkk7.com/ldwblog/comments/380842.htmlhttp://www.tkk7.com/ldwblog/archive/2012/06/15/380842.html#Feedback0http://www.tkk7.com/ldwblog/comments/commentRss/380842.htmlhttp://www.tkk7.com/ldwblog/services/trackbacks/380842.html
一、问题描q?br />    Ҏ(gu)CentOS-6.0-x86_64-bin-DVD1.iso制作虚拟机镜像后Q用该镜像创徏的虚

拟机都是|卡eth1Q虽然能讄上ip但是虚拟|关q不能设|成功?br />    q且随着镜像->虚拟?>镜像->虚拟机类似流EP代,|卡ethx?x)递增。ȝ一

句话Q就是eth0不v作用?br />    
二、解决问题如下:(x)

    1、在grub里增加biosdevname=0的启动参敎ͼ形如

    kernel /vmlinuz-2.6.32-131.21.1.el6.i686 ro root=/dev/mapper/vg_test-

lv_root rd_LVM_LV=vg_test/lv_root rd_LVM_LV=vg_test/lv_swap rd_NO_LUKS rd_NO_MD 

rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latar
    cyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet 

biosdevname=0

    2、删除udev的配|文件rm -f /etc/udev/rules.d/70-persistent-net.rules?br />
Q我的做法比较彪(zhn),直接把rules.dq掉了。)

    W???步是针对单个L或者虚拟机而言的,我们保证镜像中的eth0|卡配置

文g存在Q名字ؓ(f)ifcfg-eth0文g中DEVICE=eth0?br />    
    3、把|卡配置文g改名

        mv ifcfg-em1 ifcfg-eth0

    4、把|卡配置文g内容修正Q把em1的全部改成eth0

        perl -p -i -e ‘s/em1/eth0/g’ ifcfg-eth0 

    5、重启系l即?br />
    6、配|ssh
        6.1Q?etc/ssh/sshd_config   配置文g中修Ҏ(gu)加入UseDNS=noQ将

#UseDNS=yes Ҏ(gu)QUseDNS=no
        6.2Q?etc/ssh/sshd_config   配置文g中将#GSSAPIAuthentication 

no ?号去掉,更改成GSSAPIAuthentication no
        6.3Q?etc/ssh/sshd_config   配置文g中将PermitRootLogin no修改

为yes 
        6.4Q?nbsp;  
        6.5Q?etc/ssh/sshd_config   配置文g中将PasswordAuthentication 

no修改为yes可以了
        6.6Q?etc/nsswitch.conf     配置文g中,hostsQfiles dns  ?br />
成:(x)hostsQfiles
        6.7Q?etc/init.d/sshd restart         重启sshdq程佉K|生?br />        
        其中6.1?.2?.6都是处于性能斚w考虑
    
    7、镜像中存在bcec提供的setIp、rc.local{脚本?br />    
    l过?9.4环境试Q操作过E从原始镜像 -> 新虚拟机 -> 制作镜像镜像 -> 

新镜像虚拟机Q网卡都没有问题Q都是eth0?br />
 Centos6.0制作镜像|卡问题ȝ-zhgp 


David1228 2012-06-15 11:07 发表评论
]]>用SSHq接q程L公钥?/title><link>http://www.tkk7.com/ldwblog/archive/2012/06/15/380832.html</link><dc:creator>David1228</dc:creator><author>David1228</author><pubDate>Fri, 15 Jun 2012 01:30:00 GMT</pubDate><guid>http://www.tkk7.com/ldwblog/archive/2012/06/15/380832.html</guid><wfw:comment>http://www.tkk7.com/ldwblog/comments/380832.html</wfw:comment><comments>http://www.tkk7.com/ldwblog/archive/2012/06/15/380832.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/ldwblog/comments/commentRss/380832.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/ldwblog/services/trackbacks/380832.html</trackback:ping><description><![CDATA[<h1><a style="color: #000000; font-weight: normal; text-decoration: none; clear: left; display: block; padding: 0.3em 0.5em; margin: 0px 0px 0.2em; background-image: url(http://www.worldhello.net/images/header_gradient.gif); background-color: #f8f8f8; -webkit-box-shadow: rgba(0, 0, 0, 0.597656) 1px 1px 5px; box-shadow: rgba(0, 0, 0, 0.597656) 1px 1px 5px; z-index: 10000; background-position: 50% 100%; background-repeat: repeat no-repeat; ">用 SSH q程L的公钥检?/a></h1><div style="color: #333333; font-family: Rockwell, Verdana, sans-serif; font-size: 18px; line-height: normal; background-color: #ffffff; ">SSH 公钥查是一个重要的安全机制Q可以防范中间h劫持{黑客攻凅R但是在特定情况下,严格?SSH 公钥查会(x)破坏一些依?SSH 协议的自动化dQ就需要一U手D能够绕q?SSH 的公钥检查?h2>首先看看什么是 SSH 公钥?/h2>SSH q接q程LӞ?x)检查主机的公钥。如果是W一ơ该LQ会(x)昄该主机的公钥摘要Q提C用h否信任该LQ?pre style="background-color: #f8f8f8; border-style: solid; border-color: #e7e5dc; border-width: 1px 0px 4px 6px; padding: 1em; overflow: auto; color: black; line-height: 16px; font-family: Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 14px; letter-spacing: 0px; background-position: initial initial; background-repeat: initial initial; ">The authenticity of host '192.168.0.110 (192.168.0.110)' can't be established. RSA key fingerprint is a3:ca:ad:95:a1:45:d2:57:3a:e9:e7:75:a8:4c:1f:9f. Are you sure you want to continue connecting (yes/no)? </pre>当选择接受Q就?x)将该主机的公钥q加到文?~/.ssh/known_hosts 中。当再次q接该主机时Q就不会(x)再提C问题了?如果因ؓ(f)某种原因Q服务器pȝ重装Q服务器间IP地址交换QDHCPQ虚拟机重徏Q中间h劫持Q,该IP地址的公钥改变了Q当使用 SSH q接的时候,?x)报错?x)<pre style="background-color: #f8f8f8; border-style: solid; border-color: #e7e5dc; border-width: 1px 0px 4px 6px; padding: 1em; overflow: auto; color: black; line-height: 16px; font-family: Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 14px; letter-spacing: 0px; background-position: initial initial; background-repeat: initial initial; ">@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that the RSA host key has just been changed. The fingerprint for the RSA key sent by the remote host is e9:0c:36:89:7f:3c:07:71:09:5a:9f:28:8c:44:e9:05. Please contact your system administrator. Add correct host key in /home/jiangxin/.ssh/known_hosts to get rid of this message. Offending key in /home/jiangxin/.ssh/known_hosts:81 RSA host key for 192.168.0.110 has changed and you have requested strict checking. Host key verification failed. </pre>上面的警告信息说的是Q?ul><li>服务器公钥已l改变,新的公钥的摘要是Qe9:0c:36:89:7f:3c:07:71:09:5a:9f:28:8c:44:e9:05.</li><li>该服务器原来的公钥记录在文g ~/.ssh/known_hosts 中第 81 行?/li></ul>如果认不是中间人劫持,需要连接到该服务器Q怎么办呢Q最单的是?vi 打开 ~/.ssh/known_hosts 文gQ定位到 81 行,该行删除。之后就可以使用 ssh q接了?h2>如何让连接新LӞ不进行公钥确认?</h2>在首ơ连接服务器Ӟ?x)弹出公钥确认的提示。这?x)导致某些自动化dQ由于初ơ连接服务器而导致自动化d中断。或者由?nbsp; ~/.ssh/known_hosts 文g内容清空Q导致自动化d中断?SSH 客户端的 StrictHostKeyChecking 配置指o(h)Q可以实现当W一ơ连接服务器Ӟ自动接受新的公钥。只需要修?/etc/ssh/ssh_config 文gQ包含下列语句:(x)<pre style="background-color: #f8f8f8; border-style: solid; border-color: #e7e5dc; border-width: 1px 0px 4px 6px; padding: 1em; overflow: auto; color: black; line-height: 16px; font-family: Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 14px; letter-spacing: 0px; background-position: initial initial; background-repeat: initial initial; ">Host * StrictHostKeyChecking no </pre>或者在 ssh 命o(h)行中?-o 参数<pre style="background-color: #f8f8f8; border-style: solid; border-color: #e7e5dc; border-width: 1px 0px 4px 6px; padding: 1em; overflow: auto; color: black; line-height: 16px; font-family: Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 14px; letter-spacing: 0px; background-position: initial initial; background-repeat: initial initial; ">$ ssh  -o StrictHostKeyChecking=no  192.168.0.110</pre><h2>如何防止q程L公钥改变D SSH q接p|</h2>当确认中间h劫持d风险比较?yu)的情况下,才可以用下面的?gu)Q禁?SSH q程L的公钥检查?SSH 客户端提供一?UserKnownHostsFile 配置Q允许指定不同的 known_hosts 文g。那么将 known_hosts 指向不同的文Ӟ不就不会(x)造成公钥冲突D的中断了么?<pre style="background-color: #f8f8f8; border-style: solid; border-color: #e7e5dc; border-width: 1px 0px 4px 6px; padding: 1em; overflow: auto; color: black; line-height: 16px; font-family: Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 14px; letter-spacing: 0px; background-position: initial initial; background-repeat: initial initial; ">$ ssh -o UserKnownHostsFile=/dev/null 192.168.0.110 The authenticity of host '192.168.0.110 (192.168.0.110)' can't be established. RSA key fingerprint is e9:0c:36:89:7f:3c:07:71:09:5a:9f:28:8c:44:e9:05. Are you sure you want to continue connecting (yes/no)? </pre>看,提示信息由公钥改变中断警告,变成了首ơ连接的提示?和之前提到的 StrictHostKeyChecking 配置配合使用Q则不再有Q何警告出CQ?pre style="border-style: solid; border-color: #e7e5dc; border-width: 1px 0px 4px 6px; padding: 1em; overflow: auto; color: black; line-height: 16px; font-family: Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 14px; letter-spacing: 0px; background-color: #f8f8f8; ">$ ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null 192.168.0.110 Warning: Permanently added '192.168.0.110' (RSA) to the list of known hosts. jiangxin@192.168.0.110's password: </pre>如果讄了无口o(h) SSH dQ即通过客户端公钥认证)Q就可以直接q接到远E主机。这是基?SSH 协议的自动化d常用的手Dc(din)?br /><br />转自: <a >http://www.worldhello.net/2010/04/08/1026.html</a> <br />可参考资料:(x)<a >http://www.symantec.com/connect/articles/ssh-host-key-protection</a></div><img src ="http://www.tkk7.com/ldwblog/aggbug/380832.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/ldwblog/" target="_blank">David1228</a> 2012-06-15 09:30 <a href="http://www.tkk7.com/ldwblog/archive/2012/06/15/380832.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>linux下rvm安装ruby以及(qing)rubygems的过E分?http://www.tkk7.com/ldwblog/archive/2012/03/14/371835.htmlDavid1228David1228Wed, 14 Mar 2012 02:08:00 GMThttp://www.tkk7.com/ldwblog/archive/2012/03/14/371835.htmlhttp://www.tkk7.com/ldwblog/comments/371835.htmlhttp://www.tkk7.com/ldwblog/archive/2012/03/14/371835.html#Feedback0http://www.tkk7.com/ldwblog/comments/commentRss/371835.htmlhttp://www.tkk7.com/ldwblog/services/trackbacks/371835.html

2012-01-08 18:14:40     我来说两?nbsp;
收藏
以前从来没有使用qrubyQ这两天刚好要用GitHub上的ȝwikipȝgollum,所以要在偶的ubuntu下安装ruby和ruby-gems。其中遇C些问题:(x)
 
 
 
如果使用apt-get install ruby 和apt-get install rubygems1.8
 
当用gem install 命o(h)时报以下错误Q?br />  
 
 
ERROR: While executing gem ... (TypeError) instance of Date needs to have method `marshal_load
 
 
 
可能是Ubuntu环境的原因,那么改用rvm安装Q参考了http://beginrescueend.com/rvm/install/
 
若以非root模式安装Q?br />  
 
 
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
 
 
 
 
 drvm scripts路径变量到bashQ?br />  
 
 
     echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
 
  
 
 让新的bash生效Q?br />  
 
 
     source ~/.bash_profile
 
 
 
安装ruby1.9.2:
 
    rvm install 1.9.2
 
 
 
让系l默认?.92Q?br />  
    rvm use 1.9.2 --default
 
 
 
 
 
 
查安装是否OKQ?br />  
    ruby  -v
 
--------------------------------------------
 
接下来安装rubygems
 
先到官网下蝲安装包http://rubygems.org/pages/download
 
 
 
 
然后安装
 
ruby setup.rb
 
 
 
 
默认采用淘宝的Gem镜像站点
 
 
 
 
gem source http://ruby.taobao.org/
 
 
 
 
接下来就可以使用gem install xxx命o(h)了,just enjoy it!
 
 
 
 
PS:如过使用gem install报错Q可能是Ubuntu本n一些依赖,比如我安装gollum时缺依赖libxml2,libxslt,
 
~少啥就install 啥:(x)
 
 
 
apt-get install libxml2
 
apt-get install libxslt
 
转自Q?div>http://www.2cto.com/os/201201/116337.html


David1228 2012-03-14 10:08 发表评论
]]>云计?Google Amazon IBM三巨?/title><link>http://www.tkk7.com/ldwblog/archive/2011/09/09/358355.html</link><dc:creator>David1228</dc:creator><author>David1228</author><pubDate>Fri, 09 Sep 2011 03:06:00 GMT</pubDate><guid>http://www.tkk7.com/ldwblog/archive/2011/09/09/358355.html</guid><wfw:comment>http://www.tkk7.com/ldwblog/comments/358355.html</wfw:comment><comments>http://www.tkk7.com/ldwblog/archive/2011/09/09/358355.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/ldwblog/comments/commentRss/358355.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/ldwblog/services/trackbacks/358355.html</trackback:ping><description><![CDATA[<div><div>==========amazon<br />亚马逊的Ҏ(gu)计云<br /><br /><br />亚马逊是互联|上最大的在线零售商,但是同时也ؓ(f)独立开发h员以?qing)开发商提供云计服务^台。亚马逊将他们的云计算q_UCؓ(f)Ҏ(gu)计云QElastic Compute CloudQEC2Q,它是最早提供远E云计算q_服务的公司?br /><br />开攄服务<br /><br />?Google提供的云计算服务不同QGoogle仅ؓ(f)自己在互联网上的应用提供云计^収ͼ独立开发商或者开发h员无法在q个q_上工作,因此只能转而?q开源的Hadoop软g支持来开发云计算应用。亚马逊的Ҏ(gu)计云服务也和IBM的云计算服务q_不一P亚马逊不销售物理的云计服务^収ͼ没有cM ?#8220;蓝云”一L(fng)计算q_。亚马逊将自己的弹性计云建立在公司内部的大规模集计的q_之上Q而用户可以通过Ҏ(gu)计云的网l界面去操作在云计算q_ 上运行的各个实例QInstanceQ,而付Ҏ(gu)式则qL(fng)使用状况军_Q即用户仅需要ؓ(f)自己所使用的计^台实例付费,q行l束后计费也随之l束?br /><br />?性计云从沿革上来看Qƈ不是亚马逊公司推出的W一这U服务,它由名ؓ(f)亚马逊网l服务的现有q_发展而来。早?006q?月,亚马逊就发布了简单存?服务QSimple Storage ServiceQS3Q,q种存储服务按照每个月类似租金的形式q行服务付费Q同时用戯需要ؓ(f)相应的网l流量进行付贏V亚马逊网l服务^C用REST QRepresentational State TransferQ和单对象访问协议(SOAPQ等标准接口Q用户可以通过q些接口讉K到相应的存储服务?br /><br />2007q?月,亚马逊公?推出了简单队列服务(Simple Queue ServiceQSQSQ,q项服务使托主机可以存储计机之间发送的消息。通过q一Ҏ(gu)务,应用E序~写人员可以在分布式E序之间q行数据传递,而无 考虑消息丢失的问题。通过q种服务方式Q即使消息的接收方还没有模块启动也没有关pR服务内部会(x)~存相应的消息,而一旦有消息接收lg被启动运行,则队 列服务将消息提交l相应的q行模块q行处理。同L(fng)Q用户必Mؓ(f)q种消息传递服务进行付费用,计费的规则与存储计费规则cMQ依据消息的个数以及(qing)消息?递的大小q行收费?br /><br />在亚马逊提供上q服务的时候,q没有从头开始开发相应的|络服务lgQ而是对公司已有的q_q行优化和改造,一斚w满了本w网l零售购物应用程序的需求,另一斚w也供外部开发h员用?br /><br />在开放了上述的服务接口之后,亚马逊公司进一步在此基上开发了EC2pȝQƈ且开攄外部开发h员用?/div><div>灉|的工作模?br /><br />亚马逊的云计模式沿袭了单易用的传统Qƈ且徏立在亚马逊公司现有的云计基q_之上。弹性计云用户使用客户端通过 SOAP over HTTPS协议来实C亚马逊弹性计云内部的实例进行交互。用HTTPS协议的原因是Z保证q端q接的安全性,避免用户数据在传输的q程中造成?霌Ӏ因此,从用模式上来说Q弹性计云q_为用h者开发h员提供了一个虚拟的集群环境Q得用L(fng)应用h充分的灵zL,同时也减M云计^台拥?者(亚马逊公司)的管理负担?br /><br />而弹性计云中的实例是一些真正在q行中的虚拟机服务器Q每一个实例代表一个运行中的虚拟机。对于提供给?一个用L(fng)虚拟机,该用户具有完整的讉K权限Q包括针Ҏ(gu)虚拟机的理员用h限。虚拟服务器的收费也是根据虚拟机的能力进行计的Q因此,实际上用L(fng) 用的是虚拟的计算能力Q简化了计费方式。在Ҏ(gu)计云中,提供了三U不同能力的虚拟机实例,h不同的收费h(hun)根{例如,其中默认的也是最的q行实例?1.7GB的内存,1个EC2的计单元(1虚拟的计核以相关的计算单元Q,160GB的虚拟机内部存储定wQ是一?2位的计算q_Q收Ҏ(gu)准ؓ(f)每个 时10分。在当前的蓝计算q_中,q有两种性能更加强劲的虚拟机实例可供使用Q当然h(hun)g更加昂贵一炏V?br /><br />׃用户在部|网l程序的?候,一般会(x)使用过一个运行实例,需要很多个实例共同工作。弹性计云的内部也架设了实例之间的内部|络Q得用L(fng)应用E序在不同的实例之间可以通信?在弹性计云中的每一个计实例都h一个内部的IP地址Q用L(fng)序可以用内部IP地址q行数据通信Q以获得数据通信的最好性能。每一个实例也h外部 的地址Q用户可以将分配l自qҎ(gu)IP地址分配l自qq行实例Q得徏立在Ҏ(gu)计云上的服务pȝ能够为外部提供服务。当Ӟ亚马逊公怹对网l上?服务量计费Q计费规则也按照内部传输以及(qing)外部传输q行分开?br /><br />总而言之,亚马逊通过提供Ҏ(gu)计云Q减了规模Y件开发h员对于集系 l的l护Qƈ且收Ҏ(gu)式相对简单明了,用户使用多少资源Q只需要ؓ(f)q一部分资源付费卛_。这U付Ҏ(gu)式与传统的主机托模式不同。传l的L托管模式让用 户将L攑օ到托公司,用户一般需要根据最大或者计划的定wq行付费Q而不是根据用情况进行付费,而且Q可能还需要保证服务的可靠性、可用性等Q付?的费用更多,而很多时候,服务q没有进行满额资源用。而根据亚马逊的模式Q用户只需要ؓ(f)实际使用情况付费卛_?br /><br />在用户用模式上Q亚?逊的Ҏ(gu)计云要求用户要创建基于亚马逊规格的服务器映像(名ؓ(f)亚马逊机器映像即亚马?Machine Image, AMIQ。弹性计云的目标是服务器映像能够拥有用h要的M一U操作系l、应用程序、配|、登录和安全机制Q但是当前情况下Q它只支持Linux?核。通过创徏自己的AMIQ或者用亚马逊预先ؓ(f)用户提供的AMIQ用户在完成q一步骤后将AMI上传到弹性计云q_Q然后调用亚马逊的应用~程接口 QAPIQ,对AMIq行使用与管理。AMI实际上就是虚拟机的映像,用户可以使用它们来完成Q何工作,例如q行数据库服务器Q构建快速网l下载的q_Q?提供外部搜烦服务甚至可以出租自己h特色的AMI而获得收益。用h拥有的多个AMI可以通过通信而彼此合作,像当前的集计服务^C栗?br /><br />?Ҏ(gu)计云的将来发展过E中Q亚马逊也规划了如何在云计^C上帮助用户开发Web 2.0的应用程序。亚马逊认为除了它所依赖的网l零售业务之外,云计也是亚马逊公司的核心价值所在。可以预见,在将来的发展q程中,亚马逊必然会(x)在弹?计算云的q_上添加更多的|络服务lg模块Qؓ(f)用户构徏云计应用提供方ѝ?br /><img src="http://imgs.ccw.com.cn/resources/2008_05/2008_05_11/200805110751210512465687.jpg" alt="" /></div><br /><br />========google<br /><div><br />Google的云计算q_与应?br /><br />Google的云计算技术实际上是针对Google特定的网l应用程序而定制的。针对内部网l数据规模超大的特点QGoogle提出了一整套Z分布式ƈ行集方式的基础架构Q利用Y件的能力来处理集中l常发生的节点失效问题?br /><br />?2003q开始,Googleq箋几年在计机pȝ研究领域的最?x)议与杂志上发表论文Q揭C其内部的分布式数据处理Ҏ(gu)Q向外界展示其用的云计核 心技术。从其近几年发表的论文来看,Google使用的云计算基础架构模式包括四个怺独立又紧密结合在一L(fng)pȝ。包括Google建立在集之上的?件系lGoogle File SystemQ针对Google应用E序的特Ҏ(gu)出的Map/Reduce~程模式Q分布式的锁机制Chubby以及(qing)Google开发的模型化的大规?分布式数据库BigTable?br /><br />Google File System 文gpȝ<br /><br />Z满Googleq速增长的数据?理需求,Google设计q实CGoogle文gpȝQGFSQGoogle File SystemQ。GFS与过ȝ分布式文件系l拥有许多相同的目标Q例如性能、可伸羃性、可靠性以?qing)可用性。然而,它的设计q受到Google应用负蝲?技术环境的影响。主要体现在以下四个斚w:<br /><br />1. 集群中的节点失效是一U常态,而不是一U异常。由于参与运与处理的节Ҏ(gu)目非常庞大,通常?x)用上千个节点q行共同计算Q因此,每时每刻M(x)有节点处在失效状态。需要通过软gE序模块Q监视系l的动态运行状况,侦测错误Qƈ且将定w以及(qing)自动恢复pȝ集成在系l中?br /><br />2. Googlepȝ中的文g大小与通常文gpȝ中的文g大小概念不一P文g大小通常以G字节计。另外文件系l中的文件含义与通常文g不同Q一个大文g可能包含大量数目的通常意义上的文件。所以,设计预期和参敎ͼ例如I/O操作和块寸都要重新考虑?br /><br />3. Google文gpȝ中的文gd模式和传l的文gpȝ不同。在Google应用Q如搜烦Q中对大部分文g的修改,不是覆盖原有数据Q而是在文件尾q加?数据。对文g的随机写是几乎不存在的。对于这cd大文件的讉K模式Q客L(fng)Ҏ(gu)据块~存失去了意义,q加操作成ؓ(f)性能优化和原子性(把一个事务看做是一?E序。它要么被完整地执行Q要么完全不执行Q保证的焦点?br /><br />4. 文gpȝ的某些具体操作不再透明Q而且需要应用程序的协助完成Q应用程序和文gpȝAPI的协同设计提高了整个pȝ的灵zL。例如,放松了对GFS一致?模型的要求,q样不用加重应用E序的负担,大大简化了文gpȝ的设计。还引入了原子性的q加操作Q这样多个客L(fng)同时q行q加的时候,׃需要额外的?步操作了?br /><br />MQGFS是ؓ(f)Google应用E序本n而设计的。据UͼGoogle已经部v了许多GFS集群。有的集拥有超q?000个存储节点,过300T的硬盘空_(d)被不同机器上的数百个客户端连l不断地频繁讉K着?br /><br />?1l出了Google File System的系l架构,一个GFS集群包含一个主服务器和多个块服务器Q被多个客户端访问。文件被分割成固定尺寸的块。在每个块创建的时候,服务器分?l它一个不变的、全球惟一?4位块句柄对它q行标识。块服务器把块作为linux文g保存在本地硬盘上QƈҎ(gu)指定的块句柄和字节范围来d块数据。ؓ(f) 了保证可靠性,每个块都?x)复制到多个块服务器上,~省保存三个备䆾。主服务器管理文件系l所有的元数据,包括名字I间、访问控制信息和文g到块的映信 息,以及(qing)块当前所在的位置。GFS客户端代码被嵌入到每个程序里Q它实现了Google文gpȝ APIQ帮助应用程序与L务器和块服务器通信Q对数据q行d。客L(fng)跟主服务器交互进行元数据操作Q但是所有的数据操作的通信都是直接和块服务器进?的。客L(fng)提供的访问接口类gPOSIX接口Q但有一定的修改Qƈ不完全兼容POSIX标准。通过服务器端和客L(fng)的联合设计,Google File System能够针对它本w的应用获得最大的性能以及(qing)可用性效果?br /><img src="http://imgs.ccw.com.cn/resources/2008_05/2008_05_11/200805112061210512334132.jpg" alt="" /></div><div>MapReduce分布式编E环?br /><br />Z让内部非分布式系l方向背景的员工能够有机?x)将应用E序建立在大规模的集基之上QGoogle q设计ƈ实现了一套大规模数据处理的编E规范Map/Reducepȝ。这P非分布式专业的程序编写h员也能够为大规模的集编写应用程序而不用去虑 集群的可靠性、可扩展性等问题。应用程序编写h员只需要将_֊攑֜应用E序本nQ而关于集的处理问题则交由^台来处理?br /><br />Map/Reduce通过“MapQ映)”?#8220;ReduceQ化Q?#8221;q样两个单的概念来参加运,用户只需要提供自qMap函数以及(qing)Reduce函数可以在集群上进行大规模的分布式数据处理?br /><br />据称QGoogle的文本烦引方法,x索引擎的核心部分Q已l通过Map Reduce的方法进行了改写Q获得了更加清晰的程序架构。在Google内部Q每天有上千个Map Reduce的应用程序在q行?br /><br />分布式大规模数据库管理系lBigTable<br /><br />?Z上述两项基础之上的第三个云计^台就是Google关于数据库pȝ扩展到分布式q_上的BigTablepȝ。很多应用程序对于数据的l织q是?常有规则的。一般来_(d)数据库对于处理格式化的数据还是非常方便的Q但是由于关pL据库很强的一致性要求,很难其扩展到很大的规模。ؓ(f)了处?Google内部大量的格式化以及(qing)半格式化数据QGoogle构徏了弱一致性要求的大规模数据库pȝBigTable。据Uͼ现在有很多Google的应 用程序徏立在BigTable之上Q例如Search History、Maps、Orkut和RSS阅读器等?br /><br />?l出了在BigTable模型中的数据模型。数据模型包括行列以?qing)相应的旉戻I所有的数据都存攑֜表格中的单元里。BigTable的内Ҏ(gu)照行来划分,多个行l成一个小表,保存到某一个服务器节点中。这一个小表就被称为Tablet?br /><br />以上是Google内部云计基q_的三个主要部分,除了q三个部分之外,Googleq徏立了分布式程序的调度器,分布式的锁服务等一pd相关的云计算服务q_?br /><br />Google的云应用<br /><br />?了上q的云计基设施之外QGoogleq在其云计算基础设施之上建立了一pd新型|络应用E序。由于借鉴了异步网l数据传输的Web 2.0技术,q些应用E序l予用户全新的界面感受以?qing)更加强大的多用户交互能力。其中典型的Google云计应用程序就是Google推出的与 Microsoft Office软gq行竞争的Docs|络服务E序。Google Docs是一个基于Web的工P它有跟Microsoft Office相近的编辑界面,有一套简单易用的文档权限理Q而且它还记录下所有用户对文档所做的修改。Google Docs的这些功能o(h)它非帔R用于网上共享与协作~辑文档。Google Docs甚至可以用于监控责Q清晰、目标明的目q度。当前,Google Docs已经推出了文档编辑、电(sh)子表根{灯片演示、日E管理等多个功能的编辑模块,能够替代Microsoft Office相应的一部分功能。值得注意的是Q通过q种云计方式Ş成的应用E序非常适合于多个用戯行共享以?qing)协同编辑,Z个小l的人员q行共同创作 带来很大的方便性?br /><br />Google Docs是云计算的一U重要应用,卛_以通过览器的方式讉Kq端大规模的存储与计服务。云计算能够为大规模的新一代网l应用打下良好的基础?br /><br />?然Google可以说是云计的最大实践者,但是QGoogle的云计算q_是私有的环境Q特别是Google的云计算基础设施q没有开攑և来。除了开?有限的应用程序接口,例如GWTQGoogle Web ToolkitQ以?qing)Google Map API{,Googleq没有将云计的内部基础设施׃nl外部的用户使用Q上q的所有基设施都是U有的?br /><br />q运的是QGoogle公开 了其内部集群计算环境的一部分技术,使得全球的技术开发h员能够根据这一部分文档构徏开源的大规模数据处理云计算基础设施Q其中最有名的项目即 Apache旗下的Hadoop目。而下面的两个云计的实现则ؓ(f)外部的开发h员以?qing)中公司提供了云计的q_环境Q得开发者能够在云计的基础?施之上构q新型|络应用。其中IBM的蓝云计^台是可供销售的计算q_Q用户可以基于这些Yg产品自己构徏云计^台。亚马逊的Ҏ(gu)计云则是 托管式的云计^収ͼ用户可以通过q端的操作界面直接用?br /><img src="http://imgs.ccw.com.cn/resources/2008_05/2008_05_11/200805115911210512347475.jpg" alt="" /></div><br />==================IBM<br /><div>IBM蓝云计算q_<br /><br /><br />IBM?007q?1?5日推Z蓝云计算q_Qؓ(f)客户带来即买即用的云计算q_。它包括一pd的云计算产品Q得计不仅仅局限在本地机器或远E服务器农场Q即服务器集)Q通过架构一个分布式、可全球讉K的资源结构,使得数据中心在类g互联|的环境下运行计?br /><br />?qIBM的技术白皮书Q我们可以一H蓝云计^台的内部构造?#8220;蓝云”建立在IBM大规模计领域的专业技术基上,Z由IBM软g、系l技术和服务?持的开放标准和开源Y件。简单地_(d)“蓝云”ZIBM Almaden研究中心QAlmaden Research CenterQ的云基架构Q包括Xen和PowerVM虚拟化、Linux操作pȝ映像以及(qing)Hadoop文gpȝ与ƈ行构建?#8220;蓝云”由IBM Tivoli软g支持Q通过理服务器来保Z需求的最x能。这包括通过能够跨越多服务器实时分配资源的YӞ为客户带来一U无~体验,加速性能q确 保在最苛刻环境下的E_性。IBM新近发布?#8220;蓝云QBlue CloudQ?#8221;计划Q能够帮助用戯行云计算环境的搭建。它通过Tivoli、DB2、WebSphere与硬件品(目前是x86刀片服务器Q集成, 能够Z业架设一个分布式、可全球讉K的资源结构。根据IBM的计划,首款支持Power和x86处理器刀片服务器pȝ?#8220;蓝云”产品于2008q正?推出Qƈ且计划随后推出基于System z“大型L”的云环境Q以?qing)基于高密度机架集群的云环境?br /><br />在IBM的云计算白皮书上Q我们可以看到如下的蓝云计算q_配置情况?br /><br />?4演示了蓝云计的高层架构。可以看刎ͼ蓝云计算q_׃个数据中? IBM Tivoli部v理软gQTivoli Provisioning ManagerQ、IBM Tivoli监控软gQIBM Tivoli MonitoringQ、IBM WebSphere应用服务器、IBM DB2数据库以?qing)一些虚拟化的组件共同组成。图中的架构主要描述了云计算的后台架构,q没有涉?qing)到前台的用L(fng)面?br /><br />蓝云的硬件^台ƈ没有 什么特D的地方Q但是蓝云用的软gq_相较于以前的分布式^台具有不同的地方Q主要体现在对与虚拟机的使用以及(qing)对于大规模数据处理Y件Apache Hadoop的部|ӀHadoop是网l开发h员根据Google公司公开的资料开发出来的cM于Google File System的Hadoop File System以及(qing)相应的Map/Reduce~程规范。现在也正在q一步开发类gGoogle的Chubbypȝ以及(qing)相应的分布式数据库管理系l?BigTable。由于Hadoop是开源的Q因此可以被用户单位直接修改Q以适合应用的特D需求。IBM的蓝云品则直接Hadoop软g集成到自?本n的云计算q_之上?br /><br />“蓝云”中的<br /><br />虚拟?br /><br />从蓝云的l构上我们还可以看出Q在每一个节点上q行的Y件栈 与传l的软g栈一个很大的不同在于蓝云内部使用了虚拟化技术。虚拟化的方式在云计中可以在两个别上实现。一个别是在硬件别上实现虚拟化。硬件?的虚拟化可以使用IBM ppd的服务器Q获得硬件的逻辑分区LPAR。逻辑分区的CPU资源能够通过IBM Enterprise Workload Manager来管理。通过q样的方式加上在实际使用q程中的资源分配{略Q能够得相应的资源合理地分配到各个逻辑分区。Ppdpȝ的逻辑分区最粒??/10颗中央处理器QCPUQ?br /><br />虚拟化的另外一个别可以通过软g来获得,在蓝云计^C使用了Xen虚拟化Y件。Xen也是一个开源的虚拟化YӞ能够在现有的Linux基础之上q行另外一个操作系l,q过虚拟机的方式灉|地进行Y仉|和操作?br /><br />?q虚拟机的方式进行云计算资源的管理具有特D的好处。由于虚拟机是一cȝD的软gQ能够完全模拟硬件的执行Q因此能够在上面q行操作pȝQ进而能够保留一 整套q行环境语义。这P可以整个执行环境通过打包的方式传输到其他物理节点上,q样p够得执行环境与物理环境隔离Q方便整个应用程序模块的部v?M上来_(d)通过虚拟化的技术应用到云计的q_Q可以获得一些良好的Ҏ(gu)?br /><br />1. 云计的理q_能够动态地计^台定位到所需要的物理q_上,而无需停止q行在虚拟机q_上的应用E序Q这比采用虚拟化技术之前的q程q移Ҏ(gu)更加灉|?br /><br />2. 能够更加有效率地使用L资源Q将多个负蝲不是很重的虚拟机计算节点合ƈ到同一个物理节点上Q从而能够关闭空闲的物理节点Q达到节U电(sh)能的目的?br /><br />3. 通过虚拟机在不同物理节点上的动态迁U,能够获得与应用无关的负蝲q性能。由于虚拟机包含了整个虚拟化的操作系l以?qing)应用程序环境,因此在进行迁Uȝ时候带着整个q行环境Q达C与应用无关的目的?br /><br />4. 在部|上也更加灵z,卛_以将虚拟机直接部|到物理计算q_当中?br /><br />总而言之,通过虚拟化的方式Q云计算q_能够辑ֈ极其灉|的特性,而如果不使用虚拟化的方式则会(x)有很多的局限?br /><img src="http://imgs.ccw.com.cn/resources/2008_05/2008_05_11/200805111651210512742280.jpg" alt="" /></div><div>“蓝云”中的<br /><br />存储l构<br /><br />蓝云计算q_中的存储体系l构对于云计来说也是非帔R要的Q无论是操作pȝQ服务程序还是用户应 用程序的数据都保存在存储体系中。云计算q不排斥M一U有用的存储体系l构Q而是需要跟应用E序的需求结合v来获得最好的性能提升。M上来_(d)云计?的存储体pȝ构包含类gGoogle File System的集文件系l以?qing)基于块讑֤方式的存储区域网lSAN两种方式?br /><br />在设?云计^台的存储体系l构的时候,不仅仅是需要考虑存储的容量。实际上随着盘定w的不断扩充以?qing)硬盘h(hun)格的不断下降Q用当前的盘技术,可以很容易?q用多个磁盘的方式获得很大的磁盘容量。相较于盘的容量,在云计算q_的存储中Q磁盘数据的d速度是一个更重要的问题。单个磁盘的速度很有可能限制 应用E序对于数据的访问,因此在实际用的q程中,需要将数据分布到多个磁盘之上,q且通过对于多个盘的同时读写以辑ֈ提高速度的目的。在云计^?中,数据如何攄是一个非帔R要的问题Q在实际使用的过E中Q需要将数据分配到多个节点的多个盘当中。而能够达到这一目的的存储技术趋势当前有两种?式,一U是使用cM于Google File System的集文件系l,另外一U是Z块设备的存储区域|络SANpȝ?br /><br />Google 文gpȝ在前面已l做q一定的描述。在IBM的蓝云计^C使用的是它的开源实现Hadoop HDFS QHadoop Distributed File SystemQ。这U用方式将盘附着于节点的内部Qƈ且ؓ(f)外部提供一个共享的分布式文件系l空_(d)q且在文件系l别做冗余以提高可靠性。在合适的?布式数据处理模式下,q种方式能够提高M的数据处理效率。Google文gpȝ的这U架构与SANpȝ有很大的不同?br /><br />SANpȝ也是云计^台的另外一U存储体pȝ构选择Q在蓝云q_上也有一定的体现QIBM也提供SAN的^台能够接入到蓝云计算q_中。图5是一个SANpȝ的结构示意图?br /><br />??中可以看刎ͼSANpȝ是在存储端构建存储的|络Q将多个存储讑֤构成一个存储区域网l。前端的L可以通过|络的方式访问后端的存储讑֤。而且Q由 于提供了块设备的讉K方式Q与前端操作pȝ无关。在SANq接方式上,可以有多U选择。一U选择是用光U网l,能够操作快速的光纤盘Q适合于对性能?可靠性要求比较高的场所。另外一U选择是用以太网Q采取iSCSI协议Q能够运行在普通的局域网环境下,从而降低了成本。由于存储区域网l中的磁盘设?q没有与某一C机绑定在一P而是采用了非常灵zȝl构Q因此对于主机来说可以访问多个磁盘设备,从而能够获得性能的提升。在存储区域|络中,使用虚拟 化的引擎来进行逻辑讑֤到物理设备的映射Q管理前端主机到后端数据的读写。因此虚拟化引擎是存储区域网l中非常重要的管理模块?br /><br />SANp?l与分布式文件系l例如Google File Systemq不是相互对立的pȝQ而是在构建集系l的时候可供选择的两U方案。其中,在选择SANpȝ的时候,Z应用E序的读写,q需要ؓ(f)应用E序 提供上层的语义接口,此时需要在SAN之上构徏文gpȝ。而Google File System正好是一个分布式的文件系l,因此能够建立在SANpȝ之上。M来说QSAN与分布式文gpȝ都可以提供类似的功能Q例如对于出错的处理 {。至于如何用还是需要由建立在云计算q_之上的应用程序来军_?br /><br />与Google不同的是QIBMq没有基于云计算提供外部可访问的|?l应用程序。这主要是由于IBMq不是一个网l公司,而是一个IT的服务公司。当ӞIBM内部以及(qing)IBM未来为客h供的软g服务?x)基于云计算的架构?Q注: 本文受国?73计划资助Q资助号: 2007CB310900以及(qing)国家自然U学基金资助Q资助号90718040Q?br /><img src="http://imgs.ccw.com.cn/resources/2008_05/2008_05_11/200805111081210512763013.jpg" alt="" /></div><br /><br />转蝲?http://topic.csdn.net/u/20080526/11/D9D28C55-9BE0-46F1-97DD-B6E2F0CDE31D.html</div><img src ="http://www.tkk7.com/ldwblog/aggbug/358355.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/ldwblog/" target="_blank">David1228</a> 2011-09-09 11:06 <a href="http://www.tkk7.com/ldwblog/archive/2011/09/09/358355.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>лǵվܻԴȤ</p> <a href="http://www.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> վ֩ģ壺 <a href="http://thinkchating.com" target="_blank">þþþ޹</a>| <a href="http://selangcun.com" target="_blank">ëƬѹۿƵ</a>| <a href="http://7788mgqb.com" target="_blank">ɫݺɫۺƵ </a>| <a href="http://zhuanjiao521.com" target="_blank">vaþþþ</a>| <a href="http://igdytt.com" target="_blank">AVպAVþþ</a>| <a href="http://hnmxld.com" target="_blank">ձһ߲</a>| <a href="http://yiqigxfc.com" target="_blank">ƷƵѲ</a>| <a href="http://5kee.com" target="_blank">Ʒվ</a>| <a href="http://xfmkt.com" target="_blank">Ļ߹ۿ</a>| <a href="http://www-887234.com" target="_blank">ѴƬavֻƬ</a>| <a href="http://chinacmk.com" target="_blank">޾ƷۺϾþþþý</a>| <a href="http://gzmsijz.com" target="_blank">޹ƷۺϾþþ</a>| <a href="http://www454yu.com" target="_blank">޹˾þۺһ</a>| <a href="http://ddm88888.com" target="_blank">þֹƷۺ</a>| <a href="http://51ruilon.com" target="_blank">ѹҹ </a>| <a href="http://quxx28.com" target="_blank">߹ۿ</a>| <a href="http://34pmpm.com" target="_blank">޹Ʒ˾ƷС˵</a>| <a href="http://gs168sz.com" target="_blank">avһ </a>| <a href="http://517fanfan.com" target="_blank">ƷŮƵۿ</a>| <a href="http://chinashineway.com" target="_blank">ɫ޵һ</a>| <a href="http://dsfv1.com" target="_blank">޾Ʒ</a>| <a href="http://szmazida.com" target="_blank">˳˳ۺ</a>| <a href="http://155562.com" target="_blank">wwww߹ۿ</a>| <a href="http://400209.com" target="_blank">ѹۿƵ</a>| <a href="http://www-333346.com" target="_blank">޾Ʒŷ޾Ʒ</a>| <a href="http://jst-hosp.com" target="_blank">޾ƷþëƬҰ </a>| <a href="http://fantoment.com" target="_blank">AVƷ鶹</a>| <a href="http://079566.com" target="_blank">޾Ʒ벻߲HE</a>| <a href="http://wwwby1385.com" target="_blank">߹ۿ</a>| <a href="http://pjwys.com" target="_blank"></a>| <a href="http://abab14.com" target="_blank">˳ۺ7777</a>| <a href="http://srztw.com" target="_blank">˳һ</a>| <a href="http://34pmpm.com" target="_blank">޾Ʒٸ30p</a>| <a href="http://fenglengqi.com" target="_blank">޳վ</a>| <a href="http://988938.com" target="_blank">ŷպߵӰ</a>| <a href="http://51708695.com" target="_blank">һëƬѹۿ</a>| <a href="http://123994.com" target="_blank">ĻAVÿ</a>| <a href="http://mcsser.com" target="_blank">AV</a>| <a href="http://5gg1.com" target="_blank">ɫaѿ</a>| <a href="http://mt181.com" target="_blank">һƬƵ</a>| <a href="http://sao350.com" target="_blank">aëƬƵѹۿ</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>