Home > php教程 > PHP开发 > How to install phpredis extension on Mac

How to install phpredis extension on Mac

高洛峰
Release: 2016-12-21 14:54:35
Original
1615 people have browsed it

Recently, I switched the development environment from Windows to Mac, and all environments have to be reconfigured. Since Mac is based on a Unix system and I am not familiar with it, I encountered many problems. The editor will sort out and share them with you below.

Install the phpredis extension:

First, everyone downloads the phpredis extension package. This is the address https://nodeload.github.com/nicolasff/phpredis/zip/master (it is recommended that you download it manually and then copy it).

Secondly, everyone uses the command to enter the folder

cd phpredis-master/  
 phpize命令(命令可能会出问题,解决方法请见文章尾部)
 ./configure --with-php-config=/usr/bin/php-config
 make
 sudo make install (依次执行上面的命令)
 # 这时候会提示一个路径
 # /usr/lib/php/extensions/no-debug-non-zts-20100525/
 # 表示已经将扩展放置在该位置
 vim /etc/php.ini
 #增加如下内容
 extension=redis.so
 #重启apache
 sudo apachectl restart
 #查看扩展安装情况
 php -m |grep redis
 #出现 redis 表示安装成功
Copy after login

The above is the complete introduction to installing the phpredis extension on Mac. I hope you like it.

For more related articles on how to install phpredis extension on Mac, please pay attention to PHP Chinese website!


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template