Redis belongs to the Key-value database, which differs greatly from the traditional database, where Redis replaces complex SQL statements in a command, and is in the memory library nature, so it runs very fast. Memory data generates database files to ensure data persistence.
There are no concepts such as tables, fields, and primary keys for traditional databases in Redis. Store data in an intuitive, data-structured way. Redis supports the following types of data stores:
- String (Key-value)
- Hash (Key-filed-value)
- List (Key-value)
- Set (Key-value)
- Sort set (Key-score-value)
Redis is easy to install and can be downloaded and installed by performing the apt install redis-server.
After installation, Redis will run automatically and you can use Ps–ef | grep redis view Redis run status.
Use service Redis Stop/start to stop or start the Redis service.
You can also perform redis-server to start the Redis service.
Redis default port is 6379, and Redis-related configuration can be modified in/etc/redis/redis.conf to restart the Redis service to take effect.
The Config set command can also be used for hot modification.
Execution REDIS-CLI can enter the Redis client and execute the command operation database. You can take some parameters when executing REDIS-CLI, such as specifying a configuration file path, specifying the REDIS server IP port, and so on.
Introduction and installation of Redis