...
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 |
If there is one called mongodb.conf it is no longer necessary. Please move this to /root to avoid any future confusion.
Make a backup of the old mondgod.conf and copy the new rpm version over it.
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
- Change the dbPath to /data/mongodb
- Provision wiredTiger (uncomment)
Code Block | ||
---|---|---|
| ||
--snip
# Where and how to store data.
storage:
dbPath: /data/mongodb
journal:
enabled: true
# engine:
# mmapv1:
wiredTiger:
--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.
Delete the contents of /data/mongodb and verify the group and owner of /data/mongodb is mongod.
Code Block |
---|
[root@opmantek ~]# cd /data/mongodb
[root@opmantek mongodb]# rm -rf *
[root@opmantek mongodb]# cd ..
[root@opmantek data]# ls -l | grep mongodb
drwxr-xr-x 2 mongod mongod 4096 2017-04-05 17:42 mongodb |
Start MongoDB Service
Code Block |
---|
[root@opmantek ~]# service mongod start Starting mongod: [ OK ] [root@opmantek ~]# |
...
Log into each OMK Application via the GUI and verify the data is still there. If everythis everything is as it should be then delete /data/mongodump
...