一、Ubuntu安装
Ubuntu安装Redis通过apt-get
$sudo apt-get update $sudo apt-get install redis-server
Ubuntu卸载Redis通过apt-get
$sudo apt-get remove redis-server
二、Mac安装
三、常用操作
1、启动
//ubuntu $redis-server //mac /usr/local/Cellar/redis/4.0.1/bin/redis-server &
2、命令窗口
$redis-cli /usr/local/Cellar/redis/4.0.1/bin/redis-cli
3、验证是否安装成功
四、远程服务上执行命令
1、语法
redis-cli -h host -p port -a password
2、例子
redis-cli -h 192.168.0.137 -p 6379 [-a password]
五、配置文件目录
Mac的redis.conf位置
/usr/local/etc/redis.conf
Ubuntu的redis.conf位置
/etc/redis/redis.conf