centos安装redis
window下载redis:https://github.com/dmajkic/redis/downloads
1. 安装wget
yum install wget -y
2. 安装c++环境
yum install gcc-c++ -y
3. 下载redis包
cd / wget http://download.redis.io/redis-stable.tar.gz
4. 解压
tar xzf redis-stable.tar.gz
5.编译
cd /redis-stable make
6.安装
cd /redis-stable make install
ps: 执行入口会自动生成到 /usr/local/bin中
7.复制一份配置文件到 /usr/local/bin
cp /redis-stable/redis.conf /usr/local/bin
8.修改conf
vi /usr/local/bin/redis.conf
把“bind 127.0.0.1”注释掉,daemonize置为true
9. 开启服务(处于/usr/local/bin目录下)
./redis-server redis.conf
10.本地运行
./redis-cli