首页 > 系统相关 >Centos恢复默认源

Centos恢复默认源

时间:2023-05-06 16:12:32浏览次数:32  
标签:Centos centos 恢复 默认 etc 64 yum rpm x86

Centos恢复默认源

1. 查看centos版本

cat /etc/centos-relese

2. 备份所有

cd /etc/yum.repos.d/ 
mkdir repobak
mv /etc/yum.repos.d/*.repo   /etc/yum.repos.d/repobak

3. 手动安装相关 rpm

rpm -Uvh --force http://mirror.centos.org/centos-7/7.9.2009/os/x86_64/Packages/centos-release-7-9.2009.0.el7.centos.x86_64.rpm

注意

也可以使用清华源 https://mirrors.tuna.tsinghua.edu.cn/centos/7.9.2009/os/x86_64/Packages/centos-release-7-9.2009.0.el7.centos.x86_64.rpm

4. 重新缓存

yum clean all
yum makecache

标签:Centos,centos,恢复,默认,etc,64,yum,rpm,x86
From: https://www.cnblogs.com/edclol/p/17377672.html

相关文章

  • CentOS7搭建LAMP环境
    一、LMAP版本VMware版本:16.2.4Linux版本:CentOS7.7Apache版本:Apache2.4.6MySQL版本:MySQL5.6.51PHP版本:PHP7.2.34二、Apache环境配置1.安装配置LAMP环境需要的辅助工具(vim、tmux和wget)yuminstallvimtmuxwget-y2.安装Apache(×)yum-yinstallhttpd......
  • centos7使用yum安装postgis数据库
    https://www.postgresql.org/download/linux/redhat/1添加PostgreSQLYum源sudoyuminstallepel-releasesudoyuminstall-yhttps://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm2安装PostgreSQL和PostGISsudo......
  • Centos7下的pm2环境离线安装
    一、下载node离线包并安装官网:https://nodejs.org/en/download/根据操作系统类型下载指定包:wget https://nodejs.org/dist/v16.20.0/node-v16.20.0-linux-x64.tar.xz解压:tar-xvfnode-v16.20.0-linux-x64.tar.xz 移动到指定目录并重新命名为nodemvnode-v16.20.0-linux-x64......
  • 多个Sql字段拼接为一个字段,并判断是否为空,为空时赋默认值
    在这里记录一下怕后面自己忘了,直接看代码吧,这是我数据库需要查询的两张表--库区表select*fromReservoir--仓库表select*fromWarehouse 需要的效果是将同一库区下的仓库的仓库名合并到同一字段中在进行查询,就是下图的效果--将多个查询出的字段拼接到一个......
  • CentOS虚拟机连接外网,NET模式
    大致思路,将主机和CentOS的ip设置成同一网段,并且网关相同,虚拟网络编辑器中的网关也与主机相同1、主机VMnet8的ip设置  2、CentOS的网关和ip设置1)查看网络设备名称 2)进入编辑IP和网关、DNS等进入network-scripts,网络相关的配置文件存放位置/etc/sysconfig/network-scr......
  • centos os初始设置
    echo"192.168.14.141mysql1">>/etc/hostsecho"exportLANG=en_US">>~/.bash_profile资源限制参数cat>>/etc/security/limits.conf<<EOF*softnproc65535*hardnproc65535*softnofile65535*softnofile655......
  • Linux Centos7内核升级
    LinuxCentos7内核升级现在主流的centos应该都是centos7了,从centos7.2开始,内核版本为3.10,越往后内核版本越高。高版本的内核修复了许多的低版本内核的bug,因此,系统是需要提高内核版本的,从而提高安全性,稳定性,并增加更多的功能。Linux是支持多版本内核共存的,无非是系统启动的时候应......
  • CentOS7yum安装出现/var/run/yum.pid 已被锁定,解决办法
    安装epel扩展源yum-yinstallepel-release提示:[root@masterhome]#yum-yinstallepel-release已加载插件:fastestmirror,langpacks/var/run/yum.pid已被锁定,PID为22410的另一个程序正在运行。Anotherappiscurrentlyholdingtheyumlock;waitingforitto......
  • centos7安装oracle11g11.2.0.4.0
    1,下载oracle11g11.2.0.4.0安装包,解压2,配置安装环境1,下载配置环境文件-------------------------------------------------------------------------------------------------------------------------------------cd/etc/yum.repos.dwgethttp://public-yum.oracle.com/pub......
  • FAQ-virtualbox安装centOS7 报错 not syncing fatal exception
    1、假设你的虚拟机的名字为:CentOS7提示:已经建完(未启动)2、在命令行窗户执行:VBoxManagemodifyvmCentOS7--spec-ctrlonVBoxManage命令所在的目录为:c:\ProgramFiles\Oracle\VirtualBox>3、启动CentOS7......