redis 单节点安装

wget http://download.redis.io/releases/redis-5.0.3.tar.gz

1.下载解压

image

2.make编译

image

3.提示没有安装安装gcc,安装gcc

yum install gcc

4.make 提示error: jemalloc/jemalloc.h: No such file or directory

[root@computer7 redis-5.0.3]# make
cd src && make all
make[1]: Entering directory `/data/apps/redis-5.0.3/src'
    CC Makefile.dep
make[1]: Leaving directory `/data/apps/redis-5.0.3/src'
make[1]: Entering directory `/data/apps/redis-5.0.3/src'
    CC adlist.o
In file included from adlist.c:34:0:
zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory
 #include <jemalloc/jemalloc.h>
                               ^
compilation terminated.
make[1]: *** [adlist.o] Error 1
make[1]: Leaving directory `/data/apps/redis-5.0.3/src'
make: *** [all] Error 2
[root@computer7 redis-5.0.3]# cd src/
[root@computer7 src]# make
    CC adlist.o
In file included from adlist.c:34:0:
zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory
 #include <jemalloc/jemalloc.h>
                               ^
compilation terminated.
make: *** [adlist.o] Error 1
[root@computer7 src]# make all
    CC adlist.o
In file included from adlist.c:34:0:
zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory
 #include <jemalloc/jemalloc.h>
                               ^
compilation terminated.
make: *** [adlist.o] Error 1
解决:执行  make MALLOC=libc  

5. make test 提示 You need tcl 8.5 or newer in order to run the Redis test

解决:

wget http://downloads.sourceforge.net/tcl/tcl8.6.1-src.tar.gz 
tar xzvf tcl8.6.1-src.tar.gz
./configure 
make 
make install 

6. 再次测试redis

[root@computer7 src]# pwd
cd redis-5.0.3/src

make test

Executing test client: couldn't open socket: connection refused.  这个错不管,执行下一步。

image

7. make install安装

image

8. 启动redis

修改redis.conf 中绑定ip为本机ip如:bind 192.168.1.71  默认为bind 127.0.0.1 不能远程访问

image

 

9.安装redis客户端

https://github.com/uglide/RedisDesktopManager/releases/download/0.9.3/redis-desktop-manager-0.9.3.817.exe

image

 

 

 

 





posted @ 2018-12-29 22:52  csqq  阅读(235)  评论(0编辑  收藏  举报