美文网首页
在CentOS 7中安装Redis 3.2.8

在CentOS 7中安装Redis 3.2.8

作者: 油腻的胖子 | 来源:发表于2018-01-08 14:09 被阅读0次

环境:centos7

更新gcc

yum -y install gcc#解压tar -zxvf redis-3.2.8.tar.gz

#转换目录

cd redis-3.2.8/deps/

#编译依赖make geohash-int hiredis jemalloc linenoise lua

#转换目录

cd ..

#编译Redismake && make install#转换目录

cd utils/

#使用脚本安装服务

./install_server.sh#启动服务

systemctl start redis_6379

systemctl status redis_6379

vim /etc/redis/6379.conf

注释掉bing 127.0.0.1

requirepass mypasswork

重启redis

systemctl restart redis_6379

简单提示:

1、当前版本中需要编译的依赖有五项,更早或未来的版本可能会有不同。如果您没有编译这些项目,编译Redis会遇到错误。

fatal error: jemalloc/jemalloc.h: No suchfile or directorycc: error: ../deps/hiredis/libhiredis.a: No suchfile or directorycc: error: ../deps/lua/src/liblua.a: No suchfile or directorycc: error: ../deps/geohash-int/geohash.o: No suchfile or directorycc: error: ../deps/linenoise/linenoise.o: No suchfileor directory

2、在使用脚本安装服务的过程中,您可以一路【Enter】完成安装。之后您可以再次运行脚本文件,并通过输入不同的端口号建立多个Redis服务

相关文章

网友评论

      本文标题:在CentOS 7中安装Redis 3.2.8

      本文链接:https://www.haomeiwen.com/subject/ugkbnxtx.html