Curl command to download and install
1. Run the /usr/local CD /usr/local command. 2. Download the sudo curl - O https://fastdl.mongodb.org/osx/mongodb-osx-ssl-x86_64-4.0.9.tgz 2. Decompress sudo tar -zxvf mongodb -osx-ssl-x86_64-4.0.90.tgz 3. Sudo mv mongodb-osx-x86_64-4.0.9/ mongodb 4. Environment variable export PATH=/usr/local/mongodb/bin:$PATH 5. Sudo mkdir -p /usr/local/var/mongodb 6. Log repository paths sudo mkdir -p/usr/local/var/log/directing a 7. Set the read and write access sudo chown runoob/usr/local/var/mongo sudo chown runoob/usr/local/var/log/mongo 8. Start mongodb mongod --dbpath --logpath --fork 9. Unable to start the lock file for deleting stored dataCopy the code