标签:redis安装
环境:CentOs 6.5 (最小化安装)
Redis是一个开源的使用ANSI C语言编写、支持网络、可基于内存亦可持久化的日志型、Key-Value数据库
[root@localhost software]# yum -y install gcc gcc-c++ libstdc++-devel tcl [root@localhost software]# tar -zxvf redis-3.0.0.tar.gz -C /usr/local [root@localhost software]# mv /usr/local/redis-3.0.0 /usr/local/redis [root@localhost software]# cd /usr/local/redis/ [root@localhost redis]# make ··· Hint: It‘s a good idea to run ‘make test‘ ;) [root@localhost redis]# make test ··· \o/ All tests passed without errors! [root@localhost redis]# [root@localhost redis]# cd src/ [root@localhost src]# ln -s /usr/local/redis/src/redis-server /bin/ [root@localhost src]# ln -s /usr/local/redis/src/redis-cli /bin/ [root@localhost src]# redis-server /usr/local/redis/redis.conf & [root@localhost ~]# ps -ef |grep redis |grep -v grep root 5980 5955 0 20:48 pts/2 00:00:00 redis-server *:6379 [root@localhost ~]# [root@localhost ~]# echo "redis-server /usr/local/redis/redis.conf" >>/etc/rc.local
打开xshell
[root@localhost ~]# redis-cli -h localhost -p 6379 localhost:6379> list (error) ERR unknown command ‘list‘ localhost:6379> help redis-cli 3.0.0 Type: "help @<group>" to get a list of commands in <group> "help <command>" for help on <command> "help <tab>" to get a list of possible help topics "quit" to exit localhost:6379> exit [root@localhost ~]#
关闭redis服务
[root@localhost ~]# redis-cli shutdown [root@localhost ~]# ps -ef |grep redis |grep -v grep [root@localhost ~]#
本文出自 “鹏城-酱油瓶” 博客,请务必保留此出处http://yfshare.blog.51cto.com/8611708/1674968
标签:redis安装
原文地址:http://yfshare.blog.51cto.com/8611708/1674968