In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Redis
It's a key-value storage system. Similar to Memcached, it supports relatively more value types, including string (string), list (linked list), set (collection), zset (sorted set-ordered collection), and hash (hash type). These data types support push/pop, add/remove, and take intersection union and difference sets, and richer operations, and these operations are atomic. On this basis, redis supports a variety of different sorting methods. Like memcached, data is cached in memory for efficiency. The difference is that redis will periodically write updated data to disk or modify operations to additional record files, and on this basis to achieve master-slave (master-slave) synchronization.
In order to ensure the security of the server in the production environment, there is a specification in the work, which requires that the services we run are required to be run by ordinary users who are not logged in, so as to prevent the loopholes in the program from being exploited. For example, before compiling and installing nginx, mysql, and php, we will create a non-login normal user through useradd, and then specify that user at compile time. Services like this are natively supported to run as ordinary users. However, some programs do not have native support and do not provide this feature at compile time. Can only be compiled after we re-modify the specified ordinary user to run. For example, today we are going to give an example of redis.
1. Establish ordinary users
Groupadd redis useradd redis-M-g redis-s / sbin/nologin
two。 Create the necessary directories in advance
Mkdir / var/run/redis-pv & & chown redis.redis / var/run/redis-R
Mkdir / usr/local/redis/data/-pv & & chown redis.redis / usr/local/redis/data/-R mkdir / var/log/redis/-pv & & chown redis.redis / var/log/redis/-R
(pid directory, default is / var/run/, but only created by root users. If ordinary users run it, they must create their own directory under it and chown authorization)
Note: our appendonly.aof file has 644 permissions by default, and other users are read-only. So before modifying an ordinary user, see which path the file is in, and check whether it is chown redis. You can also directly add w permissions to him, but it is not recommended for security.
3. Modify the pidfile,logfile of the configuration file and the location of dir
4. Modify the service startup file
Vim / usr/lib/systemd/system/redis.service
Mainly add User,Group,PIDFile.
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.