Redis 5.0.5 Installation / Update / Upgrade

Redis 5.0.5 Installation / Update / Upgrade on Ubuntu 18 with Plesk with WoltLab

Redis easily installed and updated on the server

Part Ⅰ – Only necessary for the update

  • Shut down Redis and safely shut down data storage


    Bash
    root@server:~# redis-cli
    127.0.0.1:6379> SHUTDOWN SAVE
    (1.89s)
    not connected> quit
    root@server:~#
  • Stop Redis instance: ~# systemctl stop redis_6379 or ~# service redis_6379 stop
  • Backup of the current Redis configuration /etc/redis/6379.conf and data files /var/lib/redis/6379/appendonly.aof and /var/lib/redis/6379/dump.rdb

Part Ⅱ – Installation / Update

Debian + Ubuntu

Bash
~# apt-get install build-essential
~# apt-get install tcl wget

CentOS

Bash
~# yum groupinstall 'Development Tools'
~# yum install tcl wget

Debian + Ubuntu + CentOS

Open Redis configuration – Testing Redis with Ping Pong

Bash
~# redis-cli
127.0.0.1:6379> ping
PONG
127.0.0.1:6379>

Display Redis version

Bash
~# redis-server --version
Redis server v=5.0.5 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=346d28814696cac3
~#

Part Ⅲ – Configure server for Redis

Option A: Settings for overcommit_memory and somaxconn

Bash
~# echo never > /sys/kernel/mm/transparent_hugepage/enabled
~# echo "vm.overcommit_memory = 1" >>  /etc/sysctl.conf  && sysctl  -p
~# echo "net.core.somaxconn = 65535" >>  /etc/sysctl.conf  && sysctl  -p

Check:
~# cat /sys/kernel/mm/transparent_hugepage/enabled
always madvise [never]
~# cat /proc/sys/net/core/somaxconn
65535

Option B: Settings for transparent_hugepage, overcommit_memory and somaxconn

All changed settings are displayed here in the Redis configuration file /etc/redis/6379.conf. The first two values are caused by the following configuration for system.d.

Bash
daemonize yes
supervised systemd
logfile /var/log/redis_6379.log
dir /var/lib/redis/6379
maxclients 10000
maxmemory 15GB (Server hat 32G Memory)
maxmemory-policy volatile-ttl
maxmemory-samples 5
appendonly yes

The Highlight – The great finale – Configure Redis for system.d

We create the file redis.service in /lib/systemd/system/redis.service with the following content:

Thus, the two following values must also be adapted in the Redis configuration /etc/redis/6379.conf.

Bash
daemonize yes
pidfile /var/run/redis/redis.pid

Then definitely reload the daemon and restart Redis.

Code
~# systemctl daemon-reload
~# systemctl restart redis_6379

Redis 5.0.5 OK-Status with system.d on Ubuntu18 Server

About the Author

Hola Hello ஹலோ Halo привет Hallo Salut Ciao Olá 你好 Γεια σας もしもし Pozdravljeni สวัสดี Habari ਹੈਲੋ Salve прывітанне


WoltLab POLSKI Polskie tłumaczenie

WoltLab ESPAÑOL – Traducción Español

WoltLab PORTUGUÊS Tradução Português

VieCode Rynek + Sklep + Leksykon w POLSKI

VieCode Mercado+Tienda+Léxico en ESPAÑOL

VieCode Mercado + Loja + Léxico em PORTUGUÊS

CLS EasyLink ESPAÑOL + PORTUGUÊS (BR) + POLSKI

Zaydowicz JCoins ESPAÑOL + PORTUGUÊS (BR) + POLSKI

Tims Chat (For FREE) ESPAÑOL + PORTUGUÊS (BR) + POLSKI

Multimedia multimedia-pool.com