Mac install Phpredis, from Redis to homebrew to autoconf to phpredis-master one-stop installation

Source: Internet
Author: User
Tags curl redis

Note that this is installed in the OS X environment and does not apply to Linux systems, please take a seat. But Linux is a much simpler environment.

most of the contents of the text are copied from my East copy of the West copy, the original will give the source.

ok,1. First of all you have to install good redis, this is particularly simple, direct to the official online download, http://redis.io/. I'm under the redis-3.0.3. Mac to install these software has a benefit, directly double-click on the good, and then copy the/usr/local under. Omitted the tar. The prerequisite is to have decompression software ~

Configuration I will not detail, please refer to the link: http://www.cnblogs.com/moon521/p/5301895.html. This article is very thin.

2. Then get to the point. began to install Phpredis. As with a lot of online introductions, I made a phpredis-3.2.3 (note that everyone should never go down, because the Mac doesn't use this version.) -Embarrassing death, the problem, run Phpize when the error: Cannot find autoconf. Please check your autoconf installation and the $PHP _autoconf environment variable.

Many sites will recommend a bunch of installation packages to install autoconf, don't listen to them. That is true in a Linux environment. Mac words to install a magical thing, called homebrew. This thing is good NB, is the OS under the Suite Manager, you can use it to install a variety of expansion packs. It's similar to Yum.

Installation method: Run Ruby-e "$ (Curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)" Directly on the terminal end. Note that if it is the root user, it may prompt "don ' t run this as root." This does not matter, quit the root user, with the normal user login installation is good.

3. It's easy to pack a good homebrew, first search for autoconf:brew searches autoconf

Installation: Brew Install autoconf

Uninstall: Brew Uninstall autoconf (you can use this for any future software.) )

4. Start to install Phpredis. As mentioned above, do not install phpredis-3. x.x. Because this is true in a Linux environment. Download Phpredis-master on your own, this is the OS version.

Run Curl-o Https://nodeload.github.com/nicolasff/phpredis/zip/master

TAR-ZXF Master

CD Phpredis-master

/usr/local/php5/bin/phpize

./configure--with-php-config=/usr/bin/php-configmakesudo Make Install

Done. Remember to add extensions to php.ini: extention=redis.so

Restart Apache

To view an extended installation: Php-m |grep Redis

A redis indicates a successful installation.

Attached: Mac install Phpredis extension http://my.oschina.net/Twitter/blog/287544

Hombrew official website http://brew.sh/index_zh-cn.html

Phpize Error Resolution Method http://my.oschina.net/Twitter/blog/287543

Related Article

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.