Installing Redis in a Mac environment

Source: Internet
Author: User
Tags fpm phpinfo redis server

Reference article: http://www.jianshu.com/p/6b5eca8d908b1. Installation

Download the installation package redis-*.*.*.tar.gz

Website address: Http://redis.io/download


Decompression: TAR-ZVXF redis-*.*.*.tar.gz the extracted folder into the/usr/local directory

Compile test:


Next switch to the/usr/local/redis directory in the terminal, enter: sudo make test


Details are as follows ....



$ wget http://download.redis.io/releases/redis-3.2.8.tar.gz$ tar xzf redis-3.2.8.tar.gz$ cd redis-3.2.8$ make

The binaries that is now compiled is available in the src directory. Run Redis with:

$ src/redis-server

You can interact with Redis using the built-in client:

$ src/redis-cliredis> set foo barokredis> get foo "bar"


2. Expansion

There are no Redis extensions installed: You can view the phpinfo.php in your demo first

<?phpecho phpinfo ();


For example, in the thinkphp3.2.3 project, using Redis,

1. See Tutorial:

Http://www.thinkphp.cn/code/1458.html

2. Download the Redis.rar to view the instructions.


Cd/usr/local/php5

sudo cp-r ~/downloads/redis/redis extension file/./


3. Added config.conf,



3. First make sure that the Redis extension for PHP is already installed.

http://demo.ccc/default/phpinfo.php


if not installed properly?detailed records of installing Redis and installing Php-redis extension procedures in Mac

Http://www.cnblogs.com/neverleave/p/6309063.html



4., Find /private/etc/php.ini

php.ini Add the following two lines:

Extension=php_igbinary.dll

Extension=php_redis.dll

Note:php_redis.dll need to be placed after Php_igbinary.dll


==

PHP-FPM restart

Killall PHP-FPM

Re-execute (usr/local/php is the PHP installation directory)
/USR/LOCAL/PHP/SBIN/PHP-FPM &




Appear:

:(

Redis Server went away


Whether the firewall was shut down.

View, System Preferences.

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/92/A0/wKiom1kBbDzzIJlWAANoZh9n3VU204.png "title=" Mac-redis.png "alt=" Wkiom1kbbdzzijlwaanozh9n3vu204.png "/>








Installing Redis in a Mac environment

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.