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?

otwol
asked Aug 13, 2019
1 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
View More
linuxhelp
answered Aug 14, 2019
Your Answer
||||
 
100:0

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

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