In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Redis is an open source, BSD licensed, advanced key-value storage system.
Can be used to store strings, hash structures, linked lists, collections are often used to provide data structure services.
Compared with memcached, redis is unique in:
1: redis can be used for storage, while memccached is used for caching, mainly because of its persistence function.
2: the stored data has a "structure". For memcached, the stored data has only one type of string.
Redis can store strings, linked lists, hash structures, collections, ordered collections, etc.
The company has been using redis for a long time, but it has not picked up its heart to learn and master it seriously. Try to write today and communicate with each other.
The official website of redis is https://redis.io
Our production environment uses the redis-3.2.13 version to get to know and show you the installation process.
It can be done directly on systems with external network permissions, and installation information such as https://redis.io/download can be obtained from the official website.
1dint wget http://download.redis.io/releases/redis-3.2.13.tar.gz
2. Decompress directly
Tar-zvxf redis-3.2.13.tar.gz
3. Enter the installation directory make
4. Rebound use make test to test the validity of command syntax
66 seconds-unit/dump
69 seconds-unit/type/list-2
72 seconds-integration/replication-3
74 seconds-integration/replication-4
44 seconds-unit/hyperloglog
58 seconds-unit/obuf-limits
53 seconds-unit/geo
99 seconds-unit/type/list-3
112 seconds-integration/replication-psync
\ o / All tests passed without errors!
Cleanup: may take some time... OK
Make [1]: Leaving directory `/ laoyang/redis-3.2.13/src'
[root@test-laoyangtest redis-3.2.13] #
5, if we want to change the installation directory, we can install it like this
[root@test-laoyangtest redis-3.2.13] # make PREFIX=/usr/local/redis install
Cd src & & make install
Make [1]: Entering directory `/ src/redis-3.2.13/src'
Hint: It's a good idea to run 'make test';)
INSTALL installINSTALL installINSTALL installINSTALL installINSTALL install
Make [1]: Leaving directory `/ laoyang/redis-3.2.13/src'
[root@test-laoyangtest redis-3.2.13] #
And copy a configuration file to the installed directory
[root@test-laoyangtest local] # cd / usr/local/redis/bin/
[root@test-laoyangtest local] # cd..
[root@test-laoyangtest redis] # cp / src/redis-3.2.13/redis.conf. /
6. Explain the Redis directory
[root@test-laoyangtest bin] # ls
Redis-benchmark redis-check-aof redis-check-rdb redis-cli redis-sentinel redis-server
Redis-benchmark performance testing tool
Redis-check-aof log file tester (for example, log damage caused by power outage, which can be detected and repaired)
Redis-check-dump snapshot file detection tool, on the effects class
Redis-cli client
Redis-server server
7. Start the Redis--- non-background process.
[root@test-laoyangtest redis] #. / bin/redis-server. / redis.conf
.
_.-_'. -. ''. Redis 3.2.13 (00000000Zet0) 64 bit
. -. ```\ / _., _'-. _ (.-`|`,) Running in standalone mode | `-. _` -.-`_ _. -. |'`. -'| Port: 6379
| -. _. /. -'| PID: 10994
-. _. `-. /. -'. -'
| | `-. _ -. -'|
| -. _ -. . -'. -'| http://redis.io
`-. -. _. -'
| | -. _. -'_. -'| |. `-. . -'. -'|
-. _. -'. . -'
`-. _. -'
10994:M 09 May 21:14:48.408 # Server started, Redis version 3.2.13
10994VOF M 09 May 21UR 14UR 48.408 * The server is now ready to accept connections on port 6379
8, try to query and test
[root@test-laoyangtest redis] #. / bin/redis-cli
127.0.0.1 purl 6379 > info replication
Role:master
Connected_slaves:0
Master_repl_offset:0
Repl_backlog_active:0
Repl_backlog_size:1048576
Repl_backlog_first_byte_offset:0
Repl_backlog_histlen:0
127.0.0.1 purl 6379 > set What laoyang
OK
127.0.0.1 purl 6379 > get What
"laoyang"
9. Change the redis to be executed in the background, and change it to
Daemonize yes
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.