Because redis server installing, but redis server install the your Ubuntu operating system version. You able to see the version table for your operating system version displayĥ) sudo apt-get install redis-server Don't getting this way install.
Restart redis and then re-run steps 1, 4, and 5 to connect with the client again and confirm that your test value is still available, hence it's working as expected: sudo systemctl restart redisĮnable redis to start at boot: sudo systemctl enable redisĭigital Ocean - how to install and configure redis on Ubuntu 16.04Ģ) and you see there check the download page Get the key just set: 127.0.0.1:6379 get test # result "It's working!" Test connectivity at prompt: 127.0.0.1:6379> ping # result PONGĬheck ability to set keys: 127.0.0.1:6379 set test "It's working!" # result ok Process: 3115 ExecStop=/usr/local/bin/redis-cli shutdown (code=exited, status=0/SUCCESS) Loaded: loaded (/etc/systemd/system/rvice enabled vendor preset: enabled)Īctive: active (running) since Wed 14:38:08 EDT 1min 43s ago Result of status if started successfully: Output Start redis service: sudo systemctl start redis Sudo chmod 770 /var/lib/redis # adjust permission Sudo chown redis:redis /var/lib/redis # make redis own /var/lib/redis Sudo mkdir /var/lib/redis # create directory Set up redis user, groups and directories:Ĭreate redis user and group with same ID but no home directory: sudo adduser -system -group -no-create-home redis Set up the systemd unit file: sudo nano /etc/systemd/system/rviceĮxecStart=/usr/local/bin/redis-server /etc/redis/nfĮxecStop=/usr/local/bin/redis-cli shutdown Move sample redis configuration file: sudo cp /home/george/redis-stable/nf /etc/redisĮdit the file: sudo nano /etc/redis/nf # or with any other text editorĭir to dir /var/lib/redis # for persistent data dump
Move into created folder and extract it tar xzvf Ĭhange into the folder cd redis-stable and build it with makeĬreate configuration directory: sudo mkdir /etc/redis Create a temporary folder for it in say your /home/username/redis-stable directory.Install build and test dependencies: sudo apt updateĭownload latest copy via this link or with this curl -O Set up a non-root user with sudo privileges