Http://www.linuxidc.com/Linux/2013-06/85816.htm
 
 
 
 
Ubuntu 12.10 Install Redis (Text detailed) + Jedis connection Redis
 
To ensure that permissions do not go wrong, the following operations are performed using the root account.
 
1. Get Redis source
 
Wgethttp://redis.googlecode.com/files/redis-2.2.13.tar.gz
 
 
2. Decompression, set permissions
 
 
Then copy the Redis directory of the unpacked and set permissions to the user directory/home/grid (personal habits, do not have to imitate)
 
 
 
3.make & make install
 
First Execute:
 
Root@slavenode1:/home/grid/redis#make
 
 
 
Then execute:
 
Root@slavenode1:/home/grid/redis#sudo make Install
 
 
 
4. Copy key files to target directory
 
root@slavenode1:/home/grid/redis# CP redis.conf/etc/
root@slavenode1:/home/grid/redis# CD src
root@slavenode1:/home/grid/redis/src# CP Redis-benchmark REDIS-CLI redis-server/usr/bin/
root@slavenode1:/home/grid/redis/src#
 
5. Start Service and verify
 
 
 
After starting Redis to see a warning message, we follow the prompts to
 
vm.overcommit_memory = 1
 
Append to
 
/etc/sysctl.conf
 
End of the file and execute
 
sysctl Vm.overcommit_memory=1
 
Command
 
 
 
Restart Redis, no more warnings, everything OK:
 
 
 
Verify startup status, everything is OK:
 
 
 
6. Using Telnet simple test
 
Use the Telnet connection Redis to perform a simple command to test.
 
Note: To open a new window, just the server-side window is running Redis-server
 
 
 
As shown in the figure above, when the Telnet connection is Redis, the server-side window displays the following message:
 
[3523] 23:33:50-accepted 127.0.0.1:42711
 
 
The following is a simple command to test (note: The SET command format here is set key value, which is slightly different from the teacher demo, for unknown reasons ...). ):
 
Set/get Setex
 
 
 
Lpush Rpush Lrange
 
 
 
 
7. Close Service
 
The Redis Server service can be turned off by command Redis-clishutdown
 
After the command is executed, the server-side window displays:
 
 
 
 
 
install Redis under Ubuntu
 
2011-11-02 17:24:04| Category: Default Category | Font size Subscriptions 1. Install and compile Redis: $sudo su $mkdir/usr/local/redis $cd/usr/local/redis $wget http://redis.googlecode.com /files/redis-2.0.0-rc2.tar.gz $tar zxvf redis-2.0.0-rc2.tar.gz $cd redis-2.0.0-rc2 $make
2. Copy files to the specified folder: $CP redis.conf/etc/$cp redis-benchmark redis-cli redis-server/usr/bin/
3. Start service and verify: $redis-server/etc/redis.conf
See if a successful startup $ ps-ef | grep Redis
 
Test set and Get methods: $ redis-cli Set key1 value1 OK $ redis-cli Get key1 value1
 
 
Close Service $ redis-cli shutdown #关闭指定端口的redis-server $redis-cli-p 6380 shutdown
 
 
So far, the Redis has been able to run successfully