Pecl Way to install Php-mongodb extension step

Source: Internet
Author: User
Tags install mongodb install openssl openssl library install redis
This time to everyone to bring pecl way to install php-mongodb extension steps in detail, pecl way to install PHP-MONGODB expansion of the attention to what, the following is the actual case, together to see.

Start installation

New virtual machine Ubuntu14.04, apache2 and php5 are installed manually;

Then we use a command to install the PHP extension

sudo pecl install MongoDB

This will be an error, showing the lack of dependent package php-pear, then install, the command is as follows

sudo apt-get install Php-pear

When we execute pecl install MongoDB command again, we will prompt phpize not internal command, need to install Php5-dev, then install the following command:

sudo apt-get install Php7.0-dev

When we execute pecl install MongoDB again, this error should be reported and the OpenSSL Library is missing. Then we need to install the following things

Apt-get install OpenSSL Libssl-dev libssl0.9.8 Libgtk2.0-dev

When the Pecl install MongoDB is executed again, the effort is finally successful, but the last hint is that we need to add the MongoDB extension manually in the php.ini file.

Finally we open, Vim/etc/php5/apache2/php.ini, add a line of such code.

#/etc/php5/apache2/php.iniextension=mongodb.so

In the end, this will show the effect.

Redis Similarly, pecl install Redis

Believe that you have read the case of this article you have mastered the method, more exciting please pay attention to the PHP Chinese network other related articles!

Recommended reading:

Php+rsa generate key bits in 1024-bit steps

PHP Development API Interface Security verification steps detailed

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.