Detailed steps for Redis installation under CentOS 6.5

  
 

Redis is an open source, log-based, Key-Value database that is written in ANSI C, supports networking, and can be persisted based on memory, and provides APIs in multiple languages. From March 15, 2010, Redis' development work was hosted by VMware.

redis is a key-value storage system. Similar to Memcached, it supports storing more value types, including string, list, set, zset (sorted set – ordered) and hash. These data types support push/pop, add/remove, and intersection set and difference sets and richer operations, and these operations are atomic. On this basis, redis supports sorting in a variety of different ways. As with memcached, to ensure efficiency, data is cached in memory. The difference is that redis periodically writes the updated data to disk or writes the modification operation to the appended record file, and on this basis, master-slave synchronization is implemented.

Installation environment:

CentOS 6.5

Redis 2.8.13

Download and install:

Download files to /opt/directory

wget http://download.redis.io/releases/redis-2.8.13.tar.gz

Extracting files

tar zxvf redis-2.8.13. Tar.gz

Switch directory to redis-2.8.13 directory

cd redis-2.8.13

Execute the make command, the output of the last few lines

Hint: To run ‘make test’ is a good idea make[1]: Leaving directory `/opt/redis-2.8.13/src’

Execute the installation command

Make install

Hint:

cd src && make installmake[1]: Entering directory `/opt/redis-2.8.13/src'Hint: To run 'make test' Is a good idea INSTALL install INSTALL install INSTALL install INSTALL install INSTALL installmake[1]: Leaving directory `/opt/redis-2.8.13/src'

According to the prompt, execute: cd src && make install

Tip:

Hint: To run 'make test' is a good idea INSTALL install INSTALL install INSTALL install INSTALL Install INSTALL instal

Follow the prompts: make test

Tip:

You need tcl 8.5 or newer in order to run the Redis testmake: *** [test] Error 1

Resolution reference: http://www.linuxfromscratch.org/blfs/view/cvs/general/tcl.html

You can also use: yum install tcl command to install

Later search Found that you do not need to install, go directly to the src directory to execute ./redis-server


You can use a similar ./redis-server /path/to/redis.conf command to specify the configuration file. ;

Server started, Redis version 2.8.13The server is now ready to accept connections on port 6379

The service started successfully, the service has listened for connection requests on port 6379.

You can connect to Redis using the built-in client: http://www.redis.cn/download.html

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

Note:

To access it remotely, you need to turn it on.

Do not use Ctrl+C, this will cause the program to exit

Copyright © Windows knowledge All Rights Reserved