Install:
1. Get redis resources
wget http://download.redis.io/releases/redis-4.0.8.tar.gz
2. Unzip
tar xzvf redis-4.0.8.tar.gz
3. Installation
cd redis-4.0.8
make
cd src
make install PREFIX=/usr/local/redis
4. Move the configuration file to the installation directory
cd ../
mkdir /usr/local/redis/etc
mv redis.conf /usr/local/redis/etc
5. Configure redis to start in the background
vi /usr/local/redis/etc/redis.conf // Change daemonize no to daemonize yes
6. Add redis to boot
vi /etc/rc.local //Add content inside: /usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf (meaning to call this command to start redis at boot)
7. Open redis
/usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf
Common commands
redis-server /usr/local/redis/etc/redis.conf //Start redis
pkill redis //stop redis
Uninstall redis:
rm -rf /usr/local/redis //delete the installation directory
rm -rf /usr/bin/redis-* //delete all redis related command scripts
rm -rf /root/download/redis-4.0.4 //Delete the redis decompression folder