Task: https://rafed.github.io/courses/distributed-systems/lab/microservice-linkedin/
Install MongoDB Community Edition
-
Import the public key used by the package management system.
From a terminal, install gnupg and curl if they are not already available:sudo apt-get install gnupg curl
To import the MongoDB public GPG key from https://pgp.mongodb.com/server-7.0.asc , run the following command:
curl -fsSL https://pgp.mongodb.com/server-7.0.asc | \ sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg \ --dearmor
-
Create a /etc/apt/sources.list.d/mongodb-org-7.0.list file for MongoDB.
Create the list file using the command appropriate for your version of Debian:Debian 11 "Bullseye"
echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] http://repo.mongodb.org/apt/debian bullseye/mongodb-org/7.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
-
Reload local package database.
Issue the following command to reload the local package database:sudo apt-get update
3.1. Some additional packages need to install (libssl)
sudo -i
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
-
Install the MongoDB packages. You can install either the latest stable version of MongoDB or a specific version of MongoDB.
Install the latest version of MongoDBsudo apt-get install -y mongodb-org
- start mongodb
sudo systemctl start mongod
- if failed run this first
sudo systemctl daemon-reload
- check status
sudo systemctl status mongod
- stop mongodb
sudo systemctl stop mongod
- restart mongodb
sudo systemctl restart mongod
-
Download mongodb comapss
wget https://downloads.mongodb.com/compass/mongodb-compass_1.39.3_amd64.deb
-
Install
sudo dpkg -i mongodb-compass_1.39.3_amd64.deb
-
Download Minio server package
wget https://dl.minio.io/server/minio/release/linux-amd64/minio
-
Make the file executable
chmod +x minio
- To use minio server
sudo ./minio server /minio
then paste the address http://127.0.0.1/9000 at browser and hit enter