redis
来源:互联网 发布:软件光盘品牌 编辑:程序博客网 时间:2024/05/21 06:46
1.centos6.5安装redis
wgt http://download.redis.io/releases/redis-stable.tar.gztar zxvf redis-stable.tar.gzcd redis-stablemakemake installmake test
根据提示
You need tcl 8.5 or newer in order to run the Redis test
所以安装tcl
wget http://downloads.sourceforge.net/tcl/tcl8.6.1-src.tar.gz tar xzvf tcl8.6.1-src.tar.gz cd tcl8.6.1/unix./configure make make install
2.尝试启动redis
遇到问题
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.
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-server
./redis-server ../redis.conf
发现启动了但是不能退出
需要把redis-server设置为后台运行(守护进程)
vi redis.conf设置里面的daemonize 为yes 即可
继续尝试启动redis-server
redis-server ../redis.conf
启动成功
redis-cli
测试一下
ok了
3.关联php
0 0
- Redis
- redis
- Redis
- redis
- Redis
- redis
- Redis
- redis
- REDIS
- Redis
- Redis
- redis
- Redis
- Redis
- Redis
- Redis
- Redis
- Redis
- 关于Xcode报错, 但编译,运行正常情况
- java实现一个栈
- Android的对话框显示与隐藏
- C#中使用托管C++类,委托调用,以供托管C++类的成员函数回调的实现方式
- 程序员技巧---调试
- redis
- spring mvc 使用kaptcha生成验证码
- Unity-使用UIAnchor 和 UIStretch适配
- Android Studio 2.2 来啦!
- java BigInteger hex
- java 异常处理总结
- mysql异常:Communications link failure
- (第四周项目3)单链表的应用(3)
- 第四周项目2-建设“顺序表”算法库