您的位置:首页 > 数据库 > Redis

Linux下,Redis安装

2015-10-30 11:05 766 查看
编辑器竟然不能直接粘贴图片,偏偏我又喜欢截图。只好将博文直接做成图片了。

用到的Linux命令如下,以供懒人同学直接复制粘贴

1.下载Redis安装包
wget http://download.redis.io/releases/redis-2.8.12.tar.gz 2.解压并重命名
tar -zvxf redis-2.8.12.tar.gz
mv redis-2.8.12 redis2812
3.进入redis2812,编译
cd redis2812
make
4.报错:cc: command not found
5.安装 gcc: sudo yum install gcc
7.解决办法:make MALLOC=libc
问题原因:参考http://www.phperz.com/article/14/1219/42002.html
9.其实Redis不用install ,只要make就可以了。类似于windows下的绿色软件,可以直接跑的。参见:http://blog.csdn.net/chenggong2dm/article/details/610000
11.果然,如它所愿,连test自己都报错了(你也可能没有):You need tcl 8.5 or newer in order to run the Redis test
12.升级tcl
wget http://downloads.sourceforge.net/tcl/tcl8.6.1-src.tar.gz tar -zxvf tcl8.6.1-src.tar.gz
cd tcl8.6.1/unix
sudo ./configure
sudo make
sudo make install
13.回到redis的界面,先后make test。
如它所愿,报错了(你也可能没有): Test replication partial resync: no backlog in tests/integration/replication-psync.tcl
14. 解决办法:参见:https://github.com/antirez/redis/issues/1417
16.启动:进到utils目录,然后: sudo ./install_server.sh。
又报错了:Mmmmm...  it seems like you don't have a redis executable. Did you run makeinstall yet?
17.2.按照网上说的,创建一个软连接:
ln -s /usr/local/redis/bin/redis-* /usr/local/bin/
service redis_6379 start
ps -ef | grep redis


安装过程如下:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: