1、下载redis的安装包
cd /export/softwares
wget http://download.redis.io/releases/redis-3.2.8.tar.gz
2、解压redis压缩包到指定的目录
cd /export/softwares
tar -zxvf redis-3.2.8.tar.gz -C ../servers/
3、安装c程序的运行环境 redis是c编写的
yum -y install gcc-c++
4、下载较新版本的tcl
yum -y install tcl
5、编译redis
cd /export/servers/redis-3.2.8/
make && make install
6、修改配置文件
cd /export/servers/redis-3.2.8/
mkdir -p /export/servers/redis-3.2.8/logs
mkdir -p /export/servers/redis-3.2.8/redisdata
vim redis.conf
bind hadoop01
daemonize yes
pidfile /var/run/redis_6379.pid
logfile "/export/servers/redis-3.2.8/logs/redis.log"
dir /export/servers/redis-3.2.8/redisdata
7、启动redis
cd /export/servers/redis-3.2.8/
src/redis-server redis.conf
8、连接redis客户端
cd /export/servers/redis-3.2.8/
src/redis-cli -h hadoop01