In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
There are many versions of redis, the latest version of redis-3.2.3. The installation procedure is the same as that of the previous version. The following are the installation steps:
1. First you need to download the tar installation file
Download address: http://redis.io/
Download version: redis-3.2.3.tar.gz
2. Extract the installation package
Tar-xzvf redis-3.2.3.tar.gz
Cd redis-3.2.3.tar.gz
Make
Make test
Cd src/
Make install
3. Parameter introduction:
After the make install command is executed, the executable files, redis-server, redis-cli, redis-benchmark, redis-check-aof, and redis-check-dump, are generated in the / usr/local/bin directory. Their functions are as follows:
Daemon launcher for redis-server:Redis server
Redis-cli:Redis command line operation tool. You can also use telnet to operate according to its plain text protocol
Redis-benchmark:Redis performance testing tool to test the read and write performance of Redis on the current system
Redis-check-aof: data repair
Redis-check-dump: check the export utility
4. It is convenient for future maintenance and management to migrate the above important files to the specified path
Mkdir-p / usr/local/redis/bin
Mkdir-p / usr/local/redis/etc
Cp mkreleasehdr.sh redis-benchmark redis-check-aof redis-cli redis-server / usr/local/redis/bin/
Cp redis.conf / usr/local/redis/etc/redis.conf
Redis.conf is an important configuration file for redis
5. Important parameters of redis.conf configuration file
Daemonize: whether to run in background daemon mode
Pidfile:pid file location
Port: the port number on which to listen
Timeout: request timeout
Loglevel:log information level
Logfile:log file location
Databases: number of databases opened
Save * *: how often the snapshot is saved. The first * indicates how long it takes, and the second * indicates how many writes are performed. The snapshot is automatically saved when a certain number of writes are performed within a certain period of time. Multiple conditions can be set.
Rdbcompression: whether to use compression
Dbfilename: data snapshot file name (file name only, not directory)
Dir: the directory where the data snapshot is saved (this is the directory)
Appendonly: whether or not to enable appendonlylog, each write operation will record a log, which will improve the anti-risk ability of the data, but affect the efficiency.
How to synchronize appendfsync:appendonlylog to disk (three options: forcing fsync to be called every time you write, enabling fsync once per second, and not calling fsync to wait for the system to synchronize itself)
A password is required when requirepass:redis-cli logs in
6. Program startup
. / redis-server / usr/local/redis/etc/redis.conf
7. Check whether the startup is successful
Ps-ef | grep redis
8. Master-slave configuration
The master-slave configuration of redis is very simple. You only need to modify two parameters of the configuration file.
Slaveof 192.168.127.121 6379 specifies the IP address and port of master
Authentication password for masterauth 12345678 master
After the modification is completed, restart redis.
PS: after the master-slave configuration is completed, master_link_status:down down for a long time after restart
Solution:
Modify redis master node configuration file bind 0.0.0.0
Restart master.
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.