Download to the lamp directory via wget: Composer [root @ localhostlamp] # cdredis-2.4.18 Editor
Download to the lamp directory through wget: [root @ localhost home] # mkdir lamp [root @ localhost lamp] # wget http://redis.googlecode.com/files/redis-2.4.18.tar.gz unzip [root @ localhost lamp] # tar zxvf redis-2.4.18.tar.gz [root @ localhost lamp] # cd redis-2.4.18 editing
Download to the lamp directory through wget:
[Root @ localhost home] # mkdir lamp
[Root @ localhost lamp] # wget http://redis.googlecode.com/files/redis-2.4.18.tar.gz
Extract
[Root @ localhost lamp] # tar zxvf redis-2.4.18.tar.gz
[Root @ localhost lamp] # cd redis-2.4.18
Compile:
[Root @ localhost redis-2.4.18] # make
Go to the src directory to install
[Root @ localhost redis-2.4.18] # cd src & make install
Recursively create the redis-/bin/etc directory
Mkdir-p/usr/local/redis/bin
Mkdir-p/usr/local/redis/etc
Move the configuration file
[Root @ localhost redis-2.4.18] mv/home/lamp/redis-2.4.18/redis. conf/usr/local/redis/etc
[Root @ localhostetc] # cd/home/lamp/redis-2.4.18/src
[Root @ localhost src] # mv mkreleasehdr. sh redis-benchmark redis-check-aof redis-check-dump redis-cli redis-server/usr/local/redis/bin
Start the background
[Root @ localhost src] # cd/usr/local/redis/bin
[Root @ localhost bin] # redis-server/usr/local/redis/etc/redis. conf
View process:
Ps-ef | grep redis
View Port:
[Root @ localhost bin] # netstat-tunpl | grep 6379
Tcp? 0? 0 0.0.0.0: 6379? 0.0.0.0 :*? LISTEN ??? 18704/redis-server
Enter the client
[Root @ localhost bin] #./redis-cli
Redis 127.0.0.1: 6379>
Close service
[Root @ localhost bin] # redis-cli shutdown