Linux ubuntu安装
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225535483-423365558.png)
我们这里选择的是:ubuntu-14.04.4-server-amd64.iso
配制vmware:
https://my.oschina.net/liangbo/blog/206553
最近想体验一下Ubuntu系统,之后在虚拟机上安装Ubuntu 14.04.4,安装虚拟机步骤可以参考:http://my.oschina.net/liangbo/blog/206541。
下面是在虚拟机上安装过程:
1. 在VMware的菜单栏中点击“文件”-->“新建虚拟机”,如下图:
2. 在“新建虚拟机向导”界面选择“自定义(高级)”,默认下一步:
选择,稍后安装操作系统:
依次选择Linux 和 Ubuntu 64位:
定义你自己想要的虚拟机名称,如:Ubuntu 13.10。并且选择自己新建好的位置:
我这里使用了2G的内存给虚拟机,可能还有点小,可后期再调整:
我这里选择的是“使用桥接网络”,因为我使用的笔记本,并且使用的无线网。如果你是直插网线的话,可以选择“使用网络地址转换(NAT)”。
一直点“下一步”:
下面选择“创建新虚拟磁盘”:
这里我使用的是默认的20G,(玩docker 须要大点,我设50G,特别注意分区分配)并且选择“将虚拟磁盘存储为单个文件”:
这里是将你创建好的20G的磁盘文件放置的路径,尽量不要使用默认的配置,选择一个非系统盘的路径,根据自己的喜好定义文件路径:
下面就是你新建虚拟机的配置预览了,看下图,如果你使用了默认的配置,文件的路径将会在C:\Users\...\Documents文件下,占用你大量的系统磁盘空间。
3. 这样你就完成了虚拟机的配置了,但是你还不能启动你的虚拟机,第一次启动需要配置系统iso的路径:
点击“编辑虚拟机设置”后,弹出如下配置:
4. 好的,现在启动你的虚拟机。
配制系统:
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225541655-725687829.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225541905-69620550.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225542139-2029025103.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225542358-304411008.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225542577-1130029465.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225543061-1087660584.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225543358-1302302122.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225543592-1089534723.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225543827-387368111.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225544092-1911210784.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225544608-1418123994.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225545014-1066720648.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225545436-102044724.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225546124-1601362136.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225546420-566786304.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225546655-1129828132.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225546889-2091069125.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225547155-1603848825.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225547436-1692353526.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225547670-2110310770.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225547967-173555300.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225548295-1984607406.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225548608-898059173.png)
选择“EXT4日志文件系统”
挂载点:选择/boot
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225548842-1645342487.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225549092-1273892977.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225549342-933939610.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225549577-1537967000.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225549795-1495980359.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225550030-307548621.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225550249-1870253081.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225550467-362810330.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225550749-1068541277.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225551077-1226862077.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225551374-496384332.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225551655-461682312.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225551874-546970799.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225552170-1118841784.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225552436-785729675.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225552780-588597356.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225553030-1688397333.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225553655-1149125360.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225554639-882166279.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225555514-1450926973.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225556170-1741976492.png)
sudo passwd root #启用root账号并设置密码,根据提示输入2次密码
su root #从普通用户切换到root用户,根据提示输入root密码
sudo passwd -l root #禁用root账号,如果要启用,输入sudo passwd root再次设置root密码
三、设置IP地址、网关、DNS
1、设置IP地址、网关
nano /etc/network/interfaces #编辑网网卡配置文件
auto lo
iface lo inet loopback
auto eth0 #开机自动连接网络
iface eth0 inet static #static表示使用固定ip,dhcp表述使用动态ip
address 192.168.21.128 #设置ip地址
netmask 255.255.255.0 #设置子网掩码
gateway 192.168.21.2 #设置网关
ctrl+o #保存配置
ctrl+x #退出
2、设置dns
nano /etc/resolv.conf #编辑配置文件,添加以下内容
nameserver8.8.8.8 #设置首选dns
nameserver8.8.4.4 #设置备用dns
ctrl+o #保存配置
ctrl+x #退出
service networking restart #重启网络
四、设置apt-get本地源,为快速安装软件做准备
mount -o loop -t iso9660 /home/ubuntu-13.10-server-i386.iso /media/cdrom
#挂载系统镜像(需要先拷贝系统镜像到相应目录)
#把系统镜像文件/home/ubuntu-13.10-server-i386.iso挂载到/media/cdrom目录下
cp /etc/apt/sources.list /etc/apt/sources.listbak #备份原文件
nano /etc/apt/sources.list #编辑,删除全部内容,添加下面一行
deb file:///media/cdrom saucy main
ctrl+o #保存配置
ctrl+x #退出
apt-get update #更新源
apt-get upgrade #更新软件包
参数说明:
#/media/cdrom为挂载的目录(可以自己创建)
#saucy为Ubuntu Server 13.10 的版本名称,main为系统安装文件中pool目录下的文件夹名字
#umount /media/cdrom 命令可以卸载
五、使用apt-get安装软件
apt-get install apache2 #安装apache
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225556592-1821043952.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225556827-65952474.png)
![](https://images2015.cnblogs.com/blog/1058968/201611/1058968-20161110225557061-1870699590.png)