Installing MongoDB on Ubuntu16.04

Source: Internet
Author: User
Tags fpm

Installing MongoDB

Now the latest version is 3.4

1:

sudo apt-key adv--keyserver HKP://keyserver.ubuntu.com:80--recv 0c49f3730359a14518585931bc711f9ba15703c6

2:

Echo " Deb [arch=amd64,arm64] Http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 Multiverse " sudo Tee /etc/apt/sources.list.d/mongodb-org-3.4. List

3: Update apt

sudo apt-get update

4: Installation

sudo Install -y mongodb-org

MongoDB Open and close

sudo Service Mongod Start sudo service mongod stop
Installing the MongoDB PHP extension

Installing extensions using PECL

sudo Install Php-pear

If it is PHP7, install Php7.0-dev, otherwise install Php5-dev

sudo Install PHP7. 0 Pkg-config sudo Install MongoDB

Add extension=mongodb.so to PHP.ini

If the FPM is installed, the path is/etc/php/7.0/fpm/php.ini

Restart PHP7.0-FPM, refresh phpinfo () to see the expansion of MongoDB

Installing MongoDB on Ubuntu16.04

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.