The packages may change following the MongoDb version. See documentation for packages requirements
See https://www.mongodb.com/docs/manual/installation/ and https://www.mongodb.com/docs/manual/administration/install-on-linux/ for detailed information.
To download packages see https://www.mongodb.com/try/download/community
🟡 NOTE:
The pacages listed in the wgetcommands are for ubuntu. Adapt the package list for your OS.
Some additional packages can be needed. (RPM or APT following your OS type. Check the documentation to firn the right packages.)
Commands are executed as mongodb user.
root@dev-vm:~$ sudo su - mongodb
mongodb@dev-vm:~$ export MONGODB_BASE=/u01/app/mongodb
mongodb@dev-vm:~$ cd $MONGODB_BASE/artifacts
# get files for mongodb 8.0 (this is an example, change-it following the version used)
mongodb@dev-vm:~$ wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-{os_version}-8.0.4.tgz
mongodb@dev-vm:~$ wget https://downloads.mongodb.com/compass/mongosh-{version}-linux-x64.tgz
mongodb@dev-vm:~$ wget https://fastdl.mongodb.org/tools/db/mongodb-database-tools-{os_version}-x86_64-100.10.0.tgz
mongodb@dev-vm:~$ ls -l
-rw-r--r-- 1 mongodb mongodb 54047120 Jan 14 10:11 mongodb-database-tools-{os_version}-x86_64-100.10.0.tgz
-rw-r--r-- 1 mongodb mongodb 39047168 Jan 14 10:10 mongodb-linux-x86_64-{os_version}-8.0.4.tgz
-rw-r--r-- 1 mongodb mongodb 82047119 Jan 14 10:10 mongosh-{version}-linux-x64.tgz
Uncompress archives
mongodb@dev-vm:~$ cd $MONGODB_BASE/artifacts
mongodb@dev-vm:~$ mkdir /u01/app/mongodb/product/8.0
mongodb@dev-vm:~$ for f in *.tgz; do tar -xvzf $f -C /u01/app/mongodb/product/8.0 ; done
mongodb@dev-vm:~$ ls -l /u01/app/mongodb/product/8.0
total 12
drwxr-xr-x 3 mongodb mongodb 4096 Jan 14 10:23 mongodb-database-tools-ubuntu2204-x86_64-100.10.0
drwxr-xr-x 3 mongodb mongodb 4096 Jan 14 10:23 mongodb-linux-x86_64-ubuntu2204-8.0.4
drwxr-xr-x 3 mongodb mongodb 4096 Dec 30 23:03 mongosh-2.3.8-linux-x64