linux服务之redis

系统环境:

[root@redis ~]# cat /etc/redhat-release
CentOS release 6.5 (Final)
[root@redis ~]# uname -a
Linux redis 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@redis ~]# lsb_release -a
LSB Version:    :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description:    CentOS release 6.5 (Final)
Release:    6.5
Codename:   Final

开始安装:

[root@redis ~]# mkdir soft
[root@redis ~]# cd soft
[root@redis soft]# wget http://download.redis.io/releases/redis-2.8.8.tar.gz
[root@redis soft]# mv redis-2.8.8.tar.gz /usr/local/
[root@redis soft]# cd /usr/local/
[root@redis local]# tar xf redis-2.8.8.tar.gz
[root@redis local]# mv redis-2.8.8 redis
[root@redis local]# cd redis
[root@redis redis]# make
[root@redis redis]# cd src/
[root@redis src]# make install
[root@redis src]# echo vm.overcommit_memory=1 >>/etc/sysctl.conf
[root@redis src]# sysctl -p
[root@redis src]# cd ..
[root@redis redis]# cp redis.conf /etc/
[root@redis redis]# cp src/redis-benchmark /usr/bin/
[root@redis redis]# cp src/redis-cli /usr/bin/
[root@redis redis]# cp src/redis-server /usr/bin/
[root@redis redis]# redis-server /etc/redis.conf
[root@redis redis]# vim /etc/redis.conf
daemonize yes
[root@redis redis]# redis-server /etc/redis.conf
[root@redis redis]# netstat -tulnpan |grep redis
tcp        0      0 0.0.0.0:6379                0.0.0.0:*                   LISTEN      31835/redis-server 
tcp        0      0 :::6379                     :::*                        LISTEN      31835/redis-server 
[root@redis redis]# redis-cli -h 127.0.0.1
127.0.0.1:6379> ping
PONG
127.0.0.1:6379>
127.0.0.1:6379> exit
[root@redis redis]#


本文出自 “devops” 博客,谢绝转载!

你可能感兴趣的:(redis,linux,NoSQL,release)