• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to install Redis on Debian 11.3

  • 00:24 lsb_release -a
  • 00:36 apt install redis-server
  • 00:58 apt install php-redis
  • 01:14 systemctl restart redis-server
  • 01:30 systemctl enable redis-server
  • 01:47 redis-cli
  • 01:57 ping [hello]
  • 02:10 set keys hello
  • 02:20 get keys
{{postValue.id}}

To Installation of Redis on Debian 11.3

Introduction:

Redis is an open-source data structure store that is stored in memory. In-memory databases (IMDBs) store computer data in the main memory of a computer rather than on a disk drive to increase response times.

Installation Procedure:

Step 1: Check the OS version by using the below command

root@linuxhelp:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 11 (bullseye)
Release:	11
Codename:	bullseye

Step 2: Install the redis-server package by using the below command

root@linuxhelp:~# apt install redis-server
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libgnutls-dane0 libunbound8
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  libjemalloc2 liblua5.1-0 liblzf1 lua-cjson redis-tools
Suggested packages:
  ruby-redis
The following NEW packages will be installed:
  libjemalloc2 liblua5.1-0 liblzf1 lua-cjson redis-server redis-tools
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,224 kB of archives.
After this operation, 5,288 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://deb.debian.org/debian bullseye/main amd64 libjemalloc2 amd64 5.2.1-3 [248 kB]
Get:2 http://deb.debian.org/debian bullseye/main amd64 liblua5.1-0 amd64 5.1.5-8.1+b3 [109 kB]
Get:3 http://deb.debian.org/debian bullseye/main amd64 liblzf1 amd64 3.6-3 [10.2 kB]
Get:4 http://deb.debian.org/debian bullseye/main amd64 lua-cjson amd64 2.1.0+dfsg-2.1 [17.5 kB]
Get:5 http://deb.debian.org/debian bullseye/main amd64 redis-tools amd64 5:6.0.16-1+deb11u2 [741 kB]
Get:6 http://deb.debian.org/debian bullseye/main amd64 redis-server amd64 5:6.0.16-1+deb11u2 [98.2 kB]
Fetched 1,224 kB in 1s (2,111 kB/s)     
Selecting previously unselected package libjemalloc2:amd64.
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/sys
tem/redis-server.service.
/usr/sbin/policy-rc.d returned 101, not running 'start redis-server.service'
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for libc-bin (2.31-13+deb11u3) ...

Step 3: Install the php-redis package by using the below command

root@linuxhelp:~# apt install php-redis
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libgnutls-dane0 libunbound8
Use 'apt autoremove' to remove them.
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 0 not upgraded.
Need to get 234 kB of archives.
After this operation, 979 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://deb.debian.org/debian bullseye/main amd64 php-igbinary amd64 3.2.1+2.0.8-2 [85.1 kB]
Get:2 http://deb.debian.org/debian bullseye/main amd64 php-redis amd64 5.3.2+4.3.0-2+deb11u1 [149 kB]
Fetched 234 kB in 0s (852 kB/s)
Selecting previously unselected package php-igbinary.
(Reading database ... 359860 files and directories currently installed.)
Preparing to unpack .../php-igbinary_3.2.1+2.0.8-2_amd64.deb ...
Unpacking php-igbinary (3.2.1+2.0.8-2) ...
Selecting previously unselected package php-redis.
Preparing to unpack .../php-redis_5.3.2+4.3.0-2+deb11u1_amd64.deb ...
Unpacking php-redis (5.3.2+4.3.0-2+deb11u1) ...
Setting up php-igbinary (3.2.1+2.0.8-2) ...
Setting up php-redis (5.3.2+4.3.0-2+deb11u1) ...
Processing triggers for libapache2-mod-php7.4 (7.4.30-1+deb11u1) ...
Processing triggers for php7.4-cli (7.4.30-1+deb11u1) ...

Step 4: Restart the redis-server by using the below command

root@linuxhelp:~# systemctl restart redis-server

Step 5: Enable the redis-server to start the services on boot time by using the below command

root@linuxhelp:~# systemctl enable redis-server
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

Step 6: Login to Redis CLI shell by using the below command

root@linuxhelp:~# redis-cli

Step 7: Use Ping command in Redis Shell

127.0.0.1:6379> ping [hello]
"[hello]"

Step 8: Set the string “hello” to the value “keys”

127.0.0.1:6379> set keys hello
OK

Step 9: Get the string in the value “keys”

127.0.0.1:6379> get keys
"hello"

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to Installation of Redis on Debian 11.3. Your feedback is much welcome.

Tags:
michael
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

What is the use of Redis-cli?

A

Redis-cli is used to send commands to Redis, and read the replies sent by the server, directly from the terminal.

Q

What is the default port of Redis?

A

The default port of Redis is 6379.

Q

Can Redis be used as a database?

A

Yes, Redis can be used as a database,

Q

What type of database is Redis?

A

Redis is a NoSQL type of database?

Q

How Redis response fast?

A

Instead of using disk drives, it uses the computer's main memory by its response is fast.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Sebastian ?
How to change non required to required field in SuiteCRM Custom/Default Modules

How to change not required to the required field in SuiteCRM Custom/Default Modules?

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.