<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>香香的快乐成长日记 &#187; 软件使用</title>
	<atom:link href="http://www.6636.net/blog/blog/category/%e8%bd%af%e4%bb%b6%e4%bd%bf%e7%94%a8/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.6636.net/blog</link>
	<description>香香成长着...香爸快乐着......</description>
	<lastBuildDate>Sat, 04 Feb 2012 05:01:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>如何把物理机的linux迁移到vmware中</title>
		<link>http://www.6636.net/blog/blog/2011/01/18/1559/</link>
		<comments>http://www.6636.net/blog/blog/2011/01/18/1559/#comments</comments>
		<pubDate>Tue, 18 Jan 2011 00:59:26 +0000</pubDate>
		<dc:creator>香爸</dc:creator>
				<category><![CDATA[软件使用]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.6636.net/blog/blog/2011/01/18/1559/</guid>
		<description><![CDATA[要把物理机的linux迁移到vmware中，vmware 自己提供了vmware converter，这个看了评测，好像不能迁移到vmware workstation中，所以没有去尝试。google之后，发现了一些方法，实际测试成功，整理一下。 1、备份物理机 如果是windows的系统，这个好办了，常用的ghost之类的都可以用，而linux系统，ghost不可用。有一个开源的工具Clonezilla可以用。 到这里下载一个live cd：http://clonezilla.org/clonezilla-live.php，刻盘，使用光盘启动机器，完成备份。如果想要完成迁移，大部分都需要把物理机的所有硬盘都迁移到vmware中，这时候需要在物理机上面外接一个硬盘来放备份的镜像，Clonezilla也支持把镜像放到ftp，nfs server，samba等网络服务器上面，但是那样速度可能太慢，如果速度快，可以插入一个USB的移动硬盘，Clonezilla会自动识别USB设备的。 关于Clonezilla的使用方法，可以看下面的这些连接，图文并茂的： (1) http://clonezilla.org/fine-print-live-doc.php?path=./clonezilla-live/doc/01_Save_disk_image/00-boot-clonezilla-live-cd.doc#00-boot-clonezilla-live-cd.doc (2) http://www.ibm.com/developerworks/cn/linux/l-clonezilla/index.html 2、恢复物理机镜像到vmware中 新建一个vmware的虚拟机，新建的磁盘最好跟物理机的磁盘大小相等或者大于物理机的磁盘大小，最终硬盘的磁盘大小会与物理机的数据大小有关系。 新建磁盘如果是scsi的，最好选择buslogic的scsi卡，否则后面修复的时候，会找不到磁盘，不能选择buslogic的，就选择ide的磁盘，但是这样修复完了以后，则需要去修改/etc/fstab文件了，因为物理机是scsi磁盘，看到的是/dev/sda1这样的格式，ide的磁盘就是/dev/hda1这样的格式。 使用Clonezilla的live cd启动虚拟机，按照上面两个连接的方法，把物理机的镜像恢复到虚拟机中。developerworks上面的那篇文章，在恢复的步骤，说要先给目标磁盘分区，格式化之类的，我没有做，直接启动live cd然后恢复即可，会自动对目标磁盘分区。 3、修复vmware镜像中的linux 物理机的镜像恢复到vmware中以后，由于物理机的硬件条件跟虚拟机不同，所以并不能立刻开始使用，甚至启动都启动不起来，所以需要修复一下，修复的方法，有几种，引用一下，可以每种都试下，那种方便使用哪种。 方法一： 引用自：http://zhangjiansheng.wordpress.com/2010/02/14/%E4%BD%BF%E7%94%A8clonezilla%E8%BF%9B%E8%A1%8Clinux%E7%B3%BB%E7%BB%9F%E7%9A%84%E7%89%A9%E7%90%86%E6%9C%BA%E5%88%B0%E8%99%9A%E6%8B%9F%E6%9C%BA%E7%9A%84p2v%E8%BF%81%E7%A7%BB/ 操作步骤：(测试成功) 1，使用clonezilla live进行备份。 可备份到移动硬盘上，或者网络上。 不管使用哪种方式，都建议将备份好的image放到网络上，便于后续的恢复工作。 记录一下，当前1.2.3版本的clonezilla还不认识R710的网卡，所以引导过程需要超时4次，每次1分钟，因为机器有4块网卡，耗时。当了后边vmware环境中，它就认识那个网卡了，启动非常快速。 2，在虚拟机中创建一个新的虚拟机。 注意硬盘不能小于物理机的硬盘。 3，启动虚拟机，并以clonezilla live光盘引导。 进入shell模式，使用fdisk对本地的硬盘进行分区，只需要创建一个分区，保存分区表。 重启虚拟机。 sudo su &#8211; fdisk -l fdisk /dev/sda;(创建分区) reboot 4，再次以clonezilla live光盘引导，启动虚拟机，进行linux系统的恢复。 进行恢复。使用网络资源进行恢复，本地机器设置静态ip即可，我使用的ssh方式挂载镜像数据，非常方便。 5，恢复系统以后，调整一些参数。 如果不执行此步骤，直接启动虚机硬盘引导，会遇到panic之类的严重错误，其实就是找不到合适的引导盘。 用linux的安装光盘（随便哪个版本都可以，只要是Linux即可，版本与主机系统相同是最好）引导虚拟机启动，进入linux rescue模式。 然后执行mkinitrd命令，重建initrd即可。 如果有多余的文件系统，可以修改/etc/fstab文件进行注释，如果原来物理机里有多块本地硬盘，或者加载有iscsi/san等网络磁盘，都需要修改这个文件。 6，重启就好了。 poertoff虚机，修改虚机设置，将光驱挂载去掉，虚拟机可以不要光盘引导了，可以自行引导了。 [...]]]></description>
			<content:encoded><![CDATA[				<p>要把物理机的linux迁移到vmware中，vmware 自己提供了vmware converter，这个看了评测，好像不能迁移到vmware workstation中，所以没有去尝试。google之后，发现了一些方法，实际测试成功，整理一下。</p>
				<p>1、备份物理机</p>
				<p>如果是windows的系统，这个好办了，常用的ghost之类的都可以用，而linux系统，ghost不可用。有一个开源的工具<a name="top">Clonezilla</a>可以用。</p>
				<p>到这里下载一个live cd：<a title="http://clonezilla.org/clonezilla-live.php" href="http://clonezilla.org/clonezilla-live.php">http://clonezilla.org/clonezilla-live.php</a>，刻盘，使用光盘启动机器，完成备份。如果想要完成迁移，大部分都需要把物理机的所有硬盘都迁移到vmware中，这时候需要在物理机上面外接一个硬盘来放备份的镜像，<a name="top">Clonezilla</a>也支持把镜像放到ftp，nfs server，samba等网络服务器上面，但是那样速度可能太慢，如果速度快，可以插入一个USB的移动硬盘，<a name="top">Clonezilla</a>会自动识别USB设备的。</p>
				<p>关于<a name="top">Clonezilla</a>的使用方法，可以看下面的这些连接，图文并茂的：</p>
				<p>(1) <a title="http://clonezilla.org/fine-print-live-doc.php?path=./clonezilla-live/doc/01_Save_disk_image/00-boot-clonezilla-live-cd.doc#00-boot-clonezilla-live-cd.doc" href="http://clonezilla.org/fine-print-live-doc.php?path=./clonezilla-live/doc/01_Save_disk_image/00-boot-clonezilla-live-cd.doc#00-boot-clonezilla-live-cd.doc">http://clonezilla.org/fine-print-live-doc.php?path=./clonezilla-live/doc/01_Save_disk_image/00-boot-clonezilla-live-cd.doc#00-boot-clonezilla-live-cd.doc</a></p>
				<p>(2) <a title="http://www.ibm.com/developerworks/cn/linux/l-clonezilla/index.html" href="http://www.ibm.com/developerworks/cn/linux/l-clonezilla/index.html">http://www.ibm.com/developerworks/cn/linux/l-clonezilla/index.html</a></p>
				<p>2、恢复物理机镜像到vmware中</p>
				<p>  <span id="more-1559"></span>
				<p>新建一个vmware的虚拟机，新建的磁盘最好跟物理机的磁盘大小相等或者大于物理机的磁盘大小，最终硬盘的磁盘大小会与物理机的数据大小有关系。</p>
				<p>新建磁盘如果是scsi的，最好选择buslogic的scsi卡，否则后面修复的时候，会找不到磁盘，不能选择buslogic的，就选择ide的磁盘，但是这样修复完了以后，则需要去修改/etc/fstab文件了，因为物理机是scsi磁盘，看到的是/dev/sda1这样的格式，ide的磁盘就是/dev/hda1这样的格式。</p>
				<p>使用<a name="top">Clonezilla</a>的live cd启动虚拟机，按照上面两个连接的方法，把物理机的镜像恢复到虚拟机中。<a href="http://www.ibm.com/developerworks/cn/linux/l-clonezilla/index.html" target="_blank">developerworks上面的那篇文章</a>，在恢复的步骤，说要先给目标磁盘分区，格式化之类的，我没有做，直接启动live cd然后恢复即可，会自动对目标磁盘分区。</p>
				<p>3、修复vmware镜像中的linux</p>
				<p>物理机的镜像恢复到vmware中以后，由于物理机的硬件条件跟虚拟机不同，所以并不能立刻开始使用，甚至启动都启动不起来，所以需要修复一下，修复的方法，有几种，引用一下，可以每种都试下，那种方便使用哪种。</p>
				<p>方法一：</p>
				<p>引用自：<a title="http://zhangjiansheng.wordpress.com/2010/02/14/%E4%BD%BF%E7%94%A8clonezilla%E8%BF%9B%E8%A1%8Clinux%E7%B3%BB%E7%BB%9F%E7%9A%84%E7%89%A9%E7%90%86%E6%9C%BA%E5%88%B0%E8%99%9A%E6%8B%9F%E6%9C%BA%E7%9A%84p2v%E8%BF%81%E7%A7%BB/" href="http://zhangjiansheng.wordpress.com/2010/02/14/%E4%BD%BF%E7%94%A8clonezilla%E8%BF%9B%E8%A1%8Clinux%E7%B3%BB%E7%BB%9F%E7%9A%84%E7%89%A9%E7%90%86%E6%9C%BA%E5%88%B0%E8%99%9A%E6%8B%9F%E6%9C%BA%E7%9A%84p2v%E8%BF%81%E7%A7%BB/">http://zhangjiansheng.wordpress.com/2010/02/14/%E4%BD%BF%E7%94%A8clonezilla%E8%BF%9B%E8%A1%8Clinux%E7%B3%BB%E7%BB%9F%E7%9A%84%E7%89%A9%E7%90%86%E6%9C%BA%E5%88%B0%E8%99%9A%E6%8B%9F%E6%9C%BA%E7%9A%84p2v%E8%BF%81%E7%A7%BB/</a></p>
				<p><font color="#666666">操作步骤：(测试成功)      <br />1，使用clonezilla live进行备份。       <br />可备份到移动硬盘上，或者网络上。       <br />不管使用哪种方式，都建议将备份好的image放到网络上，便于后续的恢复工作。       <br />记录一下，当前1.2.3版本的clonezilla还不认识R710的网卡，所以引导过程需要超时4次，每次1分钟，因为机器有4块网卡，耗时。当了后边vmware环境中，它就认识那个网卡了，启动非常快速。       <br />2，在虚拟机中创建一个新的虚拟机。       <br />注意硬盘不能小于物理机的硬盘。       <br />3，启动虚拟机，并以clonezilla live光盘引导。       <br />进入shell模式，使用fdisk对本地的硬盘进行分区，只需要创建一个分区，保存分区表。       <br />重启虚拟机。       <br />sudo su &#8211;       <br />fdisk -l       <br />fdisk /dev/sda;(创建分区)       <br />reboot       <br />4，再次以clonezilla live光盘引导，启动虚拟机，进行linux系统的恢复。       <br />进行恢复。使用网络资源进行恢复，本地机器设置静态ip即可，我使用的ssh方式挂载镜像数据，非常方便。       <br />5，恢复系统以后，调整一些参数。       <br />如果不执行此步骤，直接启动虚机硬盘引导，会遇到panic之类的严重错误，其实就是找不到合适的引导盘。       <br />用linux的安装光盘（随便哪个版本都可以，只要是Linux即可，版本与主机系统相同是最好）引导虚拟机启动，进入linux rescue模式。       <br />然后执行mkinitrd命令，重建initrd即可。       <br />如果有多余的文件系统，可以修改/etc/fstab文件进行注释，如果原来物理机里有多块本地硬盘，或者加载有iscsi/san等网络磁盘，都需要修改这个文件。       <br />6，重启就好了。       <br />poertoff虚机，修改虚机设置，将光驱挂载去掉，虚拟机可以不要光盘引导了，可以自行引导了。       <br />power on之后，虚机不再报错了，系统正常了！       <br />只需要修改自己的网络地址，所有服务已正常。</font></p>
				<p>方法二：引用自<a title="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1002402" href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1002402">http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1002402</a></p>
				<h4>Virtual machine does not boot after being converted from a physical Red Hat machine</h4>
				<h6>Details</h6>
				<ul>
				<li>
				<p>A converted physical machine running Red Hat does not boot as expected</p>
				</li>
				<li>
				<p>Virtual machine fails to boot after conversion </p>
				</li>
				<li>
				<p>The boot process halts with an error</p>
				</li>
				<li>
				<p>Possible errors include:</p>
				<ul>
				<li>
				<p>No volume groups found</p>
				</li>
				<li>
				<p>Kernel panic &#8211; not syncing: Attempted to kill init!</p>
				</li>
				<li>
				<p>VFS: Cannot open root device &quot;LABEL=/&quot; or 00:00</p>
				</li>
				<li>
				<p>Please append a correct = &quot;root=&quot; boot option</p>
				</li>
				<li>
				<p>Kernel panic: VFS: Unable to mount root fs on 00:00</p>
				</li>
				</ul>
				</li>
				</ul>
				<h6>Solution</h6>
				<p>The issue occurs because the operating system&#8217;s ramdisk image does not include the drivers or modules for the virtual SCSI adapter configured for the virtual machine. These modules are not in the ramdisk image because the image was originally created on a system that did not use this hardware. You must replace the existing ramdisk image with one that includes the proper drivers.</p>
				<p>Converter 3.0.x did not support hot cloning of Linux operating systems or the configuration of resulting virtual machines for new virtual hardware. It only supported cold cloning without configuration. vCenter Converter 4.0 does support hot cloning and the configuration of some Linux operating systems, including Red Hat. Refer to the manual for a list of supported versions.</p>
				<p>Please validate that each troubleshooting step below is true for your environment. Each step will provide instructions or a link to a document, in order to eliminate possible causes and take corrective action as necessary. The steps are ordered in the most appropriate sequence to isolate the issue and identify the proper resolution. Please do not skip a step.</p>
				<p><strong>Note</strong>: If you perform a corrective action in any of the following steps, attempt booting the virtual machine again.</p>
				<ol>
				<li>If your physical source machine has a vCenter Converter 4.0 supported version of Red Hat installed and you still have access to it:
				<ol>
				<li>Upgrade to vCenter Converter 4.0 if you have not done so already. </li>
				<li>Run Converter and perform another physical to virtual conversion. This virtual machine should boot. </li>
				</ol>
				</li>
				<li>If you are unable to use Converter to create a new Red Hat virtual machine that boots, you will need to modify the guest operating system.      <br /><strong>Notes</strong>:
				<ul>
				<li>Before beginning, VMware recommends that you take a snapshot of your virtual machine. VMware also recommends that you back up any files that you edit in the following steps. Once the operating system is working the snapshot and back up files can be deleted. </li>
				<li>In these steps, you will be making sure that the operating system has the appropriate type of virtual hard disk controller. This can be either LSI Logic or BusLogic. Choose the controller that is most suited to your version of Red Hat and make sure that it is this controller that is being presented to the virtual machine. </li>
				</ul>
				<ol>
				<li>Boot the virtual machine from the first Red Hat installation disk. </li>
				<li>At the first prompt, type linux rescue and press Enter. </li>
				<li>Change root to the mounted installation. Type chroot /mnt/sysimage and press Enter. </li>
				<li>If the physical computer was IDE based, replace any instance of the text /dev/hda with /dev/sda in the files /etc/fstab, /boot/grub/device.map, and /boot/grub/grub.conf. </li>
				<li>Ensure that grub is installed properly. Type grub-install and press Enter. </li>
				<li>If the file /etc/modules.conf exists, edit it and remove any existing entries. </li>
				<li>Edit the file /etc/modprobe.conf.
				<ol>
				<li>Look for alias ethx module entries, where x is replaced by a number and module is replaced by text. Change each module entry to pcnet32. </li>
				<li>If you will be using BusLogic:              <br />Look for alias scsi_hostadapterx module entries, where x is replaced by a number and module is replaced by text. Change each module entry to BusLogic. </li>
				<li>If you will be using LSI Logic:              <br />Look for alias scsi_hostadapterx module entries, where x is replaced by a number and module is replaced by text. Change each module entry to mptscsih.               <br />Additionally, look for an alias scsi_hostadapter module entry, where module is replaced by text and there is no number after hostadapter. If it exists, replace module with mptbase. If it does not exist, add alias scsi_hostadapter mptbase directly above the line that now reads alias scsi_hostadapter1 mptscsih. </li>
				</ol>
				</li>
				<li>Determine the full path to the ramdisk image to be rebuilt. The file will is located in /boot. List the contents of the directory by typing ls /boot and pressing Enter. There will be a file with a name similar to initrd-2.6.9-42.EL.img. In this example, the full path to the ramdisk image is /boot/initrd-2.6.9-42.EL.img. Make a note of this.          <br /><strong>Note</strong>: If there is more than one initrd- file in /boot, type cat /etc/grub.conf and press Enter to determine which file is being used. </li>
				<li>Determine the kernel version to use for rebuilding the ramdisk image. Type ls /lib/modules and press Enter. In this example, you will see the directory 2.6.9-42.EL. Make a note of this.          <br /><strong>Note</strong>: If there is more than one directory shown, type cat /etc/grub.conf and press Enter to determine which kernel version is being used. </li>
				<li>Rebuild the ramdisk. Type the command mkinitrd -v -f /boot/initrd-2.6.9-42.EL.img 2.6.9-42.EL and press Enter, where /boot/initrd-2.6.9-42.EL.img is replaced with the information noted in h. and 2.6.9-42.EL is replaced by the information noted in step i. </li>
				</ol>
				</li>
				<li>If you are unable to use a supported version of Red Hat, or the procedure in 2. did not work:
				<ol>
				<li>Modify the physical machine to have support for either BusLogic or LSI Logic. </li>
				<li>Convert the physical machine again. </li>
				</ol>
				</li>
				</ol>
				<p>方法三：引用自<a title="http://tzahid.spaces.live.com/blog/cns!E99E74DBE0A928BC!595.entry" href="http://tzahid.spaces.live.com/blog/cns!E99E74DBE0A928BC!595.entry">http://tzahid.spaces.live.com/blog/cns!E99E74DBE0A928BC!595.entry</a></p>
				<h6>Successful Physical to Virtual P2V conversion of Linux boxes with VMware Converter</h6>
				<ul>
				<li>
				<p>For those you who are looking for the comprehensive details steps of how to P2V a linux box with VMware Converter.        <br />Pre-requisites: Have the Linux installation Boot CD1 handy. You should purchase VMware Converter Enterprise license.         <br />1. Download VMware Converter Enterprise latest version and burn it to the CD. I used version 3.0.2 update 1.         <br />2. Boot up with the above VMware Converter CD on the physical Linux box.         <br />3. Let the WinPE load up and watch for the Network adaptor settings screen. Make necessary changes such as IP addressing.         <br />4. Finally you should see the VMware Converter screen where you can import the machine.         <br />5. Click on Import machine button and follow the steps.         <br />6. <b>Important</b> Make sure you select all disks and no resizing during the import process.         <br />7. If all the information is entered correctly, it should start importing to ESX/VC.         <br />8. It will create a VM on the selected ESX server.         <br />9. In my case it failed at 97% where the error occurs at customization         <br />steps (which I did not configure for) but after successful copy of the         <br />local disks.         <br />10. Go to the ESX server where the imported VM resides. Edit the settings.         <br />11. In the VM&#8217;s settings, check any irregular settings which might         <br />appears. In my case, I had to change the OS type of VM from other 32bit         <br />to REHL 4.         <br />12. When the VM is powered up for the first time as soon as P2V has         <br />finished, kernel panic will occur and it is just as expected.         <br /><u><b>Steps to fix the kernel panic on the Linux VM</b></u>         <br />13. Boot up with the bootable Linux installation CD 1. If it doesn&#8217;t         <br />boot from the CD, you may have to change the VM&#8217;s setting to go to the         <br />BIOS setting on the next boot so that you can change the boot sequence.         <br />14. At the boot: prompt type Linux rescue and hit enter.         <br />15. It will search for the Linux partition. In my case, it could not         <br />find the hard disks. So, I had to go back to VM&#8217;s setting to change the         <br />BusLogic SCSI controller to LsiLogic.         <br />16. After changing to LsiLogic controller, Linux installation image was able to find the Linux partitions on the VM.         <br />17. The system will give you opportunity to mount the root file system.         <br />At the linux prompt, type: chroot /mnt/sysimage and hit enter.         <br />18. It will get you back to the prompt. Now at the prompt type: kudzu and hit enter.         <br />19. It will ask you to remove old hardware and detect and install new hardware. Follow the instructions.         <br />20. After exiting from Kudzu, at the prompt type: ls /lib/modules and         <br />take note of the version/image. For instance, your active linux version         <br />is 2.6.9-5.ELsmp. Take note of it.         <br />21. After that you will need to make new RAM disk as follows.         <br />22. Type /sbin/mkinitrd -v -f /boot/initrd-2.6.9-5.ELsmp.img 2.6.9-5.ELsmp         <br />23. Reboot.         <br />24. After the reboot, it should successfully boot up without any kernel panic.         <br />25. If you still see the kernel panic, then go back to step 20 and find the correct module and repeat the steps 22 &amp; 23.         <br />26. After you have booted the system successfully, determine if it is working as expected.         <br />27. Install VMware Tools.         <br />The steps from 13 to 24 should take about 20-30 minutes. This procedure         <br />should be the same for most Linux distributions. Hope it will help on         <br />your P2V of Linux boxes.</p>
				</li>
				</ul>
				<p><a></a></p>
				<p><a></a></p>
				<p><font color="#ff0000">方法四：这是我迁移的一台机器，在这个环境下，我什么都没有做，自动就好了。</font></p>
				<p><font color="#ff0000">物理机的操作系统是 redhat 5.2，这个跟centos 5.2应该都是一样的</font></p>
				<p><font color="#ff0000">vmware版本是 免费的server 版1.0的</font></p>
				<p><font color="#ff0000">先把物理机克隆出来，然后vmware中建立磁盘的时候，选择的是ide类型的，然后直接恢复到虚拟机中，恢复完了重启虚拟机，就可以了，没有报错。</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.6636.net/blog/blog/2011/01/18/1559/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>多机位拍摄及后期合成的经验</title>
		<link>http://www.6636.net/blog/blog/2011/01/08/1530/</link>
		<comments>http://www.6636.net/blog/blog/2011/01/08/1530/#comments</comments>
		<pubDate>Sat, 08 Jan 2011 05:57:01 +0000</pubDate>
		<dc:creator>香爸</dc:creator>
				<category><![CDATA[生活]]></category>
		<category><![CDATA[软件使用]]></category>
		<category><![CDATA[摄像，后期合成]]></category>

		<guid isPermaLink="false">http://www.6636.net/blog/blog/2011/01/08/1530/</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;&#160;&#160; 平时经常用两台摄像机拍摄，后期基本没有什么合成，都是把两台摄像机的镜头，各自挑选合适的，简单的叠加在一起。最近用多机位拍摄了一个联欢会，后期想好好的合成一下，结果发现了很多问题，记录一下，供下一次拍摄的时候参考。 &#160;&#160;&#160;&#160;&#160;&#160; 此次拍摄的是幼儿园的联欢会，用来两台摄像机佳能的HF S10 和HF S20，奥林巴斯的录音笔LS-11。 S20做主机位，基本上算是常开，中间偶尔有停一下机，主要从前面拍摄舞台的全景；S10手持，移动，主要拍摄特写，观众等；奥林巴斯的录音笔LS-11则放在舞台后则，靠近小演员和音箱的位置。最后拍摄下来，后期合成的时候，发现问题不小。总结起来主要有： &#160; 1、两台录像机、录音笔的时间不同步。开始之前，两台录像机之间、录像机与录音笔之间，没有对好时间，结果后期合成的时候，不能自动的按照录制时间来对齐视频和音频，自能靠手工计算，费老鼻子劲儿了。所以当有多个设备录制同一场景的时候，各个设备一定要事先对好时间，这样后期剪辑的时候，可以靠软件来自动对齐。 2、当用到多台摄像机的时候，由于摄像机的品牌型号等不同，对同一个场景拍摄出来，色彩、亮度等会有差别，所以最好在拍摄之前，使用手动白平衡，设置好各台设备的白平衡，这样拍摄出来画面色彩比较统一。本次拍摄的时候，使用的都是自动白平衡，结果拍摄出来，S10的画面要暗淡一些，显得旧一些，S20的画面则显得鲜艳一些。这还是统一品牌的不同型号，如果是不同品牌的摄像机，估计差别会更大。 3、尽量使用手动曝光。联欢会性质的，有灯光、幻灯的变化等，现场灯光比较复杂，而且变化比较大，使用自动曝光的话，有时候会使主体曝光不足。比如老师站在投影仪的幕布前面的时候，由于幕布比较亮，结果导致人物曝光不足。 4、录音电平使用手动比较好。现场使用的三台设备，都可以采集到声音，回来听一下三台设备的声音，有两台算是基本不可用，比较失败。可用的是S20录的音，当时设置的是手工电平，音量、细节都不错，可用；S10用的是自动电平，声音小；LS-11当初就是往那里一放，再也没有管，用的也是自动电平，结果音量也比较小。总结一下，联欢会的现场，声音比较吵杂，加上音乐的声音有时候会比较大，使用录音电平自动控制的时候，虽然不会爆音，但是可能会导致主体的声音比较小，比如人在台上说话，没有使用话筒，结果背景音的吵杂导致录音电平降低，台上的人的声音反而听不到了。 5、主机位尽量不要停机，能够全程开机是最好了。一般来说，如果没有单独的录音设备，主机位还要担当录音的重任，所以中间停机的话，会导致丢现场的声音，另外，中间停机的话，后期合成对齐的时候，会增加不少工作量。 录制的时候，主要是注意上面的这几点，下一次估计再录制，就会好多了。后期合成的时候，一个主要的问题，就是多个摄像机之间、摄像机和音频之间的对齐，由于使用的都是消费级别的数码设备，设备都不带时间码功能，所以一般的视频剪辑软件的按照时间码对齐的功能都派不上用场。开始的时候用vegas，老是不成，后来换成Edius，发现这个真是方便多了，可以根据录制时间来自动对齐【这样就是为什么录制的时候，各个摄像机和录音设备之间，要时间同步，后期根据录制时间来自动对齐的时候，就方便多了】。使用Edius的时候，感觉有几个地方比较方便，相对于Vegas来说，提高效率不少。【或许Vagas也有类似的功能但是没有发现】 1、多机位编辑，Vegas跟Edius差不多，就是播放的时候，多个机位同时播放，然后想要哪个机位的内容，就点一下或者按一下对应的机位的数字，这样一直播放到底，完成粗剪。 2、预览的时候显示当前帧的时间。Edius经过设置，在预览的时候，可以在画面上显示时间码，这样对齐和编辑的时候，感觉比较方便，Vegas没有找到方法。 3、按照录制时间自动对齐功能。消费级摄像机没有时间码功能，但是有录制时间，特别是高清格式的，AVCHD格式的，在MTS文件的第一帧里面，就包含有录制的开始时间，Edius就能从提取这个时间，如果打开按照录制时间同步的功能，把单个录像机的所有视频全选，往时间线上面放的时候，会自动按照录制时间排列，如果中间有停机，时间线上面会空出来一段。然后另一个录像机的放到时间线上以后，首先自己的多段视频会按照录制时间对齐，然后跟第一个摄像机的视频，也会自动对齐，这样再剪辑的时候，就方便多了。 4、编辑的时候，每台摄像机，最好都放到V轨上面，把音频去掉，然后把主机位，放到A轨上面一份，这样可以全部使用主机位的音频，容易操作。 只要对齐了，后面剪辑什么的，就方便了。最后出来的效果不错，就学央视的春节晚会，台上、台下、观众、演员、特写来回的切换就行了，音频也是连续的，效果不错。]]></description>
			<content:encoded><![CDATA[				<p>&#160;&#160;&#160;&#160;&#160;&#160; 平时经常用两台摄像机拍摄，后期基本没有什么合成，都是把两台摄像机的镜头，各自挑选合适的，简单的叠加在一起。最近用多机位拍摄了一个联欢会，后期想好好的合成一下，结果发现了很多问题，记录一下，供下一次拍摄的时候参考。</p>
				<p>&#160;&#160;&#160;&#160;&#160;&#160; 此次拍摄的是幼儿园的联欢会，用来两台摄像机佳能的HF S10 和HF S20，奥林巴斯的录音笔LS-11。 S20做主机位，基本上算是常开，中间偶尔有停一下机，主要从前面拍摄舞台的全景；S10手持，移动，主要拍摄特写，观众等；奥林巴斯的录音笔LS-11则放在舞台后则，靠近小演员和音箱的位置。最后拍摄下来，后期合成的时候，发现问题不小。总结起来主要有：</p>
				<p> <span id="more-1530"></span>
				<p>&#160;</p>
				<blockquote><p>1、两台录像机、录音笔的时间不同步。开始之前，两台录像机之间、录像机与录音笔之间，没有对好时间，结果后期合成的时候，不能自动的按照录制时间来对齐视频和音频，自能靠手工计算，费老鼻子劲儿了。所以当有多个设备录制同一场景的时候，各个设备一定要事先对好时间，这样后期剪辑的时候，可以靠软件来自动对齐。</p>
				<p>2、当用到多台摄像机的时候，由于摄像机的品牌型号等不同，对同一个场景拍摄出来，色彩、亮度等会有差别，所以最好在拍摄之前，使用手动白平衡，设置好各台设备的白平衡，这样拍摄出来画面色彩比较统一。本次拍摄的时候，使用的都是自动白平衡，结果拍摄出来，S10的画面要暗淡一些，显得旧一些，S20的画面则显得鲜艳一些。这还是统一品牌的不同型号，如果是不同品牌的摄像机，估计差别会更大。</p>
				<p>3、尽量使用手动曝光。联欢会性质的，有灯光、幻灯的变化等，现场灯光比较复杂，而且变化比较大，使用自动曝光的话，有时候会使主体曝光不足。比如老师站在投影仪的幕布前面的时候，由于幕布比较亮，结果导致人物曝光不足。</p>
				<p>4、录音电平使用手动比较好。现场使用的三台设备，都可以采集到声音，回来听一下三台设备的声音，有两台算是基本不可用，比较失败。可用的是S20录的音，当时设置的是手工电平，音量、细节都不错，可用；S10用的是自动电平，声音小；LS-11当初就是往那里一放，再也没有管，用的也是自动电平，结果音量也比较小。总结一下，联欢会的现场，声音比较吵杂，加上音乐的声音有时候会比较大，使用录音电平自动控制的时候，虽然不会爆音，但是可能会导致主体的声音比较小，比如人在台上说话，没有使用话筒，结果背景音的吵杂导致录音电平降低，台上的人的声音反而听不到了。</p>
				<p>5、主机位尽量不要停机，能够全程开机是最好了。一般来说，如果没有单独的录音设备，主机位还要担当录音的重任，所以中间停机的话，会导致丢现场的声音，另外，中间停机的话，后期合成对齐的时候，会增加不少工作量。</p>
				</blockquote>
				<p>录制的时候，主要是注意上面的这几点，下一次估计再录制，就会好多了。后期合成的时候，一个主要的问题，就是多个摄像机之间、摄像机和音频之间的对齐，由于使用的都是消费级别的数码设备，设备都不带时间码功能，所以一般的视频剪辑软件的按照时间码对齐的功能都派不上用场。开始的时候用vegas，老是不成，后来换成Edius，发现这个真是方便多了，可以根据录制时间来自动对齐【这样就是为什么录制的时候，各个摄像机和录音设备之间，要时间同步，后期根据录制时间来自动对齐的时候，就方便多了】。使用Edius的时候，感觉有几个地方比较方便，相对于Vegas来说，提高效率不少。【或许Vagas也有类似的功能但是没有发现】</p>
				<blockquote><p>1、多机位编辑，Vegas跟Edius差不多，就是播放的时候，多个机位同时播放，然后想要哪个机位的内容，就点一下或者按一下对应的机位的数字，这样一直播放到底，完成粗剪。</p>
				<p>2、预览的时候显示当前帧的时间。Edius经过设置，在预览的时候，可以在画面上显示时间码，这样对齐和编辑的时候，感觉比较方便，Vegas没有找到方法。</p>
				<p>3、按照录制时间自动对齐功能。消费级摄像机没有时间码功能，但是有录制时间，特别是高清格式的，AVCHD格式的，在MTS文件的第一帧里面，就包含有录制的开始时间，Edius就能从提取这个时间，如果打开按照录制时间同步的功能，把单个录像机的所有视频全选，往时间线上面放的时候，会自动按照录制时间排列，如果中间有停机，时间线上面会空出来一段。然后另一个录像机的放到时间线上以后，首先自己的多段视频会按照录制时间对齐，然后跟第一个摄像机的视频，也会自动对齐，这样再剪辑的时候，就方便多了。</p>
				<p>4、编辑的时候，每台摄像机，最好都放到V轨上面，把音频去掉，然后把主机位，放到A轨上面一份，这样可以全部使用主机位的音频，容易操作。</p>
				</blockquote>
				<p>只要对齐了，后面剪辑什么的，就方便了。最后出来的效果不错，就学央视的春节晚会，台上、台下、观众、演员、特写来回的切换就行了，音频也是连续的，效果不错。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.6636.net/blog/blog/2011/01/08/1530/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>/tmp空间太大导致oracle安装失败</title>
		<link>http://www.6636.net/blog/blog/2010/11/16/1479/</link>
		<comments>http://www.6636.net/blog/blog/2010/11/16/1479/#comments</comments>
		<pubDate>Tue, 16 Nov 2010 03:17:42 +0000</pubDate>
		<dc:creator>香爸</dc:creator>
				<category><![CDATA[软件使用]]></category>

		<guid isPermaLink="false">http://www.6636.net/blog/?p=1479</guid>
		<description><![CDATA[在一个centos上面安装oracle10g，老是提示 [oracle@localhost database]$ ./runInstaller 正在启动 Oracle Universal Installer&#8230; 正在检查安装程序要求&#8230; 检查操作系统版本: 必须是redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2 通过 所有安装程序要求均已满足。 准备从以下地址启动 Oracle Universal Installer /tmp/OraInstall2010-11-16_11-16-28AM. 请稍候&#8230; 写入目录 /tmp/OraInstall2010-11-16_11-16-28AM 时出错。请确保此目录是可写的, 并且至少有 60 MB 的磁盘空间。无法继续安装。 : 没有那个文件或目录 /tmp空间有2.1T，足够大，百思不得其解，经过查询，在metalink上面有个问题，[ID 339657.1]，提到了，说32bit下面，如果/tmp空间大于2T，则会出现问题，可我安装的是64bit，难道也会有这个问题，于是把tmp link到一个小于2T的空间，OK了。]]></description>
			<content:encoded><![CDATA[				<p>在一个centos上面安装oracle10g，老是提示</p>
				<blockquote><p>[oracle@localhost database]$ ./runInstaller<br />
				正在启动 Oracle Universal Installer&#8230;</p>
				<p>正在检查安装程序要求&#8230;</p>
				<p>检查操作系统版本: 必须是redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2<br />
				                                      通过</p>
				<p>所有安装程序要求均已满足。</p>
				<p>准备从以下地址启动 Oracle Universal Installer /tmp/OraInstall2010-11-16_11-16-28AM. 请稍候&#8230;<br />
				写入目录 /tmp/OraInstall2010-11-16_11-16-28AM 时出错。请确保此目录是可写的, 并且至少有 60 MB 的磁盘空间。无法继续安装。<br />
				: 没有那个文件或目录</p></blockquote>
				<p>/tmp空间有2.1T，足够大，百思不得其解，经过查询，在metalink上面有个问题，[ID 339657.1]，提到了，说32bit下面，如果/tmp空间大于2T，则会出现问题，可我安装的是64bit，难道也会有这个问题，于是把tmp link到一个小于2T的空间，OK了。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.6636.net/blog/blog/2010/11/16/1479/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在电脑上模拟器上体验android的电子市场</title>
		<link>http://www.6636.net/blog/blog/2010/08/17/1280/</link>
		<comments>http://www.6636.net/blog/blog/2010/08/17/1280/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 08:04:14 +0000</pubDate>
		<dc:creator>香爸</dc:creator>
				<category><![CDATA[软件使用]]></category>

		<guid isPermaLink="false">http://www.6636.net/blog/?p=1280</guid>
		<description><![CDATA[想在电脑的模拟器上面体验android系统和google的电子市场，let&#8217;s go！ 1、下载安装android SDK，这里下载 http://developer.android.com/sdk/index.html，下载完了以后，安装sdk的时候，需要安装1.6的，后面我们的这个image，是针对1.6的。 2、配置一个ANDROID_SDK_HOME的环境变量，指向磁盘的一个目录。我电脑是这样设置的 set ANDROID_SDK_HOME=e:\ 3、启动sdk，建立一个虚拟手机，比如myphone16,虚拟手机会建立在E:\.android\avd\myphone16.avd这个目录中，这个目录是与ANDROID_SDK_HOME相关的。 4、这里下载system.img,http://www.4shared.com/get/x6pZm3-W/system.html,下载以后，解压，放到E:\.android\avd\myphone16.avd中 5、现在启动myphone16这个虚拟手机，可以使用电子市场了吧。]]></description>
			<content:encoded><![CDATA[				<p>想在电脑的模拟器上面体验android系统和google的电子市场，let&#8217;s go！</p>
				<p>1、下载安装android SDK，这里下载 http://developer.android.com/sdk/index.html，下载完了以后，安装sdk的时候，需要安装1.6的，后面我们的这个image，是针对1.6的。</p>
				<p>2、配置一个ANDROID_SDK_HOME的环境变量，指向磁盘的一个目录。我电脑是这样设置的  set ANDROID_SDK_HOME=e:\</p>
				<p>3、启动sdk，建立一个虚拟手机，比如myphone16,虚拟手机会建立在E:\.android\avd\myphone16.avd这个目录中，这个目录是与ANDROID_SDK_HOME相关的。</p>
				<p>4、这里下载system.img,http://www.4shared.com/get/x6pZm3-W/system.html,下载以后，解压，放到E:\.android\avd\myphone16.avd中</p>
				<p>5、现在启动myphone16这个虚拟手机，可以使用电子市场了吧。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.6636.net/blog/blog/2010/08/17/1280/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle数据库不能open时的数据恢复</title>
		<link>http://www.6636.net/blog/blog/2009/06/24/984/</link>
		<comments>http://www.6636.net/blog/blog/2009/06/24/984/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 06:39:50 +0000</pubDate>
		<dc:creator>香爸</dc:creator>
				<category><![CDATA[软件使用]]></category>

		<guid isPermaLink="false">http://www.6636.net/blog/?p=984</guid>
		<description><![CDATA[前几天，公司开发用的数据库，应该是硬盘坏了，导致redo文件损坏，还有system表空间也有点儿问题（oracle提示的）。试了网上网上非常流行的那种通过resetlog方式强制打开数据库的方法，无效。最后，数据库只能mount，不能open，由于是开发用的数据库，不想要了，反正从生产库可以重新导过来，但是有一个数据库，是没有备份的，比较重要，要想办法恢复。 google一段时间，了解到oracle有一个dul的工具，可以不启动instance，直接从数据文件中恢复数据，也有人开发了类似的工具，可以实现这些功能。我是使用的这里的工具：http://www.itpub.net/viewthread.php?tid=1094660&#038;extra=&#038;page=1 步骤如下： 1、编写control.gdul文件 这个文件的内容，是mount数据库以后，使用下面的语句获得： select rfile#&#124;&#124;&#8217;,'&#124;&#124;name from v$datafile; 2、然后就是一个表一个表的恢复： [oracle@oracle10g gdulimp]$ ./gdul Geng's Data Unloader for Oracle 8i/9i/10g, release 1.0.2. Copyright (c) 2007-2008,Andy Geng. All Rights Reserved. If you have any advises and suggestions, please contact me:gengyonghui@hotmail.com. GDUL>bootstrap bootstrap finished. GDUL>set user confluence GDUL>unload user confluence About to unload CONFLUENCE's tables... 2009-06-24 14:15:55...unloading table [...]]]></description>
			<content:encoded><![CDATA[				<p>前几天，公司开发用的数据库，应该是硬盘坏了，导致redo文件损坏，还有system表空间也有点儿问题（oracle提示的）。试了网上网上非常流行的那种通过resetlog方式强制打开数据库的方法，无效。最后，数据库只能mount，不能open，由于是开发用的数据库，不想要了，反正从生产库可以重新导过来，但是有一个数据库，是没有备份的，比较重要，要想办法恢复。</p>
				<p>google一段时间，了解到oracle有一个dul的工具，可以不启动instance，直接从数据文件中恢复数据，也有人开发了类似的工具，可以实现这些功能。我是使用的这里的工具：<span id="more-984"></span>http://www.itpub.net/viewthread.php?tid=1094660&#038;extra=&#038;page=1</p>
				<p>步骤如下：</p>
				<p>1、编写control.gdul文件</p>
				<p>这个文件的内容，是mount数据库以后，使用下面的语句获得：</p>
				<p><strong>select rfile#||&#8217;,'||name from v$datafile;</strong></p>
				<p>2、然后就是一个表一个表的恢复：</p>
				<p><code>[oracle@oracle10g gdulimp]$ ./gdul<br />
				Geng's Data Unloader for Oracle 8i/9i/10g, release 1.0.2.</p>
				<p>Copyright (c) 2007-2008,Andy Geng.  All Rights Reserved.<br />
				If you have any advises and suggestions,<br />
				please contact me:gengyonghui@hotmail.com.</p>
				<p>GDUL>bootstrap<br />
				bootstrap finished.<br />
				GDUL>set user confluence<br />
				GDUL>unload user confluence<br />
				About to unload CONFLUENCE's tables...</p>
				<p>2009-06-24 14:15:55...unloading table LINKS 1200rows unloaded.<br />
				2009-06-24 14:15:55...unloading table USERS 40rows unloaded.<br />
				2009-06-24 14:15:55...unloading table CONTENT_PERM_SET 19rows unloaded.<br />
				2009-06-24 14:15:55...unloading table BANDANA 47rows unloaded.<br />
				2009-06-24 14:15:56...unloading table OS_PROPERTYENTRY 902rows unloaded.<br />
				2009-06-24 14:15:56...unloading table EXTERNAL_MEMBERS 0rows unloaded.<br />
				2009-06-24 14:15:56...unloading table SPACEPERMISSIONS 500rows unloaded.<br />
				2009-06-24 14:15:56...unloading table CONTENT 4360rows unloaded.<br />
				2009-06-24 14:15:56...unloading table EXTRNLNKS 0rows unloaded.<br />
				2009-06-24 14:15:56...unloading table CONFVERSION 2rows unloaded.<br />
				2009-06-24 14:15:56...unloading table EXTERNAL_ENTITIES 0rows unloaded.<br />
				2009-06-24 14:15:56...unloading table INDEXQUEUEENTRIES 6rows unloaded.<br />
				2009-06-24 14:15:56...unloading table CONFANCESTORS 613rows unloaded.<br />
				2009-06-24 14:15:56...unloading table GROUPS 11rows unloaded.<br />
				2009-06-24 14:15:56...unloading table CLUSTERSAFETY 1rows unloaded.<br />
				2009-06-24 14:15:56...unloading table TRACKBACKLINKS 0rows unloaded.<br />
				2009-06-24 14:15:56...unloading table TRUSTEDAPPRESTRICTION 0rows unloaded.<br />
				2009-06-24 14:15:56...unloading table ATTACHMENTDATA 0rows unloaded.<br />
				2009-06-24 14:15:56...unloading table LABEL 52rows unloaded.<br />
				2009-06-24 14:15:56...unloading table OS_GROUP 11rows unloaded.<br />
				2009-06-24 14:15:56...unloading table SPACES 22rows unloaded.<br />
				2009-06-24 14:16:06...unloading table BODYCONTENT 4345rows unloaded.<br />
				2009-06-24 14:16:06...unloading table NOTIFICATIONS 22rows unloaded.<br />
				2009-06-24 14:16:06...unloading table CONTENT_PERM 20rows unloaded.<br />
				2009-06-24 14:16:06...unloading table TRUSTEDAPP 0rows unloaded.<br />
				2009-06-24 14:16:06...unloading table KEYSTORE 2rows unloaded.<br />
				2009-06-24 14:16:06...unloading table PLUGINDATA 0rows unloaded.<br />
				2009-06-24 14:16:06...unloading table CONTENT_LABEL 238rows unloaded.<br />
				2009-06-24 14:16:06...unloading table SPACEGROUPS 0rows unloaded.<br />
				2009-06-24 14:16:06...unloading table OS_USER_GROUP 55rows unloaded.<br />
				2009-06-24 14:16:06...unloading table LOCAL_MEMBERS 72rows unloaded.<br />
				2009-06-24 14:16:06...unloading table CONTENTLOCK 0rows unloaded.<br />
				2009-06-24 14:16:06...unloading table ATTACHMENTS 594rows unloaded.<br />
				2009-06-24 14:16:06...unloading table OS_USER 36rows unloaded.<br />
				2009-06-24 14:16:06...unloading table DECORATOR 0rows unloaded.<br />
				2009-06-24 14:16:06...unloading table PAGETEMPLATES 0rows unloaded.<br />
				2009-06-24 14:16:06...unloading table HIBERNATE_UNIQUE_KEY 1rows unloaded.<br />
				GDUL></code></p>
				<p>最后，会在当前目录下，每一个表生成一个exp格式导出的文件。</p>
				<p>3、重建数据库，然后把每一个表imp进去。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.6636.net/blog/blog/2009/06/24/984/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>p6spy在tomcat使用spring + jndi数据源时的配置</title>
		<link>http://www.6636.net/blog/blog/2008/12/26/841/</link>
		<comments>http://www.6636.net/blog/blog/2008/12/26/841/#comments</comments>
		<pubDate>Fri, 26 Dec 2008 09:27:32 +0000</pubDate>
		<dc:creator>香爸</dc:creator>
				<category><![CDATA[软件使用]]></category>

		<guid isPermaLink="false">http://www.6636.net/blog/?p=841</guid>
		<description><![CDATA[系统架构采用了Spring框架，之前是使用dbcp自建database connection pool，后来因为别的应用，数据库连接需要使用jndi提供，p6spy不能用了，后来修改了一下，就可以了。 1、tomcat中的jndi配置 2、spring的配置 jdbc/dongjianDS true]]></description>
			<content:encoded><![CDATA[				<p>系统架构采用了Spring框架，之前是使用dbcp自建database connection pool，后来因为别的应用，数据库连接需要使用jndi提供，p6spy不能用了，后来修改了一下，就可以了。<span id="more-841"></span></p>
				<p><strong>1、tomcat中的jndi配置</strong></p>
				<p><code><Resource name="jdbc/DS1" auth="Container"<br />
				              type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver"<br />
				              url="jdbc:oracle:thin:@192.168.0.227:1521:xxxx"<br />
				              username="xxxx" password="xxxx" maxActive="20" maxIdle="10"<br />
				              maxWait="-1"  removeAbandoned="true"  removeAbandonedTimeout="60"<br />
				              logAbandoned="true"/> </code></p>
				<p><strong>2、spring的配置</strong></p>
				<p><code><br />
				<bean id="dataSourceTarge" class="org.springframework.jndi.JndiObjectFactoryBean" lazy-init="false">   </p>
				<property name="jndiName">
				    <value>jdbc/dongjianDS</value>
				   </property>
				<property name="resourceRef">
				       <value>true</value>
				  </property>
				</bean></p>
				<p><bean id="dataSource" class="com.p6spy.engine.spy.P6DataSource" destroy-method="close"><br />
				 <constructor-arg><br />
				    <ref bean="dataSourceTarge"/><br />
				 </constructor-arg><br />
				</bean><br />
				</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.6636.net/blog/blog/2008/12/26/841/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WD Mybook World Edition II 使用感受</title>
		<link>http://www.6636.net/blog/blog/2008/12/10/813/</link>
		<comments>http://www.6636.net/blog/blog/2008/12/10/813/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 04:15:19 +0000</pubDate>
		<dc:creator>香爸</dc:creator>
				<category><![CDATA[生活]]></category>
		<category><![CDATA[软件使用]]></category>

		<guid isPermaLink="false">http://www.6636.net/blog/?p=813</guid>
		<description><![CDATA[前几天存自己拍摄的视频和照片的硬盘满了，于是决定新买一个硬盘。以前这些视频和照片，都是移动硬盘存一份儿，然后刻dvd光盘两份儿，现在硬盘越来越便宜了，dvd光盘的寿命明显不行，所以这次想一劳永逸，打造一个个人数码存贮中心。 开始的想法是买两块硬盘，东西都在备份到两个不同的硬盘上，双保险，就不用再刻盘了，后来淘宝上面一搜，发现一个好东东，就是WD Mybook World Edition II ，可以通过网络访问的硬盘盒，里面可以放两块硬盘，做raid1，使用起来就方便了。 于是淘宝下单，买了两块西部数据640G的硬盘和一个WD Mybook World Edition II 盒子，很快收到货，装好，连夜把视频先都倒进去，使用过后，感觉： 一、简单介绍 这个盒子，本质上是一个使用arm cpu的小电脑，有cpu，有内存，32M内存，有一个千兆网卡接口，一个usb接口，没有键盘、鼠标、显示器等外设的接口，因此需要现在别的机器上，给硬盘装好系统，然后放进去以后通过网络远程管理。 这个盒子上面，原装的系统就是linux，所以，linux的一切特性都适用，系统装好以后，熟悉linux的，可以把系统扩展成一台服务器应该有的所有功能，提供nfs，samba，ftp，apache等服务器特性，或者用来做命令行下面的所有网络客户端所做的工作。只是cpu和内存的限制，性能不行。 网上有很多装好的系统的版本，是为不熟悉linux的用户准备的，如果熟悉linux的用户，装好基本系统以后，可以扩展linux具有的任何功能。 二、优点 方便，以前视频和照片都是存在移动硬盘和光盘上，每次要看的时候，都要先做大半天准备工作，连接电源，给电脑插上很多尾巴，不是很方便，现在好了，只要把硬盘盒放在书架上，一次性连接好网线和电源以后，想要看的时候，按一下开机，就可以通过网上邻居来看了，一个字，爽，两个字，真爽！ 安全，两个640G的硬盘做raid1，数据安全性提高了很多倍，不用整体担心数据丢失了，两个硬盘同时坏的可能性大大降低。 可扩展性强，由于是linux的系统，虽然受硬件限制性能差点儿，但是主要功能都可以将就着用，也可以用来安装bt之类的下载软件来自动下载，由于我主要是用来存数据，舍不得全天开机折腾它，所以没有用它来下载，只是用来保持数据和方便查看。 三、缺点 慢，主要是受cpu性能的限制，数据写入大约只有4-5M左右，数据读出有8M左右，这个速度，在线看上面存储的dvd是没有问题的，将来看高清格式的，估计会有点儿问题，由于主要是做存储用，目前的速度，可以接受。 噪音，估计和因为盒子设计的问题，放了两块儿硬盘，发热量比较大，所以风扇会转，有一点点儿噪音。 2010年8月后记：用了一段时间以后，感觉速度还是太慢了，特别是换了高清的数码相机以后，上传太痛苦了，于是换成硬盘直插的盒子，用机器上面的esata口，一般都是60多M，舒服多了。]]></description>
			<content:encoded><![CDATA[				<p>前几天存自己拍摄的视频和照片的硬盘满了，于是决定新买一个硬盘。以前这些视频和照片，都是移动硬盘存一份儿，然后刻dvd光盘两份儿，现在硬盘越来越便宜了，dvd光盘的寿命明显不行，所以这次想一劳永逸，打造一个个人数码存贮中心。</p>
				<p>开始的想法是买两块硬盘，东西都在备份到两个不同的硬盘上，双保险，就不用再刻盘了，后来淘宝上面一搜，发现一个好东东，就是WD Mybook World Edition II ，可以通过网络访问的硬盘盒，里面可以放两块硬盘，做raid1，使用起来就方便了。</p>
				<p>于是淘宝下单，买了两块西部数据640G的硬盘和一个WD Mybook World Edition II 盒子，很快收到货，装好，连夜把视频先都倒进去，使用过后，感觉：<span id="more-813"></span></p>
				<p><strong>一、简单介绍</strong></p>
				<p>这个盒子，本质上是一个使用arm cpu的小电脑，有cpu，有内存，32M内存，有一个千兆网卡接口，一个usb接口，没有键盘、鼠标、显示器等外设的接口，因此需要现在别的机器上，给硬盘装好系统，然后放进去以后通过网络远程管理。<br />
				这个盒子上面，原装的系统就是linux，所以，linux的一切特性都适用，系统装好以后，熟悉linux的，可以把系统扩展成一台服务器应该有的所有功能，提供nfs，samba，ftp，apache等服务器特性，或者用来做命令行下面的所有网络客户端所做的工作。只是cpu和内存的限制，性能不行。<br />
				网上有很多装好的系统的版本，是为不熟悉linux的用户准备的，如果熟悉linux的用户，装好基本系统以后，可以扩展linux具有的任何功能。</p>
				<p><strong>二、优点</strong></p>
				<p>方便，以前视频和照片都是存在移动硬盘和光盘上，每次要看的时候，都要先做大半天准备工作，连接电源，给电脑插上很多尾巴，不是很方便，现在好了，只要把硬盘盒放在书架上，一次性连接好网线和电源以后，想要看的时候，按一下开机，就可以通过网上邻居来看了，一个字，爽，两个字，真爽！</p>
				<p>安全，两个640G的硬盘做raid1，数据安全性提高了很多倍，不用整体担心数据丢失了，两个硬盘同时坏的可能性大大降低。</p>
				<p>可扩展性强，由于是linux的系统，虽然受硬件限制性能差点儿，但是主要功能都可以将就着用，也可以用来安装bt之类的下载软件来自动下载，由于我主要是用来存数据，舍不得全天开机折腾它，所以没有用它来下载，只是用来保持数据和方便查看。</p>
				<p><strong>三、缺点</strong></p>
				<p>慢，主要是受cpu性能的限制，数据写入大约只有4-5M左右，数据读出有8M左右，这个速度，在线看上面存储的dvd是没有问题的，将来看高清格式的，估计会有点儿问题，由于主要是做存储用，目前的速度，可以接受。</p>
				<p>噪音，估计和因为盒子设计的问题，放了两块儿硬盘，发热量比较大，所以风扇会转，有一点点儿噪音。</p>
				<p><strong>2010年8月后记：用了一段时间以后，感觉速度还是太慢了，特别是换了高清的数码相机以后，上传太痛苦了，于是换成硬盘直插的盒子，用机器上面的esata口，一般都是60多M，舒服多了。</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.6636.net/blog/blog/2008/12/10/813/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>IBM DS3400磁盘阵列在Linux CentOS 5.2 上的安装</title>
		<link>http://www.6636.net/blog/blog/2008/11/29/784/</link>
		<comments>http://www.6636.net/blog/blog/2008/11/29/784/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 13:41:32 +0000</pubDate>
		<dc:creator>香爸</dc:creator>
				<category><![CDATA[互联网]]></category>
		<category><![CDATA[软件使用]]></category>
		<category><![CDATA[服务器]]></category>

		<guid isPermaLink="false">http://www.6636.net/blog/?p=784</guid>
		<description><![CDATA[一、软硬件环境 硬件：两台IBM X3650服务器，一台IBM DS3400磁盘阵列（172641X，单控制器） HBA：两块Emulex 4GB FC Single-Port PCI-E HBA for IBM System x（42C2069），每个服务器一块。 操作系统：Linux CentOS 5.2 目的：实现基于以上软硬件的Oracle 10g Cluster 二、安装步骤 硬件安装完成以后，开始软件的安装与设置。 1、操作系统安装 两台机器安装CentOS 5.2，安装的时候选择虚拟机选项，因为打算使用Xen，CentOS 5.2 能够自动识别 x3650的所有硬件及Emulex 4GB FC Single-Port PCI-E HBA for IBM System x（42C2069），所以按照一般的系统安装过程安装即可，没有特殊要注意的地方。 2、升级DS3400 firmware 在一台笔记上，设置笔记本的ip为192.168.128.200，ping DS3400的默认管理端口IP：192.168.128.101，成功。 在笔记本上安装IBM System Storage DS3000 Storage Manager version 10.35，从IBM网站下载： ftp://ftp.software.ibm.com/systems/support/system_x/ibm_sw_ds3k_10353535_winsrvr_i386.zip 截止到目前最新的版本，只安装管理客户端和firmware update工具即可。 升级DS3400的firmware。目前最新的版本是7.35.41.00，在这个版本的history中，说明增加了对Redhat 5.2（也是CentOs 5.2）的支持，IBM网站下载firmware，文件名ibm_fw_ds3k_07354100_anyos_anycpu.zip，使用Storage [...]]]></description>
			<content:encoded><![CDATA[				<p><strong>一、软硬件环境</strong><br />
				硬件：两台IBM X3650服务器，一台IBM DS3400磁盘阵列（172641X，单控制器）<br />
				HBA：两块Emulex 4GB FC Single-Port PCI-E HBA for IBM System x（42C2069），每个服务器一块。<br />
				操作系统：Linux CentOS 5.2<br />
				目的：实现基于以上软硬件的Oracle 10g Cluster</p>
				<p><strong>二、安装步骤</strong></p>
				<p><span id="more-784"></span><br />
				硬件安装完成以后，开始软件的安装与设置。</p>
				<p><strong>1、操作系统安装</strong></p>
				<p>两台机器安装CentOS 5.2，安装的时候选择虚拟机选项，因为打算使用Xen，CentOS 5.2 能够自动识别 x3650的所有硬件及Emulex 4GB FC Single-Port PCI-E HBA for IBM System x（42C2069），所以按照一般的系统安装过程安装即可，没有特殊要注意的地方。</p>
				<p><strong>2、升级DS3400 firmware</strong></p>
				<p>在一台笔记上，设置笔记本的ip为192.168.128.200，ping DS3400的默认管理端口IP：192.168.128.101，成功。<br />
				在笔记本上安装IBM System Storage DS3000 Storage Manager version 10.35，从IBM网站下载：<br />
				ftp://ftp.software.ibm.com/systems/support/system_x/ibm_sw_ds3k_10353535_winsrvr_i386.zip<br />
				截止到目前最新的版本，只安装管理客户端和firmware update工具即可。</p>
				<p>升级DS3400的firmware。目前最新的版本是7.35.41.00，在这个版本的history中，说明增加了对Redhat 5.2（也是CentOs 5.2）的支持，IBM网站下载firmware，文件名ibm_fw_ds3k_07354100_anyos_anycpu.zip，使用Storage Manager 10 Firmware Upgrade工具进行升级，升级之前，该工具会先进行一些test，需要要都passed才能允许升级，我在升级过程中，遇到两个问题：<br />
				（1）升级开始之前，日志提示：</p>
				<blockquote><p>Event log verification error: You cannot upgrade the storage subsystem until the problem is resolved. Contact your technical support representative to resolve this issue. </p>
				<p>Event log issues:<br />
				Too many critical events logged<br />
				Too many destination driver events<br />
				Too many host side channel error events</p></blockquote>
				<p>升级无法开始，根据日志来看，不是大问题，于是执行script<br />
				clear storageSubsystem eventlog;<br />
				清空了一下日志，就可以升级了。<br />
				（2）升级到最后，提示升级失败，查看日志，显示：</p>
				<blockquote><p>[2008-11-29 16:30:53] [DS3400] [SUPPORT_SERVICES] [DownloadAndActivate]<br />
				download is starting</p>
				<p>[2008-11-29 16:42:19] [DS3400] [SUPPORT_SERVICES] [DownloadAndActivate] [0h 11m 26s]<br />
				download completed successfully</p>
				<p>[2008-11-29 16:42:19] [DS3400] [array data capture] [capture storage subsystem data]<br />
				Storage Subsystem data collection in progress</p>
				<p>[2008-11-29 16:42:25] [DS3400] [SUPPORT_SERVICES] [DownloadAndActivate]<br />
				activation failed</p></blockquote>
				<p>从日志来看，firmware已经下载到DS3400中，但是activation failed<br />
				经过查询，这个在单控制器的DS3400上面常见，只要重新activation 一下就好，执行script<br />
				activate storageSubsystem firmware;<br />
				后，等了20分钟，DS3400重启两次，就可以了。关于这个问题，IBM网站有一个描述：</p>
				<p>http://www-304.ibm.com/systems/support/supportsite.wss/docdisplay?lndocid=MIGR-5078731&#038;brandind=5000028</p>
				<p>3、为DS3400配置阵列，创建逻辑磁盘，map到host</p>
				<p>这些步骤参考【ds3400配双机.doc】可轻松完成。</p>
				<p>4、CentOS 5.2中安装RDAC驱动</p>
				<p>完成步骤1-3以后，如果在CentOS中安装了HBAnywhere的话，可以看到分配给主机的lun，但是从操作系统中，还不能访问，需要安装RDAC驱动以后才可以访问。</p>
				<p>RDAC驱动从IBM网站下载：</p>
				<p>https://www-304.ibm.com/systems/support/supportsite.wss/docdisplay?lndocid=MIGR-5078549&#038;brandind=5000028</p>
				<p>文件名：rdac-LINUX-09.03.0C05.0029-source.tar</p>
				<p>下载以后，解压，然后<br />
				make<br />
				make install</p>
				<p>都成功以后，修改/boot/grub/ menu.lst<br />
				第一个menu<br />
				修改前：</p>
				<blockquote><p>title CentOS (2.6.18-92.1.18.el5xen)<br />
					root (hd0,0)<br />
					kernel /xen.gz-2.6.18-92.1.18.el5<br />
					module /vmlinuz-2.6.18-92.1.18.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet<br />
					module /initrd-2.6.18-92.1.18.el5xen.img</p></blockquote>
				<p>修改后：（红色部分）</p>
				<blockquote><p>title CentOS (2.6.18-92.1.18.el5xen) <strong>with MPP support</strong><br />
				        root (hd0,0)<br />
				        kernel /xen.gz-2.6.18-92.1.18.el5<br />
				        module /vmlinuz-2.6.18-92.1.18.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet<br />
				        <strong>module /mpp-2.6.18-92.1.18.el5xen.img</strong></p></blockquote>
				<p>修改完成后reboot</p>
				<p>然后 fdisk –l，可以看到</p>
				<blockquote><p>[root@database01 grub]# fdisk -l</p>
				<p>Disk /dev/sda: 146.6 GB, 146685296640 bytes<br />
				255 heads, 63 sectors/track, 17833 cylinders<br />
				Units = cylinders of 16065 * 512 = 8225280 bytes</p>
				<p>   Device Boot      Start         End      Blocks   Id  System<br />
				/dev/sda1   *           1          13      104391   83  Linux<br />
				/dev/sda2              14       17834   143147182+  8e  Linux LVM</p>
				<p>Disk /dev/sdb: 107.3 GB, 107374182400 bytes<br />
				255 heads, 63 sectors/track, 13054 cylinders<br />
				Units = cylinders of 16065 * 512 = 8225280 bytes</p>
				<p>Disk /dev/sdb doesn&#8217;t contain a valid partition table</p>
				<p>Disk /dev/sdc: 107.3 GB, 107374182400 bytes<br />
				255 heads, 63 sectors/track, 13054 cylinders<br />
				Units = cylinders of 16065 * 512 = 8225280 bytes</p>
				<p>Disk /dev/sdc doesn&#8217;t contain a valid partition table</p>
				<p>Disk /dev/sdd: 107.3 GB, 107374182400 bytes<br />
				255 heads, 63 sectors/track, 13054 cylinders<br />
				Units = cylinders of 16065 * 512 = 8225280 bytes</p>
				<p>Disk /dev/sdd doesn&#8217;t contain a valid partition table<br />
				[root@database01 grub]#</p></blockquote>
				<p>这里sdb,sdc,sdd就是DS3400上面的三个lun，可以像操作普通的硬盘一样进行挂载了。</p>
				<p>IBM网站的一些资源：<br />
				下载DS3400的各种驱动及相关软件、文档：</p>
				<p>https://www-304.ibm.com/systems/support/supportsite.wss/supportresources?brandind=5000028&#038;familyind=5348409&#038;taskind=2&#038;matrix=Y#Controller%20firmware</p>
				<p>redbook：IBM System Storage DS3000 Introduction and Implementation Guide.pdf</p>
]]></content:encoded>
			<wfw:commentRss>http://www.6636.net/blog/blog/2008/11/29/784/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>使用mencoder转换DVD为FLV格式</title>
		<link>http://www.6636.net/blog/blog/2008/11/17/762/</link>
		<comments>http://www.6636.net/blog/blog/2008/11/17/762/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 04:16:39 +0000</pubDate>
		<dc:creator>香爸</dc:creator>
				<category><![CDATA[软件使用]]></category>
		<category><![CDATA[视频处理]]></category>

		<guid isPermaLink="false">http://www.6636.net/blog/?p=762</guid>
		<description><![CDATA[平时给香香拍的录像，要放到网上的时候，都需要转换成flv格式的才好，经过多次尝试，终于选择了自己最方便的制作方法。 制作的过程需要分成两步，一是截取，二是压缩。 摄像机拍摄完了以后，得到的.vob为扩展名的文件，copy到硬盘以后，先是用mpeg2cut截取自己需要的部分。mpeg2cut在截取的时候，不重新编码，截取vob文件速度超快，基本上就是文件copy的速度。 对于截取出来的视频，使用mencoder转换成flv格式。 因为拍摄的时候，一般都是喜欢使用16:9的格式拍摄，一般的转换方法，转换出来以后，都变成了4:3格式的了，图像被左右压扁，上下拉长了。经过多次尝试，使用下面的参数，而可以保留16:9的宽高比，转换出来播放的时候不变形。 mencoder "VTS_01_1.vob" -o "yingzi.flv" -of lavf -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=200:mbd=2:mv0:trell:v4mv:cbp:last_pred=3:dia=4:cmp=6:vb_strategy=1:aspect=16/9 -vf scale=384:216 -ofps 12 -srate 22050 其他的参数比较容易理解，有几个关键的参数，是需要根据需要调整的。 aspect=16/9：输出的时候，保持16:9的宽高比 vbitrate=200：视频文件的质量，200是一般，数越大，质量越好，文件也越大 -vf scale=384:216 ：转换出来的视频文件的宽和高，注意定义宽和高的时候，这里定义的宽高也是需要遵循16:9的 这样转换出来的视频，与原始视频只是等比例缩小，不变形，真不错。 看看转换后的效果：http://www.6636.net/photo/#/content/FFvideo/yingzi2.flv/ 参考了mencoder的文档：http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-vcd-dvd.html]]></description>
			<content:encoded><![CDATA[				<p>平时给香香拍的录像，要放到网上的时候，都需要转换成flv格式的才好，经过多次尝试，终于选择了自己最方便的制作方法。</p>
				<p>制作的过程需要分成两步，一是截取，二是压缩。<br />
				<span id="more-762"></span><br />
				摄像机拍摄完了以后，得到的.vob为扩展名的文件，copy到硬盘以后，先是用mpeg2cut截取自己需要的部分。mpeg2cut在截取的时候，不重新编码，截取vob文件速度超快，基本上就是文件copy的速度。</p>
				<p>对于截取出来的视频，使用mencoder转换成flv格式。</p>
				<p>因为拍摄的时候，一般都是喜欢使用16:9的格式拍摄，一般的转换方法，转换出来以后，都变成了4:3格式的了，图像被左右压扁，上下拉长了。经过多次尝试，使用下面的参数，而可以保留16:9的宽高比，转换出来播放的时候不变形。</p>
				<p><code><br />
				mencoder "VTS_01_1.vob" -o "yingzi.flv" -of lavf -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=200:mbd=2:mv0:trell:v4mv:cbp:last_pred=3:dia=4:cmp=6:vb_strategy=1:aspect=16/9 -vf scale=384:216 -ofps 12 -srate 22050<br />
				</code></p>
				<p>其他的参数比较容易理解，有几个关键的参数，是需要根据需要调整的。</p>
				<p>aspect=16/9：输出的时候，保持16:9的宽高比<br />
				vbitrate=200：视频文件的质量，200是一般，数越大，质量越好，文件也越大<br />
				-vf scale=384:216 ：转换出来的视频文件的宽和高，注意定义宽和高的时候，这里定义的宽高也是需要遵循16:9的</p>
				<p>这样转换出来的视频，与原始视频只是等比例缩小，不变形，真不错。</p>
				<p>看看转换后的效果：<a href="http://www.6636.net/photo/#/content/FFvideo/yingzi2.flv/">http://www.6636.net/photo/#/content/FFvideo/yingzi2.flv/</a></p>
				<p>参考了mencoder的文档：<a href="http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-vcd-dvd.html">http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-vcd-dvd.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.6636.net/blog/blog/2008/11/17/762/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

