1. from redis Download from the official website redis Source code , This example is installed in /usr/opt Next

[root@localhost opt]# pwd
/usr/opt
[root@localhost opt]# wget http://download.redis.io/releases/redis-3.2.6.tar.gz
--2016-12-16 21:55:49-- http://download.redis.io/releases/redis-3.2.6.tar.gz
Resolving host download.redis.io (download.redis.io)... 109.74.203.151
on connection download.redis.io (download.redis.io)|109.74.203.151|:80... Connected .
Already issued HTTP request , Waiting for response ... 200 OK
length :1544806 (1.5M) [application/x-gzip]
Saving to : “redis-3.2.6.tar.gz”

2. Decompress the source code

[root@localhost opt]# tar xzf redis-3.2.6.tar.gz

3. structure redis

[root@localhost opt]# cd redis-3.2.6/
[root@localhost redis-3.2.6]# make

4. install tcl ( must ,tcl No installation redis The test will report an error . If installed , Skippable )

[root@localhost redis-3.2.6]# yum install tcl

5. test redis

[root@localhost redis-3.2.6]# make test
...

171 seconds - unit/obuf-limits


\o/ All tests passed without errors!


Cleanup: may take some time... OK
make[1]: Leave the directory “/usr/opt/redis-3.2.6/src”


6. After building , Will generate redis Server and client execution files of , And the default configuration file

/usr/opt/redis-3.2.6/src/redis-server --- redis Server side 
/usr/opt/redis-3.2.6/src/redis-cli --- redis client
/usr/opt/redis-3.2.6/src/redis-sentinel --- Redis Instance monitoring management 、 Notification and instance failure backup service , yes Redis Cluster management tools
/usr/opt/redis-3.2.6/src/redis-benchmark --- Redis Performance test
/usr/opt/redis-3.2.6/redis.conf --- redis The configuration file
/usr/opt/redis-3.2.6/sentinel.conf --- Manage tool profiles

7. For convenience , You can create a new soft link , And add it to PATH, And copy the default configuration file to the new conf Directory

[root@localhost redis]# ln -s redis-3.2.6 redis
[root@localhost redis]# cd redis
[root@localhost redis]# mkdir bin
[root@localhost redis]# ln -s src/redis-server bin/redis-server
[root@localhost redis]# ln -s src/redis-cli bin/redis-cli
[root@localhost redis]# ln -s src/redis-sentinel bin/redis-sentinel
[root@localhost redis]# ln -s src/redis-benchmark bin/redis-benchmark
[root@localhost redis]# mkdir conf
[root@localhost redis]# cp redis.conf conf
[root@localhost redis]# cp sentinel.conf sentinel.conf

modify .bashrc, Add the following path , Add it to PATH

PATH=$PATH:/usr/opt/redis/bin

Reload once .bashrc, Make the path work

[root@localhost redis]# . ~/.bashrc
[root@localhost redis]# echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/opt/redis/bin

8. Modify the configuration file redis.conf,  find ‘daemonize no’ Change it to ‘daemonize yes‘, This will allow redis After the set of services to run

9. With daem Mode start redis service

[root@localhost conf]# redis-server redis.conf 

see redis Server process

[chry@localhost ~]$ ps -ef|grep redis
root 3755 24813 0 22:49 pts/0 00:00:00 redis-server *:6379

10. start-up redis client , type ping command , redis Respond to PONG, shows redis Installed properly , And can use .

[root@localhost ~]# redis-cli

127.0.0.1:6379> ping
PONG
127.0.0.1:6379>

11. done

CentOS 7 Lower installation redis More articles on steps

  1. CENTOS 7 Lower installation REDIS 5.0.6 Complete steps

    First step : download redis Installation package wget   http://download.redis.io/releases/redis-5.0.6.tar.gz The second step : Decompress the package tar -zxvf redis ...

  2. centos 7 Lower installation redis

    One . install redis service First step : download redis Installation package command :wget http://download.redis.io/releases/redis-4.0.6.tar.gz [root@chenzh ...

  3. Linux Installation in environment Redis Step is problem solving

    First step : Install the package in window Unzip it on the platform and copy it to Linux Mechanical /usr/soft Under the table of contents , And give the folder and file the highest permissions ,chmod+x *: The second step : Enter into redis-3.2.6 Under the table of contents , perform make ...

  4. centos Installation in environment redis

    1. install gcc and gcc-c++ Use which gcc and which g++ Check if it is installed , If installed , Skip the installation steps below install gcc yum -y install gcc install gcc-c++ yum ...

  5. stay windows Lower installation Redis step ( collect )

    One . download windows Version of Redis I went to the official website for a long time , Found that the original can be downloaded from the official website windows Version of , Now the official website and no download address , Only in github Upload and download , The official website only provides linux Version download Official website download address ...

  6. Linux Installation configuration Redis CentOS 7 Lower installation Redis

    Redis Is a high-performance , Open source key-value Type database . It's building high performance , Extensible Web Perfect solution for applications , It can be stored in memory or persistent . Because to use cross process , Data caching across service levels , After comparing several options , Decide to use ...

  7. CentOS Installation under system Redis

    1. install C Language environment yum install gcc-c++ 2. download Redis Installation package http://download.redis.io/releases/redis-3.2.9.tar.gz 3. Explain ...

  8. CentOS 7 Lower installation Redis

    1. install gcc Environmental Science sudo yum install gcc-c++ 2. install wget sudo yum install wget 3. download Redis Source package wget http://download. ...

  9. windows Lower installation redis and php Of redis Expand

    1.redis brief introduction redis It's a key-value The storage system . and Memcached similar , It supports storage value There are more types , Include string( character string ).list( Linked list ).set( aggregate ).zset(s ...

Random recommendation

  1. .Net Cache management framework CacheManager

    using System; using CacheManager.Core; namespace ConsoleApplication { class Program { static void Ma ...

  2. Entity Framework Load many at a time Fluent API mapping

    There are many ways to specify the Fluent mapping ( From class to database ). 1. Directly in DbContext Class OnModel­Creating Method , As shown below : protected overrid ...

  3. PHP A little doubt

    In the database , Field is NULL, have access to empty() Judge <?php $CONFIG['hostname'] = 'localhost'; $CONFIG['username'] = 'roo ...

  4. 139. Word Break

    subject : Given a string s and a dictionary of words dict, determine if s can be segmented into a space-se ...

  5. Business order number generation algorithm , Per second 50W about , Different machines guarantee no repetition , Include dates for readability

    Reference resources snowflace Algorithm , The basic idea : Sequence 12 position ( After more formatted output , The loss of performance makes it impossible to generate so much per millisecond , So consider reducing the number of bits here , But it doesn't matter to keep it ) Machine position 10 position The millisecond is shifted to the left 22 position The above several do or run ...

  6. AngularJs The pit of tread

    1. Use checkbox and radio when , Out of commission ng-model Bind the original object directly , You need to bind a child property of an object , To bind a value to scope <label><input type ...

  7. solve Tomcatt Connect to the database classNoFount problem

    When the database connection is used alone . That is to say, as an independent class, it is built on mian In the method , It can be used correctly . example : Connect MySql database import java.sql.*; public class SQLtest { // J ...

  8. Move Web front end , Tourists click on the collection button of goods , Login complete , After coming back , How to automatically collect

    We all know , Move Web End (M Standing in the environment ), A lot of times , The front end can't judge the login status of the user , Because for security reasons , Account related cookie Fields are generally http-only Of . If the front end wants to determine the user's login status , Need the Lord ...

  9. Keep the original after editing URl search criteria

    The first thing we need to know is : 1.request.GET It's a QueryDict Type of , To remove ? The structure in the back uses request.GET.urlencode() 2.request.GET The default is not modifiable ...

  10. be based on HTML5 Canvas The temperature nephogram of the computer room shows

    Preface Under the general trend of Internet of things , The machine room equipment information and some environmental information into the data in front of people . In this age of big data , Data visualization is not just about the data values themselves , More should pass the change of data to obtain some information . Our topic for today , Temperature cloud map of machine room ...