In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article teaches you how to install Redis on a CentOS for Linux system. 1. First upload the installation package, here I take redis-5.0.8.tar.gz as an example.
Linux download redis address:
Wget http://download.redis.io/releases/redis-5.0.8.tar.gz
First, create a package upload folder under the opt directory:
Mkdir / opt/software
Upload redis-5.0.8.tar.gz to / opt/software/
two。 Download Redis installation depends on the compilation environment
Install the gcc compilation environment to execute the make command:
Yum-y install gcc gcc-c++3. Use the command tar-xzvf redis-5.0.8.tar.gz4 under / opt/software/. Move the extracted redis source files to / usr/local/src/ directory mv / opt/software/redis-5.0.8 / usr/local/src/5. Enter the make command under the / usr/local/src/redis-5.0.8 directory to compile the source code make6. Then enter the following command under / usr/local/src/redis-5.0.8/src/ to specify the directory make install PREFIX=/usr/local/redis7 for the redis installation. Create a folder to prescribe the custom redis.conf file mkdir / etc/redis/8. Copy / usr/local/src/redis-5.0.8/redis.conf to / etc/redis/ cp / usr/local/src/redis-5.0.8/redis.conf / etc/redis/9. Modify the / etc/redis/redis.conf configuration file vim / etc/redis/redis.conf10. The core redis.conf configuration modification code is as follows: bind 0.0.0.0protected-mode noport 6379tcp-backlog 511timeout 0tcp-keepalive 300daemonize yessupervised nopidfile / var/run/redis_6379.pidloglevel noticelogfile / var/log/redis/redis_master.logdatabases 16always-show-logo yessave 900 1save 300 10save 60 10000stop-writes-on-bgsave-error yesrdbcompression yesrdbchecksum yesdbfilename dump.rdbdir / opt/redis_datareplica-serve-stale-data yesreplica-read-only yesrepl-diskless-sync norepl-diskless-sync-delay 5repl-disable-tcp-nodelay Noreplica-priority 100maxmemory 10000000kblazyfree-lazy-eviction nolazyfree-lazy-expire nolazyfree-lazy-server-del noreplica-lazy-flush noappendonly yesappendfilename "appendonly.aof" appendfsync everysecno-appendfsync-on-rewrite noauto-aof-rewrite-percentage 100auto-aof-rewrite-min-size 64mbaof-load-truncated yesaof-use-rdb-preamble yeslua-time-limit 5000slowlog-log-slower-than 10000slowlog-max-len 128latency-monitor-threshold 0notify-keyspace-events "hash-max-ziplist-entries 512hash-max-ziplist-value 64list-max-ziplist-size- 2list-compress-depth 0set-max-intset-entries 512zset-max-ziplist-entries 128zset-max-ziplist-value 64hll-sparse-max-bytes 3000stream-node-max-bytes 4096stream-node-max-entries 100activerehashing yesclient-output-buffer-limit normal 00 0client-output-buffer-limit replica 256mb 64mb 60client-output-buffer-limit pubsub 32mb 8mb 60hz 10 dynamic-hz yesaof-rewrite-incremental-fsync yesrdb-save-incremental-fsync yes
You can copy my configuration file to your profile.
11. Some paths in the configuration file need to establish the corresponding directory mkdir / var/log/redis/mkdir / opt/redis_data12. Start running redis/usr/local/redis/bin/redis-server / etc/redis/redis.conf13. Detect whether ps-ef exists in the background process | grep redis14. You can test / usr/local/redis/bin/redis-cli using the client.
Enter
15. Close redisredis-cli shutdown16. Force shutdown of rediskill-9 PID
(your process ID, use this command to query ps-ef | grep redis)
Or
Pkill redis
The original text is from: https://www.linuxprobe.com/centos-redis.html
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.