WSL2 ubuntu配置redis
安装redis
sudo apt-get update
sudo apt-get install redis
启动redis-server
sudo service redis-server start
访问redis
sudo redis-cli
修改redis配置
su # root用户
vim /etc/redis/redis.conf
找到# requirepass foobared
,将这行去掉注释,
foobared
就是密码,这里可以改。
之后退出文件。
重启redis
sudo service redis-server restart
在里面输入auto 密码
进行登录验证。
[Ubuntu安装Redis修改密码,设置远程连接_ubuntu redis修改密码-CSDN博客](https://blog.csdn.net/LittyPt/article/details/125492162?ops_request_misc=%7B%22request%5Fid%22%3A%22F03D1AD2-6012-4717-829F-CF836B942F1D%22%2C%22scm%22%3A%2220140713.130102334.pc%5Fall.%22%7D&request_id=F03D1AD2-6012-4717-829F-CF836B942F1D&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allfirst_rank_ecpm_v1~rank_v31_ecpm-5-125492162-null-null.142v100pc_search_result_base1&utm_term=redis 设置用户密码 远程登录&spm=1018.2226.3001.4187)
[Redis设置密码-CSDN博客](https://blog.csdn.net/qq_61998022/article/details/132147845?ops_request_misc=&request_id=&biz_id=102&utm_term=redis 设置用户密码&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduweb~default-1-132147845.142v100pc_search_result_base1&spm=1018.2226.3001.4187)