Centos7下创建阿里云网络yum源
Linux下创建阿里云网络yum源,步骤如下:1、点击阿里巴巴开源镜像网站:或者https://opsx.alibaba.com/mirror首先备份系统yum源:[root@study ~]# cd /etc/yum.repos.d/[root@study yum.repos.d]# ll总用量 32-rw-r--r--. 1 root root 1664 11月 23 2018 C...
·
Linux下创建阿里云网络yum源,步骤如下:
1、点击阿里巴巴开源镜像网站:或者https://opsx.alibaba.com/mirror
首先备份系统yum源:
[root@study ~]# cd /etc/yum.repos.d/
[root@study yum.repos.d]# ll
总用量 32
-rw-r--r--. 1 root root 1664 11月 23 2018 CentOS-Base.repo
-rw-r--r--. 1 root root 1309 11月 23 2018 CentOS-CR.repo
-rw-r--r--. 1 root root 649 11月 23 2018 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 314 11月 23 2018 CentOS-fasttrack.repo
-rw-r--r--. 1 root root 630 11月 23 2018 CentOS-Media.repo
-rw-r--r--. 1 root root 1331 11月 23 2018 CentOS-Sources.repo
-rw-r--r--. 1 root root 5701 11月 23 2018 CentOS-Vault.repo
[root@study yum.repos.d]# mkdir backup
[root@study yum.repos.d]# mv CentOS-* ./backup
2、创建并配置repo文件
[root@study yum.repos.d]# vim aliyun.repo
1 [aliyun]
2 name=aliyun yum
3 baseurl=https://mirrors.aliyun.com/centos/7/os/x86_64/
4 enabled=1
5 gpgcheck=1
6 gpgkey=https://mirrors.aliyun.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7
#[]第一行用中括号
#第二行name=yum源名字活随便写
#第三行baseurl=yum源地址
#第四行enbaled=1是开启yum源,0是关闭
#第五行gpgcheck=1是校验yum源,取1时要写第六行gpgkey=校验文件地址,取0是不校验,则不用写第六行
:x 保存退出
3、清空yum缓存
[root@study yum.repos.d]# yum clean
4、创建yum缓存
[root@study yum.repos.d]# yum makecache
5、显示yum
[root@study yum.repos.d]# yum list
6、安装Samba软件
输入y即可安装成功。
更多推荐
已为社区贡献1条内容
所有评论(0)