DDR爱好者之家 Design By 杰米
本文实例讲述了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数据库程序设计有所帮助。
DDR爱好者之家 Design By 杰米
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
DDR爱好者之家 Design By 杰米
暂无评论...
更新日志
2024年04月29日
2024年04月29日
- 【原神】V4.6角色攻略 | 可莉培养攻略
- 决胜巅峰玛蒂尔达怎么样 技能效果一览
- 射雕手游朱门安甜贫者道寒成就怎么获得
- PUBG官方确认5月14日回归经典艾伦格地图
- 物华弥新迷踪盘第14关怎么过 迷踪盘第14关通关方法
- 逆水寒手游1.3.2馆藏上新介绍 逆水寒手游馆藏更新了什么
- 物华弥新迷踪盘第1关怎么过 迷踪盘第1关通关方法
- win7没密钥怎么永久激活,w7系统激活密钥一键激活方法
- 怎么安装电脑系统版本,怎么安装电脑的系统
- 苹果电脑wps安装字体,苹果电脑wps怎么设置字体
- 活力美少女!《摇曳露营△》各务原抚子&志摩凛手办
- 《哥斯拉大战金刚2》票房破9亿 观影人次达2100万!
- 全新IP!《寂静岭2:重制版》开发商正在开发两款新作
- FlorilegiumandAshleySolomon-Haydn-SymphoniesNos.6,7,8LeMatin,Lemidi,LeSoir[flac]
- [PTC5186211]花痴系列-柏辽兹-幻想交响曲,Op.14-小泽征尔-波士顿交响乐团iso