...
Code Block |
---|
[root@opmantek ~]# yum install mongodb-org |
Provision MongoDB 3.2
Check what kinds of MongoDB configuration files are in /etc
Code Block |
---|
[root@opmantek etc]# ls -l | grep mongo -rw-r--r-- 1 root root 1564 2015-09-11 10:00 mongod.conf -rw-r--r-- 1 root root 768 2017-02-02 02:07 mongod.conf.rpmnew |
...
Code Block |
---|
[root@opmantek etc]# cp mongod.conf mongod.conf.backup [root@opmantek etc]# cp mongod.conf.rpmnew mongod.conf |
Provision MongoDB
Now make the following changes to mongod.conf
...
Code Block | ||
---|---|---|
| ||
--snip
# Where and how to store data.
storage:
dbPath: /data/mongodb
journal:
enabled: true
# engine:
# mmapv1:
wiredTiger:
engineConfig:
cacheSizeGB: 8
--snip |
Delete temporary files associated with MongoDB
Remove any files in /tmp that look be be associated with MongoDB
If there is a mongod.pid file in /var/run/mongodb, then remove it.
If there is a /data/mongodb/mongod.lock file, then remove it.
Make sure that recursively /data/mongodb belongs to group mongod user mongod.
Code Block |
---|
[root@opmantek ~]# chown -R mongod:mongod /data/mongodb/ |
Start MongoDB Service