原码、反码、补码

# mac上安装redis

`1.官网下载redis 3.2.8 `

```

https://redis.io/download

```

`2.将redis解压到 tar -zxvf /usr/local 下为 /usr/local/redis-3.2.8`

`3.复制 /usr/local/redis-3.2.8/redis.conf 到 /usr/local/etc/下`

`4.修改 /usr/local/etc/redis.conf 文件  redis缓存文件位置`

将 dir  ./  这行改为 dir /usr/local/redis-3.2.8/redis_data

![](http://7xwt71.com1.z0.glb.clouddn.com/14887894616849.jpg)

将daemonize no 改为 daemonize yes  可以后台运行

![](http://7xwt71.com1.z0.glb.clouddn.com/14887895345806.jpg)

将requirepass foobared 注解去掉 requirepass 123456 设置密码为123456

![](http://7xwt71.com1.z0.glb.clouddn.com/14887896165025.jpg)

` 5.启动redis`

```

# /usr/local/bin/redis-server /user/local/etc/redis.conf

```

你可能感兴趣的:(原码、反码、补码)