Skip to content

Instantly share code, notes, and snippets.

@tanvirstreame
Last active March 17, 2022 13:00
Show Gist options
  • Save tanvirstreame/56142d5c12ad5c98894c9d4461d829fd to your computer and use it in GitHub Desktop.
Save tanvirstreame/56142d5c12ad5c98894c9d4461d829fd to your computer and use it in GitHub Desktop.
Mongo extra instance in same server
cp /etc/mongod.conf /etc/mongod2.conf
cd /lib/systemd/system
cp mongod.service mongod2.service
edit ta service config and add /etc/mongod2.conf
sudo chown -R mongodb:mongodb /root/database/replica_database*
sudo systemctl start mongod2.service
sudo systemctl status mongod2.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment