Comment # 1 on bug 930564 from
mongod(3):

......
--unixSocketPrefix <path>
              Specifies a path for the UNIX socket. Unless this option has a
value, mongod and mongos, create a socket  with the /tmp as a prefix.
......

You may do like this:

# install -d -m 0775 -o root -g mongodb /run/mongodb

# echo 'OPTIONS="--unixSocketPrefix=/run/mongodb"' > /etc/sysconfig/mongodb

# service mongodb restart

# ls /run/mongodb/*
/run/mongodb/mongodb-27017.sock


You are receiving this mail because: