修改Linux的网卡IP地址与yum本地配置

一.配置 ip

1.找到端口文件

cd /etc/sysconfig/network-scripts

 

 

 2.编辑

 

 

 3.重启网络

service network restart

4.测试

 

 

 二.配置本地yum源

创建本地yum源文件夹

mkdir -p /opt/centos/

挂载

mount /dev/cdrom /opt/centos

删除本地yum源

rm -rf /etc/yum.repos.d/*

配置本地源,保存退出

vi /etc/yum.repos.d/gezi.repo

 

 

 

 清除缓存 查看包

yum clean all

  yum repolist

 

 2.1将准备好的yum软件包移入/opt中

 

 2.2配置yum源

 

 清除缓存 查看包

yum clean all

  yum repolist

 

 

 

 

posted @ 2021-12-07 08:20  鸽子咕咕咕  阅读(444)  评论(0)    收藏  举报