redis compiler installation record

Summary redis compilation problems during installation:
install By way of extracting, tar -zvxf redis-3.2.9.tar.gz
into the files unpacked directory, as follows
cd /home/redis-3.2.9/
compile installation, compiled the following error occurred during the installation:
[@ localhost the root-Redis 3.2.9] the make #
CD All the src && the make
the make [. 1]: into the directory "/home/redis-3.2.9/src"
the CC adlist.o
the in File included adlist.c from: 34: 0:
zmalloc.h: 50: 31: fatal error: jemalloc / jemalloc.h: no such file or directory
#include <jemalloc / jemalloc.h>
^
compile interrupt.
the make [1]: [adlist.o] Error 1
the make [1]: leave directory "/home/redis-3.2.9/src"
the make:
[All] Error 2

这时使用make MALLOC=libc,进行安装:
root@localhost src]#make MALLOC=libc
rm -rf redis-server redis-sentinel redis-cli redis-benchmark redis-check-rdb redis-check-aof .o .gcda .gcno .gcov redis.info lcov-html
(cd ../deps && make distclean)
make[1]: 进入目录“/home/redis-3.2.9/deps”
(cd hiredis && make clean) > /dev/null || true
(cd linenoise && make clean) > /dev/null || true
(cd lua && make clean) > /dev/null || true
(cd geohash-int && make clean) > /dev/null || true
(cd jemalloc && [ -f Makefile ] && make distclean) > /dev/null || true
(rm -f .make-)
make[1]: 离开目录“/home/redis-3.2.9/deps”
(rm -f .make-
)
echo STD=-std=c99 -pedantic -DREDIS_STATIC= >> .make-settings
echo WARN=-Wall -W >> .make-settings
echo OPT=-O2 >> .make-settings
echo MALLOC=libc >> .make-settings
echo CFLAGS= >> .make-settings
echo LDFLAGS= >> .make-settings
echo REDIS_CFLAGS= >> .make-settings
echo REDIS_LDFLAGS= >> .make-settings
echo PREV_FINAL_CFLAGS=-std=c99 -pedantic -DREDIS_STATIC= -Wall -W -O2 -g -ggdb -I../deps/geohash-int -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src >> .make-settings
echo PREV_FINAL_LDFLAGS= -g -ggdb -rdynamic >> .make-settings
(cd ../deps && make hiredis linenoise lua geohash-int)
make[1]: 进入目录“/home/redis-3.2.9/deps”
(cd hiredis && make clean) > /dev/null || true
(cd linenoise && make clean) > /dev/null || true
(cd lua && make clean) > /dev/null || true
(cd geohash-int && make clean) > /dev/null || true
(cd jemalloc && [ -f Makefile ] && make distclean) > /dev/null || true
(rm -f .make-*)
(echo "" > .make-cflags)
(echo "" > .make-ldflags)
MAKE hiredis
cd hiredis && make static
make[2]: 进入目录“/home/redis-3.2.9/deps/hiredis”
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb hiredis.c
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb sds.c
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb async.c
ar rcs libhiredis.a net.o hiredis.o sds.o async.o
make[2]: 离开目录“/home/redis-3.2.9/deps/hiredis”
.
.
.
.
CC redis-benchmark.o
LINK redis-benchmark
INSTALL redis-check-rdb
CC redis-check-aof.o
LINK redis-check-aof

Hint: It's a good idea to run 'make test' ;)

After installation, enter the src directory, make test, reported You need tcl 8.5 or newer in order to run the Redis test, then install tcl, if you can install online on-line installation, if not the same download the corresponding need to install a version of tcl 8.5 tar package to install.
Redis-3.2.9 @ localhost root] # the make the Test
cd src && the make the Test
the make [1]: go to the directory "/home/redis-3.2.9/src"
by You need TCL 8.5 or newer RUN in the Order to the Test at The Redis
the make [1]: [the Test] error 1
the make [1]: leave directory "/home/redis-3.2.9/src"
the make:
[the Test] error 2

[root@localhost redis-3.2.9]# yum install tcl
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile

  • base: mirrors.cn99.com
  • warm: mirrors.aliyun.com
  • extras: mirrors.njupt.edu.cn
  • updates: mirrors.cn99.com
    is addressing dependencies
    -> Checking Services

完毕!
[root@localhost redis-3.2.9]# make test
cd src && make test
make[1]: 进入目录“/home/redis-3.2.9/src”
Cleanup: may take some time... OK
Starting test server at port 11111

Testing unit/printver
.
.
.
.
106 seconds - integration/replication-psync

\o/ All tests passed without errors!

Cleanup: May the Take some Time ... the OK
the make [1]: leave directory "/home/redis-3.2.9/src"

Guess you like

Origin blog.51cto.com/372550/2403826