Upgrading Redis Manually

I will write the fancy content of this documentation at later stage. For as of now the below code works for Ubuntu 20.4 users to update Redis to the latest version - 6.xx

To check current installed redis server version

redis-server --version

To check current installed redis cli version

redis-cli --version

To update redis to the latest available version (adding official repo first)

sudo add-apt-repository ppa:redislabs/redis

Then run update command

sudo apt update

And run the upgrade

sudo apt upgrade
2 Likes

For centos 7:


sudo yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum --enablerepo=remi install redis 

@die2mrw007 add the centos part in your content and also may be the lsphp Redis extention

1 Like

One question - it asked whether I wanted to replace or keep a config file. I kept mine. Should I have replaced it in order to take advantage of any particular features?

There shouldn’t be any such replace files for redis upgrading. Can you list which is the file it is asking to be replaced? I will have a check.

I will add all those very soon.

It looks like it only prompts you if you have modified it, which I had done in order to add a password and some other things.
image

I just downloaded and compared the files and it adds quite a lot - it goes from 61 to 93kb. It is mostly just additional commentary/documentation, but there’s also at least 20 new settings and some settings even have their default value changed.

I assume that if you are not prompted, it will change the file automatically on upgrade. But if you are prompted, it would be best to replace the file and then make your custom edits as-needed.

1 Like

FYI @die2mrw007 there are new instructions from redis on how to install the latest version

Install Redis on Linux | Redis

1 Like

Got any idea how to upgrade it on Almalinux 8?
Atm the latest installed is 5.0.3 and the latest version I’ve seen is 7.0.4

Redis server v=5.0.3 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=14b81d825631ff0c

This seems to be the working upgrade way on Almalinux 8.6

dnf module reset redis
sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm -y
dnf module enable redis:remi-7.0
dnf upgrade
systemctl restart redis

When run your command on Debian 11, I got warning

apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).

Check full results below:

 ** NOTICE **

Redis now has an official APT repository. We urge users to use the APT repository, as described here:
https://redis.io/docs/getting-started/installation/install-redis-on-linux/

This PPA is still maintained but bugfix releases of older versions cannot be distributed here.

* * *

Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker.

It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes with radius queries and streams.

Redis has built-in replication, Lua scripting, LRU eviction, transactions and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster.
 More info: https://launchpad.net/~redislabs/+archive/ubuntu/redis
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keybox '/tmp/tmpt5k_uhqr/pubring.gpg' created
gpg: /tmp/tmpt5k_uhqr/trustdb.gpg: trustdb created
gpg: key CC59E6B43FA6E3CA: public key "Launchpad PPA for Redis Labs" imported
gpg: Total number processed: 1
gpg:               imported: 1
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
gpg: no valid OpenPGP data found.

And after run update and upgrade command, Redis not get upgraded to the latest version.

Please help!
Thanks