服务器:阿里云 centos 6 64位
[root@iZ112fail84Z ~]# wget http://download.redis.io/releases/redis-3.0.7.tar.gz
[root@iZ112fail84Z ~]#tar zxvf redis-3.0.7.tar.gz
[root@iZ112fail84Z ~]# ls
redis-3.0.7
[root@iZ112fail84Z ~]# cd redis-3.0.7
[root@iZ112fail84Z redis-3.0.7]# ls
00-RELEASENOTES COPYING Makefile redis.conf runtest-sentinel tests
BUGS deps MANIFESTO runtest sentinel.conf utils
CONTRIBUTING INSTALL README runtest-cluster src
[root@iZ112fail84Z redis-3.0.7]# make
执行之后出现很多,最后显示
Hint: It’s a good idea to run ‘make test’ ;)
make[1]: Leaving directory `/root/redis-3.0.7/src’
[root@iZ112fail84Z redis-3.0.7]# make install
cd src && make install
make[1]: Entering directory `/root/redis-3.0.7/src’
Hint: It’s a good idea to run ‘make test’ ;)
INSTALL install
INSTALL install
INSTALL install
INSTALL install
INSTALL install
make[1]: Leaving directory `/root/redis-3.0.7/src’
cp /root/redis-3.0.7/redis.conf /usr/local/bin
[root@iZ112fail84Z bin]# ls
redis-benchmark redis-check-dump redis.conf redis-server
redis-check-aof redis-cli redis-sentinel
vim redis.conf
修改 redis.conf中的daemonize yes
启动redis
[root@iZ112fail84Z bin]# redis-server redis.conf
[root@iZ112fail84Z bin]# ps -ef|grep redis
root 19935 1 0 22:21 ? 00:00:00 redis-server *:6379
root 19941 17020 0 22:21 pts/0 00:00:00 grep redis
[root@iZ112fail84Z bin]# redis-cli
127.0.0.1:6379> set k1 v1
OK
127.0.0.1:6379> get k1
“v1”
停止服务:
[root@iZ112fail84Z bin]# redis-cli shutdown