Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 裸机安装 Redis Server #338

Open
Bpazy opened this issue Nov 23, 2024 · 0 comments
Open

Ubuntu 裸机安装 Redis Server #338

Bpazy opened this issue Nov 23, 2024 · 0 comments

Comments

@Bpazy
Copy link
Owner

Bpazy commented Nov 23, 2024

这里记录下裸机安装 Redis 的步骤。

先 apt 安装:

sudo apt install -y redis-server

然后修改配置文件:

sudo vim /etc/redis/redis.conf

找到其中的 bind 127.0.0.1 ::1 并注释掉,放开只能 127.0.0.1 访问的限制。
找到其中的 protected-mode yes 改为 protected-mode no 允许远程访问。
找到其中的 requirepass 一行取消注释,并把密码设置在改行,比如 requirepass thisispassword

最后重启 redis-server: sudo systemctl restart redis-server

然后用 redis-cli 连接上本地 server 验证下吧。

@Bpazy Bpazy changed the title Ubuntu 逻辑安装 Redis Server Ubuntu 裸机安装 Redis Server Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant