2

linux 网络相关的简单介绍及centos8 yum源无法使用的解决方法

 2 years ago
source link: https://blog.51cto.com/u_15148274/5511886
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

linux 网络相关的简单介绍及centos8 yum源无法使用的解决方法

原创

想剪个寸头 2022-07-25 16:31:10 ©著作权

文章标签 centos yum源 linux 文章分类 Linux 系统/运维 阅读数230

ifdown / ifup   
ifdown  ens33    关闭网卡(直接断掉终端)断掉之后无法进行运程链接,需要进入服务器开启 
ifup   ens33     开启
使用时最好两个一起使用  ifdown ens33 && ifup  ens33 一起使用

增加虚拟网卡
cd /etc/sysconfig/network-scripts/   
cp ifcfg-ens33 ifcfg-ens33\:0      \表示脱义冒号
vim ifcfg-ens33\:0               编辑文件 如图所示
linux 网络相关的简单介绍及centos8 yum源无法使用的解决方法_yum源
保存退出之后
ifdown ens33 && ifup  ens33   重启网卡
ifconfig  查看  如图所示会出现虚拟网卡信息
可在Windows上验证是否能pong通该IP地址
linux 网络相关的简单介绍及centos8 yum源无法使用的解决方法_yum源_02

查看网卡连接状态

查看网卡是否连接网线
mii-tool ens33     有时候该命令无法使用 可以使用下面那个命令  如图所示
ethtool ens33
linux 网络相关的简单介绍及centos8 yum源无法使用的解决方法_linux_03

centos8 yum源安装配置

cd cd /etc/yum.repos.d/
mkdir bak
mv CentOS-Linux-* bak
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo   
#如果没有wget 命令 无法下载的话 
#先在浏览器中输入地址下载到桌面https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo 
#然后使用xhell 的xftp工具  将下载的yum源包直接鼠标点击拖入进linux系统中 放入到/etc/yum.repos.d/ 目录下
#然后  yum list  验证即可

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK