Installation and use of Redis

Source: Internet
Author: User
Tags install redis

First, installation
Initially intended to install Redis directly with Yum, but error: No package Redis available.
After attempting to compile the installation, it is also a variety of errors, only re-think back to the Yum installation method.

Online article said download Epel can find the source of Redis.
Go to related page
Http://fedoraproject.org/wiki/EPEL
There are EPEL 5, EPEL 6, EPEL 73 Different versions of, I think EPEL 7 should be the latest version of it, with the new not old,
Then download the installation, again error ...

Later only know EPEL 5, EPEL 6, EPEL 7 respectively corresponding is CENTOS5, CENTOS6, Centos7, no wonder the installation error ...

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
RPM-IVH epel-release-6-8.noarch.rpm
Yum Install Redis

To this step the installation is complete.

Second, the configuration
Redis-server
Start Redis service side

Redis-cli
Sign in to the Redis client

Starting the server with Redis-server is not started in the background, and when the Linux client is shut down it will stop running.
We want to set up Redis to run automatically on the boot background.

Because it is a period of time to write this blog, forget the self-initiated file is what type of-_-| | |

Set Boot start service
sudo chkconfig redis on
There are also settings in the relevant text, but the Chkconfig command is relatively simple and silly home.

Open service
Service Redis Start
This will not occupy the window, directly in the background silently run

Third, the PHP operation Redis
There are two methods, one is Phpredis need to install the extension, this way access is much faster. A predis needs to download the class file.
Predis installation is relatively simple, I am lazy, temporary project on the performance requirements are not very high, so the use of Predis to operate Redis.

Iv. Manuals and Tutorials
The REDIS Getting Started Guide
"Phpredis Chinese Handbook" (http://www.cnblogs.com/ikodota/archive/2012/03/05/php_redis_cn.html)

Installation and use of Redis

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.