How to Install Redis 5 on Ubuntu 19.04
Installation of Redis 5 On Ubuntu 19.04
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. This tutorial covers Installation of Redis 5 on Ubuntu 19.04.
Installation process
Check the Ubuntu version you use by using the following command.
root@linuxhelp:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 19.04
Release: 19.04
Codename: disco
Run the apt update command.
root@linuxhelp:~# apt update
Hit:1 http://in.archive.ubuntu.com/ubuntu disco InRelease
Get:2 http://security.ubuntu.com/ubuntu disco-security InRelease [97.5 kB]
Get:3 http://in.archive.ubuntu.com/ubuntu disco-updates InRelease [97.5 kB]
Hit:4 http://in.archive.ubuntu.com/ubuntu disco-backports InRelease
Fetched 195 kB in 2s (80.0 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
90 packages can be upgraded. Run 'apt list --upgradable' to see them.
Install the Redis 5 by using the following command.
root@linuxhelp:~# apt install redis-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libhiredis0.14 libjemalloc2 liblua5.1-0 lua-bitop lua-cjson redis-tools
Suggested packages:
ruby-redis
The following NEW packages will be installed:
libhiredis0.14 libjemalloc2 liblua5.1-0 lua-bitop lua-cjson redis-server redis-tools
0 upgraded, 7 newly installed, 0 to remove and 90 not upgraded.
Need to get 876 kB of archives.
After this operation, 3,862 kB of additional disk space will be used.
Do you w1ant to continue? [Y/n] y
.
.
.
Setting up libhiredis0.14:amd64 (0.14.0-3) ...
Setting up redis-tools (5:5.0.3-4) ...
Setting up redis-server (5:5.0.3-4) ...
Created symlink /etc/systemd/system/redis.service → /lib/systemd/system/redis-server.service.
Created symlink /etc/systemd/system/multi-user.target.wants/redis-server.service → /lib/systemd/system/redis-server.service.
Processing triggers for systemd (240-6ubuntu5) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.29-0ubuntu2) ...
Start the Redis server service by using following command.
root@linuxhelp:~# systemctl start redis-server.service
Enable the Redis server service by using the following command.
root@linuxhelp:~# systemctl enable redis-server.service
Synchronizing state of redis-server.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable redis-server
Install the Redis PHP extension by using the following command.
root@linuxhelp:~# apt install php-redis
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
php-igbinary
The following NEW packages will be installed:
php-igbinary php-redis
0 upgraded, 2 newly installed, 0 to remove and 90 not upgraded.
Need to get 195 kB of archives.
After this operation, 805 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
.
.
Unpacking php-redis (4.2.0-1) ...
Setting up php-igbinary (3.0.0-1) ...
Setting up php-redis (4.2.0-1) ...
Check the Redis version by using the following command.
root@linuxhelp:~# redis-cli -v
redis-cli 5.0.3
Use redis-cli tool to verify the connection between the Redis server.
root@linuxhelp:~# redis-cli
127.0.0.1:6379> ping
PONG
127.0.0.1:6379>
With this, the installation of Redis 5 on Ubuntu 19.04 comes to an end.
Comments ( 0 )
No comments available