Linux配置yum源

一、## 软件仓库配置,以centos为例
# cat /etc/yum.repos.d/CentOS-Base.repo 
[base]
name=Base
baseurl=https://mirrors.aliyun.com/centos/7/os/x86_64/
enabled=1
gpgcheck=0
[epel] name=epel baseurl=https://mirrors.aliyun.com/epel/7/x86_64/ enabled=1
gpgcheck=0

Linux配置yum源

Linux配置yum源

 

二、 CentOS7更新阿里yum源

1、下载阿里yum源:

wget http://mirrors.aliyun.com/repo/Centos-7.repo

2、备份并替换yum源文件:

cp Centos-7.repo /etc/yum.repos.d/ 

cd /etc/yum.repos.d/ 

mv CentOS-Base.repo CentOS-Base.repo.bak 

mv Centos-7.repo CentOS-Base.repo (区分大小写)

3、执行yum源更新操作:

yum clean all

yum makecache

yum update

三、查看yum安装软件的路径:

(以wget为例)

1、安装wget:yum install wget

2、查找wget安装包:rpm -qa |grep wget

Linux配置yum源

 

 3、查找安装包的安装路径:rpm -q

Linux配置yum源

 

四、修改yum默认安装路径:

Linux配置yum源

 

 重启生效:

yum使用命令: https://cloud.tencent.com/developer/article/1527027

linux本地yum源制造:https://cloud.tencent.com/developer/article/1109445

Linux配置yum源

上一篇:Linux跨主机传输文件


下一篇:mac清除svn密码缓存