Я запустил mongodb service
, как показано ниже, но ответа при его вводе нет.
Я также проверяю статус и получаю ошибку.
Я не вижу, какая часть не так. Вы можете мне помочь?
j@location:~$ sudo service mongodb start
j@location:~$ sudo service mongodb status
● mongodb.service - High-performance, schema-free document-oriented database
Loaded: loaded (/etc/systemd/system/mongodb.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2019-06-20 15:20:03 KST; 7s ago
Process: 13405 ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf (code=exited, status=1/FAILURE)
Main PID: 13405 (code=exited, status=1/FAILURE)
Jun 20 15:20:03 location systemd[1]: Started High-performance, schema-free document-oriented database.
Jun 20 15:20:03 location systemd[1]: mongodb.service: Main process exited, code=exited, status=1/FAILURE
Jun 20 15:20:03 location systemd[1]: mongodb.service: Unit entered failed state.
Jun 20 15:20:03 location systemd[1]: mongodb.service: Failed with result 'exit-code'.
hanadmin@location:~$
Также добавьте настройки mongodb.conf.
2 # for documentation of all options, see:
3 # http://docs.mongodb.org/manual/reference/configuration-options/
4
5 # Where and how to store data.
6 storage:
7 dbPath: /var/lib/mongodb
8 journal:
9 enabled: true
10 # engine:
11 # mmapv1:
12 # wiredTiger:
13
14 # where to write logging data.
15 systemLog:
16 destination: file
17 logAppend: true
18 path: /var/log/mongodb/mongod.log
19
20 # network interfaces
21 net:
22 port: 27017
23 bindIp: [127.0.0.1,10.0.0.1,8.8.8.8,0.0.0.0]
24
25
26 #processManagement:
27
28 #security:
29
30 #operationProfiling:
31
32 #replication:
33
34 #sharding:
35
36 ## Enterprise-Only Options: