Install redis and centosredis in centos 6.5

Source: Internet
Author: User
Tags install redis

Install redis and centosredis in centos 6.5

Version: redis-2.8.19.tar.gz

Check whether the following dependencies are installed. If not, install them first. Otherwise, an exception occurs.

Yum installgcc-c ++

Yum install-y tcl.

 

1. Obtain the Installation File

Redis-2.8.19.tar.gz

Http://redis.io/download

 

2. decompress the file

Tar-xzvf redis-2.8.19.tar.gz

Music redis-2.8.19/usr/local/redis

3. Enter the Directory

Cd redis

 

4. Compile

Make

 

5. Installation

Make install

 

6. Set the configuration file path

Mkdir-p/etc/redis

Cp redis. conf/etc/redis

 

7. modify the configuration file

Vi/etc/redis. conf


Modify only: daemonize yes

 

8. Start


/Usr/local/bin/redis-server/etc/redis. conf

 

9. View startup


Ps-ef | grep redis

 

10. Use the client



Redis-cli

> Set namedavid

OK


11. Disable the client

Redis-cli shutdown


12. Exceptions and Solutions

Exception 1:

Make [2]: cc: Command not found

Cause of exception: gcc Is Not Installed

Solution: yum install gcc-c ++

Exception 2:

Zmalloc. h: 51: 31: error: jemalloc/jemalloc. h: No such file or directory

Cause of exception: Some compilation dependencies or issues left behind by the original compilation

Solution: make distclean. Clean up and then make.

 

 

Make test is required after make is successful. An exception occurred in make test.

Exception 1:

Couldn 'texecute "tclsh8.5": no such file or directory

Cause of exception: tcl is not installed

If you run make test without installing tcl to compile redis, the following error will be reported. This step can also be omitted, directly executing make install without executing make test has no effect on redis startup or shutdown.
[Root @ localhostredis] # make test
Cd src & make test
Make [1]: Enteringdirectory '/usr/local/webserver/redis/src'
You need tcl 8.5 ornewer in order to run the Redis test
Make [1]: *** [test] Error 1
Make [1]: Leavingdirectory '/usr/local/webserver/redis/src'
Make: *** [test] Error 2

 



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.