4

I'm following an installation guide for MongoDB and it says extract some zip file to a folder.

I'm on Mac and it has folders like Download, Desktop, Music, etc., but where is a more real place to extract my files into? I want something like C:\MyDBFiles that I could create on Windows...

3 Answers 3

10

The file system used by *nix operating systems is fundamentally different from that used by DOS, Windows, etc.

  • On Windows, each partition has a drive letter (C:, D:, etc.).

  • On Mac OS X, each partition has a mount point (/, /home).

I am on Mac and it has like Download, Desktop, Music, etc... but where is a more real place to extract my files into? I want something like C:\MyDBFiles that I could create on Windows...

There are no drive letters on Mac OS X, sorry.

There nothing unreal about Desktop. It's actually ~/Desktop, where ~ is your home directory (usually /home/username).

Without root privileges, you only have access to ~ anyway. All your personal files belong there. Consider it your C:\.

See also: Filesystem Hierarchy Standard - Wikipedia

5
  • Ok Thanks, I wanted to copy and run a Database Server, where do you recommend is a better place for this? /home ? I just don't want to do it in a stupic place, for example on Windows you can install SQL Server in C:\MyPictures...but not a good place! So I am trying to see what is a good place in Mac for such a thing? Thanks
    – Blake
    May 25, 2012 at 3:30
  • 1
    @BdotA: Without actually seeing the installation guide, my best guess is that you're downloading a compressed tarball that has to get installed with the usual extract - make - make install approach. If that's the case, you can delete the extracted files after the installation is complete, so it doesn't matter where you do it.
    – Dennis
    May 25, 2012 at 3:34
  • I am following the steps from here: bigspaceship.com/2011/02/installing-mongodb-on-mac ... where he says "Unzip into a location of choice." .. so I just want to unzip it in a good! place.
    – Blake
    May 25, 2012 at 3:39
  • 1
    @BdotA: There really isn't a wrong place for this. Personally, I'd use /usr/local/mongodb, so you have /usr/local/mongodb/bin/mongod, etc...
    – Dennis
    May 25, 2012 at 3:46
  • See also this somewhat related answer: askubuntu.com/a/138551/34265 May 25, 2012 at 10:40
1

You can follow the guide at http://www.mongodb.org/display/DOCS/Quickstart+OS+X it will install MongoDB under /usr/local. It also contains instructions to create the data directory under /data

If you install Homebrew (and follow steps in the above tutorial) it will download MongoDB, extract to the right locations, setup the symlinks, etc. for you.

1

While the other answers are all true, I'd like to suggest you create a sparse bundle in disk utility, and use this for your install. It will act as a "virtual" drive - use it just for your install.

Nice thing is you can freely move it around and don't have to worry about getting in conflict with installations of other programs or your system. It's worth gold when you want to clean/update your install in a few months...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .