7.5.2. Configuring MongoDB
- Configuring authentication
- Configuring default database size
- Configuring the firewall and
mongoddaemon
Procedure 7.9. To Configure Authentication and Default Database Size for MongoDB:
- Open the
/etc/mongodb.conffile. - Locate the line beginning with
auth =and ensure it is set totrue:auth = true
- Add the following line at the end of the file:
smallfiles = true
- Ensure no other lines exist that begin with either
auth =orsmallfiles =. - Save and close the file.
Procedure 7.10. To Configure the Firewall and Mongo Daemon:
- Ensure the
mongoddaemon starts on boot:# chkconfig mongod on - Start the
mongoddaemon immediately:# service mongod start
Note
configure_datastore function performs these steps.
Before continuing with further configuration, verify that you can connect to the MongoDB database:
# mongoImportant
mongo command, wait and try again. When MongoDB is ready, it will write a "waiting for connections" message in the /var/log/mongodb/mongodb.log file. A connection to the MongoDB database is required for the ensuing steps.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.