Centos的安装与配置
Centos7使用国内镜像源下载
阿里镜像源: http://mirrors.aliyun.com/centos/7/isos/x86_64/
各个版本的ISO镜像文件说明:
CentOS-7-x86_64-DVD-1708.iso 标准安装版(推荐)
CentOS-7-x86_64-Everything-1708.iso 完整版,集成所有软件(以用来补充系统的软件或者填充本地镜像)
CentOS-7-x86_64-LiveGNOME-1708.iso GNOME桌面版
CentOS-7-x86_64-LiveKDE-1708.iso KDE桌面版
CentOS-7-x86_64-Minimal-1708.iso 精简版,自带的软件最少
CentOS-7-x86_64-NetInstall-1708.iso 网络安装版(从网络安装或者救援系统)
Centos7设置静态IP
1. 修改网卡配置
vi /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE="Ethernet" PROXY_METHOD="none" BROWSER_ONLY="no" BOOTPROTO="static" DEFROUTE="yes" IPV4_FAILURE_FATAL="no" IPV6INIT="yes" IPV6_AUTOCONF="yes" IPV6_DEFROUTE="yes" IPV6_FAILURE_FATAL="no" IPV6_ADDR_GEN_MODE="stable-privacy" NAME="ens33" UUID="40fa6da5-b384-40d9-bc63-505ce8439119" DEVICE="ens33" ONBOOT="yes" IPADDR="192.168.19.20" PREFIX="24" GATEWAY="192.168.19.2" IPV6_PRIVACY="no"
2. 重启网络
service network restart
Centos7初始化配置
1. 修改主机名
hostnamectl set-hostname Centos
2. 关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
3. 更新源
# 1. 备份/etc/yum.repos.d/CentOS-Base.repo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup # 2. 下载对应版本repo文件 curl http://mirrors.163.com/.help/CentOS7-Base-163.repo # 3. 生成缓存 yum clean all yum makecache