Mongodb32 installed withouth mongodb.conf

I've just installed mongodb32 from the port collection:
Code:
make install clean

After the installation I would like to setup some configurations, but can find mongod.conf?

It's not located under /usr/local/etc/mongod.conf or in /etc

Am I doing something wrong? I am new to FreeBSD, so this might be the case.

I am using FreeBSD 11.0.

Thanks
 
/usr/ports/databases/mongodb32 % cat pkg-plist|grep conf
@sample etc/mongodb.conf.sample

I guess it should be /usr/local/etc/mongodb.conf.sample..
 
So the gist of a sample conf is to copy it -to retain an original template file.
cp /etc/mongodb.conf.sample /usr/local/etc/monogodb.conf

Then edit it:
ee /usr/local/etc/monogodb.conf
 
Thank again for the help!
I've got the file and setup my rc.conf with the following:
Code:
mongod_enable="YES"
mongod_config="/usr/local/etc/mongodb.conf"
mongod_dbpath="/var/db/mongodb"

But now I get the following error (/var/db/mongodb/mongod.log):
Code:
I CONTROL  [main] ERROR: Cannot write pid file to /var/run/mongodb/pid: No such file or directory

I've tried the naive approach (I am new to FreeBSD) and created the folder, but then ran into a permission issue. I am installing MongoDB as root.

I've followed the guide also mention Phishfry
https://newbiedba.wordpress.com/2016/03/14/installing-mongodb-on-freebsd-10-x/

Thanks
 
I've solved the permission issue with setting the /var/run/mongodb to 777.
I'm not sure this is the best permission to use though?

Thanks again!
 
I've solved the permission issue with setting the /var/run/mongodb to 777.
I'm not sure this is the best permission to use though?
Bad. Really bad. You just gave everything and everyone write access. Please note that 777 permissions are rarely, if ever, the correct solution.

Code:
chown mongodb:mongodb /var/run/mongodb
chmod 755 /var/run/mongodb
 
Back
Top