Get 50% Discount Offer 7 Days

NeuronVM

Contact Info

Chicago 12, Melborne City, USA

+88 01682648101

[email protected]

Tutorial Configure and use Redis on Fedora 34
0
(0)

In this article, we are going to teach you How to Configure and use Redis on Fedora 34. Many businesses today have moved their business to websites, which has led to an increase in the number of server applications. These programs must be able to respond to the high volume of server requests. The best solution is to use NoSQL databases. One of the most efficient database servers can be called Redis. But on the Redis website and in some sources, Redis is referred to as a data structure server.

Configure and use Redis on Fedora 34 Linux VPS

What is Redis?

Redis stands for Remote Dictionary Server. Redis is a type of data structure that is stored in RAM and where information is temporarily stored. It is free and open-source and is released under the BSD license. Redis is an in-memory data structure store, which is important for the speed and efficiency of response. This database can be stored in both main memory and external memory.

Redis is written in ANSI C and works with many Posix systems such as the large Linux family – Unix – BSDs such as OpenBSD, FreeBSD, and OSx without the need for external dependency. Redis is also made for Windows by Microsoft.

Advantages of Redis

1- Easy to use Redis.

2- Redis has high persistence and your data will not be lost due to restarting the server.

3- Redis supports Replication and you can run different servers as Master/Slave or custom scenarios.

4- Redis uses a wide range of data types.

5- Redis has a high response speed.

Follow us in this article to show you how to install, Configure and use Redis on Fedora 34.

How to Install Redis on Fedora 34

At first, you must prepare prerequisites for Redis installation.

As a prerequisite, you must have a Fedora 34 server with enough free memory for Redis and also create a Sudo user.

Update your system using the following command before installing Redis:

sudo dnf -y update

Now install Redis on your Fedora 34 by entering the following command:

sudo dnf -y install redis

In this step, you must enable the Redis service by executing the following command:

sudo systemctl enable --now redis

How to Configure Redis on Fedora 34

After successfully installing Redis in the previous section, we now want to teach you how to configure it. First, you must allow your remote clients to listen to all network interfaces.

Then you need to open the /etc/redis.conf file with the desired text editor. To do this, enter the following command:

sudo vim /etc/redis.conf

Now you need to change the line to the following:

bind 0.0.0.0

At this point, you need to Configure Redis Authentication for the clients to require AUTH <PASSWORD>.

requirepass <AuthPassword>

Now it’s time to set Persistent Store recovery.

You must first set persistence mode. To do this, change the appendonly value to yes.

appendonly yes
appendfilename "appendonly.aof"

Now you must restart the service. To do this, run the following command:

sudo systemctl restart redis

Only allow port 6379 if the firewall service is activated:

sudo firewall-cmd --add-port=6379/tcp --permanenent
sudo firewall-cmd --reload

Enter the following command to check the status of the Redis service:

sudo systemctl status redis

You can verify the listening address with the following command:

sudo ss -tunelp | grep 6379

How to Use Redis on Fedora 34

At first, you should confirm that you can connect to Redis locally. To do this run the following command:

redis-cli
127.0.0.1:6379>

Now enter the following command to test authenticate:

127.0.0.1:6379> AUTH <AuthPassword>

You should get OK on the output.

To check for Redis information, proceed as follows:

127.0.0.1:6379> INFO

You get a long output of data. If you want to limit the output, pass the section as an argument. For example

127.0.0.1:6379> INFO Server
# Server
redis_version:5.0.2
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:9ce1182a4801eefb
redis_mode:standalone
os:Linux 4.18.16-300.fc29.x86_64 x86_64
arch_bits:64
multiplexing_api:epoll
atomicvar_api:atomic-builtin
gcc_version:8.2.1
process_id:11000
run_id:48846b4a1b59f792183d4ca5637937b5eced7e36
tcp_port:6379
uptime_in_seconds:563
uptime_in_days:0
hz:10
configured_hz:10
lru_clock:431578
executable:/usr/bin/redis-server
config_file:/etc/redis.conf
127.0.0.1:6379>

Conclusion

All in all, Redis’ popularity is not unreasonable, and as developers look for tools to speed up access to information, the technology has met the needs of developers. In this article, we introduce the Redis database server and list its benefits in full. Then, we taught you how to configure and use Redis in Fedora 34. With our step-by-step tutorial, you can easily install, configure and use Redis.

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

Share this Post

4 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *