how to create mongodb keyfile in linux


 description

Generate the mongodb-keyfile file in linux, ps: Need to set up user groups and permissions sudo chmod 600 mongodb-keyfile sudo chown 999 mongodb-keyfile

 command

openssl rand -base64 666 > mongodb-keyfile

 parameter

openssl: is a powerful, commercial-grade and full-featured toolkit for Transport Layer Security (TLS) and Secure Socket Layer (SSL) protocols
rand: Generate random bytes of the specified length, here set to 666
-base64: code signing
Was this helpful?

I hope to help every developer quickly find the commands they need. Of course, you can also add your own commonly used commands for easy searching.