Tag: MongoDB CentOS 7

  • Install MongoDB 4 on CentOS 7

    Create file

    vi /etc/yum.repos.d/mongodb-org-4.0.repo
    

    Add

    [mongodb-org-4.0]
    name=MongoDB Repository
    baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/testing/x86_64/
    gpgcheck=1
    enabled=1
    gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc
    

    Install MongoDB with

    yum install -y mongodb-org
    

    Set MongoDB to start on boot.

    chkconfig mongod on
    

    Start MongoDB

    service mongod start