Installing MongoDB system Centos 8

The following tutorial describes how to install MongoDB system Centos 8.
The whole is simple and comes down to a few simple commands wykonanaia.

In previous entries we described the installation process for Ubuntu 18.04 which is under this entry.

For starters, we create a repository:

its content:

Save the file and install the same service kodonujemy:

Run it and add to autostart:

Check the status of services:

Score:

MongoDB to get to using the command:

Creating a user administrative MongoDB

we get to MongoDB command :

Then we move the database named admin

We issue a command to create user:

password123 we change, of course, to our secret password 😉

We should get the result:

Check your command:

Score:

Configure authentication MongoDB

By default MongoDB allows all users access to the MongoDB shell and run arbitrary commands. It is therefore recommended that you configure authentication MongoDB, to prevent other users to run commands without the required permissions.

First you need to enable authentication for MongoDB, by editing the file

And so we set the following line:

reload services:

Now we try to enter without permission:

We'll see an error

Now we log on correctly privileges:

How useful this post was?

Click on the star, to evaluate it!

Average grade / 5. number of votes:

So far, no votes! Be the first to rate this post.