install mongodb

install address

configuration

/etc/mongodb.conf

script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# mongod.conf

# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/

# where to write logging data.
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log

# Where and how to store data.
storage:
dbPath: /var/lib/mongo
journal:
enabled: true
# engine:
# wiredTiger:

# how the process runs
processManagement:
fork: true # fork and run in background
pidFilePath: /var/run/mongodb/mongod.pid # location of pidfile
timeZoneInfo: /usr/share/zoneinfo

# network interfaces
net:
port: 27017
#bindIp: 127.0.0.1
bindIp: 0.0.0.0 # Enter 0.0.0.0,:: to bind to all IPv4 and IPv6 addresses or, alternatively, use the net.bindIpAll setting.

#security:
# authorization: 'enabled'
#operationProfiling:

#replication:

#sharding:

## Enterprise-Only Options

#auditLog:

#snmp:

mongodb install address

script
1
>whereis mongo

start mongodb

script
1
2
3
sudo service mongod start

systemctl start mongod.service

stop mongodb

script
1
2
3
sudo service mongod stop

systemctl stop mongod.service

mongodb listener

script
1
netstat -anp |grep 27017

mongodb client

mongodb client download

最后更新: 2020年02月10日 21:02

原始链接: https://chenadminchen.github.io/2019/12/16/install-mongodb/

× 请我吃糖~
打赏二维码