grep mongo
Termination process number
Open the configuration file and modify the port.
vi /etc/mongod.conf
Port = 2888# Required port
: wq# Save and exit.
Start mongodb
mongod -f /etc/mongod.conf
log in
Mengge port 2888