如果服务器不允许联网的话,可以事先把相关依赖包准备好。
参考链接:https://www.cnblogs.com/lijl11/p/15024724.html
apt -y install lrzsz gcc make wget
1 http://download.redis.io/releases cd /data wget http://download.redis.io/releases/redis-5.0.3.tar.gz tar -zxvf redis-5.0.3.tar.gz
1 cd redis-5.0.3/ 2 make
1 mkdir apps 2 make install PREFIX=/apps/redis
将redis源目录下的redis.conf文件复制到/apps/redis/bin中,然后修改redis.conf配置文件
将daemonize no 改完 daemonize yes
1 cd /apps/redis/bin 2 cp /data/redis-5.0.3/redis.conf . 3 vim /apps/redis/bin/redis.conf daemonize yes 4 ./redis-server redis.conf
1 ./redis-server redis.conf