Redis is a key-value storage system. Similar to Memcached, Memcached supports more storage value types, including string, list, set, and zset) and hash (hash type ). These data types support push/pop, add/remove, Intersection Set and difference set, and more abundant operations, and these operations are atomic. On this basis, redis supports sorting in different ways. Like memcached, data is cached in the memory to ensure efficiency. The difference is that redis periodically writes the updated data to the disk or writes the modification operation to the append record file, and implements master-slave.
Install and test Redis in Ubuntu 14.04
Redis cluster details
Install Redis in Ubuntu 12.10 (graphic explanation) + Jedis to connect to Redis
Redis series-installation, deployment, and maintenance
Install Redis in CentOS 6.3
Redis. conf
Preface
Because it is the first time to use, it is installed and used in windows. refer to the following blogs:
Install Redis
Http://redis.io/
Official download: http://redis.io/download can download different versions as needed
Https://github.com/mythz/redis-windows for windows
Github resources can be downloaded by ZIP directly (this is a friendly reminder for unknown users ).
After the download is complete, you can right-click and unzip to a hard disk such as D: \ Redis \ redis-2.6.
Under D: \ Redis \ redis-2.6 \ bin \ release, there are two zip packages, one 32-bit and one 64-bit.
Extract To the D: \ Redis \ redis-2.6 root directory based on the number of windows.
2. Start Redis
Go to the redis directory and enable the Service (add redis. conf)
- Redis-server.exe redis. conf
The redis service is automatically closed when this window is enabled or disabled.
Redis will automatically save the data to the hard disk, so the figure shows that when I enable it for the second time, I have an additional DB loaded from disk.
3. Test and use
In addition, open a command line window to enter the redis directory (note to modify your own ip address)
- Redis-cli.exe-h 192.168.10.61-p 6379
4. Java Development Kit Jedis
Jedis: (Redis official preferred Java Development Kit)
- 1 <! -- Redis -->
- 2 <dependency>
- 3 <groupId> redis. clients </groupId>
- 4 <artifactId> jedis </artifactId>
- 5 <version> 2.0.0 </version>
- 6 <type> jar </type>
- 7 <scope> compile </scope>
- 8 </dependency>
For more details, please continue to read the highlights on the next page: