Ubuntu 18.04 Install MongoDB 4.0 (Community Edition)

Source: Internet
Author: User
Tags install mongodb mongodb download mongodb server mongodb version mongo shell

Ubuntu 18.04 (on virtual machine VirtualBox), MongoDB 4.0,

Listen to your roommate and say, there's a World Cup final at 23! But, lonely to write blog Ah! To record this hectic afternoon and evening successfully installed a software onto Linux. --2250

There are two ways to install Mongodb:.deb packages on Linux (official recommendation, it makes sense, [tears]),. tgz tarballs. As a result of their own download tgz source package, so, from the beginning to choose from the Tgz source package start installation, the result, because libcrypto.so.10, libssl.so.10 did not find the problem, sang and wasted the whole afternoon plus half the night! Later in the garden sent a Bo asked, and then, Dudu the big guy gave a bunch of commands.--deb Install the package installation commands. Fortunately you are not lazy, this is not, MongoDB 4.0 has been successfully run on Ubuntu 18.04!

MongoDB download page can only download tgz file (official website), as shown in: Can download various Linux distributions of MongoDB

Official website Installation Guide: Install MongoDB Community Edition on Ubuntu

Installation 1: Using the TGZ source package--Failed

installation files:

mongodb-linux-x86_64-amazon2-4.0.0.tgz

Oh, my God! What a amazon2! The only one is the Ubuntu version Ah! Although there is no Ubuntu 18.04 version of the official website, however, how to download a mongodb-linux-x86_64-ubuntu1604-4.0.0.tgz Ah!

This...... Wrong...... That's outrageous! Hey ~

We must be careful! --2311

Installation steps refer to the Using. tgz Tarballs section of the official website Installation Guide, in view of the installation package error problem found above, only show parts:

Execute Bin/mongod--version, error ( 15 o'clock in the Afternoon + ):

Mongod:error while loading shared libaries:libcrypto.so.10:cannot open Shared object file:no such file or directory

Some of the crazy, read a lot of information, the problem is mostly English, but, did not solve Ah! In particular, see the Web page said, set up a soft connection, OK, problem solved; Reinstall what software, good le, problem solved.

However, the problem of solitary here still exists ah! And I don't know how to solve it--it's a little scary to have something to do with Linux. Fortunately MongoDB website comforted me, they currently do not provide Ubuntu 18.04 support!

Later, in the park friend Dudu the proposal issued Bo asked, later, Dudu big Guy gave a bunch of orders--with the following Deb way to install, then, 22 points more see, and then, try, the result is installed, test is OK!

Thanks for the big Dudu! There are enthusiastic friends of the park, Ah, park friends whining also directly to the proposal, thank you!

Try the ubuntu1604 MongoDB source package later!

Installation 2: Using the Deb installation package--Success

Refer to the afternoon of the Bo asked: Ubuntu 18.04 installation of MongoDB 4.0 but can not run, among them, the most important is the Dudu to provide a series of commands:

1$sudoApt-key adv--keyserver HKP://keyserver.ubuntu.com:80--recv 9da31620334bd75d9dcb49f368818c72e52529d42$Echo "Deb [arch=amd64,arm64] Https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 Multiverse"|sudo Tee/etc/apt/sources.list.d/mongodb-org-4.0. List3$sudoapt-Get update4$sudoApt-getInstall-Y OpenSSL libcurl3 mongodb-org5$sudoApt-getInstallMongodb

Follow the above steps to execute the order (the official website Installation Guide also has a corresponding command, and detailed explanation ).

After the execution of line 4th, MongoDB has been installed--mongod, MONGO shell can be used.

The execution of line 5th was time-consuming, in hours, so that there was no execution, and the timing was done.

Here is the installation process:

The Mongod command can be executed, or you can view the MongoDB version-- incredibly ubuntu1604! It seems that the TGZ version can be installed successfully!

MONGO Shell version:

Test

Test environment: Run the MONGO shell on Ubuntu 18.04 to access the MongoDB server running on the Windows host.

-Execute MONGO Connection server, failed, this machine is not yet open

-Use Ifconfig to view IP addresses, failed, not installed, can be checked after installation

-windows View virtual Machine management address: 192.168.56.1

-MongoDB server connecting to Windows Host: failed, server does not start Network service function

-Restart the Windows host's MongoDB server, using the--bind_ip_all option

-Allow access

-Connect again, success!

-Access database, authenticate users, query collection data: all success!

Of course, you can do more testing, but it's over 0! That's it! --0000

Postscript

Careless, Hairenbujian Ah! Not only hurt themselves, but also hurt others!

Love Yourself, love others, please be careful and rigorous.

Learn linux! Become a Master!

Ubuntu 18.04 Install MongoDB 4.0 (Community Edition)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.