Redis Nedir ve Nasıl Kullanılır

Redis

Redis is a structure used as a mesaj broker, keep data in memory, caching and as a database. Redis support more than one data types. Using Redis, you keep data permanently, get it’s replica and use lua script. Also Redis provide high availability via redis sentinel and automatically data partitioning with redis cluster.
Redis works fast because it uses memory to keep data. Also depends in your case, you can persist your data in your system with periodicaly dumping.
You can use redis with programming languages. You can see supportting languages in this link.

Redis Installation

In this topic will explain redis installation on linux server. To do this we need redis installation files and a few commands.You can install th redis by following the commands below. Also this intallastion will do on Rhel8 OS platform. You can use below command to install on Rhel7 OS platform.

Step1:
We We will install the redis5 version.To do this, obtain the redis installation files with command below.

wget https://download.redis.io/releases/redis-5.0.10.tar.gz

Step2:
Decompress the dowlanded files.

tar -zxvf redis-5.0.10.tar.gz

Step3:
Go opened redis source code folder and complie source code. Before complie you make sure be installed neccassary packages. To do this you should install “Development Tools”.

yum group install "Development Tools"
cd redis-5.0.10
make
make install

Step4:
Create redis working directory, service file and other settings with command below

mkdir /etc/redis
cp redis.conf /etc/redis/redis.conf
vim /etc/redis/redis.conf

You should change below settings in redis.conf file.

daemonize no
supervised systemd
logfile /var/log/redis/redis.log
vim /usr/lib/systemd/system/redis.service
[Unit]
Description=Redis persistent key-value database
After=network.target
[Service]
ExecStart=/usr/local/bin/redis-server /etc/redis/redis.conf --supervised systemd
ExecStop=/usr/local/bin/redis-cli shutdown
Type=notify
User=redis
Group=redis
RuntimeDirectory=redis
RuntimeDirectoryMode=0755
[Install]
WantedBy=multi-user.target
mkdir /var/lib/redis
mkdir /var/log/redis/

Step4:
Redis user add and change folder permission.

useradd redis
chown -R redis:redis /etc/redis /var/lib/redis /var/log/redis/ /usr/lib/systemd/system/redis.service

Step5:
Enable redis service and check redis service status

systmctl daemon-reload
systemctl enable redis
systemctl start redis
systemctl status redis
Redis Service Status

That’s it, Have nice works…

Similar Posts

  • NGINX Kurulum ve Konfigürasyon

    KURULUM Burada anlatılacak kurulum çalışmaları manuel kurulum üzerinden olacaktır. Öcelikle kurulum için .rpm uzantılı dosyanın indirilmesi gerekmektedir. Buradan ilgili nginx sürümünün güncel versiyonu indirilir. Kurulum rhel 7.6 üzerinde yapılmıştır. Dosya indirildikten sonra WinSCP proğramı(buradan indirebilirsiniz) üzerinden linux makinesinde istediğimiz dizine atılır. Ben burada /opt/nginxrpm/ dosya yolunu kullanacağım. Dosya atıldıktan sonra kurulum yukarıdaki komut ile kurulum işlemi yapılır….

  • Tomcat Kurulum Rehberi

    Tomcat Installation Linux Server Tomcat installation will be explained under this topic for answer the how install tomcat application server.To do this I will explain in a few steps below. We will install tomcat 9.0.41. INFO: Java must be installed on your machine. Or you must install the java. Step1:Go to /opt directory and obtain…

  • Docker Nedir ve Nasıl Kurulur

    Bu yazıda Docker’ın ne olduğunu, mimarisini ve image/container mantığını anlatıp, ardından RHEL 9 / Rocky Linux 9 / AlmaLinux 9 üzerine Docker Engine kurulumunu ve ilk container’ımızı çalıştırmayı adım adım göreceğiz. Docker Nedir? Docker, uygulamaları bağımlılıklarıyla birlikte paketleyip birbirinden izole container’lar içinde çalıştırmamızı sağlayan bir platformdur. İlk sürümleri Linux Container (LXC) altyapısını kullanıyordu; bugün ise…

  • Sanallaştırma Teknolojisi

    NORMAL SİSTEM VE SANALLAŞTIRILMIŞ YAPILAR Anlatıma basit bir şekilde değineceğim; Normal sistemlerde en alt katmanda fiziksel olarak donanımların bulunduğu fiziksel katman vardır. Hemen bir üst katmanın da operational system(işletim sistemi) bulunur. Bu katmanın üzerinde ise çalışan uygulamalarımız bulunmaktadır. Burada kullancağımız uygulamaları bir işletim sistemine bağlı kalarak kullanırız. İşletim sistemi üzerin de çalışan uygulamalar yaptıkları işlem bakımından…

Bir yanıt yazın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir