Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install the Mongo extension of mongodb database in Linux

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

In this issue, Xiaobian will bring you about how to install Mongodb database Mongo extension in Linux. The article is rich in content and analyzed and described from a professional perspective. After reading this article, I hope you can gain something.

1. Download the extension installation package

wget http://pecl.php.net/get/mongo-1.4.5.tgz

2. compile and install

tar xvf mongo-1.4.5.tgz -C /usr/src

cd /usr/src/mongo-1.4.5/

phpize

./ configure --with-php-config=/usr/local/php/bin/php-config

make && make install

3. Configure php.ini and add the following two lines

[mongo]

extension = /usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/mongo.so

4. Reload php-fpm, nginx

pkill php-fpm

/usr/local/php/sbin/php-fpm

/usr/local/nginx/sbin/nginx -s reload

5. Verify successful installation

php -m | grep mongo

#or see phpinfo page

The above is how to install Mongodb database Mongo extension in Linux shared by everyone. If there is a similar doubt, please refer to the above analysis for understanding. If you want to know more about it, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report