Roby Cigar
Posted on January 16, 2022
Berikut ini langkah2 menginstall mongodb mengunakan sistem operasi linux dengan distro ubuntu versi 22.10
- Import public key
wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -
Jalankan kode tersebut, maka akan memunculkan output bertuliskan OK
- Membuat file list
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list
- Reload package local
sudo apt-get update
- Install package mongoDB
sudo apt-get install -y mongodb-org
- Start server mongodb
sudo systemctl daemon-reload
sudo systemctl start mongod
sudo systemctl status mongod
Troubleshooting
Jika anda mendapatkan error Process: 8724 ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf (code=exited, status=14)
masukkan perintah berikut.
chown -R mongodb:mongodb /var/lib/mongodb
chown mongodb:mongodb /tmp/mongodb-27017.sock
sudo service mongod restart
Sumber:
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
https://askubuntu.com/questions/823288/mongodb-loads-but-breaks-returning-status-14
š šŖ š
š©
Roby Cigar
Posted on January 16, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
ubuntu Ubuntu Setup Essentials: First Steps After Installing on a 2015 MacBook Air
November 10, 2024
linux Unlocking Linux on Windows: A Guide to Installing Ubuntu Using WSL 2 on Windows 11
November 21, 2024