标签:挂载 service 拷贝 bak route ack font serve vco
网络1:物理机与虚拟机相连。host-only,用于管理网络。DHCP off网络2:OpenVswitch 占用网路。Host-only。
网络3:数据通讯网络。Host-only。指的是存储数据的大规模数据
网络4:链接internet网络。NAT
ubuntu只能以普通账户登录
$ sudo passwd root //启动root
$ su - root
虚拟机4网卡
vmnet2—hostonly 192.168.56.1
vmnet3—hostonly 192.168.57.1
vmnet4—hostonly 192.168.58.1
vmnet5—NAT
修改vmware Fusion vmnet
/Library/Preferences/VMware\Fusion/networking
修改ubuntu 网络配置
vim /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.56.180
netmask 255.255.255.0
network 192.168.56.0
broadcast 192.168.56.255
gateway 192.168.56.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 8.8.8.8
auto eth1
iface eth1 inet dhcp
auto eth2
iface eth2 inet dhcp
auto eth3
iface eth3 inet static
address 10.0.2.2
netmask 255.255.255.0
gateway 10.0.2.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 8.8.8.8
重启电脑后,需要虚拟机可以ping通过外网,通过NAT网卡
查看命令 route (如过default默认为192.168.56.1 0.0.0.0 eth)
删除默认 route del default gw 192.168.56.1 eth0
增加默认 route add default gw 10.0.2.1 eth3
如果仍然ping 百度显示unkonw
vi /etc/nsswitch.conf
hosts: files dns
networks: files
改成:
hosts: files dns wins
networks: files
如果不一样的话,就在hosts:原来那行后面加个wins 就行了。
本地更新源
root@ubuntu:~# mount /dev/sdb1 /data/ 挂载光盘
root@ubuntu:~# vim /etc/nginx/sites-enabled/default //nginx的配置文件
root@ubuntu:~#nginx -t
root@ubuntu:~#nginx //启动nginx
或者
root@ubuntu:~#service nginx
s-allinone主机:
root@s-allinone:~# cp /etc/apt/sources.list /etc/apt/sources.list.bak //备份文件
root@s-allinone:~# vim /etc/apt/sources.list
:%s,us.archive.ubuntu.com,192.168.1.108/archive.ubuntu.com,g //替换为本地源
并且注释掉全部的security.ubuntu.com相关选项
可以增加置MongoDB源
deb http://192.168.1.108/downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
网络更新源:
#vim /etc/apt/sources.list
:%s,us.archive.ubuntu.com,cn.archive.ubuntu.com,g
注释掉zib
#apt-get update
拷贝openstack-ubuntu-14.04到vbox
#scp -pr openstack-ubuntu-14-04.tar.gz root@192.168.56.180:~/
#mv openstack-ubuntu-14-04.tar.gz /opt/
#tar -zxvf openstack-ubuntu-14-04.tar.gz
#cd openstack-ubuntu-14-04/
初始化
#./init.sh
#./create_link.sh
标签:挂载 service 拷贝 bak route ack font serve vco
原文地址:http://blog.51cto.com/wuhui1994/2064962