# 更新
sudo apt-get update
sudo apt-get install -y gcc make

# 下载
wget http://download.redis.io/releases/redis-3.2.7.tar.gz
tar xzf redis-3.2.7.tar.gz
cd redis-3.2.7

# 编译
make
sudo make install PREFIX=/opt/redis

# 部署
sudo chown ubuntu:ubuntu -R /opt/redis
sudo sh -c 'echo "PATH=/opt/redis/bin:\$PATH" >> /etc/bash.bashrc'