Compile and install:
Apt-get Update
Apt-get Install build-essential tcl
wget http://download.redis.io/redis-stable.tar.gz
Tar XF redis-stable.tar.gz
CD Redis-stable;make;make Install
Configuration file:
Cp/root/work/redis-stable/redis.conf/etc/redis
Vi/etc/redis/redis.conf
Supervised SYSTEMD
Dir/data/redis
Startup script:
Vi/etc/systemd/system/redis.service
[Unit]
Description=redis in-memory Data Store
After=network.target
[Service]
User=redis
Group=redis
Execstart=/usr/local/bin/redis-server/etc/redis/redis.conf
EXECSTOP=/USR/LOCAL/BIN/REDIS-CLI shutdown
Restart=always
[Install]
Wantedby=multi-user.target
Users and Groups:
AddUser--system--group--no-create-home Redis
Directories and Permissions:
Mkdir/data/redis
Chown Redis:redis/data/redis
chmod 770/data/redis
Start and close:
Systemctl Start Redis
Systemctl Status Redis
Systemctl Stop Redis
Systemctl Restart Redis
Test Redis:
Redis-cli
127.0.0.1:6379> Ping
PONG
After the tests have passed, set the boot up to start Redis:
Systemctl Enable Redis
Ubuntu 16.04.1 LTS Redis installation configuration