-
wget下载安装包
# wget http://download.redis.io/releases/redis-4.0.14.tar.gz
-
解压安装
# tar -xf redis-4.0.14.tar.gz # cd redis-4.0.14 # make &&make install
-
启动服务
# redis-server 2480:C 20 May 15:13:11.495 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo 2480:C 20 May 15:13:11.495 # Redis version=4.0.14, bits=64, commit=00000000, modified=0, pid=2480, just started 2480:C 20 May 15:13:11.495 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf 2480:M 20 May 15:13:11.496 * Increased maximum number of open files to 10032 (it was originally set to 1024). _._ _.-``__ ''-._ _.-`` `. `_. ''-._ Redis 4.0.14 (00000000/0) 64 bit .-`` .-```. ```\/ _.,_ ''-._ ( ' , .-` | `, ) Running in standalone mode |`-._`-...-` __...-.``-._|'` _.-'| Port: xxxx | `-._ `._ / _.-' | PID: xxxx `-._ `-._ `-./ _.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | http://redis.io `-._ `-._`-.__.-'_.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | `-._ `-._`-.__.-'_.-' _.-' `-._ `-.__.-' _.-' `-._ _.-' `-.__.-'
-
安装报错信息解决
-
报错提示:make[3]: gcc:命令未找到;原因:没有安装gcc环境,yum install gcc
/bin/sh: cc: command not found make[1]: *** [adlist.o] 错误 127 make[1]: Leaving directory `/home/software/redis-4.0.14/src' make: *** [install] 错误 2 [root@localhost ~]# yum install gcc Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com -------------------------------
-
报错提示:在包含自 adlist.c:34 的文件中:zmalloc.h:50:31: 错误:jemalloc/jemalloc.h:没有那个文件或目录
措施:# make MALLOC=libc在包含自 adlist.c:34 的文件中: zmalloc.h:50:31: 错误:jemalloc/jemalloc.h:没有那个文件或目录 zmalloc.h:55:2: 错误:#error "Newer version of jemalloc required" make[1]: *** [adlist.o] 错误 1 make[1]: Leaving directory `/home/software/redis-4.0.14/src' make: *** [all] 错误 2 [root@localhost redis-4.0.14]# make MALLOC=libc cd src && make all make[1]: Entering directory `/home/software/redis-4.0.14/src' ------------------------------
-