Mac installation Php-redis

Source: Internet
Author: User
Tags fpm install brew zts

The first thing to say is to install the software on the Mac, the best tool is brew, it is recommended to install brew first. Do not understand the first to search for this, very easy to use. Use Ruby to install the following:

/usr/bin/ruby-e "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)"

The PHP I use is a brew-installed PHP54, the process is as follows:

brew tap homebrew/dupes

brew tap josegonzalez/homebrew-php

brew install php54 --with-imap --with-tidy --with-debug --with-pgsql --with-mysql --with-fpm

If you are using another way to install PHP, or the system comes with PHP, replace the file location,

/usr/local/bin/php-i|grep php.ini Find INI location

Php-fpm.conf under the same folder

wget Https://nodeload.github.com/nicolasff/phpredis/zip/master

Tip No wget, first install brew, then brew install wget

TAR-ZXF Master

CD phpredis-master/

sudo phpize

Cannot find autoconf. Please check your autoconf installation

Tip No autoconf, use brew install autoconf

./configure

Make

sudo make install

# This will prompt a path

#/usr/lib/php/extensions/no-debug-non-zts-20090626/

Mine is /usr/local/cellar/php54/5.4.45_3/lib/php/extensions/debug-non-zts-20100525/ .

Indicates that an extension has been placed at that location

Add the following in the/usr/local/etc/php/5.4/php.ini:

extension= "/usr/local/cellar/php54/5.4.45_3/lib/php/extensions/debug-non-zts-20100525/redis. So"

# restart fpm Nginx

Nginx-s Reload

Killall PHP-FPM

/USR/LOCAL/CELLAR/PHP54/5.4.45_3/SBIN/PHP-FPM--daemonize--fpm-config/usr/local/etc/php/5.4/php-fpm.conf--pid/ Usr/local/var/run/php-fpm.pid-c/usr/local/etc/php/5.4/php.ini

#查看扩展安装情况

Php-m |grep Redis

#出现Redis indicates a successful installation.

Mac installation Php-redis

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.