安装Ubuntu和必备软件
一:安装虚拟机Vmware。
注意:如果是win7系统则需要装7.0以上版本,否则会导致虚拟机geust系统无法上网。
二:安装Ubuntu。建议安装9.04相对稳定。
注意:9.10版本可能会导致安装ADT失败,需要安装WST解决此问题。run Eclipse->Help->Install new software->Add Site->
http://download.eclipse.org/releases/galileo/.
三:安装Samba。此工具用于host与guest之间的文件共享。
# sudo apt-get insall samba samba-common-bin
# mkdir /home/win_share
# sudo chmod 777 /home/win_share
2.2. 创建Samba配置文件: (选配)
#sudo gedit /etc/samba/smb.conf
添加以下配置:
[Win_share]
comment = windows share
path = /home/win_share
browseable = yes
read only = no
writable = yes
public = yes
guest ok = yes
available = yes
2.3. 重启Samba服务
# /etc/init.d/samba restart
以上操作成功后,在Ubuntu下敲命令行ifconfig查看ip,用主机直接访问guest的ip地址即可。为了方便访问win_share文件夹,也可以工具->映射网络驱动
四:安装Vmware-tools
首先你可能需要安装vmware-tools工具.这样你鼠标可以方便的在虚拟机和主机之间自由移动.复制黏贴等操作.
以下操作可以完成vmware-tools的安装
将下面代码保存成ubuntu904vmtools.sh
echo "Updating packages..."
sleep 3
sudo apt-get update
echo Y|sudo apt-get upgrade
echo -n "Determining whether this is a desktop or a server installation... "
if [ "${kernelstring=`uname -r|grep -i server`}" == "" ]; then
desktopinstall=true
echo "desktop."
else
desktopinstall=false
echo "server."
fi
sleep 3
if [ $desktopinstall == true ]; then
echo Y|sudo apt-get install build-essential libgtk2.0-dev libgtkmm-2.4-dev libproc-dev libdumbnet-dev xorg-dev psmisc linux-headers-$(uname -r) libproc-dev libicu-dev libglib2.0-dev libnotify-dev libfuse-dev xserver-xorg-input-vmmouse
else
echo Y|sudo apt-get install build-essential libproc-dev libdumbnet-dev psmisc linux-headers-$(uname -r) libproc-dev libicu-dev libglib2.0-dev libfuse-dev
fi
mkdir /tmp/chrysaor.info && cd /tmp/chrysaor.info
echo "Downloading VMware Tools..."
sleep 1
wget http://content.wuala.com/contents/chrysaor.info/public/scriptcontent/vmware-tools-ubuntu904.tgz
echo "Removing (Open) VMware Tools if installed"
sleep 1
echo Y|sudo apt-get remove open-vm-tools
if [ -f /usr/bin/vmware-uninstall-tools.pl ]; then
sudo perl /usr/bin/vmware-uninstall-tools.pl
fi
echo "Untaring VMware Tools..."
sleep 1
tar xzvf vmware-tools*.tgz*
echo "Installing VMware Tools..."
sleep 1
cd vmware-tools-distrib/
sudo perl ./vmware-install.pl
echo "Installation of VMware Tools finished. You may now reboot."
echo "Please come visit us at http://chrysaor.info ."
保存在当前目录下然后运行#sudo perl ./ubuntu904vmtools.sh。
最后注意旧版本的金山词霸去Ubuntu有冲突,主机host与guest切换光标时会导致程序退出