The first issue that I encountered deploying mongod on a local machine were permissions to files (code=exited, status=100 - no permissions) As I see in lab filesystem (Vagrant?) mongod.log and config files have permissions set to 755 (rxw, rx, rx), on a local linux machine these by default are 644, which of those are advised for default paths (/var/log/ and /etc/, also for db in /var/lib/) and which for custom (e.g. fast deploying at home/user path just for practice)?
The second one is deploying another service of mongod - with systemd. I could copy-paste to custom unit - named mongod1.service, mongod2.service or mongod3.service at /lib/systemd/system/ (according to discussion at github) and use separate mongod.conf files, therefore separate logs and dbs, for learning purposes. The main question is - should those mongod units (in systemd) run on a binary code of the same service (default: /usr/bin/mongod) or should they be deployed on separate located binaries? How does it look in virtual environments? Is the binary shared?
As a summary:
- I’ve installed a package mongodb-org with MongoDB tutorial instructions, on Linux Mint 20.1 (ubuntu focal-based) It uses systemd init system
- the error code comes from a systemtcl status mongod msg and requires chmod on mongod.log file
- the compared “lab system” files’ permissions are MongoDB University courses’ lab IDE (with system V init)
- the main point of creating other mongod units is to deliver other mongod instances (for deploying replica set) without getting bad habbits in the learning process (right file permissions, binary locations of the mongod in the file system)
Any tips are welcome!