We have a requirement to load a text file (fixed width file) to mongodb. We are trying to connect to remote mongodb (mongodb+srv://servername) from bash shell script which resides in AWS RHEL EC2. Below are the steps followed. But after doing that when I type mongo or mongosh it mentions as command not found(-bash: mongosh: command not found). Could you please let me know what is missing here?
- Installed mongodb mongodb-org-shell-5.0.6-1.el8.x86_64.rpm
yum install mongodb-mongosh -y
- Start and enable Mongo - systemctl restart mongod, systemctl enable mongod