search
Homephp教程PHP开发How to install phpredis extension on Mac

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 表示安装成功

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!


Statement
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.