0

How to Change the Default port number of MongoDB On CentOS 7.6

Hello,i just would like to know the default port number of MongoDB .Is it possibl to change the port number to defined port number?

Mongodb Add a comment
otwol
asked Aug 13 2019

Answer

0

if you've installed the mongoDB,Navigate to the MongoDB configuration file using the vim or your favourite editor and edit the following line

vim /etc/mongod.conf

port :< your desired port number>

Comment the default port number and save thew configuration file
Restart the service of MongoDB

systemctl restart mongod
Add a comment
linuxhelp
asked Aug 14 2019
edited Aug 14 2019
Post your Answer