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 php extension under linux

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Editor to share with you how to install the php extension under linux, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

The correct installation method of php extension under linux: 1, download and extract the extension file; 2, enter the decompressed file directory and check the system configuration; 3, execute the [make & & make install] command to install the extension.

Method 1: compile and install

Specific steps:

/ / download file # wget http://pecl.php.net/get/zip-1.12.4.tgz// extract file # tar zxfv zip-1.12.4.tgz// enter the extracted file directory # cd zip-1.12.4// check system configuration to start configuration Specify the configuration when installing PHP #. / configure-- with-php-config=/usr/local/php-5.2.17/bin/php-config// compilation # make// Test # make test// installation # make install

Method 2: install in pecl mode

Specific steps:

1. First check whether there is pecl under / usr/local/php/bin/. Pear (php-pear is installed to use phpize in pecl) if not, install it with yum

Yum install php-pear,php-devel

2. Update the pecl library

Pecl channel-update pecl.php.net

3. Install the appropriate extension

Pecl install redis

If the path to php is not added to the environment variable, you need to use an absolute address

4. Generally, extensions installed through pecl are automatically added to the configuration of php.ini. If the installed extension is not queried through phpinfo () or php-m, then add the corresponding so file to php.ini (extension=redis.so) and restart php-fpm.

The above is all the contents of how to install the php extension under linux. Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow 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