zoukankan      html  css  js  c++  java
  • redis配置启动测试

    解压安装redis

    tar -xzvf redisxxx.xx生成解压目录

    进入解压目录:执行命令

    make
    
    make install

    安装成功:

    redis默认安装位置/usr/local/bin

    查看/usr/local/bin下新增文件命令:

    修改配置文件

    配置文件位于redis的解压目录:参见:关于配置文件的详述

    将解压目录当中的redis.conf复制到自己新建的一个目录(myredis)下,作为副本,以后我们就修改副本即可。

    默认本机运行

     默认端口6379

     修改为yes,使之以后台方式启动.

    运行测试

    redis-server /home/kakarotto/myredis/redis.conf
    其中指定redis启动时绑定的配置文件,是我之前修改之后配置文件存放的位置(即副本)。
    [root@localhost bin]# redis-server /home/kakarotto/myredis/redis.conf
    9144:C 08 Aug 2020 23:48:08.996 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
    9144:C 08 Aug 2020 23:48:08.996 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=9144, just started
    9144:C 08 Aug 2020 23:48:08.996 # Configuration loaded
    [root@localhost bin]# redis-cli
    127.0.0.1:6379> ping
    PONG
    127.0.0.1:6379> set k1 hello
    OK
    127.0.0.1:6379> get k1
    "hello"
    127.0.0.1:6379> shutdown
    not connected> exit
    [root@localhost bin]# ps -ef | grep redis
    root       9169   8806  0 23:49 pts/1    00:00:00 grep --color=auto redis
    [root@localhost bin]# 
  • 相关阅读:
    AWS Dynamodb aggregation的处理问题
    Java线程池的实现与应用
    机器学习笔记之基本框架:
    Azure machine learning series 1 Introduction
    AWS的安全机制
    模板
    矩阵快速幂总结
    中位数总结
    KMP算法
    动态规划----背包总结
  • 原文地址:https://www.cnblogs.com/yanl55555/p/13458201.html
Copyright © 2011-2022 走看看