centos deployment installation, configuration redis

  • Redis Introduction

         Redis is an open source in-memory database software, C / S architecture. Redis data in the main memory is stored in the form of Hash list. Support for data persistence.

  • Redis deployment
  1.  Download the software installation package redis, I downloaded the Redis5.0.5 http://download.redis.io/releases/redis-5.0.5.tar.gz Redis Linux systems are supported by default, Windows system is based on Microsoft's own source code adaptation, it is not necessary to select the operating system version.
  2.  Extract the package       tar -zxvf redis- 5.0 . 5 . Tar .gz
  3. Yum install gcc gcc mounted reliance
  4. make install
  5. Test whether the installation is successful redis make test
  • Redis Profile Description

        redis default does not allow external network access, if allowed to access external network configuration file bind 127.0.0.1 commented #bind 127.0.0.1

        redis interface default is 6379, you can define their own interfaces

        redis default is not used as a background process, if needed, will be daemonize value yes

        redis pidfile instead of their own files corresponding to a port, mine is 6606 corresponds /var/run/redis_6606.pid

       If you need to redis data for persistence, attention will need to save 900 1. . These configuration settings, if needed persistence, comment out the best of these

        redis password requirepass own password

  • Redis Command Remarks

       Start redis server, not written environment variable, so redis directly to the extracted directory cd src, ./redis-server redisconfpath / redis.conf

       Start redis client, you need to extract the redis directory cd src, ./redis-cli -p port -a password

       Data situation View redis each database, specify the database to select dbindex

      View the database of all the key values ​​of key *

      

       

Guess you like

Origin www.cnblogs.com/gishuanhuan/p/11327885.html