CentOS6 Installing Redis

Source: Internet
Author: User

Open the official website of Reids, see if there is no quick install such documents, a look dumbfounded, nothing, about the installation, no mention. This makes me uncomfortable, not better than Oracle.


Unpack 3.0.7 version, there is an install, hey, open a look, hehe--->look README.


All right, go to the readme. Inside good detail ah, give a praise!


First, go to the extracted directory, make a bit, made sure you have installed the MAKE,GCC, and other components.


Sure enough, the error:

Zmalloc.h:50:31:error:jemalloc/jemalloc.h:no such file or directory Zmalloc.h:55:2: Error: #error "newer version of Jemalloc Required "

Need this thing, according to the usual practice, can yum install Ah! On-line search, uniform, in make when adding parameters:


Allocator
---------

Selecting a Non-default memory allocator when building Redis are done by setting
The ' MALLOC ' environment variable. Redis is compiled and linked against LIBC
malloc by default, with the exception of Jemalloc being the default on Linux
Systems. This default is picked because Jemalloc has proven to having fewer
Fragmentation problems than libc malloc.

To force compiling against libc malloc, use:

% make MALLOC=LIBC

To compile against Jemalloc in Mac OS X systems, use:

% make Malloc=jemalloc

Verbose Build

Did you see it? That's clear, isn't it? I decided not to use the above parameters: malloc=libc people tell you there may be a lot of mistakes, you still silly to go with it? Production environment resolutely do not use, usually do not have to form a good habit PS: Developers automatically ignore.


This software can be installed with Yum only in the Epel source.

Yum Install Jemalloc-devel

If you don't have a epel, install it first: Yum install Epel-release

This is Method 1.

There is another method 2:

Into the deps inside make Jemalloc



--------------------------above is error 1------------------------

Error 2:

$ makeclang:error:no Such file or directory: '. /DEPS/HIREDIS/LIBHIREDIS.A ' Clang:error:no such file or directory: '. /deps/lua/src/liblua.a ' make[1]: * * [Redis-server] Error 1make: * * * [ALL] Error 2 method: CD Depsmake lua Hiredis linenoise----- ----------------------Error 3-------------------------
You need TCL 8.5 or newer on order to run the Redis testmake: * * * [Test] Error 1 method: Yum install TCL official website so say: Http://www.linux fromscratch.org/blfs/view/cvs/general/tcl.html, make test, if you start an error, then make test, the slot, the error is gone. What a wonderful thing! Make--prefix=/usr/lcoal/redis install to specify the installation directory.  /usr/local/redis/bin/redis-server/path/redis.conf Specify the configuration file to start the service default port 6379 can be this: nohup/usr/local/redis/bin/redis-server /path/redis.conf $ after startup, follow the test to change the kernel parameters. ---------------------------------about user and password---------------------------

Http://www.2cto.com/database/201412/365757.html

This article is from the "Yong Climbing Peak" blog, please be sure to keep this source http://libin580.blog.51cto.com/2252719/1770343

CentOS6 Installing 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.