Reputation: 499
I have Centos 7
and php 7.1
. I want to install pecl
and I tried that with yum install pecl
but it has a conflict with php5.4
.
How can I install mongodb driver without pecl
or how can I fix pecl
to work with php7.1
?
Upvotes: 2
Views: 9576
Reputation: 2806
I used pecl to install the mongo driver.
yum install php-pear
pecl install mongodb
note that there's also an old mongo
driver that works for php5 but mongodb
driver is for php7
Upvotes: 9
Reputation: 1816
You can Install mongodb manually with following commands:
First install php71w-devel
package with following command:
sudo yum install php71w-devel -y
and then you can install it manually.
$ git clone https://github.com/mongodb/mongo-php-driver.git $ cd mongo-php-driver $ git submodule sync && git submodule update --init $ phpize $ ./configure $ make all -j 5 $ sudo make install
ref:http://php.net/manual/en/mongodb.installation.manual.php
Upvotes: 3