linux 关闭redis 命令_Linux下停止和启动redis

1.停止redis (进入redis安装目录)

[root@JDu4e00u53f7 redis]# ./bin/redis-cli shutdown

2. 启动redis

[root@JDu4e00u53f7 redis]# ./bin/redis-server /usr/local/redis/etc/redis.conf

3.使用redis

[root@JDu4e00u53f7 redis]# ./bin/redis-cli

127.0.0.1:6379> ping

PONG

127.0.0.1:6379> keys*

(error) ERR unknown command 'keys*'

127.0.0.1:6379>

4.redis的自带的性能测试工具redis-benchmark

[root@JDu4e00u53f7 redis]# ./bin/redis-benchmark -help

Invalid option "-help" or option argument missing

Usage: redis-benchmark [-h ] [-p ] [-c ] [-n [-k ]

-h Server hostname (default 127.0.0.1)

-p Server port (default 6379)

-s Server socket (overrides host and port)

-a Password for Redis Auth

-c Number of parallel connections (default 50) 并发客户端数

-n Total number of requests (default 100000) 请求数量

-d Data size of SET/GET value in bytes (default 2) 数据大小

-dbnum SELECT the specified db number (default 0)

-k 1=keep alive 0=reconnect (default 1) 是否采用keep alive模式

-r Use random keys for SET/GET/INCR, random values for SADD

Using this option the benchmark will expand the string __rand_int__

inside an argument with a 12 digits number in the specified range

from 0 to keyspacelen-1. The substitution changes every time a command

is executed. Defa

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值