时间:2021-04-01 08:19:31 | 栏目:Redis | 点击:次
Linux redis5.0.0安装,教程如下所示:
1.从官网下载,然后传到服务器,tar -zxvf
解压
2.进入redis
[root@localhost software]# cd redis-5.0.0/
3.安装:make
,
(1)若提示:: gcc: Command not found
要安装gcc ,直接命令安装:yum -y install gcc
(2)若:提示
fatal error: jemalloc/jemalloc.h: No such file or directory
原因是jemalloc重载了Linux下的ANSI C的malloc和free函数。解决办法:make时添加参数
make MALLOC=libc
4.make install
5.启动
redis-server redis.conf
redis集群安装注意
1.下载 2.redis5.0以上的集群是
/usr/local/software/redis-5.0.0/src/redis-cli --cluster create 192.168.221.132:7000 192.168.221.132:7001 192.168.221.132:7002 192.168.221.132:7003 192.168.221.132:7004 192.168.221.132:7005 192.168.221.132:7006 192.168.221.132:7007 192.168.221.132:7008 --cluster-replicas 2
输入:yes
配置成功
总结