Redis 安装

Linux 下安装 Redis:

cd /usr/local/src/
wget http://download.redis.io/releases/redis-4.0.1.tar.gz
tar xf redis-4.0.1.tar.gz 
cd redis-4.0.1
make && make install
/bin/cp redis.conf /etc/redis.conf                                     # 拷贝配置文件
sed -i 's#daemonize no#daemonize yes#g' /etc/redis.conf                # 设置以daemon方式启动
sed -i 's#logfile ""#logfile "/var/log/redis.log"#g' /etc/redis.conf   # 设置日志文件路径
sed -i 's#dir ./#dir /data/redis#g' /etc/redis.conf                    # 设置RDB或AOF文件的存放目录
sed -i 's#appendonly no#appendonly yes#g' /etc/redis.conf              # 设置开启AOF持久化
mkdir -p /data/redis                                                   # 创建数据存放目录
redis-server /etc/redis.conf                                           # 启动Redis


Windows 下安装 Redis:

安装 Redis:https://github.com/MicrosoftArchive/redis/releases/download/win-3.2.100/Redis-x64-3.2.100.msi

安装 Redis 可视化工具:https://github.com/uglide/RedisDesktopManager/releases/download/0.8.8/redis-desktop-manager-0.8.8.384.exe

     

原文地址:https://www.cnblogs.com/pzk7788/p/10461832.html