MongoDB - How to Install MongoDB on Linux Please follow the below steps to Install MongoDB Enterprise Edition on Linux: 1.Configure repository. Create an /etc/yum.repos.d/mongodb-enterprise.repo file so that you can install MongoDB enterprise directly using yum : [mongodb-enterprise] name = MongoDB Enterprise Repository baseurl = https://repo.mongodb.com/yum/redhat/$releasever/mongodb-enterprise/4.2/$basearch/ gpgcheck = 1 enabled = 1 gpgkey = https://www.mongodb.org/static/pgp/server-4.2.asc You can also download the .rpm files directly from the MongoDB repository . 2. Install the MongoDB Enterprise packages. Install MongoDB Enterprise 4.2. Issue the following command: copy copied sudo yum install -y mongodb-enterprise