MongoDB installation (Ubuntu 18 LTS)

What I did this time

--Install MongoDB (NoSQL). Follow the MongoDB Community URL Install MongoDB Community Edition on Ubuntu.

--Run from Python pymongo Running in Jupyter Notebook under Anaconda environment

environment

procedure

  1. Import public key
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -

If you get an error here, install gnupg. And that.

  1. Create list file
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
  1. Local package update
sudo apt-get update
  1. Install MongoDB
sudo apt-get install -y mongodb-org

default remarks Data directory / var / lib / mongodb Log directory / var / log / mongodb Config file /etc/mongod.conf

  1. Check the Init system Depending on Linux, the following work changes depending on whether you are using systemd or system V init. Check your settings.
ps --no-headers -o comm 1

>systemd results in my case

Start MongoDB

sudo systemctl start mongod

Check 1 Check the Log file to see if it worked

sudo cat /var/log/mongodb/mongod.log

Check 2 or status confirmation

sudo systemctl status mongod

PyMongo installation

Open terminal on Anaconda

conda install pymongo  
#pip install is mentioned in the documentation, but mongo in conda-3.11.Installed 0

Recommended Posts

MongoDB installation (Ubuntu 18 LTS)
Ubuntu 20.04 LTS installation method (for external drive)
Install Docker (Ubuntu 18.04 LTS)
ubuntu20.04 + Geth installation procedure
Installing Singularity (Ubuntu 18.04 LTS)
USB Wifi on Ubuntu 20.04LTS
ubuntu 20.04 + VirtalBox installation procedure summary
Python 3.4 pyvenv fails on Ubuntu 14.04 LTS
Ubuntu 18.04 LTS installation method (compatible with external HDD / SSD / USB memory)
Introducing Slurm Workload Manager to Ubuntu 18.04 LTS
How to use OpenVPN with Ubuntu 18.04.3 LTS
Elasticsearch installation and basic operation for ubuntu
13 Things to Do After Installing Ubuntu 20.04 LTS
Install pyenv and Python 3.6.8 on Ubuntu 18.04 LTS
GPD P2 Max Ubuntu Mate installation notes
10 Things to Do After Installing Ubuntu 18.04 LTS