时间:2021-05-23
本文实例讲述了redis基本安装判断、启动使用方法。分享给大家供大家参考,具体如下:
1、Redis对否安装(安装好了会出现下面对应的代码)
[root]$ whereis redis-cliredis-cli: /usr/local/bin/redis-cli[root]$[root]$ whereis redis-serverredis-server: /usr/local/bin/redis-server2、启动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.conf30733: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.030733: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 63793.判断Redis是否启动
[root]# redis-cli -p 6379127.0.0.1:6379> pingPONG127.0.0.1:6379>希望本文所述对大家Redis数据库程序设计有所帮助。
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
本文实例讲述了Java连接redis及基本操作。分享给大家供大家参考,具体如下:点击此处:本站下载安装。解压安装启动redis:使用cd命令切换目录到D:\re
本章简单介绍redis的配置及使用方法,本文示例代码在前面代码的基础上进行修改添加,实现了使用redis进行缓存验证码,以及校验验证码的过程。1、添加依赖库(添
本文实例总结了Redis安装与使用方法。分享给大家供大家参考,具体如下:1、下载:项目地址:https://github.com/MSOpenTech/redi
前言本篇文章主要讲述了Mac下Redis的安装和使用的经验,并将python如何操作Redis做了简单介绍。1.redis安装和启动1.1用brew安装1.查看
关于startService的基本使用概述及其生命周期可参见《Android中startService基本使用方法概述》。本文通过播放背景音乐的简单示例,演示s