Linux 系统安装 Redis

前言
Redis(Remote Dictionary Server ),即远程字典服务,是一个开源的使用 ANSI C 语言编写、支持网络、可基于内存亦可持久化的日志型、Key-Value 数据库,并提供多种语言的 API。
Redis 是一个高性能的 key-value 数据库。 redis 的出现,在部分场合可以对关系数据库起到很好的补充作用。它提供了 Java,C/C++,C#,PHP,JavaScript,Perl,Object-C,Python,Ruby,Erlang 等客户端,使用很方便。
本文将介绍在 CentOS 7 操作系统下的 Redis 的安装及使用。
1、安装

Redis 本身没有 windows 版本,不过 Github 有大神,出来 windows 版本的 Redis 供我们使用。
下载链接如下:https://github.com/microsoftarchive/redis/releases

1、上传解压
打开 Xftp 或者其他工具,将下载好的压缩包上传到云服务器。

将上传的压缩包解压,命令如下:

2、安装 gcc 环境进行编译
使用如下命令安装 gcc 环境进行编译:

3、进行编译 make
进入 rediscd redis-6.2.4/
,使用 make 命令进行编译。

4、进行安装 make install
进入 src,cd src
,使用 make install 命令进行安装

2、使用
进入 src 目录cd src
,进行启动停止操作,命令如下。
启动 --> ./redis-server

客户端 --> ./redis-cli

停止 --> kill -9 pid
3、远程连接
当我们远程链接 redis 时,需要如下操作。
搜索功能
找到 bind 加 #注释掉

即可在 windows 测试链接
总结
以上就是在 linux 操作系统下的安装 redis 教程,希望对你有帮助。送你一句毒鸡汤:你一定要笑,不然不会知道,自己有多少鱼尾纹。
版权声明: 本文为 InfoQ 作者【斯】的原创文章。
原文链接:【http://xie.infoq.cn/article/eb94867b06efdff6698246ea6】。文章转载请联系作者。
评论