VM:Virtual-box
Host:winxp
Guest:Ubuntu
实在受不了virtual-box 下ubutnu桌面版和windows切换屏幕时候的等待时间,而且性能和速度越来越慢,有人说和GNOME有关系,于是决定用virtual-box 装ubuntu-server,彻底没有桌面,速度似乎快了很多,内存消耗也非常少了。
但是要解决固定IP的问题,于是参考了下后加了一些东西
1./etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
address 192.168.56.2
netmask 255.255.255.0
network 192.168.56.255
gateway 192.168.56.1
#是设置成这个是因为windows上virtual-box的host only interface的IP被设置成了 192.168.56.1
2.virtual-box中两张网卡的设置
第一张设置为NAT,接口为原来计算机网卡,相当于通过原来网卡,NAT可以上网。
第二章设置为 host-only, 接口也为virtual-box host-only
关键是 要把xp上有个什么1394的第三张网卡禁掉,不然要么ping不通, 要么不能通过host上网。
另外一个办法是,第二张网卡先不要设为host-only, 先改成其他方式,让第一张先联通网络,然后在通过vb的控制菜单改成host-only接口,居然可以了
神奇的很。
安装sshserver sudo apt-get install openssh-server
ssh 192.168.56.2
全部搞定。
#ruby install
sudo apt-get install build-essential bison openssl libreadline5 libreadline-dev libreadline5-dev curl git-core zlib1g zlib1g-dev libssl-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev
#download ruby
wget ftp://ftp.ruby-lang.org:21//pub/ruby/1.9/ruby-1.9.2-p180.tar.gz
#tar -xzvf ruby-1.9.2-p180.tar.gz
cd ruby-1.9.2-p180...
./configure
make
sudo make install
# openssl config and update
cd ruby-source/ext/openssl
ruby extconf.rb
make
make install
进行上面的操作需要包:libssl-dev
#readline config and update, otherwise,rails console will fail
cd ruby-srouce/ext/readline
ruby extconf.rb
make && make install
#rails install
家里要用ADSL先拨号上网
#Virtual-box additional install
wget http://download.virtualbox.org/virtualbox/4.0.4/VBoxGuestAdditions_4.0.4.iso
mount -o loop VBoxGuestAdditions_4.0.4.iso ./disk
sudo apt-get install dkms
uname -r查看header version
第一次会失败,然后根据提示看log里面, 会有提示安装对应的linux-header,装了后,再运行 sudo ./VBoxLinuxAdditions.run --nox11
apt-get install linux-headers-2.6.35-22.generic
#这个时候启动失败,好像默认是启动ubuntu pae不知道为什么失败
用 ubuntu 2.6.35-22 generic 是ok,只好改动下启动顺序
#grub2 启动顺序
sudo vim /etc/default/grub
改变第一行的值GRUB_DEFAULT=3
sudo update-grub
#ubuntu install mongodb
sudo apt-get install mongodb
#install nginx
sudo apt-get install nginx
#use putty connection manager to connect guest with eth1 ip
question is why sometimes internet drops while ssh session with guest is there
Virtual-box install Ubuntu-Server
猜你喜欢
转载自hunter-wxhu-hotmail-com.iteye.com/blog/932209
今日推荐
周排行