<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[阿Tim日志]]></title> 
<link>https://atim.cn/index.php</link> 
<description><![CDATA[专业的php开发者.开发团队的带队人]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[阿Tim日志]]></copyright>
<item>
<link>https://atim.cn/post//</link>
<title><![CDATA[vbox在centos下增加共享目录]]></title> 
<author>bkkkd &lt;partybase@gmail.com&gt;</author>
<category><![CDATA[开发应用]]></category>
<pubDate>Sun, 14 Jun 2015 15:25:40 +0000</pubDate> 
<guid>https://atim.cn/post//</guid> 
<description>
<![CDATA[ 
	最近在写一个程序，需要放到linux下运行，所以我想在vbox下建立一个共享目录。vbox在window系统下安装增强功能是很简单的，但在linux命令行下，有些门槛。<br/>我这里大概说一下在命令行下如何安装共享目录。<br/><br/>1，在vbox对应的系统窗口里，点击”安装增加功能“（这里实际就是把增加功能的iso文件作为光盘加载到虚拟系统上）<br/><a href="https://atim.cn/attachment.php?fid=55" target="_blank"><img src="https://atim.cn/attachment.php?fid=55" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/>2，查看有没有一个/media/cdrom的目录<br/><div class="code"><br/>ll /media/cdrom<br/></div><br/>正常的内容是：<br/><a href="https://atim.cn/attachment.php?fid=54" target="_blank"><img src="https://atim.cn/attachment.php?fid=54" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/>3，如果没有该目录或者该目录下没有内容，可能需要手动加载。<br/><div class="code"><br/>mount -t auto -o ro /dev/cdrom /media/cdrom/<br/></div><br/>注意如果/dev下没有cdrom的资源，可以在系统窗口中，取消 VBoxGuestAdditions.iso后，再选择。<br/><a href="https://atim.cn/attachment.php?fid=56" target="_blank"><img src="https://atim.cn/attachment.php?fid=56" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/>4，执行安装程序<br/><div class="code"><br/>./VBoxLinuxAdditions.run<br/></div><br/>网上的教程说会有部分系统会有错误，不过我在centos5.11下没有问题。<br/>5，添加共享目录<br/><a href="https://atim.cn/attachment.php?fid=57" target="_blank"><img src="https://atim.cn/attachment.php?fid=57" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/><a href="https://atim.cn/attachment.php?fid=58" target="_blank"><img src="https://atim.cn/attachment.php?fid=58" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/>由于是我想长期使用，所以我选择了固定共享，具体情况。可以自行调整。<br/>6，加载共享目录<br/><div class="code"><br/>mount -t vboxsf share /mnt/share<br/></div><br/>注意上面的命令是临时加载，只是为了测试是否有效。<br/><div class="code"><br/>ll /mnt/share<br/></div><br/>看看在母机上修改文件是否可以更新到虚拟机上。<br/>注意share是我使用的共享名，可以根据情况自行调整。<br/>7，作为长自动加载。<br/><div class="code"><br/>echo &quot;share&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /mnt/share&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vboxsf&nbsp;&nbsp;defaults&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 0&quot;&gt;&gt; /etc/fstab<br/></div><br/>重启系统看一下是否自动加载了。
]]>
</description>
</item><item>
<link>https://atim.cn/post//#blogcomment</link>
<title><![CDATA[[评论] vbox在centos下增加共享目录]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://atim.cn/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>