This may seem like an innocent enough question, but I can't for the life of me figure out where gentoo puts mongodb.conf after installation from portage. The documentation says to look under /etc/, but it's not there. All I need to do is modify the dbpath parameter have it store under /data/db, but it's currently using /var/lib/mongodb (which is odd since it should default to /data/db)
The closest thing I've seen is /etc/init.d/mongodb, which has the following configuration:
start-stop-daemon --background --start --make-pidfile \
--pidfile ${MONGODB_RUN:-/var/run/mongodb}/${SVCNAME}.pid \
${USEROPT} ${MONGODB_USER:-mongodb} \
--exec ${MONGODB_EXEC:-/usr/bin/mongod} \
-- \
--port ${MONGODB_PORT:-27017} \
--dbpath ${MONGODB_DATA:-/data/db} \
#--dbpath ${MONGODB_DATA:-/var/lib/mongodb} \
--unixSocketPrefix ${MONGODB_RUN:-/var/run/mongodb} \
--logappend --logpath /var/log/mongodb/${SVCNAME}.log \
${MONGODB_OPTIONS}
eend $?
}
As you can see, I change where dbpath should point to. However, running a ps aux | grep mongod results in the following:
mongodb 21044 0.2 2.1 189300 22032 ? Ssl May01 0:01 /usr/bin/mongod --port 27017 --dbpath /var/lib/mongodb --unixSocketPrefix /var/run/mongodb --logappend --logpath /var/log/mongodb/mongodb.log --bind_ip 127.0.0.1 --journal
The other file I have is /etc/conf.d/mongodb, which contains the following:
# Mongodb essentials
MONGODB_EXEC="/usr/bin/mongod"
MONGODB_RUN="/var/run/mongodb"
MONGODB_DATA="/var/lib/mongodb"
MONGODB_USER="mongodb"
# Listen to specified IP, comment this to listen to all
MONGODB_IP="127.0.0.1"
# Listen to specified port
MONGODB_PORT="27017"
# Set extra options here, such as disabling the admin web server
MONGODB_OPTIONS="--journal"
It someone knows where to properly set the dbpath parameter, I'd really appreciate it.