ubuntu上安装redis和配置远程访问
- 安装redis:
- 下载安装包:
- wget http://download.redis.io/releases/redis-4.0.1.tar.gz
- 解压:
- tar -zxvf redis-4.0.1.tar.gz
- 进入压缩目录:
- cd redis-4.0.1
- 编译:
- make
- 安装Redis:
- make install PREFIX=/usr/local/redis
- make install PREFIX=/usr/local/redis
- 拷贝redis.conf文件:
- cp -r redis.conf /usr/local/redis/bin/
- cp -r redis.conf /usr/local/redis/bin/
- 下载安装包:
- 配置远程访问:
- 进入redis目录:
- cd /usr/local/redis/bin/
- 编辑redis配置文件:
- vim redis.conf
- 注释掉bind 127.0.0.1
- daemonize no 修改为 daemonize yes
- protected-mode no 修改为 protected-mode yes
- vim redis.conf
- 启动redis:
- ./redis-server redis.conf
- 进入redis目录: