In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Environment OSredis version of the firewall and selinuxCentOS74.0.14 shutdown installation steps before installation equipment 1. Because redis is written in C, you need to install gcc#yum-y install gcc2. Download redis source code package # wget-P / usr/local/src/ http://download.redis.io/releases/redis-4.0.14.tar.gz compilation installation # cd / usr/local/src/#tar xf redis-4.0.14.tar.gz#cd redis-4.0.14#make PREFIX=/apps/redis install # PREFIX indicates the specified redis installation directory # mkdir / apps/redis/ {etc,logs,data Run} # create configuration files, logs, data, etc. Directories # cp redis.conf / apps/redis/etc/ Edit redis service startup script Use systemd to manage the service Note: this script is a slightly modified # cat > / usr/lib/systemd/system/redis.service / apps/redis/bin/redis-check-aof # AOF file check tool lrwxrwxrwx 1 root root 31 Feb 9 21:34 / usr/bin/redis-check-rdb-> / apps/redis/bin/redis-check-rdb # RDB file check tool lrwxrwxrwx 1 root root 25 Feb from the redis generated by the yum installation 9 21:34 / usr/bin/redis-cli-> / apps/redis/bin/redis-cli # redis client tool lrwxrwxrwx 1 root root 30 Feb 9 21:34 / usr/bin/redis-sentinel-> / apps/redis/bin/redis-sentinel # Sentinel Soft Connect to serverlrwxrwxrwx 1 root root 28 Feb 9 21:34 / usr/bin/redis-server-> / apps/redis/bin/redis-server # redis service startup commands change the directory path where rdb files are stored and set relevant permissions # sed-I'/ ^ dir/s#./#/apps/redis/data#' / apps/redis/etc/redis.conf verify redis startup
Resolve errors and warnings for redis Failed opening the RDB file dump.rdb (in server root dir /) for saving: Permission denied
Reference: https://stackoverflow.com/questions/22160753/redis-failed-opening-rdb-for-saving-permission-denied
When executing the systemctl stop redis command, the above error is found in the / var/log/messages log. The reason for this error is that the data needs to be saved to the rdb file before closing redis, but the error is reported due to permission reasons. The solution is as follows: specify the directory where the rdb file is saved in the configuration file of redis. And make sure the relevant permissions are correct # ll / apps/redis/data/-ddrwxr-xr-x 2 redis redis 22 Feb 11 20:33 / apps/redis/data/#vim / apps/redis/etc/redis.confdir / apps/redis/dataSocket Maximum Connection
Reference: https://stackoverflow.com/questions/36880321/why-redis-can-not-set-maximum-open-file
WARNING: the The TCP backlog setting of 511 cannot be enforced because / proc/sys/net/core/somaxconn is set to the lower value of 128.backlog parameter controls the queue value after the server side receives the client ack confirmation number when the three-way handshake occurs. Memory OvercommitWARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory=1' to / etc/sysctl.conf and then reboot or run the command' sysctl vm.overcommit_memory=1' for this to take effect.0: indicates that the kernel will check whether there is enough memory available for the application process; if there is enough memory available, the memory request is allowed; otherwise, the memory request fails and the error is returned to the application process. 1: indicates that the kernel allows all physical memory to be allocated, regardless of the current memory state. 2: indicates that the kernel allows more than the sum of all physical memory and swap space to be allocated because the two are related, so solve # vim / etc/sysctl.confvm.overcommit_memory = 1net.core.somaxconn = 1024 for these configurations to take effect, you need to reload the configuration # sysctl-pTransparent Huge PagesWARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > / sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your / etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled. Dynamic allocation of large pages of memory, need to be turned off and let redis be responsible for memory management. Temporary effective echo never > / sys/kernel/mm/transparent_hugepage/enabled to resolve this problem permanently, follow the recommendations of the log and modify rc.local#vim / etc/rc.localif test-f / sys/kernel/mm/transparent_hugepage/enabled; then echo never > / sys/kernel/mm/transparent_hugepage/enabledfi#chmod + x / etc/rc.d/rc.local
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.