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.
We suggest you use the Linux VPS plans provided on our website to launch the Fedora 34 distribution. The speed, quality, and variety of locations will make your work easy. After that, you will easily be able to Configure and use Redis on Fedora 34.
– Root Access: You need root or administrative access to install packages and configure Redis.
– Package Manager: Fedora uses DNF (Dandified Yum) as the default package manager. Ensure that DNF is installed and updated on your system before proceeding.
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
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:
At this point, you need to Configure Redis Authentication for the clients to require <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
At first, you should confirm that you can connect to Redis locally. To do this run the following command:
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:
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>
Configuring and using Redis on Fedora 34 can be achieved by following the steps outlined in this guide. By installing and customizing Redis, you can leverage its powerful features for caching, storing data, or as a message broker in your applications. Redis’s high-speed performance and flexibility make it a popular choice for various use cases. If you want, you can read the article on how to install Redis on Ubuntu 22.04.
How useful was this post?
Click on a star to rate it!
Average rating 5 / 5. Vote count: 1
No votes so far! Be the first to rate this post.
Nowadays people can have their own online shop or showcase in a few days with the help of content ma...
What is your opinion about this Blog?