# ./mongo --version
MongoDB shell version v3.4.13
git version: fbdef2ccc53e0fcc9afb570063633d992b2aae42
allocator: tcmalloc
modules: none
build environment:
distarch: x86_64
target_arch: x86_64
Configure ssl in conf
net:
Port: 27017 # listening port, default 27017
#bindIp: 127.0.0.1 # The default configuration file (/etc/mongod.conf) in the deb and rpm packets is 127.0.0.1. If ip is not restricted, ensure authentication security. Multiple IP's are separated by commas
MaxIncomingConnections: 65536 # Maximum Connections. Acceptable connections are also limited by the maximum connections configured by the operating system
WireObjectCheck: true # verifies the client's request to prevent erroneous or invalid BSON insertion. Objects nested in multiple documents will have slight performance impact. Default is true
Ipv6: false # Whether IPv6 is enabled, versions above 3.0 are always on
UnixDomainSocket: #unix socket Monitor, Only for unix-Based Systems
Enabled: false # defaults to true
PathPrefix: /tmp # pathprefix, default /temp
FilePermissions: 0700 # File Permissions Default 0700
ssl:
mode: requireSSL
PEMKeyFile: /opt/webplatform/server/mongossl/mongodb.pem
CAFile: /opt/webplatform/server/mongossl/client.pem
Run mongod and prompt:
# ./mongod -f /data/mongodb34/mg.conf
Unrecognized option: net.ssl.mode
try './mongod --help' for more information
Db.serverBuildInfo ()
{
"version" : "3.4.13",
"gitVersion" : "fbdef2ccc53e0fcc9afb570063633d992b2aae42",
"modules" : [ ],
"allocator" : "tcmalloc",
"javascriptEngine" : "mozjs",
"sysInfo" : "deprecated",
"versionArray" : [
3,
4,
13,
0
],
"openssl" : {
"running" : "disabled",
"compiled" : "disabled"
},
You are looking at the version of the shell, which is supported by the server and has no direct connection with shell version. Look at the server version:
db.serverBuildInfo()