Redis
the installation
1, First officer network Download Redis compressed package, address: Http://redis.io/download Download stable version, here use redis-3.2.8.tar.gz,yht002 on/home/dev under
2, Decompression: TAR–ZXVF redis-3.2.8.tar.gz
3. Go to Redis folder, perform make to compile files after Redis decompression
4, after the successful compilation, there will be corresponding SRC, conf and other folders, into the SRC folder, execute make install for Redis installation
Redis
the deployment
for ease of management, the Redis in the file conf configuration files and common execution commands are moved to the unified file
- Create bin and etc folder (bin to put common execution commands, etc in the Conf profile )
- Move the file to the new folder
Execution Redis-server command, start Redis Service
Note: The Redis service, which executes the redis-server boot directly, is run directly in the foreground (as an effect), that is, if LUnix closes the current session after executing the command, the Redis service is closed. Under normal circumstances, starting the Redis service requires booting from the background and specifying a startup configuration file.
Redis is not like other Linux boot daemon, add a "&" at the end of the startup command can solve the problem, he needs to modify the Conf file.
Background Boot
Redis
Service
First edit the conf file, change the Daemonize property to Yes (indicating that you need to run in the background)
New dump file, process pid,log directory, etc., usually placed in the /var/directory
Modify all Redis hosts to access
Set access password
Start the Redis service again and specify the startup service profile: redis-server/home/dev/redis/etc/redis.conf
Set alias Alias
Finally start your own client test
The action is similar to Memcache, which sets a key value through the client and then takes value out of this key.
Installation and deployment of Redis under Linux