码迷,mamicode.com
首页 > 系统相关 > 详细

Ubuntu虚拟机安装

时间:2015-07-18 19:56:31      阅读:156      评论:0      收藏:0      [点我收藏+]

标签:

曾经多次安装Ubuntu虚拟机,但是都没有将安装遇到的问题进行总计,这次准备搭建hadoop集群,因此又折腾起来。将安装遇到的问题,进行总结。

 

使用Ubuntu10.04LTS镜像。

 

安装完成后,先配置成国内更新源

由于默认情况下没有vim可用,因此先用gedit进行文本可视化编辑。

 

sudo gedit /etc/apt/sources.list

将需要的源拷贝进入此list中:

## 163 sources
deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse

## ali source
deb http://mirrors.aliyun.com/ubuntu/ utopic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ utopic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ utopic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ utopic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ utopic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ utopic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ utopic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ utopic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ utopic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ utopic-backports main restricted universe multiverse

## osChina sources
deb http://mirrors.oschina.net/ubuntu/ utopic main restricted universe multiverse
deb http://mirrors.oschina.net/ubuntu/ utopic-security main restricted universe multiverse
deb http://mirrors.oschina.net/ubuntu/ utopic-updates main restricted universe multiverse
deb http://mirrors.oschina.net/ubuntu/ utopic-proposed main restricted universe multiverse
deb http://mirrors.oschina.net/ubuntu/ utopic-backports main restricted universe multiverse
deb-src http://mirrors.oschina.net/ubuntu/ utopic main restricted universe multiverse
deb-src http://mirrors.oschina.net/ubuntu/ utopic-security main restricted universe multiverse
deb-src http://mirrors.oschina.net/ubuntu/ utopic-updates main restricted universe multiverse
deb-src http://mirrors.oschina.net/ubuntu/ utopic-proposed main restricted universe multiverse
deb-src http://mirrors.oschina.net/ubuntu/ utopic-backports main restricted universe multiverse

 

此时需要update及upgrade,否则会报如下错误:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package vim is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

所以,update以及upgrade先:

sudo apt-get update
sudo apt-get upgrade

update时候会报类似“wick”的错误提示,可以忽略。然后进入漫长的等待upgrade。

[后来发现,不用upgrade,直接update之后,就可以安装自己需要的工具了,如vim、git等]

 

sudo apt-get install git
sudo apt-get install vim

 

upgrade会将一些常见的基础以及依赖都更新下来。

 

PS:ubuntu官方的下载速度都可以在2.5MB/s,真是良心。

 

Ubuntu虚拟机安装

标签:

原文地址:http://www.cnblogs.com/crafet/p/4656281.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!