fmt command in Linux: A Practical Guide

Introduction

In this tutorial, we’ll explore how to use the fmt command in Linux to neatly format text in files, set optimal column widths, and standardize spacing. This guide aims to enhance your text processing skills on Linux using practical examples of the fmt command. Let’s dive into the capabilities of the fmt command in Linux.

What does the fmt command mean?

fmt – a straightforward command used as an optimal text formatter.

Syntax

fmt [-WIDTH] [OPTION]... [FILE]...


In the manual page, the fmt command is described as a simple and optimal text formatting Linux. For more detailed information about the fmt command, you can refer to the man fmt section in the manual.

fmt command in Linux with an example

By default, fmt sets the column width at 75.

I have created a file fmt_command.txt

[vagrant@DevopsRoles ~]$ cat fmt_command.txt 
 HuuPV, My website DevopsRoles.com and HuuPhan.com.SN:199x.
 Devops Roles.
 Hello world. xxx.

fmt with no options

[vagrant@DevopsRoles ~]$ fmt fmt_command.txt 
HuuPV, My website DevopsRoles.com and HuuPhan.com.SN:199x.  Devops Roles.

Hello world. xxx.

How to change the width of formatting.

[vagrant@DevopsRoles ~]$ fmt --width 20 fmt_command.txt 
 HuuPV, My website
 DevopsRoles.com and
 HuuPhan.com.SN:199x.
 Devops Roles.
 Hello world. xxx.

with -u option uses one space between words and two spaces after sentences for formatting.

[vagrant@DevopsRoles ~]$ fmt -u fmt_command.txt 
 HuuPV, My website DevopsRoles.com and HuuPhan.com.SN:199x.  Devops Roles.
 Hello world. xxx.

Formatting Multiple Files

You can also format multiple files simultaneously. Simply list the files as arguments:

fmt file1.txt file2.txt file3.txt

fmt will process each file and output the formatted text for all of them.

Splitting Long Lines

If you need to split long lines without breaking words, use the -s or --split-only option:

fmt -s myfile.txt

This option splits lines at spaces, ensuring words are not cut off.

Advanced Formatting Options

The fmt command offers several advanced options for more precise text formatting:

  • -c or --crown-margin: Preserve the indentation of the first two lines.
  • -t or --tagged-paragraph: Format the text as tagged paragraphs, maintaining a hanging indentation.
  • -g or --goal: Set the goal width for formatting. This is the preferred width, while the -w option sets the maximum width.

Frequently Asked Questions

What is the default width for the fmt command?

The default width is 75 characters. You can change it using the -w or --width option.

Can fmt handle multiple files at once?

Yes, you can list multiple files as arguments and fmt will format each of them.

How can I preserve indentation with fmt?

Use the -u or --uniform-spacing option to keep the original indentation intact.

What is the difference between the -w and -g options?

The -w option sets the maximum line width, while the -g option sets the goal width, which is the preferred width for formatting.

Can fmt split long lines without breaking words?

Yes, use the -s or --split-only option to split lines at spaces without cutting off words.

Conclusion

The fmt command is a straightforward Linux utility that helps format text files, set column width commands, and ensure uniform spacing. It simplifies text editing tasks, making it a valuable tool for developers and system administrators alike. Thank you for reading this guide on the DevopsRoles page!

By understanding and utilizing the various options and features of fmt, you can efficiently format text files to meet your specific requirements. Experiment with the examples provided in this guide and explore the full potential of the fmt command in your Linux environment.

How to connect to Pluggable Databases in Oracle 19: A Step-by-Step Guide

Introduction

In this tutorial, I used the Default Service for connecting to the PDB. Made in the tnsnames.ora file that defines database addresses that allow us to establish a connection with the database. The status of the PDB needs to be changed from mounted to read-write mode.

The concept Databases in Oracle 19

  • The Container Database (CDB).
  • Pluggable Database (PDB).

Connect to Pluggable Databases in Oracle 19

  • Where cpdb is the global database.
  • pdb1 and pdb2 are the two pluggable databases created.

Made in the tnsnames.ora file as below:

$ sudo su - oracle
$ cat $ORACLE_HOME/network/admin/tnsnames.ora

#The content tnsnames.ora as below:

CPDB01 =
  (DESCRIPTION =
    (ENABLE = BROKEN)
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.x.x)(PORT = 1655))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = DEVOPSROLES)
      (SERVER = DEDICATED)
    )
  )

PDB01 =
  (DESCRIPTION =
    (ENABLE = BROKEN)
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.x.x)(PORT = 1655))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = PDB01_DEVOPSROLES)
      (SERVER = DEDICATED)
    )
  )

PDB02 =
  (DESCRIPTION =
    (ENABLE = BROKEN)
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.x.x)(PORT = 1655))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = PDB02_DEVOPSROLES)
      (SERVER = DEDICATED)
    )
  )

Changing the status of the pluggable database

When the pdbs are created, by default, the open_mode is ‘Mounted’ only. Query status opens mode pdbs as command below:

$ sudo su - oracle
$ export ORACLE_SID=CPDB01
$ sqlplus "/as sysdba"
SQL> select name, open_mode from v$pdbs;

If pdbs open mode is “Mounted” only. You run the command that opens all the pluggable databases in a read-write mode.

SQL> Alter pluggable database all open;

After this connection can be established with the database using sqlplus command as below:

$ sqlplus "sys/oracle@PDB01"

Conclusion

Thought the article, “How to connect to Pluggable Databases in Oracle 19″ as above. Connecting to pluggable databases in Oracle 19c is a fundamental skill for anyone working with Oracle’s advanced database management system. By following the steps outlined in this guide, you can easily manage and connect to your PDBs, taking full advantage of Oracle’s multi-tenant architecture.

This capability not only simplifies database administration but also enhances scalability and resource management. Stay proactive in exploring and mastering Oracle’s features to keep your database environment efficient and cutting-edge. I hope will this your helpful. Thank you for reading the DevopsRoles page!

Learning Flutter part 1

In this series, let together learning flutter dart part 1.

What is Flutter

Flutter is a Google UI toolkit for building, natively compiled applications for mobile, web and desktop from a single codebase.

  • Fast Development
    • with Stateful Hot Reload helps Paint your app to life in milliseconds. realtime!
  • Expressive and Flexible UI
    • The layered architecture allows for full customization, which results in incredibly fast rendering and expressive and flexible designs.
  • Native performance
    • Full native performance on both IOS and Android.

Flutter System Overview

Architectural Overview Platform channels

Why flutter use Dart?

Flutter is a Framework. It uses Dart to build a layer Framework.

  • Support build, compile AOT(Ahead Of Time) and JIT(Just In Time).
  • OOP Language.
  • Flutter aims to provide 60 frames per second fps performance.

JIT and AOT work

How does Dart work?

Dart programming language basic

  • Dart is a programming language OOP ( Example: null, functions, number… is Object ).
  • All Objects inherits from the Object Dart class.
  • Support Generic types. For example, List
  • There are no keywords public, protected and private.
  • Dart is programming language strongly typed but type annotation is optional. For example, var number = 30 -> number = int )

Install the Dart SDK

Link here: https://dart.dev/get-dart

I will use IntelliJIDEA to code :). Link here

Add plugin Dart for IntelliJIDEA

Choice Configure –> Plugins.

Click Marketplace –> search dart —> click Installed.

Create a New Project for Dart

Select Dart –> Console Application – a Command-line application sample.

For example, Project name: Dart-Study and Project location as the picture below

Now we will code hello with a dart programming language 🙂

void main(){
  print("Hello, I am Dart");
}

Conclusion

Through the article, we learn “Learning Flutter dart part 1” as above. I hope will this your helpful. Thank you for reading the DevopsRoles page!

How to Manage Users and Roles in Jenkins

In this tutorial, How to Manage users and Roles in jenkins. You have installed “plugin Manage and Assign Roles” if yet then install it! Now let begin.

Install and configure Manage users and Roles in Jenkins

1. Click Jenkins –> Manage Jenkins –> Configure Global Security –> Choose Role-Based Strategy.

2. click Jenkins –> Manage Jenkins –> Click Manage and Assign Roles –> Click Manage Roles.

In Global roles –> Role to add. For example, Add new admin, user

In “Project roles” –> Add “Role to add” and “Pattern”.
For example, Multiple Pattern for NGINX.
Role to add: NGINX
Pattern: startnginx.|stopnginx.|buildnginx.*

3. click Jenkins –> Manage Jenkins –> Click Manage and Assign Roles –> Click Assign Roles.

In “Global roles” –> Add “User/group to add”.
For example: “User/group to add”add new xxx_jenkins account and chose “user” role. Account HuuPV chose the “admin” role as in the picture below.

In “Item roles” –> Add “User/group to add”.

For example: choose xxx_jenkin account with role “ NGINX “ have created above step 2 as the picture below.

Plugin Manage and Asign Roles.

Conclusion

Thought the article, How to use “How to Manage Users and Roles in Jenkins” as above. I hope will this your helpful. Thank you for reading the DevopsRoles page!

chown Invalid argument centos solved problem

Good morning, I am working and changing the ownership folder of my home, but I cannot run chown command. It is Error “Invalid argument”. This is indeed an NFS4 issue. The error chown Invalid argument as following below:

[root@Client ~]# chown -R huupv:huupv /home/huupv                                                    
chown: changing ownership of `huupv/.bashrc': Invalid argument
chown: changing ownership of `huupv': Invalid argument

My environment

Client <---> NFS server

How can I fix the chown Invalid argument this

You need to check step by step as below:

NFS client:

[root@Client ~]# cat /etc/redhat-release
Centos 6

NFS Server

[root@DevopsRoles ~]# cat /etc/redhat-release
Centos 7

Configure NFS server

[root@DevopsRoles ~]# cat /etc/exports

The Content in file exports

#Data Volume Share
/mnt/data 192.168.1.12(rw,sync,no_root_squash,no_subtree_check)

Solve Problem

From the Client, we will umount and mount as below

[root@Client ~]# umount /mnt/data # if umount is busy then you need run umount -lf /mnt/data
[root@Client ~]# mount -t nfs -o vers=3 192.168.1.13:/mnt/data  /mnt/data
[root@Client ~]# chown -R huupv:huupv /home/huupv

You have solved the problem “chown Invalid argument centos” Thank you for reading the DevopsRoles page!

Spring Boot application as a service in Linux

In this tutorial, How to run Spring Boot Application as a service in Linux. Spring boot preferred deployment method via an executable jar file that contains tomcat inside.

Spring Boot application as a service

Spring Boot and Systemd

Create new file “/etc/systemd/system/myapp.service” as a service to start on reboot.

[Unit]
Description=myapp
After=syslog.target
[Service]
User=myapp
ExecStart=/var/myapp/myapp.jar
SuccessExitStatus=143
Restart=always
RestartSec=30
[Install]
WantedBy=multi-user.target

Note: You change the Description, User, and ExecStart fields suitable for your application.

Start the service:

$ sudo systemctl start myapp

Check the status is active

$ sudo systemctl status myapp

Spring Boot and System V

Create a specific user to run the service and executable JAR file.

$ cd /opt/myapp
$ sudo useradd huupv
$ sudo passwd huupv
$ sudo chown huupv:huupv myapp.jar
$ sudo chmod 500 myapp.jar

Assuming you have a Spring Boot application installed in the folder /opt/myapp . you need to create a symlink as follows:

$ sudo ln -s /opt/myapp/myapp.jar /etc/init.d/myapp

Start the service

$ sudo service myapp start

You have created the “Spring Boot application as a service in Linux“.Thank you for reading the DevopsRoles page!

Install Gradle on CentOS

In this tutorial, How to install Gradle on CentOS. Gradle is a free and Open Source that helps your build, automate and deliver better software, faster.

Prerequisites

  • Server instance : CentOS 7
  • A sudo user.

Your System update

Login into the sudo user and run the following commands to update your system.

$ sudo yum -y install epel-release
$ sudo yum -y update
$ sudo reboot

Install JDK

Gradle requires Java Development Kit (JDK) 7 or higher in order to work. Link here

Download Gradle

In this guide, I use the “binary-only” archive. Link the Gradle release page to the latest version of Gradle. Using wget command to download Gradle.

$ cd /opt/
$ wget https://downloads.gradle-dn.com/distributions/gradle-5.6.2-bin.zip

Install Gradle on CentOS

Your run the command following.

$ sudo mkdir /opt/gradle
$ sudo unzip -d /opt/gradle gradle-5.6.2-bin.zip

Set the PATH environment for Gradle executable.

$ export PATH=$PATH:/opt/gradle/gradle-5.6.2/bin

To check if the Gradle install was successful.

$ gradle -v

Your system is now built the program with Gradle. Thank you for reading the DevopsRoles page!

How to use Docker-compose Build SonarQube

In this tutorial, How to Docker-compose Build SonarQube.

Docker-compose Build SonarQube

Build SonarQube with Docker-compose

  • WebApp: Create Mysql with Docker-compose
  • SonarQube: Create Mysql with Docker-compose
  • And Launch SonarQube with Docker-compose

Folder Structure for SonarQube

[vagrant@localhost ~]$ tree docker
 docker
 ├── docker-compose.yml
 ├── mysql
 │   ├── conf
 │   │   └── custom.cnf
 │   └── init
 │       ├── 1_create_db.sql
 │       ├── 2_create_user.sql
 │       └── 3_grant.sql
 └── sonarqube
 4 directories, 5 files

Mysql Configure

Create file ./mysql/conf/custom.cnf

The content as below

[mysqld]
character-set-server=utf8
lower_case_table_names=1
explicit_defaults_for_timestamp=true

Create two Database

Create the database with “./mysql/init/1_create_db.sql” file.

-- For WebApp
CREATE DATABASE IF NOT EXISTS items DEFAULT CHARACTER SET UTF8;
-- For SonarQube
CREATE DATABASE IF NOT EXISTS sonar DEFAULT CHARACTER SET UTF8;

User for SonarQube

Create a user with “./mysql/init/2_create_user.sql” file

CREATE USER 'sonar' IDENTIFIED BY 'sonar';

Grant user

Grant user for sonar with “./mysql/init/3_grant.sql” file.

GRANT ALL ON sonar.* TO 'sonar'@'%' IDENTIFIED BY 'sonar';
GRANT ALL ON sonar.* TO 'sonar'@'localhost' IDENTIFIED BY 'sonar';
FLUSH PRIVILEGES;

Example docker-compose file as below

version: '3.5'
services:
 mysql:
     image: mysql:5.7.21
     container_name: mysql
     ports:
       - 3306:3306
     volumes:
       - ./mysql/init:/docker-entrypoint-initdb.d
       - ./mysql/conf/:/etc/mysql/conf.d
     networks:
       - sonarnet
     environment:
       MYSQL_ROOT_PASSWORD: root
     restart: always
 sonarqube:
     image: sonarqube:7.0
     container_name: sonarqube
     depends_on:
       - mysql
     volumes:
       - sonarqube_conf:/opt/sonarqube/conf
       - sonarqube_data:/opt/sonarqube/data
       - sonarqube_extensions:/opt/sonarqube/extensions
       - sonarqube_bundled-plugins:/opt/sonarqube/lib/bundled-plugins
     networks:
       - sonarnet
     command: -Dsonar.web.context=/sonarqube
     ports:
       - 9000:9000
       - 9092:9092
     environment:
       - SONAR_JDBC_USERNAME=sonar
       - SONAR_JDBC_PASSWORD=sonar
       - SONAR_JDBC_URL=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
     restart: always
networks:
   sonarnet:
     driver: bridge
volumes:
   sonarqube_conf:
   sonarqube_data:
   sonarqube_extensions:
   sonarqube_bundled-plugins:

Build and start with Docker-compose

$ cd docker
$ docker-compose -f docker-compose.yml up -d

Access to SonarQube login page

  • Link access: http://127.0.0.1:9000/sonarqube
  • User/Password: admin/admin

As a result the picture below

Stop SonarQube with Docker-compose

$ cd docker
$ docker-compose -f docker-compose.yml stop

You have Docker-compose Build SonarQube. Thank you for reading! Thank you for reading the DevopsRoles page!

Install Oracle client 18.3 on centos 7

In this tutorial, How to install Oracle client 18.3 on Centos 7.

Bach server (sqlplus,sqlldr, etc) <–> Oracle server

Your environment

On server

  • OS: Centos 7 (Batch server)
  • Oracle client 18.3

On My PC

  • OS: Windows
  • Putty
  • Xming server

Install Oracle client 18.3 on centos 7

On server

Install the packages

$ sudo yum install zip libaio wget unzip
$ sudo yum install  xorg-x11-server-Xorg xorg-x11-xauth xorg-x11-apps -y

Download Oracle client 18.3 Here

To change to folder Oracle client

$ cd /opt/
$ unzip LINUX.X64_180000_client.zip

Create Account for Oracle

$ sudo groupadd -g 501 oinstall
$ sudo groupadd -g 502 dba
$ sudo useradd -u 501 -g 501 -G 502 -s /bin/bash -d /home/oracle oracle -m

Enable X11Forwarding in sshd_config file. The content as below

X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

On PC

Install Xming server link download here. After you have to install Xming server then start it.

Configure Putty enable X11Forwarding as the picture below

Install Oracle client 18.3

[oracle@batch-server ~]$ cd /opt/client/
[oracle@batch-server ~]$ xclock

The result as the picture below

Run Oracle client 🙂

[oracle@batch-server ~]$  ./runInstaller

Confirm after install Oracle client 18.3

How to create variable $ORACLE_HOME for oracle user. For example as below

[oracle@batch-server ~]$ cat .bash_profile

 #The content as below
 PATH=$PATH:$HOME/.local/bin:$HOME/bin
 export ORACLE_HOME=/opt/oraInventory/product/18.0.0/client_1
 export PATH=$PATH:$ORACLE_HOME/bin

 [oracle@batch-server ~]$ source .bash_profile

Create new file tnsnames.ora

[oracle@batch-server ~]$ $ORACLE_HOME/network/admin/tnsnames.ora

The following is a reference example.

devopsroles_01 = 
   (DESCRIPTION =
     (ENABLE = BROKEN)
     (LOAD_BALANCE = ON)
     (FAILOVER = ON)
     (ADDRESS_LIST =
       (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.2.15)(PORT = 1534))
       (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.2.15)(PORT = 1535))
     )
     (CONNECT_DATA =
       (SERVICE_NAME = DBB_DEVOPSROLES)
       (SERVER = DEDICATED)
     )
   )

Add end line in file sqlnet.ora

[oracle@batch-server ~]$ $ORACLE_HOME/network/admin/sqlnet.ora

The content as below

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
ADR_BASE = /opt/oracle

Connection check from Batch server to Oracle database.

[oracle@batch-server ~]$ sqlplus /nolog
 SQL> conn username/password
 SQL> set head off
 SQL> select * from v$instance ;
 SQL> quit

You have installed Oracle client 18.3 on Centos 7. If during setup error you can Q&A. Thank you for reading!

Redis Install and Configure: Your Database and Cache System

Introduction

This tutorial is a Step-by-Step Guide to Redis Install and Configure. Now, let’s go Redis Install and Configure.

Dive into the efficient world of Redis with this detailed guide on installation and configuration on Linux systems. Whether you’re setting up Redis for the first time or optimizing an existing installation, this tutorial offers clear, step-by-step instructions to get Redis up and running smoothly on your server.

Redis

  • It is an Open Source.
  • In-memory data structure store.
  • Used as Database.
  • Cache and message broker.
  • Redis is a key-value pair cache and store

Redis is perfect for storing sessions. All operations are performed in memory, so reading and writing will be fast

Redis Install and Configure

Download Redis

Link latest Redis home here

$ cd /opt
$ wget http://download.redis.io/releases/redis-5.0.5.tar.gz
$ sudo tar zxvf redis-5.0.5.tar.gz
$ cd redis-5.0.5

Install Redis

$ sudo make test
$ sudo make
$ sudo make install

If the following error is in make test command as below.

You need tcl 8.5 or newer in order to run the Redis test
make[1]: *** [test] Error 1
make[1]: Leaving directory `/opt/redis-5.0.5/src'
make: *** [test] Error 2

You need to install tcl

$ sudo yum install -y tcl

Again install Redis

$ sudo make test

Error

Executing test client: couldn’t execute “src/redis-benchmark”: no such file or directory.

Then perform the following steps

$ sudo make distclean
$ sudo make
$ sudo make install

Configure Redis

$ sudo mkdir /etc/redis
$ sudo cp redis.conf /etc/redis/6379.conf
$ sudo vi /etc/redis/6379.conf

The information content 6379.conf file

$ cat /etc/redis/6379.conf | grep -v "#" | sed /^$/d
 bind 127.0.0.1
 protected-mode yes
 port 6379
 tcp-backlog 511
 timeout 0
 tcp-keepalive 300
 daemonize yes
 supervised no
 pidfile /var/run/redis_6379.pid
 loglevel notice
 logfile "/var/log/redis_6379.log"
 databases 16
 always-show-logo yes
 save 900 1
 save 300 10
 save 60 10000
 stop-writes-on-bgsave-error yes
 rdbcompression yes
 rdbchecksum yes
 dbfilename dump.rdb
 dir /etc/redis/
 replica-serve-stale-data yes
 replica-read-only yes
 repl-diskless-sync no
 repl-diskless-sync-delay 5
 repl-disable-tcp-nodelay no
 replica-priority 100
 maxmemory 10240000
 lazyfree-lazy-eviction no
 lazyfree-lazy-expire no
 lazyfree-lazy-server-del no
 replica-lazy-flush no
 appendonly no
 appendfilename "appendonly.aof"
 appendfsync everysec
 no-appendfsync-on-rewrite no
 auto-aof-rewrite-percentage 100
 auto-aof-rewrite-min-size 64mb
 aof-load-truncated yes
 aof-use-rdb-preamble yes
 lua-time-limit 5000
 slowlog-log-slower-than 10000
 slowlog-max-len 128
 latency-monitor-threshold 0
 notify-keyspace-events ""
 hash-max-ziplist-entries 512
 hash-max-ziplist-value 64
 list-max-ziplist-size -2
 list-compress-depth 0
 set-max-intset-entries 512
 zset-max-ziplist-entries 128
 zset-max-ziplist-value 64
 hll-sparse-max-bytes 3000
 stream-node-max-bytes 4096
 stream-node-max-entries 100
 activerehashing yes
 client-output-buffer-limit normal 0 0 0
 client-output-buffer-limit replica 256mb 64mb 60
 client-output-buffer-limit pubsub 32mb 8mb 60
 hz 10
 dynamic-hz yes
 aof-rewrite-incremental-fsync yes
 rdb-save-incremental-fsync yes

Create Deamon for Redis

$ sudo cp utils/redis_init_script /etc/init.d/redis
$ sudo chkconfig --add redis
$ sudo chkconfig redis on
$ sudo /etc/init.d/redis start

The Redis server has been installed on your system.

$ sudo netstat -nplt | grep 6379                                            
 tcp        0      0 127.0.0.1:6379              0.0.0.0:*                   LISTEN      11567/redis-server

For more advanced details the “redis.conf” file configuration item is described as follows:

When the client is idle for a long time, close the connection

timeout 300

Specify the logging level. Redis supports four levels: debug, verbose, notice, and warning. The default is verbose.

loglevel verbose

Set the number of databases, the default database is 0, you can use the “select DBID from v$database;” command to specify the database ID on the connection

databases 16

Set the IP address and port of the master service when the machine is slav service. When Redis starts, it will automatically synchronize data from the master.

slaveof <masterip> <masterport>

When the master service is password protected, the slav service connects to the master password.

masterauth <master-password>

Set the Redis connection password. If the connection password is configured, the client needs to provide the password through the AUTH command when connecting to Redis. The default is off.

requirepass abc

Set the maximum number of client connections at the same time. The default is unlimited.

maxclients 128

Specify the maximum memory limit of Redis. Redis will load the data into the memory at startup. After the maximum memory is reached, Redis will first try to clear the expired or expired Key. When this method is processed, the maximum memory setting is still reached. The write operation will no longer be possible, but the read operation will still be possible. Redis’ new VM mechanism will store the Key in memory and the value will be stored in the swap area.

maxmemory <bytes>

You can use the same configuration file between multiple Redis instances on the same host, and each instance has its own specific configuration file.

include /path/to/local.conf

Conclusion

Successfully installing and configuring Redis enhances your application’s performance by providing rapid data access. This guide aims to equip you with the knowledge to seamlessly integrate Redis into your system, ensuring optimal setup for a robust data management solution. Thank you for reading the DevopsRoles page!

Devops Tutorial

Exit mobile version