Linux生成mongodb-keyfile文件


 description

在linux中生成mongodb-keyfile文件,
ps:需要设置用户分组以及权限
 sudo chmod 600 mongodb-keyfile
 sudo chown 999 mongodb-keyfile

 command

openssl rand -base64 666 > mongodb-keyfile

 parameter

openssl : 是用于传输层安全性(TLS)和安全套接字层(SSL)协议的功能强大的,商业级且功能齐全的工具包
rand : 生成指定长度的随机字节,这里设置为 666
-base64 : 编码署出
 

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.