Centos7 yum源挂在、磁盘挂在、percona-xtrabackup安装、qpress安装. Couldn‘t open file /xxx/repodata/repomd.xml 问题处理

添加yum源 之后 还出现这个错误:Couldn't open file /xxx/repodata/repomd.xml 

在执行 yum clean all  

在执行 yum makecache  出现这个错误 failure: repodata/repomd.xml from localrepo: [Errno 256] No more mirrors to try.
file:///iso/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /iso/repodata/repomd.xml"

file:///iso/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /iso/repodata/repomd.xml"
Trying other mirror.
Trying other mirror.


 One of the configured repositories failed (localrepo),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=localrepo ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable localrepo
        or
            subscription-manager repos --disable=localrepo

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=localrepo.skip_if_unavailable=true

failure: repodata/repomd.xml from localrepo: [Errno 256] No more mirrors to try.
file:///iso/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /iso/repodata/repomd.xml"

是找不到 这里重点看到一个路径 repodata 的路劲

创建这个路径  进去iso 目录下 

执行这个命令: createrepo .

root@Xxxxx-yw /]# cd iso/
[root@Xxxxx-yw iso]# ls
[root@Xxxxx-yw iso]# createrepo .
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
[root@Xxxxx-yw iso]# ll
total 4
drwxr-xr-x 2 root root 4096 Mar  6 13:19 repodata
[root@Xxxxx-yw iso]# cd repodata/
[root@Xxxxx-yw repodata]# ls
01a3b489a465bcac22a43492163df43451dc6ce47d27f66de289756b91635523-filelists.sqlite.bz2
401dc19bda88c82c403423fb835844d64345f7e95f5b9835888189c03834cc93-filelists.xml.gz
5dc1e6e73c84803f059bb3065e684e56adfc289a7e398946574d79dac6643945-primary.sqlite.bz2
6bf9672d0862e8ef8b8ff05a2fd0208a922b1f5978e6589d87944c88259cb670-other.xml.gz
7c36572015e075add2b38b900837bcdbb8a504130ddff49b2351a7fc0affa3d4-other.sqlite.bz2
dabe2ce5481d23de1f4f52bdcfee0f9af98316c9e0de2ce8123adeefa0dd08b9-primary.xml.gz
repomd.xml
[root@Xxxxx-yw repodata]# yum clean all
Loaded plugins: fastestmirror, langpacks
Cleaning repos: base extras localrepo updates
Cleaning up list of fastest mirrors
[root@Xxxxx-yw repodata]# yum makecache
Loaded plugins: fastestmirror, langpacks
Determining fastest mirrors
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
base                                                                                | 3.6 kB  00:00:00     
extras                                                                              | 2.9 kB  00:00:00     
localrepo                                                                           | 2.9 kB  00:00:00     
updates                                                                             | 2.9 kB  00:00:00     
base/7/x86_64/primary_db       FAILED                                          
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/repodata/6d0c3a488c282fe537794b5946b01e28c7f44db79097bb06826e1c0c88bad5ef-primary.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
(1/13): base/7/x86_64/group_gz                                                      | 153 kB  00:00:00     
(2/13): extras/7/x86_64/filelists_db                                                | 277 kB  00:00:00     
(3/13): localrepo/filelists_db                                                      |  586 B  00:00:00     
(4/13): localrepo/primary_db                                                        | 1.1 kB  00:00:00     
(5/13): localrepo/other_db                           

1:yum源挂在

cd /etc/yum.repos.d/

mv Centos-7.repo Centos-7.repo.bak

mv epel-7.repo epel-7.repo.bak

mount -o loop /home/CentOS-7.3-x86_64-bin-DVD.iso /home/centos

 2:磁盘挂在,新建一个文件夹,挂在存在数据的问题请找其他教程,强行挂在会导致数据隐藏,带来不必要的麻烦

fdisk /dev/vdb

mkfs.ext4

mkfs.ext4 /dev/vdb

mount /dev/vdb  /approot

blkid /dev/vdb

vi /etc/fstab

UUID=4e8cc2bb-7aa8-4cb6-a171-0cd06a50a299 /approot ext4 defaults 0 0 

添加完成后,执行mount -a 即可生效

reboot

3:RDS数据热备插件

percona-xtrabackup-2.4.21-Linux-x86_64.glibc2.12.tar.gz

cd local/

mv percona-xtrabackup-2.4.21-Linux-x86_64.glibc2.12/ xtrabackup

ln -s /approot/local/xtrabackup/bin/* /usr/bin/

xtrabackup --version

qpress-11-linux-x64.tar 安装

tar xvf qpress-11-linux-x64.tar

mv qpress /usr/bin

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值