In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Stop the redis service after the configuration file has been modified:
[root@caiji redis-3.2.8] # / etc/init.d/redis_6379 stopStopping... Waiting for Redis to shutdown... Redis stopped
Then restart:
[root@caiji redis-3.2.8] # / etc/init.d/redis_6379 startStarting Redis server...
Check that the process is correct, indicating that the modification is successful:
[root@caiji redis-3.2.8] # ps-ef | grep redisroot 32106 10 11:31? 00:00:00 / usr/local/bin/redis-server 0.0.0.0 ef 6379 root 32111 3030 0 11:31 pts/0 00:00:00 grep redis
(since then, redis has been installed and configured and is in a startup state! )
3. View, enable and disable the Redis service:
1. Use the ps-ef | grep redis command to view the Redis process:
[root@caiji redis-3.2.8] # ps-ef | grep redisroot 32106 10 11:31? 00:00:00 / usr/local/bin/redis-server 0.0.0.0 ef 6379 root 32111 3030 0 11:31 pts/0 00:00:00 grep redis
two。 Enable the Redis service operation through the / etc/init.d/redis_6379 start command, or through: service redis_6379 start
3. Turn off the Redis service operation through the / etc/init.d/redis_6379 stop command, or through: service redis_6379 stop
4. Modify the root password of Redis users
To improve security, you can set a password for root users in Redis.
The methods are as follows:
1. Temporary modification, invalid after restart:
[root@local] # cd / usr/local/bin [root@local bin] # llotal 26344-rwxr-xr-x. 1 root root 5578239 May 5 11:01 redis-benchmark-rwxr-xr-x. 1 root root 22185 May 5 11:01 redis-check-aof-rwxr-xr-x. 1 root root 7827882 May 5 11:01 redis-check-rdb-rwxr-xr-x. 1 root root 5707107 May 5 11:01 redis-clilrwxrwxrwx. 1 root root 12 May 5 11:01 redis-sentinel-> redis-server-rwxr-xr-x. 1 root root 7827882 May 5 11:01 redis-server [root@local bin] #. / redis-cli127.0.0.1:6379 > config set requirepass pwtest10OK127. 0.0.1 requirepass 6379 > auth pwtest10OK127.0.0.1:6379 > config get requirepass1) "requirepass" 2) "pwtest10"
The above password setting command "config set requirepass pwtest10" sets the root user password of Redis to pwtest10, and the query password uses the command "config get requirepass", but this is a temporary setting. If you restart Redis, the password will become invalid.
two。 Permanently set the password:
Open the configuration file / etc/redis/6379.conf of Redis to find the configuration parameter * * # requirepass foobared * *. This parameter is released in remarks. Remove the comment and change it to * * requirepass pwtest10 * *.
Restart Redis after the configuration file is modified.
This is how to install the Redis service in the Linux system shared by the editor. If you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
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
Getting StartedInstall the Go toolsTest your installationUninstalling GoGetting helpYour download sh
© 2024 shulou.com SLNews company. All rights reserved.