Linux System compilation installation Redis and PHP extensions tutorial

Source: Internet
Author: User
Tags mkdir redis zts install redis

Redis is an open source, with the use of ANSI C language, support network, can be based on memory can also be persistent log-type, Key-value database, and provide a variety of language APIs. From March 15, 2010 onwards, Redis's development work is hosted by VMware. Since May 2013, the development of Redis has been sponsored by pivotal.


Below, we take Redis 3.0.2 as an example, the compilation installs the method to explain:

Tar zxvf./redis-3.0.2.tar.gz
CD redis-3.0.2
Make
Make install///By default deployed to the/usr/local/bin directory

Mkdir/etc/redis//For storing location files
Mkdir/usr/local/redis//For storing data

CD Utils
./install_server.sh//Run Setup scripts (daemon, profile deployment, etc.)

Once the Redis is installed, let's install Redis extensions for PHP:

Tar zxvf./phpredis-2.2.7.tar.gz
CD phpredis-2.2.7
/usr/local/php/bin/phpize
./configure--with-php-config=/usr/local/php/bin/php-config
Make
Make install
When the above operation is completed, it will be/usr/local/php/lib/php/extensions/ no-debug-non-zts-20090626 directory to generate a redis.so file, the following we need to add this so file to the php.ini

Vi/usr/local/php/etc/php.ini

The specific settings are as follows:


Extension_dir= "/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/"
Extension=redis.so

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.