Line 2: |
Line 2: |
| | | |
| {{Note box| Manual configuration required}} | | {{Note box| Manual configuration required}} |
| + | |
| + | MongoDB 5.0+ requires the AVX CPU instruction set |
| + | |
| + | lscpu |grep avx |
| | | |
| ===Install Official Repository=== | | ===Install Official Repository=== |
Line 9: |
Line 13: |
| https://wiki.koozali.org/Extrarepositories | | https://wiki.koozali.org/Extrarepositories |
| | | |
− | Note that all versions are available form 0.9 -> 1.0 -> 3.0/1/2/3/4/5/6/7 -> 4.0/1/2/3/4 -> 5.0 | + | Note that versions are available from 4.0/1/2/3/4 -> 5.0 -> 6.0 |
| | | |
| Please check which versions are deprecated - they should not be used. | | Please check which versions are deprecated - they should not be used. |
Line 82: |
Line 86: |
| | | |
| | | |
− | Once started you need to initialises the replicaset: | + | Once started you need to initialise the replicaset. Make sure to exit from the mongo instance and run from the cli: |
| | | |
| mongo --eval "printjson(rs.initiate())" | | mongo --eval "printjson(rs.initiate())" |
| + | |
| + | You should now have a working mongoDB good enough to use with Rocket.Chat |
| + | |
| | | |
| ===Other settings=== | | ===Other settings=== |
Line 113: |
Line 120: |
| show users | | show users |
| | | |
− | We can then set Mongo to force authenticaiotn when conneting. | + | We can then set Mongo to force authentication when connecting. |
| | | |
| nano /usr/lib/systemd/system/mongod.service.d/50koozali.conf | | nano /usr/lib/systemd/system/mongod.service.d/50koozali.conf |
Line 120: |
Line 127: |
| | | |
| [Service] | | [Service] |
− | Environment="OPTIONS= --auth-f /etc/mongod.conf" | + | Environment="OPTIONS=--auth -f /etc/mongod.conf" |
| | | |
| Restart Mongo | | Restart Mongo |
Line 132: |
Line 139: |
| This is possible but we need to create a new file so we do not overwrite the original - otherwise yum/rpm will complain. | | This is possible but we need to create a new file so we do not overwrite the original - otherwise yum/rpm will complain. |
| | | |
− | Something like /etc/mongo/mongod.conf | + | Something like /etc/mongod/mongod.conf |
| | | |
| Template fragments in | | Template fragments in |
| | | |
− | /etc/e-smith/templates/etc/mongo/mongod.conf | + | /etc/e-smith/templates/etc/mongod/mongod.conf |
| | | |
| We can then amend the systemd overrride | | We can then amend the systemd overrride |
Line 146: |
Line 153: |
| [Service] | | [Service] |
| Environment="OPTIONS=-f /etc/mongod/mongod.conf" | | Environment="OPTIONS=-f /etc/mongod/mongod.conf" |
− |
| |
| | | |
| ===Dump and restore=== | | ===Dump and restore=== |