Please Install Jq and Then Try Again

In this commodity, I will have y'all through the steps to Install jq(JSON Processor) on RHEL/CentOS 7/8. If you lot are working with JSON then y'all might be aware of jq tool which is existence used to query and procedure the JSON output on Linux Based Servers. jq is an open up source tool available from EPEL Repository which tin be easily installed in any of the Linux Servers in just few steps. Oft Programmers and Developers uses this tool forth with another tools to process the JSON output. More on JSON Official website.

What is JSON

JSON is known as JavaScript Object Notation. Information technology is based on JavaScript Programming Language and is used to store the data in name value pairs format. It tin be used with multifariousness of other programming Linguistic communication likes C, C++, Java, Python, Perl and many more.

What is jq

jq is known as JSON Processor. It is an open source tool available on Linux Based Organisation to process the JSON output and query the desired results. This tool can easily exist integrated and used with other Linux friendly scripting languages similar Python and Bash.

How to Install jq(JSON processor) on RHEL/CentOS 7/8

How to Install jq(JSON Processor) tool on RHEL/CentOS 7/viii

Also Read: How to Defragment an XFS Filesystem in Linux(5 Simple and Effective Steps)

Step one: Prerequisites

a) You crave a running RHEL/CentOS 7/eight Server.

b) You should accept yum installed in your Server. You tin bank check Acme 22 YUM command examples in RedHat/CentOS 7 to know more about yum command.

c) You should accept root or sudo access to run Privileged commands on your Server. Please Check How to Add User to Sudoers to know more than nearly providing sudo admission to the User.

Step 2: Install EPEL Repository

JQ(JSON Processor) utility is bachelor through EPEL Repository so to install jq yous demand to first install EPEL Repository by using yum install epel-release -y command as shown below.

[root@localhost ~]#          yum install epel-release -y          Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.hbcse.tifr.res.in * extras: centos.hbcse.tifr.res.in * updates: centos.hbcse.tifr.res.in Resolving Dependencies --> Running transaction check ---> Bundle epel-release.noarch 0:7-11 will be installed --> Finished Dependency Resolution  Dependencies Resolved  ======================================================================================================================================================================== Package Curvation Version Repository Size ======================================================================================================================================================================== Installing: epel-release noarch 7-xi extras xv k  Transaction Summary ======================================================================================================================================================================== Install i Bundle  Total download size: 15 k Installed size: 24 k Downloading packages: epel-release-7-xi.noarch.rpm | 15 kB 00:00:01 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : epel-release-7-11.noarch one/i Verifying : epel-release-7-11.noarch 1/1  Installed: epel-release.noarch 0:7-xi  Complete!        

Step three: Update Your Server

If y'all have not updated your Server from long time then it is always recommended to first update your server with latest available releases using yum update -y command and so proceed for new parcel installation.

[root@localhost ~]#          yum update -y          Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base of operations: centos.hbcse.tifr.res.in * epel: mirror.poliwangi.air-conditioning.id * extras: centos.hbcse.tifr.res.in * updates: centos.hbcse.tifr.res.in Resolving Dependencies --> Running transaction bank check ---> Package epel-release.noarch 0:seven-11 will exist updated ---> Parcel epel-release.noarch 0:vii-12 will exist an update --> Finished Dependency Resolution  Dependencies Resolved  ======================================================================================================================================================================== Package Arch Version Repository Size ======================================================================================================================================================================== Updating: epel-release noarch 7-12 epel fifteen grand  Transaction Summary ======================================================================================================================================================================== Upgrade i Parcel  Total download size: xv k Downloading packages: epel/x86_64/prestodelta | 469 B 00:00:00 epel-release-7-12.noarch.rpm | fifteen kB 00:00:00 Running transaction check Running transaction examination Transaction examination succeeded Running transaction Updating : epel-release-vii-12.noarch i/2 Cleanup : epel-release-7-11.noarch 2/2 Verifying : epel-release-7-12.noarch one/two Verifying : epel-release-7-11.noarch 2/ii  Updated: epel-release.noarch 0:seven-12  Complete!        

Footstep 4: Install jq(JSON Processor) tool

If everything goes well yous can now install jq on RHEL/CentOS 7/viii using yum install jq -y control every bit shown below.

[root@localhost ~]#          yum install jq -y          Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile epel/x86_64/metalink | six.five kB 00:00:00 * base: centos.hbcse.tifr.res.in * epel: epel.mirror.angkasa.id * extras: centos.hbcse.tifr.res.in * updates: centos.hbcse.tifr.res.in epel | 4.7 kB 00:00:00 (ane/2): epel/x86_64/updateinfo | 1.0 MB 00:00:01 (two/2): epel/x86_64/primary_db | half dozen.9 MB 00:00:26 Resolving Dependencies --> Running transaction check ---> Parcel jq.x86_64 0:1.six-2.el7 will be installed --> Processing Dependency: libonig.so.five()(64bit) for package: install jq-ane.half-dozen-2.el7.x86_64  --> Running transaction check ---> Bundle oniguruma.x86_64 0:6.viii.2-1.el7 will exist installed --> Finished Dependency Resolution  Dependencies Resolved  ======================================================================================================================================================================== Bundle Arch Version Repository Size ======================================================================================================================================================================== Installing: jq x86_64 1.6-ii.el7 epel 167 k Installing for dependencies: oniguruma x86_64 half-dozen.8.two-1.el7 epel 181 m  Transaction Summary ======================================================================================================================================================================== Install i Bundle (+1 Dependent bundle)  Total download size: 348 one thousand Installed size: 1.0 Thou Downloading packages: (1/2): jq-one.vi-2.el7.x86_64.rpm | 167 kB 00:00:00 (2/2): oniguruma-six.8.2-1.el7.x86_64.rpm | 181 kB 00:00:01 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Full 180 kB/s | 348 kB 00:00:01 Running transaction check Running transaction test Transaction examination succeeded Running transaction Installing : oniguruma-6.viii.2-one.el7.x86_64 1/two Installing : jq-i.vi-ii.el7.x86_64 two/2 Verifying : oniguruma-6.viii.ii-1.el7.x86_64 1/2 Verifying : jq-1.vi-ii.el7.x86_64 ii/2  Installed: jq.x86_64 0:one.6-2.el7  Dependency Installed: oniguruma.x86_64 0:6.8.ii-1.el7  Complete!        

Footstep 5: Verify jq package Installation

Y'all can also verify the jq package installation by querying the packet from RPM DB using rpm -qa | grep -i jq command as shown below.

[root@localhost ~]#            rpm -qa | grep -i jq          jq-1.half-dozen-2.el7.x86_64        

Step 6: Check jq version

To bank check the installed jq version you need to use jq -Version command every bit shown below. As you can see from beneath output, current version is 1.six.

[root@localhost ~]#          jq -Version          jq-1.6        

Pace 7: Using jq(JSON Processor) tool

If yous accept some JSON output like below and yous want to query the value of user and so you need to use jq .user command to get the value of user.

          { "user" : "admin", "Modifieddate" : "Nov ten, 2015 11:26:10 PM GMT", "Accesseddate" : "Nov ten, 2015 xi:26:10 PM GMT" }        

To go the user from above output you tin can use jq .user command as shown beneath.

          jq .user        

Step 8: Remove jq(JSON Processor) from Server

In one case you are done with jq utility yous can uninstall this tool by using yum remove jq -y command as shown beneath.

[root@localhost ~]#          yum remove jq -y          Loaded plugins: fastestmirror Resolving Dependencies --> Running transaction check ---> Package jq.x86_64 0:1.6-2.el7 will be erased --> Finished Dependency Resolution  Dependencies Resolved  ======================================================================================================================================================================== Parcel Arch Version Repository Size ======================================================================================================================================================================== Removing: jq x86_64 1.6-2.el7 @epel 381 k  Transaction Summary ======================================================================================================================================================================== Remove 1 Package  Installed size: 381 1000 Downloading packages: Running transaction check Running transaction test Transaction examination succeeded Running transaction Erasing : jq-ane.6-2.el7.x86_64 one/i Verifying : jq-1.6-two.el7.x86_64 1/1  Removed: jq.x86_64 0:1.6-2.el7  Complete!        

Step 9: Remove EPEL Repository

You lot can even remove the EPEL repository past using yum remove epel-release -y command if not required anymore.

[root@localhost ~]#          yum remove epel-release -y          Loaded plugins: fastestmirror Resolving Dependencies --> Running transaction check ---> Package epel-release.noarch 0:vii-12 volition be erased --> Finished Dependency Resolution  Dependencies Resolved  ======================================================================================================================================================================== Package Arch Version Repository Size ======================================================================================================================================================================== Removing: epel-release noarch 7-12 @epel 24 k  Transaction Summary ======================================================================================================================================================================== Remove one Package  Installed size: 24 k Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Erasing : epel-release-7-12.noarch 1/1 Verifying : epel-release-7-12.noarch 1/1  Removed: epel-release.noarch 0:vii-12  Consummate!        

Popular Recommendations:-

How to Install Arpwatch tool on RHEL/CentOS vii/8(Simple and Effective Steps)

How to Install and Configure Squid Proxy Server on RHEL/CentOS 7/eight

Python3: ModuleNotFoundError: No Module Named "prettytable" in Linux

How to List all the Installed Python Modules in Linux{2 Like shooting fish in a barrel Methods}

Solved: ModuleNotFoundError: No Module Named "requests" in Python iii

How to Install and Enable EPEL Repository on RHEL/CentOS vii/eight{Uncomplicated and Easy Steps}

Solved: FATAL: Authentication Helper Program /usr/lib/squid/basic_ncsa_auth: (2) No Such File or Directory

Primitive Data Types in Java - int, char, byte, brusque, long, float, double and boolean

barrettuposee.blogspot.com

Source: https://www.cyberithub.com/how-to-install-jq-json-processor-on-rhel-centos-7-8/

0 Response to "Please Install Jq and Then Try Again"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel