本分原文件cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
编辑镜像文件vi /etc/yum.repos.d/CentOS-Base.repo-------------------------------------# 删除原来内容dG# 粘贴中科大源地址-------------------------------------# 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 - Base#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infrabaseurl=https://mirrors.ustc.edu.cn/centos/$releasever/os/$basearch/gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#released updates[updates]name=CentOS-$releasever - Updates#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infrabaseurl=https://mirrors.ustc.edu.cn/centos/$releasever/updates/$basearch/gpgcheck=1gpgkey=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=$releasever&arch=$basearch&repo=extras&infra=$infrabaseurl=https://mirrors.ustc.edu.cn/centos/$releasever/extras/$basearch/gpgcheck=1gpgkey=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=$releasever&arch=$basearch&repo=centosplus&infra=$infrabaseurl=https://mirrors.ustc.edu.cn/centos/$releasever/centosplus/$basearch/gpgcheck=1enabled=0gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
更新本地缓存yum makecache
配置静态IP编辑网络配置文件/etc/sysconfig/network-scripts/ifcfg-ens33
修改BOOTPROTO的值为static
vim /etc/sysconfig/network-scripts/ifcfg-ens33----------------------------------------------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="1821e847-7c8c-45b8-9875-7c4e2333bd3d"DEVICE="ens33"ONBOOT="yes"IPADDR="192.168.200.100"PREFIX="24"GATEWAY="192.168.200.2"DNS1="8.8.8.8"IPV6_PRIVACY="no"
【Linux学习环境搭建流程】
经验总结扩展阅读
- 持续更新~ Arch Linux + KDE 配置&美化
- Archlinux + Dwm 配置流程
- Archlinux配置fcitx5
- 2022-10-01 ArchLinux安装手册
- Archlinux安装Picgo配置Typora
- 关于入门深度学习mnist数据集前向计算的记录
- 四十 Java开发学习----MyBatisPlus入门案例与简介
- FHE学习笔记 #2 多项式环
- 奥比岛搜查藏宝屋及其附近环境完成方法
- 手把手教程 VM虚拟机搭建Linux CentOS7