Ce contenu n'est pas disponible dans la langue sélectionnée.
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
auth = trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow  - Add the following line at the end of the file:
smallfiles = true
smallfiles = trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow  - 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
# chkconfig mongod onCopy to Clipboard Copied! Toggle word wrap Toggle overflow  - Start the
mongoddaemon immediately:service mongod start
# service mongod startCopy to Clipboard Copied! Toggle word wrap Toggle overflow  
Note
configure_datastore function performs these steps.
		Before continuing with further configuration, verify that you can connect to the MongoDB database:
mongo
# mongo
Important
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.