inux环境:Centos 6.8
Redis服务端版本:3.2.6
Redis客户端下载链接:https://redisdesktop.com/download
省略Linux系统安装Redis教程,网上安装教程很多;建议用tar.gz包安装
Redis官网tar.gz下载地址:wget http://download.redis.io/releases/redis-3.2.6.tar.gz
安装时可能遇到的问题
问题1:make[3]: gcc: Command not found
解决:Centos系统执行yum install gcc;Ubuntu系统执行apt-get install gcc
问题2:zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory
zmalloc.h:55:2: error: #error “Newer version of jemalloc required”
make[1]: * [adlist.o] Error 1
解决:输入make MALLOC=libc,然后重新编译
安装完之后,进入Redis安装目录
[root@Karle redis-3.2.6]# ll
总用量 208
-rw-rw-r--. 1 root root 80406 12月 6 2016 00-RELEASENOTES
drwxr-xr-x. 2 root root 4096 1月 4 2017 bin
-rw-rw-r--. 1 root root 53 12月 6 2016 BUGS
-rw-rw-r--. 1 root root 1805 12月 6 2016 CONTRIBUTING
-rw-rw-r--. 1 root root 1487 12月 6 2016 COPYING
drwxrwxr-x. 7 root root 4096 1月 4 2017 deps
drwxr-xr-x. 2 root root 4096 1月 4 2017 etc
-rw-rw-r--. 1 root root 11 12月 6 2016 INSTALL
-rw-rw-r--. 1 root root 151 12月 6 2016 Makefile
-rw-rw-r--. 1 root root 4223 12月 6 2016 MANIFESTO
-rw-rw-r--. 1 root root 6834 12月 6 2016 README.md
-rw-rw-r--. 1 root root 46696 9月 10 10:06 redis.conf (Redis配置文件)
-rwxrwxr-x. 1 root root 271 12月 6 2016 runtest
-rwxrwxr-x. 1 root root 280 12月 6 2016 runtest-cluster
-rwxrwxr-x. 1 root root 281 12月 6 2016 runtest-sentinel
-rw-rw-r--. 1 root root 7606 12月 6 2016 sentinel.conf
drwxrwxr-x. 2 root root 4096 9月 10 10:08 src (执行脚本)
drwxrwxr-