Sunday, May 5, 2024
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 5665  / 1 Year ago, tue, january 31, 2023, 12:06:03

I have a Ubuntu 13.04 computer with two hard drives; one is 30GB, the other is 500GB.



I use the 30GB drive for the OS and I install everythign else on the 500GB drive.



How can I install MongoDB on to that drive?



If I just install using apt-get, by default it will install to my OS drive. Is there a way to change it?


More From » installation

 Answers
2

If you install MongoDB using apt-get, the executable files and libraries will be installed to your OS drive. By default, the packaged version of MongoDB stores its data in /var/lib/mongodb which, unless you've put part or all of your /var directory on your larger drive, will also be on your OS drive.



If you want to install absolutely all the MongoDB files on your other drive, you would need to download the unpackaged binary distribution from the MongoDB website and install manually. However, I would advise against this; the binaries won't take up much space and installing the package is easier.



Instead, you can install the package and then change the location used to store the data. See How to change the location that MongoDB uses to store its data? for how to do this.


[#29345] Wednesday, February 1, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
bblerest

Total Points: 240
Total Questions: 119
Total Answers: 113

Location: Wallis and Futuna
Member since Mon, May 18, 2020
4 Years ago
;