Environmental information
Operating system: Ubuntu 16.04.2 64-bit installation steps
Download the corresponding installation package
CD ~/downloads
wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1604-3.4.4.tgz
Unzip to the specified directory
sudo tar-xzvf mongodb-linux-x86_64-ubuntu1604-3.4.4.tgz-c/usr/local/&& sudo mv/usr/local/mongodb-linux-x86 _64-ubuntu1604-3.4.4/usr/local/mongodb
Add the MongoDB installation directory to the system path
sudo vi/etc/profile
Add at the end
Export Path=/usr/local/mongodb/bin: $PATH
Save, refresh
Source/etc/profile
Create a Database storage directory
sudo mkdir-p ~/data/db
Modify the database directory owner
sudo chown-r <dbOwner> ~/data/db start
If you are installing a single point MongoDB, the start command is:
Mongod--dbpath ~/data/db&
For the installation and configuration of the MongoDB cluster, refer to the following documentation. Reference Documents
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/