performancekillo.blogg.se

Install mongodb as a service or not
Install mongodb as a service or not







install mongodb as a service or not

It was a zipped file called mongodb-win32-i386-2.4.4.zip (The name of the folder will change according to the version you download, here I got version 2.4.4).

#Install mongodb as a service or not 32 bit#

You will see a screen like this: I am using a windows 7 32 bit machine - that’s why I downloaded the package marked in red.Ĭlick download (It only takes a few seconds). That's it! So simple, right? Ok let’s start Extract it and copy the files into your desired location. Ideally, these files should be owned by that user.Are you ready for the installation … and use … Technically, it’s not an installation it’s just Downloading… Note that doing this will run it as the currently logged in user, that means all of the data files as well as mongod.log must be writable by that user. To start MongoDB without running it as a service, since you used the rpm, the mongod binary should be in your path, so the following should work mongod -dbpath /path/to/data -logpath /path/to/mongod.log -fork This will still result in errors attempting to modify the ulimits and is generally not recommended. There is no simple way around this except granting the mongod user a shell, assigning it a password, logging in as that user, then running the service. So, in order to run as a service, you must use sudo or root.

install mongodb as a service or not

etc/init.d/mongod: line 58: ulimit: open files: cannot modify limit: Operation not permitted This is because the init script must execute a change user command so the mongod process can be forked as a child of the mongod user.įailure to use root or sudo to start the service results in the errors you quoted above. When starting MongoDB installed by the rpm, the command must either be run by root or run using sudo. When you do this, the mongod user is created on the system and all of the appropriate files are created and owned by the mongod user. You mention that you used the rpm installer for installing MongoDB on the Amazon Linux AMI. UPDATE: Changed ownership on everything to ec2-user, still getting exactly the same errors as before. Maybe there are some config issues relating to running daemon processes if you're not ec2-user?

install mongodb as a service or not

The nonRootUser is a new user I created in addition to ec2-user. I am able to start it like this $mongod, but I want to run it as daemon so it runs continuously. T15:03:54.144+0000 I CONTROL got signal 15 (Terminated), will terminate after current cmd ends Mongod.log file says this: T15:03:49.053+0000 I NETWORK waiting for connections on port 27017 I also tried $mongod -fork -logpath /var/log/mongodb.logĪbout to fork child process, waiting until server is ready for connections.ĮRROR: child process failed, exited with error number 1 var/lib/mongo, var/log/mongodb, data/db, var/run/mongodb $sudo chown -R nonRootUser:nonRootUser Starting mongod: runuser: may not be used by non-root usersġ) Now, I've changed ownership to the non root user on all mongo directores I could find i.e. etc/init.d/mongod: line 60: ulimit: max user processes: cannot modify limit: Operation not permitted When I start without sudo it gives me this error: /etc/init.d/mongod: line 58: ulimit: open files: cannot modify limit: Operation not permitted I can start MongoDB as $sudo service mongod start.









Install mongodb as a service or not