1、CentOS版本:CentOS-7-x86_64-DVD-1611.iso
2、官网镜像ISO下载(阿里云), 链接
安装步骤
1、开启虚拟机,按Enter键,开始安装CentOS。
2、按Enter键继续,耐心等待检查映像的完整性。
3、进入安装界面,选择English(推荐选择)。
4、耐心等待,点击选择软件配置。
5、选择最小化安装,勾选开发者常用软件包。
6、耐心等待,点击配置磁盘分区。
7、选择自定义磁盘分区。
8、点击 + 号,创建必需分区。
9、创建/boot分区,引导分区,512MB。
10、创建swap分区,内存交换分区,2048MB。
11、创建/分区,根分区。
12、创建完成后,点击Done。
13、同意格式化磁盘。
14、开始安装CentOS。
15、设置root用户密码,创建普通用户(可选)。
16、如果设置密码过于简单,需要双击Done,才能设置成功。
17、创建普通用户(ben),如果密码过于简单,同样需要双击Done。
18、耐心等待安装,安装成功后点击reboot,重启虚拟机。
19、至此安装CentOS7 mini版完成。
配置CentOS7
1、获取超级管理员权限(#)。
2、配置网卡,设置静态IP。
vi /etc/sysconfig/network-scripts/ifcfg-ens33
注意修改HWADDR、UUID、IPADDR、GATEWAY
DEVICE=eth33 HWADDR=00:0C:29:C0:BD:A2 TYPE=Ethernet UUID=7b32e2d7-66ed-47e1-a21c-c1b22faebbeb ONBOOT=yes BOOTPROTO=static IPADDR=192.168.1.110 NETMASK=255.255.255.0 GATEWAY=192.168.1.2 DNS1=223.5.5.5 DNS2=8.8.8.8
3、重启网络服务。 service network restart
4、使用XShell连接虚拟机,进行操作,教程。 5、修改CentOS的更新源,备份源。
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
6、添加中科大的CentOS7的源
vi /etc/yum.repos.d/CentOS-Base.repo
|# CentOS-Base.repo
The mirror system uses the connecting IP address of the client and the
update status of each mirror to pick mirrors that are updated to and
geographically close to the client. You should use this for CentOS updates
unless you are manually picking other mirrors.
If the mirrorlist= does not work for you, as a fall back you can try the
remarked out baseurl= line instead.
[base] name=CentOS-releasever&arch=releasever/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#released updates [updates] name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=basearch&repo=updates
baseurl=http://mirrors.ustc.edu.cn/centos/basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful [extras] name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=basearch&repo=extras
baseurl=http://mirrors.ustc.edu.cn/centos/basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=basearch&repo=centosplus
baseurl=http://mirrors.ustc.edu.cn/centos/basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
7、生成源的缓存。
yum makecache
8、安装vim编辑器
yum install vim