Linux 下安装Redis

来源:互联网 发布:用户画像的数据来源 编辑:程序博客网 时间:2024/06/02 06:53

依据慕课网的Redis入门视频教程 在Linux环境中进行安装,总结的。

1.首先安装编译Redis 的环境   yum install gcc-c++ (需要root权限)  在线安装gcc环境的命令

2. 利用FileZilla 工具将Redis的下载包导入到Linux中

3.安装Redis

 解压Redis  tar -zxvf redis-xx.xx 

编译redis  --> 进入redis解压后的文件夹内。输入 make   编译

    然后 make PERFIX = 文件安装的路径

   再将 redis的配置文件 redis.conf 拷贝放到 redis目录下

  修改redis.conf 中的  daemonize  由 no 变成 yes  这样设置就能在后端启动 redis了

 启动命令: ./bin/redis-server  ./redis-conf  回车     

 通过 ps -ef |grep redis 就能看到redis启动的信息


关于   异常问题

DENIED Redis is running in protected mode because protected mode is enabled, no bind address was specified, no authentication password is requested to clients. In this mode connections are only accepted from the loopback interface. If you want to connect...


只要修改 redis.conf  中的   protected-mode  yes  --> 修改为   protected-mode no  就不会报错



原创粉丝点击