- 安裝gcc
yum install -y gcc
- 下載并解壓安裝包
wget http://download.redis.io/releases/redis-5.0.6.tar.gz
tar zxvf redis-5.0.3.tar.gz
- 執(zhí)行編譯
cd /data/software/redis-5.0.6
make
- 安裝并指定安裝目錄
make install PREFIX=/usr/local/redis
- 復(fù)制 redis.conf 到 redis 的安裝目錄
cp /data/software/redis-5.0.6/redis.conf /usr/local/redis/bin/
修改 redis.conf 文件,把 daemonize no 改為 daemonize yes
- 啟動(dòng)
./redis-server redis.conf