Redis Series One: initial knowledge of Redis

Source: Internet
Author: User
Tags benchmark

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.