yum install mongodb 3.2 fails

后端 未结 13 1318
自闭症患者
自闭症患者 2021-02-08 00:04

I am trying to install mongodb 3.2 on a CentOS 7 machine and facing issues in locating the packages.

I have updated the repo file as per the documentation:



        
13条回答
  •  梦如初夏
    2021-02-08 00:53

    Follow the below steps to install MongoDB on CentOS

    1. Add MongoDB yum repository
    # vi /etc/yum.repos.d/mongodb.repo
    
    1. Enter i and paste the below lines in the file
    [MongoDB]
    name=MongoDB Repository
    baseurl=http://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/
    gpgcheck=0
    enabled=1
    

    Press esc to save the vim file then enter :wq to quit the saved file.

    3.Install MongoDB server

    yum install mongodb-org
    
    1. Start MongoDB Service
    # systemctl start mongod.service    # For CentOS 7 
    # service mongod restart            # For CentOS 6/5 
    
    1. Check Mongod version
    mongod --version
    

    Referance: Installing MongoDB on CentOS

提交回复
热议问题