bingoogolapple / bingoogolapple.github.io

个人主页。同时也通过 Issues 记录学习笔记
http://www.bingoogolapple.cn
86 stars 19 forks source link

Redis学习笔记 #92

Open bingoogolapple opened 8 years ago

bingoogolapple commented 8 years ago

官网

配置redis以守护进程的方式启动

mac
vim /usr/local/etc/redis.conf
linux
vim /etc/redis.conf
查找 ?daemonize 改为yes

redis-server /usr/local/etc/redis.conf

客户端操作

➜  ~  ps aux | grep redis
bingoogol       71241   0.1  0.0  2470008   1380   ??  Ss    4:01下午   0:00.03redis-server 127.0.0.1:6379 
bingoogol       71304   0.0  0.0  2445076    780 s000  R+    4:01下午   0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn redis

redis-cli
redis-cli -h 127.0.0.1 -p 6379

set test 1 keys * get test