Install Redis under CentOS

Here we introduce the use of source code to compile and install Redis.
1. Install the gcc required to compile Redis
    ~: # yum install gcc

2. Verify that gcc is successful

    ~: # rpm -qa | grep gcc

3. Download the redis source code

    ~: # wget http://download.redis.io/releases/redis-3.2.6.tar.gz

4. Unzip redis

    ~: # tar -xzf redis-3.2.6.tar.gz

5. Compile redis

    ~:# cd redis-3.2.6

    ~: # make

6. Start redis (do not enter the src directory)

    ~: # src/redis-server

 

Note: If gcc is not installed, an error occurs during compilation:

    make: cc: Command not found make: *** [adlist.o] Error 127

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326402461&siteId=291194637