Linux Boot camp Series – 21/Mar/2020

Package Based Software Installation on Centos/RedHat

Lab Setup

  • Centos Machine: Ensure you create one centos/RHEL machine

YUM (Yellowdog Updater Modified)

  • Opensource tool developed for RPM Based Packages by RedHat
  • Main configuration file will be at /etc/yum.conf which specifies repository locations at /etc/yum.repos.d
  • Yum will pick any file with extension .repo

Yum commandline

  • Searching the package:
    • Syntax by using command line: yum search <package-name>
    • Example: Lets try to find a openjdk8 package yum search openjdk
    • Example: Find a package to install nginx
  • In your system there is some executable, you want to which package can be used to install that executable
    • Syntax: yum whatprovides '*/executable'
    • Example “`yum whatprovides ‘*/git’
  • To install any package
    • Synatax: yum install <package-name>
    • Example: Install openjdk11
    sudo yum search openjdk
    sudo yum install java-11-openjdk-devel
  • To install using rpm you can use sudo yum localinstall <path-to-rpm>
  • Displaying information about package sudo yum info <package-name>
  • Display all the packages installed sudo yum list installed
  • List all the available packages sudo yum list
  • Uninstall a package is sudo yum remove <package>
  • Exercise: Install any version of tomcat using yum commands
yum search tomcat
yum -q list available --showduplicates tomcat
yum install tomcat -y

  • To Check updates to the system
yum check-update
  • To apply all updates
yum update
  • To apply update to specifc package
yum update <package-name>
  • If you need add a custom repository to the yum add .repo file in /etc/yum.repos.d and then install the additional packages. Refer Here for elastic file beat installation

Managing repositories using yum

  • Display all the enabled repositories
yum repolist
  • Display all the available (enabled or disabled) repositiries
yum repolist all
  • Enabling a repository
yum-config-manager --enable <repo id>

History management using yum

yum history
# use id 

yum history undo <ID>


  • Install ansible control server on Centos7
  • Install nginx on Centos7
  • Install nodejs on Centos7

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin