Home > Database > Redis > body text

How to set redis password under Linux

WBOY
Release: 2023-05-28 08:23:59
forward
3354 people have browsed it

The server has redis installed. For security, set the password to access redis-server.

How to set redis password under Linux

1. Open the redis configuration file

vi` `/usr/local/redis/etc/redis``.conf
Copy after login

Add the requirepass password

Will bind 127.0.0.1::1 before #Remove

Save and exit

2. Close redis

/usr/local/redis/bin/redis-cli` `shutdown
Copy after login

Start redis

/usr/local/redis/bin/redis-server` `/usr/local/redis/etc/redis``.conf
Copy after login

3. Check

/usr/local/redis/bin/redis-cli
Copy after login
How to set redis password under Linux

The password has been set successfully. A password is required to enter. Enter the password

How to set redis password under Linux
How to set redis password under Linux
##4. How to close redis after setting the password

/usr/local/redis/bin/redis-cli` `-a 密码 ``shutdown
Copy after login

The above is the detailed content of How to set redis password under Linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!