zoukankan      html  css  js  c++  java
  • Centos7安装Redis

    一、安装redis 

            yum install redis

            出现选择就一直 y

    安装完成

    二、启动redis服务 

           /bin/systemctl  start  redis.service

    三、测试redis

           redis-cli

           set  'test'  'hello'

           get  'test'

    测试redis

    四、修改配置

            1.找配置文件 

                whereis  redis.config     

    找配置文件

           2.打开配置文件  

               vi /etc/redis.conf

    允许外部访问

            允许远程访问

            #bind 127.0.0.1

            端口号

            port 8888

            设置密码

            requirepass FA86D6708231EACC2EC22F0_20190624

            关闭保护

            protected-mode no

              ESC  :wq  保存

             /bin/systemctl  restart  redis.service

    常用命令

        启动  /bin/systemctl  start  redis.service

        重启  /bin/systemctl  restart  redis.service

        关闭  /bin/systemctl  stop  redis.service



    作者:余炳高笔记
    链接:https://www.jianshu.com/p/f4e27cf54f60
    来源:简书
    著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
  • 相关阅读:
    【洛谷P1558】色板游戏
    【SCOI2010】序列操作
    Windows下MySQL下载安装、配置与使用
    Redis和MySQL数据同步及Redis使用场景
    python的设计模式之MVC模式
    python 面试真题
    python调用C语言
    一次跨域请求出现 OPTIONS 请求的问题及解决方法
    服务器宕机问题
    页面静态化
  • 原文地址:https://www.cnblogs.com/tiancai/p/13161306.html
Copyright © 2011-2022 走看看