Redis is a key-value type of in-memory database, and Redis is more powerful than memcached. 1. Redis supports two methods of data persistence: snapshotting (snapshot) and Append-only file (append) 2, Redis not only supports simple key-value, but also supports list (list), set (unordered collection), sorted Set (ordered set), hash and other types of data structure 3, Redis support master-slave replication One, Redis installation and installation environment centos release 6.5 64 bit 1) Download $wget http ://download.redis.io/releases/redis-3.0.5.tar.gz2) Unzip $TAR-ZXVF redis-3.0.5.tar.gz3) compile and install $cd redis-3.0.5$ MAKE4) Copy the redis.conf under this directory to the/etc/directory $CP redis.conf/etc/ Below is a few important executable files Redis-server:redis server program after installation, the directory after installation/USR /local/bin/redis-server (different operating system directories may not be the same), Redis-cli:redis command-line operation tool, after installation of the directory/usr/local/bin/ REDIS-CLI (different operating system directories may not be the same) Redis-benchmark:redis performance testing tools to test the read and write performance of Redis in your system and configuration, after installation of the directory/usr/local/bin/ Redis-benchmark (different operating system directories may not be the same) second, run Redis boot redis$redis-server/etc/redis.conf check if Redis starts $ps-ef|grep Redis the simple operation of Redis 1) Use the Command Action tool provided by Redis REDIS-CLI to interact with the Redis server $redis-cliset key1 value1 the command to set a string type, Key is Key1, value is Valuekey value, store with string, cannot appear space or newline character "\ n" (Space and line break is special character of Redis); You should try to use shorter key to save memory and bandwidth
Redis Series One: first knowledge of Redis