系统安装过程
12版本虚拟机:
准备:改成传统网卡名称eth:
CentOS5 6 网卡名字eth0 eth1
CentOS7 网卡默认命名 ens33
安装之前按Tab 键改网卡名称 eth:
net.ifnames=0 biosdevname=0
网卡如果不是eth0,修改方法
http://oldboy.blog.51cto.com/2561410/17221011、 按键盘↑选择Install CentOS Linux7
2、 在安装过程中使用的语言,默认英文
3、 日期和时间DATA & TIME
4、 软件选择SOFTWARE SELECT
选择Sever with GUI或者
选择GNOME Desktop或者
选择Minimal Install,并勾选 1调试工具、2兼容库、3开发包、4安全工具、6系统管理工具。
5、 安装位置
1.勾选I will configure paritioning – Done --选择标准分区:standard partiton–然后按+号开始划分分区
2.添加磁盘 ADD….:
默认LVM,动态分配磁盘,但高并发下性能会下降 5-10%
分区建议:
点Done后,弹出变更摘要Summary of changes,点Accept Changes6、 NETWORK & HOSTNAME(网络和主机名)
7、安全:忽略
KDUMP:虚拟环境可不勾选。工作中需打开。8、 安装过程中,设置下root密码,然后创建一个用户
设置root密码
创建用户,勾选下作为管理员Make this user Administrator
9、 安装完后点重启
10、 重启后,接受下协议
11、 完成设置
12、 ifconfig检查两个网卡是否都起来了,是否有ip地址分配,如果没有,可以cat /etc/sysconfig/network-scripts/ifcfg-网卡名,看看里面有一行ONBOOT=no(这条配置决定了开机是否启动网卡),如果是no, 可以用nano或gedit或vim等工具来更改为yes,这样下次重启后就永久生效了,然后ifup 网卡名实时启动网卡(避免重启)。
13、关闭系统,拍一个快照。
14、配置YUM源
更改yum源,下载软件的安装源: 在-o前加 -s 静默安装
curl -s -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
curl -s -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
系统更新到最新:
yum clean all # 清除系统所有的yum缓存
yum makecache # 生成yum缓存
Yum -y update
PS:如更新失败,删除重新配置yum仓库:
rm -f /etc/yum.repos.d/CentOS-Base.repo
rm -f /etc/yum.repos.d/*
#CentOS6和CentOS7都要安装的常用基础工具包
yum install tree nmap dos2unix lrzsz nc lsof wget tcpdump htop iftop iotop sysstat nethogs -y#CentOS7要安装的常用基础工具包
yum install psmisc net-tools bash-completion vim-enhanced -y15、安装组包
yum groups mark convert
yum grouplist #<==查看所有包组名称,包括已安装的和未安装的
#指定包组名安装,要带双引号,装过的不能重复装:
yum groupinstall “Development Tools” -y
yum groupinstall “Cinnamon” -y