Exactly following the below we can install the MongoDB 7.0 version
Get the OS name info
grep ^NAME /etc/*release
It was showing Amazon Linux
Then used the Amazon Linux 2023
Sudo vi /etc/yum.repos.d/mongodb-org-7.0.repo
[mongodb-org-7.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/amazon/2023/mongodb-org/7.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-7.0.asc
Now install using the below command
sudo yum install -y mongodb-org
By default, a MongoDB instance stores:
its data files in /var/lib/mongo
its log files in /var/log/mongodb
sudo systemctl start mongod
sudo systemctl enable mongod
sudo systemctl restart mongod
references:
https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-amazon/
No comments:
Post a Comment