Start mongodb?

1

I just installed mongodb on my pc, which has Linux operating system with antergos distribution.

The command does not seem to work: sudo service mongod start I also tried only with: service mongod start and it still does not work

Does anyone know where the problem might be?

When making a mongo --version I get the following data:

MongoDB shell version v3.4.9
git version: 876ebee8c7dd0e2d992f36a848ff4dc50ee6603e
OpenSSL version: OpenSSL 1.1.0f  25 May 2017
allocator: tcmalloc
modules: none
build environment:
    distarch: x86_64
    target_arch: x86_64
    
asked by Pedro Fumero 12.10.2017 в 15:23
source

1 answer

0

I see that you are not root, so first write to the console:

su

Enter, then you must type the superuser / root password. Now yes, you can continue.

To install mongodb as a service:

sudo apt-get install mongodb-server

To start the MongoDB service

#Debes ser root
service mongodb start

To configure mongodb

nano /etc/mongodb.conf

Restart the mongodb service

#Debes ser root
service mongodb restart

#Tambíen podrías:
service mongodb stop
service mongodb start
    
answered by 12.10.2017 в 17:16