# Redis ### 环境 Ubuntu 18.04 ### 安装redis ```shell apt-get install redis-server ``` ### 修改密码 ```shell vi /etc/redis/redis.conf # requirepass 你的密码 ``` ### 限制外网访问 ```shell vi /etc/redis/redis.conf # bind 127.0.0.1 ::1 ```