...
Opmantek upgrade documentation for MongoDB:
First make sure you know which OS your server is on, never assume!
cat /etc/os-release
For Ubuntu:
Ubuntu - Process for Upgrading MongoDB 3.4 Standalone to MongoDB 4.2 Standalone
For Centos/Redhat:
CentOS/Redhat - Process for Upgrading MongoDB 3.4 Standalone to MongoDB 4.2 Standalone
...