Home  >  Article  >  Database  >  How to set redis password in Linux system

How to set redis password in Linux system

王林
王林forward
2023-05-26 21:00:463231browse

After installing redis under the Linux system, the default is no password, you need to set the password yourself.

How to set redis password in Linux system

  1. First open the configuration file vim redis.conf

  2. Search for /requirepass# in the command line state

  3. ##Then add requirepass 123 in insert mode

  4. Close redis /usr/local/redis/bin/redis-cli shutdown

  5. Start redis/usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf

  6. Enter the client to view/ usr/local/redis/bin/redis-cli

  7. auth password can be used to enter

  8. Check the password under the client config get requirepass

If you have a password, you can log in first and then verify

How to set redis password in Linux system

You can also log in and verify directly

How to set redis password in Linux system

What is a Linux system

Linux is a UNIX-like operating system that is free to use and spread freely. It is a POSIX-based multi-user, multi-task, multi-thread and multi-CPU system. Operating system, Linux can run major Unix tool software, applications and network protocols.

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

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete