zoukankan      html  css  js  c++  java
  • ubuntu 18.04 安装 Redis

    一、安装redis

    sudo apt install redis-server
    

    二、配置redis

    sudo vim /etc/redis/redis.conf
    

    可以输入“:?supervised”找到supervised指令,指令默认为no,改为systemd

    # If you run Redis from upstart or systemd, Redis can interact with your
    # supervision tree. Options:
    #   supervised no      - no supervision interaction
    #   supervised upstart - signal upstart by putting Redis into SIGSTOP mode
    #   supervised systemd - signal systemd by writing READY=1 to $NOTIFY_SOCKET
    #   supervised auto    - detect upstart or systemd method based on
    #                        UPSTART_JOB or NOTIFY_SOCKET environment variables
    # Note: these supervision methods only signal "process is ready."
    #       They do not enable continuous liveness pings back to your supervisor.
    supervised systemd

    重启redis:

    sudo service redis-server restart
    

    查看redis启动状态:

    ps -ef|grep redis

    三、redis远程连接

    打开配置文件:

    sudo vim /etc/redis/redis.conf

    将 bind 127.0.0.1 ::1 改为 bind 0.0.0.0

    之后重新启动 redis

    四、redis设置密码

    打开 Redis 的配置文件

    sudo vim /etc/redis/redis.conf

    找到下面这一行:

    # requirepass foobared 

    将注释符号去掉,将后面呢修改成自己的密码,如:

    requirepass 123456
  • 相关阅读:
    一个java的进销存管理系统源码阅读
    嵌入式起步
    java数据库操作有关的杂记
    VS 调试
    软件测试的原则
    黑盒测试与白盒测试
    Xmind快速入门(基本操作够用了)
    opt目录
    日志测试
    bug的前世今生
  • 原文地址:https://www.cnblogs.com/darklights/p/9901021.html
Copyright © 2011-2022 走看看