CentOS安装Redis
wgethttp://download.redis.io/redis-stable.tar.gz
tar-zxvfredis-stable.tar.gz
cdredis-stable
make
makeinstall
viredis.conf
修改#bind127.0.0.1
修改protected-modeno
redis-server
redis-clishutdown
redis-serverredis.conf
后台启动
redis-server&
设置密码
redis-cli-p6379
configsetrequirepass123
编译可能报错
zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory #include <jemalloc/jemalloc.h> ^ compilation terminated. make[1]: *** [adlist.o] Error 1 make[1]: Leaving directory `/home/software/redis-stable/src' make: *** [all] Error 2
原因是jemalloc重载了Linux下的ANSIC的malloc和free函数
解决办法是make时添加参数
makeMALLOC=libc
相关推荐
liuhangtiant 2020-10-20
尹小鱼 2020-06-12
IBMRational 2020-02-14
qiguiting 2020-01-31
hbcbgcx 2019-10-28
qingmuluoyang 2019-10-31
soyo 2016-04-07
归去来兮 2019-01-20
tubro0 2017-10-08
王道革 2015-08-17
fackyou00 2014-12-19
yztezhl 2014-10-29
runningo 2019-04-01
liuyulong 2019-04-01