Installing redis under Linux
Introduction and use of redis
Introduction and installation of redis framework (MAC and windows)
Redis installation and use
Redis introduction
Redis Client is based on redis-sharp for the basic communication functions, but it offers some differences. C; acl-redis Standard C Redis Client with high performance and stl-like interface, supporting Redis Cluster, thread safety aedis An async redis client designed for simplicity and reliability. Installing Redis using Homebrew on Mac Homebrew is a package manager for Mac OS similar to apt-get in Linux for installing any software. If you don't have it installed on your Mac then you can follow this guide to install Homebrew. Once, installed you can execute below command on the termonal. Brew install Redis on Mac Raw. Mac-setup-redis.md type below: brew update brew install redis To have launchd start redis now and restart at login: brew services start. Redis is an in-memory data structure store,used as database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs and geospatial indexes with radius queries. Redis Installation On Mac What is Redis. Redis is an in-memory data structure store / no sql database primarily used as a database for high performance application and cache. In this tutorial, we will show you how to install, configure and use Redis on a Mac Book Pro running macOS Sierra as an operating system.
Our daily development, data need to be persistent storage, common persistent storage has many kinds, such as database, file, computer memory, and even cloud server are persistent storage of data. As far as database is concerned, it is often divided into relational database and non relational database. In our project, the relational database we use is mysql, the data stored in the relational database is mainly some core business data; in addition, in our project, there are some data that are unlikely to change, such as the regional data in the application, city list, or the statistics of the increase in the number of applications every day, and so on. These data are very important for us The requirement of timeliness is not particularly high. Therefore, in order to improve the storage efficiency of the application and improve the performance of the program, we will store some data that do not change obviously and often in the redis database.
So why can storage efficiency be improved by putting it in redis database? Redis database is a kind of non relational database, and its storage form is key value format. There are many ways to support it, such as memory, disk, file and so on. The characteristic of key value database is that it can locate the corresponding value directly according to the key. Therefore, compared with the table structure query method of relational database, the non relational database has very high execution efficiency, and we usually store the data in memory, and the speed of memory reading and writing is the fastest. Therefore, it can meet our needs of high traffic and high concurrency.
Redis database installation
Free Redis Client
- MAC system
Install brew first
Redis Client Install Mac High Sierra
1.brew install redis
2. Set redis server as an environment variable
vim .bash_profile
alias redis=/usr/local/Cellar/redis/5.0.0/bin/redis-server
Note: modify the configuration file and path to your own configuration
3. Execute redis and start redis service
- Windows system
1. Download redis:https://github.com/MicrosoftArchive/redis/releases (or see the compressed package file)
2. The downloaded files are MSI files that can be installed and run directly
3. Click MSI file, and the steps are as follows:
Waiting for installation
1) First, find the installation directory where you want to install redis
2) Open the CMD terminal and enter the redis installation directory:
3) Execute redis- cli.exe The documents are as follows:
The above screen appears, indicating that the installation is successful.
- Enter the redis terminal:redis-cli
This work adoptsCC agreementReprint must indicate the author and the link of this article