How to Install and Configure Redis on CentOS 7

Redis is an open-source in-memory data structure store. It can be used as a database, cache and message broker and supports various data structures such as Strings, Hashes, Lists, Sets, etc. Redis provides high availability via Redis Sentinel including monitoring, notifications Automatic failover. It also provides automatic partitioning across multiple Redis nodes with Redis Cluster.

This tutorial explains how to install and configure Redis on a CentOS 7 server.

Prerequisites

Before starting with the tutorial, make sure you are logged in as a user with sudo privileges.

Installing Redis on CentOS 7

Redis package is not included in the default CentOS repositories. We will be installing Redis version 5.0.2 from the Remi repository.

The installation is pretty straightforward, just follow the steps below:

  1. Start by enabling the Remi repository by running the following commands in your SSH terminal:
sudo yum install epel-release yum-utils
sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum-config-manager --enable remi
  1. Install the Redis package by typing:
sudo yum install redis
  1. Once the installation is completed, start the Redis service and enable it to start automatically on boot with:
sudo systemctl start redis
sudo systemctl enable redis
Created symlink from /etc/systemd/system/multi-user.target.wants/redis.service to /usr/lib/systemd/system/redis.service.
  1. To check the status of the service enter the following command:
sudo systemctl status redis
  1. You should see something like the following:
● redis.service - Redis persistent key-value database
Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/redis.service.d
        └─limit.conf
Active: active (running) since Sat 2018-11-24 15:21:55 PST; 40s ago
Main PID: 2157 (redis-server)
CGroup: /system.slice/redis.service
        └─2157 /usr/bin/redis-server 127.0.0.1:6379

Redis service will fail to start if IPv6 is disabled on your server.

Congratulations, at this point you have Redis installed and running on your CentOS 7 server.

#centos 7 #redis #version 5.0.2

What is GEEK

Buddha Community

How to Install and Configure Redis on CentOS 7
Chet  Lubowitz

Chet Lubowitz

1595855400

How to install PgAdmin 4 on CentOS 8

pgAdmin is the leading graphical Open Source management, development and administration tool for PostgreSQLpgAdmin4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL database.

In this tutorial, we are going to show you how to install pgAdmin4 in Server Mode as a web application using httpd and Wsgi module on CentOS 8.

Install pgAdmin4 on CentOS 8

**01-**To install pgAdmin4 on CentOS 8 we need to add an external repository, so execute the following command:

$ sudo rpm -i https://ftp.postgresql.org/pub/pgadmin/pgadmin4/yum/pgadmin4-redhat-repo-1-1.noarch.rpm

02- After we add the pgAdmin4 repository, let’s use the below command to install pgAdmin4 as server mode:

$ sudo dnf install pgadmin4-web

03- Before proceeding with the configuration of pgAdmin4, we need to install policycoreutils tool:

$ dnf install policycoreutils-python-utils  

04- Once we done installing pgAdmin4, we need to configure the pgAdmin4 by setting up the initial pgAdmin user account

#databases #linux #ubuntu #install pgadmin4 #install pgadmin4 centos #pgadmin #pgadmin 4 install #pgadmin 4 install centos #pgadmin4 #pgadmin4 install centos

Loma  Baumbach

Loma Baumbach

1596679140

Redis Transactions & Long-Running Lua Scripts

Redis offers two mechanisms for handling transactions – MULTI/EXEC based transactions and Lua scripts evaluation. Redis Lua scripting is the recommended approach and is fairly popular in usage.

Our Redis™ customers who have Lua scripts deployed often report this error – “BUSY Redis is busy running a script. You can only call SCRIPT KILL or SHUTDOWN NOSAVE”. In this post, we will explain the Redis transactional property of scripts, what this error is about, and why we must be extra careful about it on Sentinel-managed systems that can failover.

Redis Lua Scripts Diagram - ScaleGrid Blog

Transactional Nature of Redis Lua Scripts

Redis “transactions” aren’t really transactions as understood conventionally – in case of errors, there is no rollback of writes made by the script.

Atomicity” of Redis scripts is guaranteed in the following manner:

  • Once a script begins executing, all other commands/scripts are blocked until the script completes. So, other clients either see the changes made by the script or they don’t. This is because they can only execute either before the script or after the script.
  • However, Redis doesn’t do rollbacks, so on an error within a script, any changes already made by the script will be retained and future commands/scripts will see those partial changes.
  • Since all other clients are blocked while the script executes, it is critical that the script is well-behaved and finishes in time.

The ‘lua-time-limit’ Value

It is highly recommended that the script complete within a time limit. Redis enforces this in a weak manner with the ‘lua-time-limit’ value. This is the maximum allowed time (in ms) that the script is allowed to run. The default value is 5 seconds. This is a really long time for CPU-bound activity (scripts have limited access and can’t run commands that access the disk).

However, the script is not killed when it executes beyond this time. Redis starts accepting client commands again, but responds to them with a BUSY error.

If you must kill the script at this point, there are two options available:

  • SCRIPT KILL command can be used to stop a script that hasn’t yet done any writes.
  • If the script has already performed writes to the server and must still be killed, use the SHUTDOWN NOSAVE to shutdown the server completely.

It is usually better to just wait for the script to complete its operation. The complete information on methods to kill the script execution and related behavior are available in the documentation.

#cloud #database #developer #high availability #howto #redis #scalegrid #lua-time-limit #redis diagram #redis master #redis scripts #redis sentinel #redis servers #redis transactions #sentinel-managed #server failures

How to Install and Configure Redis on CentOS 7

Redis is an open-source in-memory data structure store. It can be used as a database, cache and message broker and supports various data structures such as Strings, Hashes, Lists, Sets, etc. Redis provides high availability via Redis Sentinel including monitoring, notifications Automatic failover. It also provides automatic partitioning across multiple Redis nodes with Redis Cluster.

This tutorial explains how to install and configure Redis on a CentOS 7 server.

Prerequisites

Before starting with the tutorial, make sure you are logged in as a user with sudo privileges.

Installing Redis on CentOS 7

Redis package is not included in the default CentOS repositories. We will be installing Redis version 5.0.2 from the Remi repository.

The installation is pretty straightforward, just follow the steps below:

  1. Start by enabling the Remi repository by running the following commands in your SSH terminal:
sudo yum install epel-release yum-utils
sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum-config-manager --enable remi
  1. Install the Redis package by typing:
sudo yum install redis
  1. Once the installation is completed, start the Redis service and enable it to start automatically on boot with:
sudo systemctl start redis
sudo systemctl enable redis
Created symlink from /etc/systemd/system/multi-user.target.wants/redis.service to /usr/lib/systemd/system/redis.service.
  1. To check the status of the service enter the following command:
sudo systemctl status redis
  1. You should see something like the following:
● redis.service - Redis persistent key-value database
Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/redis.service.d
        └─limit.conf
Active: active (running) since Sat 2018-11-24 15:21:55 PST; 40s ago
Main PID: 2157 (redis-server)
CGroup: /system.slice/redis.service
        └─2157 /usr/bin/redis-server 127.0.0.1:6379

Redis service will fail to start if IPv6 is disabled on your server.

Congratulations, at this point you have Redis installed and running on your CentOS 7 server.

#centos 7 #redis #version 5.0.2

Java Questions

Java Questions

1590502070

How To Install PyCharm on CentOS 7 and 8

PyCharm is an IDE (or Integrated Development Environment) for the Python programming language. It is a cross-platform development environment that is compatible with Windows, macOS, and Linux. It provides a tool that integrates code analysis, graphical debugging, unit testing, and also contains an integrated terminal that supports development on remote hosts and virtual machines.

PyCharm was created by JetBrains based on the IntelliJ IDEA platform. There are two main versions of PyCharm.

The PyCharm Community Edition – This version is used for development without the framework options and other features that are necessary for writing Enterprise solutions.
The PyCharm Professional Edition – This version is used to develop software for large projects where frameworks and additional libraries are needed. This version contains support for Scientific and Python development and supports HTML, JS, and SQL.
For successful developers, it is crucial to have excellent tools that lessen their workload and save time. Additionally, PyCharm utilizes various plugins and extensions, written by both IntelliJ IDEA and other third-party contributors to increase functionality. The Professional Edition has a free trial period during which users can familiarize themselves with it and its use or the open-source Community Edition which allows for continued free usage.

#centos #centos 7 #centos 8 #code analysis #cross platform

Install PHP 7 on CentOS 7

CentOS 7 ships with PHP version 5.4 which has been officially EOL for quite some time and is no longer supported.

By using PHP 7 your applications will load faster and consume less system resources.

In this tutorial, we will explain how to install or upgrade to PHP 7.0. 7.1, 7.2 and 7.3 on a CentOS 7 system. We’ll also show you how to integrate PHP with Nginx and Apache.

Also prior to installing a specific PHP 7.x version make sure that it is supported by your application.

#php #centos #centos 7