个人笔记
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.0 KiB

3 years ago
# redis安装与配置
## linux
- 下载:[官方源码](http://redis.io/download)
`wget http://download.redis.io/releases/redis-6.0.8.tar.gz`
- 安装
```shell
tar xzf redis-6.0.8.tar.gz
cd redis-6.0.8
make
```
- 配置
默认配置文件为解压目录下redis.conf
| 配置项 | 作用 | 默认 |
| -------------- | --------------------- | --------- |
| daemonize | 是否后台运行redis服务 | no |
| requirepass | redis认证密码 | 无 |
| protected-mode | 是否开启远程保护 | yes |
| bind | 绑定访问地址 | 127.0.0.1 |
- 启动
在src目录下的redis-server和redis-cli两个可执行文件,直接执行就可以启动redis服务或客户端
建议将这两个文件拷贝到/sbin目录下,并将nginx.conf拷贝到/etc目录下
方便在任意目录执行`redis-server /etc/redis.conf`启动服务
- 链接
`redis-cli` 链接
`auth $password` 进行密码验证