1.下载redis安装包
地址:http://download.redis.io/releases/redis-3.0.6.tar.gz
2.解压安装包
命令:tar zvxf redis-3.0.6.tar.gz
3.进入文件夹并安装
命令:cd redis-3.0.6.tar.gz
命令:make
4.测试是否安装成功
命令:make test
出现错误:
[[email protected] redis-stable]# make test
cd src && make test
make[1]: Entering directory `/usr/local/src/redis-stable/src‘
which: no tclsh8.5 in (/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/geffzhang/bin)
You need ‘tclsh8.5‘ in order to run the Redis test
make[1]: *** [test] 错误 1
make[1]: Leaving directory `/usr/local/src/redis-stable/src‘
make: *** [test] 错误 2
[[email protected] redis-stable]#
原因:未安装tcl
解决办法:yum 安装
命令:yum install -y tcl
5.开始安装
命令:make install
根据提示执行命令:cd src && make install
6.启动redis
命令:./redis-server(默认配置启动)
命令:./redis-server redis.conf(指定配置启动)