主页 > 知识库 > redis基本安装判断、启动使用方法示例

redis基本安装判断、启动使用方法示例

热门标签:网站排名优化 Linux服务器 百度竞价排名 AI电销 呼叫中心市场需求 铁路电话系统 地方门户网站 服务外包

本文实例讲述了redis基本安装判断、启动使用方法。分享给大家供大家参考,具体如下:

1、Redis对否安装(安装好了会出现下面对应的代码)

[root]$ whereis redis-cli
redis-cli: /usr/local/bin/redis-cli
[root]$
[root]$ whereis redis-server
redis-server: /usr/local/bin/redis-server

2、启动Redis

输入代码

redis-server 
30733:C 09 Dec 14:45:30.876 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
30733:M 09 Dec 14:45:30.879 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
30733:M 09 Dec 14:45:30.879 # Server can't set maximum open files to 10032 because of OS error: Operation not permitted.
30733:M 09 Dec 14:45:30.879 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
[root]$         _._
      _.-``__ ''-._
   _.-``  `. `_. ''-._      Redis 3.2.0 (00000000/0) 64 bit
 .-`` .-```. ```\/  _.,_ ''-._
 (  '   ,    .-` | `,  )   Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|   Port: 6379
 |  `-._  `._  /   _.-'  |   PID: 30733
 `-._  `-._ `-./ _.-'  _.-'
 |`-._`-._  `-.__.-'  _.-'_.-'|
 |  `-._`-._    _.-'_.-'  |      http://redis.io
 `-._  `-._`-.__.-'_.-'  _.-'
 |`-._`-._  `-.__.-'  _.-'_.-'|
 |  `-._`-._    _.-'_.-'  |
 `-._  `-._`-.__.-'_.-'  _.-'
   `-._  `-.__.-'  _.-'
     `-._    _.-'
       `-.__.-'

30733:M 09 Dec 14:45:30.900 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
30733:M 09 Dec 14:45:30.900 # Server started, Redis version 3.2.0
30733:M 09 Dec 14:45:30.901 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
30733:M 09 Dec 14:45:30.901 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
30733:M 09 Dec 14:45:30.902 * The server is now ready to accept connections on port 6379

3.判断Redis是否启动

[root]# redis-cli -p 6379
127.0.0.1:6379> ping
PONG
127.0.0.1:6379>

希望本文所述对大家Redis数据库程序设计有所帮助。

您可能感兴趣的文章:
  • 64位Windows下安装Redis教程
  • Linux下Redis的安装和部署
  • CentOS 6.6下Redis安装配置记录
  • Redis数据库的安装配置方法
  • Windows下Redis的安装使用图解
  • windows 64位下redis安装教程
  • Django中redis的使用方法(包括安装、配置、启动)
  • CentOS系统下Redis安装和自启动配置的步骤
  • 详解linux下redis安装、启动与停止,redis做成服务
  • redis启动流程介绍
  • Redis的配置、启动、操作和关闭方法
  • 解决redis服务启动失败的问题
  • mac下设置redis开机启动方法步骤

标签:仙桃 兰州 崇左 衡水 湖南 黄山 铜川 湘潭

巨人网络通讯声明:本文标题《redis基本安装判断、启动使用方法示例》,本文关键词  ;如发现本文内容存在版权问题,烦请提供相关信息告之我们,我们将及时沟通与处理。本站内容系统采集于网络,涉及言论、版权与本站无关。
  • 相关文章
  • 收缩
    • 微信客服
    • 微信二维码
    • 电话咨询

    • 400-1100-266