这篇文章主要介绍了CentOS 7.3.1611 系统安装配置图文教程,需要的朋友可以参考下

说明:
截止目前CentOS 7.x最新版本为CentOS 7.3.1611,下面介绍CentOS 7.3.1611的具体安装配置过程
服务器相关设置如下:
操作系统:CentOS 7.3.1611
IP地址:192.168.21.130
网关:192.168.21.2
DNS:8.8.8.8 8.8.4.4
备注:
CentOS 7.x系列只有64位系统,没有32位。生产服务器建议安装CentOS-7-x86_64-Minimal-1611.iso版本
一、安装CentOS 7.3.1611
成功引导系统后,会出现下面的界面

界面说明:
Install CentOS 7 #安装CentOS 7
Test this media & install CentOS 7 #测试安装文件并安装CentOS 7
Troubleshooting #修复故障
这里选择第一项,安装CentOS 7,回车,进入下面的界面

语言选择界面,正式生产服务器建议安装英文版本。
Continue继续

选择-系统SYSTEM-安装位置INSTALLTION DESTINATION,进入磁盘分区界面

选择-其它存储选项Other Storage Options-分区Partitoning-我要配置分区I will configure partitioning,
点左上角的“完成Done”,进入下面的界面

新挂载点使用以下分区方案:标准Standard Partition
完成Done

分区前先规划好
swap #交换分区,一般设置为内存的2倍
/ #剩余所有空间
备注:生产服务器建议单独再划分一个/data分区存放数据

点左下角的“+”号
挂载点:swap
期望容量:2048
添加挂载点,如下图所示

继续点左下角的“+”号
挂载点:/
期望容量:留空 #默认为剩余所有空间
添加挂载点,如下图所示


点左上角的“完成Done”,进入下面的界面

接受更改Accept Changes,进入下面的界面

软件SOFTWARE”-“软件选择SOFTWARE SELECTION”,我们使用的是Minimal版本,默认是最小化安装。

设置完成后,点Done

开始安装Begin Installation
进入下面的界面

选择-用户设置USER SETTINGS-ROOT密码,进入下面的界面

设置Root密码
如果密码长度少于5位,会提示要按“完成”两次来确认,安装继续。

安装完成之后,会进入下面的界面

重启Reboot

进入登录界面

账号输入root 回车
再输入上面设置的root密码回车
系统登录成功
二、设置IP地址、网关DNS
说明:CentOS 7.x默认安装好之后是没有自动开启网络连接的!
cd /etc/sysconfig/network-scripts/ #进入网络配置文件目录
vi ifcfg-ens33 #编辑配置文件,添加修改以下内容
BOOTPROTO=static #启用静态IP地址
ONBOOT=yes #开启自动启用网络连接
IPADDR0=192.168.21.130 #设置IP地址
PREFIXO0=24 #设置子网掩码
GATEWAY0=192.168.21.2 #设置网关
DNS1=8.8.8.8 #设置主DNS
DNS2=8.8.4.4 #设置备DNS
:wq! #保存退出

service network restart #重启网络
ping www.baidu.com #测试网络是否正常

ip addr #查看IP地址

三、设置主机名为www
hostname www #设置主机名为www
vi /etc/hostname #编辑配置文件
www #修改localhost.localdomain为www
:wq! #保存退出
vi /etc/hosts #编辑配置文件
127.0.0.1 localhost www #修改localhost.localdomain为www
:wq! #保存退出
四、把网卡名称ifcfg-ens33改为ifcfg-eth0
CentOS 7.x系统中网卡命名规则被重新定义,可能会是”ifcfg-ens33”等,下面我们把网卡改为ifcfg-eth0这种。
1、cd /etc/sysconfig/network-scripts/
mv ifcfg-ens33 ifcfg-eth0 #修改名称
vi ifcfg-eth0 #编辑
NAME=eth0 #修改
DEVICE=eth0 #修改
:wq! #保存退出

2、vi /etc/sysconfig/grub #编辑
在”GRUB_CMDLINE_LINUX“变量中添加一句”net.ifnames=0 biosdevname=0“
:wq! #保存退出

3、运行命令:grub2-mkconfig -o /boot/grub2/grub.cfg #重新生成grub配置并更新内核参数
4、添加udev的规则
在”/etc/udev/rules.d“目录中创建一个网卡规则”70-persistent-net.rules“,并写入下面的语句:
SUBSYSTEM==”net”,ACTION==”add”,DRIVERS==”?*”,ATTR{address}==”00:0c:29:1e:a3:77″,ATTR{type}==”1″ ,KERNEL==”eth*”,NAME=”eth0″
#ATTR{address}==”00:0c:29:1e:a3:77″是网卡的MAC地址
cd /etc/udev/rules.d
vi 70-persistent-net.rules #添加
SUBSYSTEM==”net”,ACTION==”add”,DRIVERS==”?*”,ATTR{address}==”00:0c:29:1e:a3:77″,ATTR{type}==”1″ ,KERNEL==”eth*”,NAME=”eth0″
:wq! #保存退出

shutdown -r now #重启系统
网卡已经更改为eth0
至此,CentOS 7.3.1611系统安装配置图解教程完成!
原文链接:http://www.osyunwei.com/archives/10003.html
© 版权声明
文章版权归作者所有,未经允许请勿转载。
相关文章
暂无评论...