1. Download and install
CD/TMPWgetHTTP://Redis.googlecode.com/files/redis-2.2.13.tar.gzTar-Zxf redis-2.2.13.Tar. Gzcd redis-2.2.13MakeSudo Make Install
In this case, the redis executable file is stored in/usr/local/bin.
2. Download the configuration file and the init STARTUP script:
WgetHttps://Github.com/ijonas/dotfiles/raw/master/etc/init.d/redis-serverWgetHttps://Github.com/ijonas/dotfiles/raw/master/etc/redis.confSudo MVRedis-server/etc/init. d/redis-ServerSudo Chmod+ X/etc/init. d/redis-ServerSudo MVRedis. CONF/etc/redis. conf
3. initialize the user and Log Path
Before starting redis for the first time, we recommend that you create a separate user for redis and create a new data and log folder.
SudoUseradd redisSudo Mkdir-P/var/lib/RedisSudo Mkdir-P/var/log/RedisSudo ChownRedis. redis/var/lib/RedisSudo ChownRedis. redis/var/log/redis
4. Set Automatic startup and automatic shutdown
SudoUpdate-rc.d redis-server ults
5. Start redis:
Sudo/Etc/init. d/redis-Server start
6. Start the client connection:
$ Redis-Cliredis>Set Foo barokredis>Get foo"Bar"