search

Home  >  Q&A  >  body text

centos - yum安装MongoDB的时候一直超时怎么办

服务器是阿里云64位的centos7,我的安装步骤是这样的

  1. 修改yum包管理系统
    vim /etc/yum.repos.d/mongodb-org-3.2.repo

  2. 填写配置
    [mongodb-org-3.2]
    name=MongoDB Repository
    baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/gpg
    check=0
    enabled=1

  3. yum安装
    yum install -y mongodb-org

错误提示,看英文是连接超时没有其它镜像了的样子,我要怎么配置其它镜像呢?或者直接修改baseurl ?

PHPzPHPz2818 days ago1034

reply all(2)I'll reply

  • 怪我咯

    怪我咯2017-05-02 09:19:59

    Can’t you just download and compile it yourself? Or you can use a proxy to connect to high-speed foreign websites.

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-05-02 09:19:59

    I also encountered it, but I was using fedora. After checking the official documentation, I found that fedora does not support versions above 3.0. In the end, I used 2.6. You can open https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.2/x86_64/gpgrepodata/repomd.xml to see if the key was not added successfully. The official configuration file is
    [mongodb-org-3.2]
    name=MongoDB Repository
    baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/
    gpgcheck=1
    enabled=1

    reply
    0
  • Cancelreply