1. Home
  2. Training Library
  3. DevOps
  4. Courses
  5. Red Hat Enterprise Linux Technical Overview

Managing Software

Developed with
Red Hat
play-arrow
Start course
Overview
DifficultyBeginner
Duration1h 43m
Students183
Ratings
5/5
starstarstarstarstar

Description

Red Hat Enterprise Linux (RHEL) is a rock solid commercial grade Linux operating system. If you're interested in learning RHEL from a system admins perspective then this course is for you!

The "Red Hat Enterprise Linux Technical Overview" course walks you through many of the basic system admin tasks and concepts required to administer RHEL effectively.

This course will provide you with insights to:

  • Working with the Terminal
  • Understanding the Kernel and User Spaces
  • Graphical User Interface
  • File management and the File System Hierarchy
  • Editing Files using Vim
  • Organizing Users and Groups
  • File Permissions
  • Managing Software
  • Configuring Networking
  • Controlling System Startup Processes
  • Introduction to Containers
  • Overview of Cockpit

Transcript

Hey guys, you've most likely heard of RPM, which is short for Red Hat Package Manager.

It's a very popular format for installing software. Now think of rpm as an archive of files to be installed along with metadata, along with the scripts to handle the Lifecycle Management of Software. Like installing, updating, and removing. RPM files in Red Hat Enterprise Linux follows a certain format.

So let's going to have a look. So in this directory I have an RPM file for the bash shell that I've downloaded. You can see over here that the rpm file is for a package called bash and you can see that we have a - over here as our separators.

So, this little bit over here is the version of the of the bash package, that we are making use of, so this is a 4.4.19 there's next a little bit over here this would be the release and this is the number of times that the packager has released the software and of course in this particular case Red Hat is the here or the packager of this file.

Then this next little bit of information over here that's the architecture that this is applicable to and rpm files typically have the extension of .rpm now the cool thing about rpm software is that all the installed software is stored in a database this is called the rpm database and this allows us to keep track of what software is installed along with their versions. 

So where do I get my RPM files from? There are many third-party websites offering rpm files for free download but how do you know that the rpm file hasn't been tampered with since the developer originally published it. You don't and that is why you acquire software from trusted vendors like Red Hat.

Software packages generally come from repositories or repos and your server points to one or more repos provided by vendors. At Red Hat we make repositories available to our customers through a subscription service and to subscribe your machine to get these repos you would need to make use of the subscription manager tool the basic framework to do this, is to make use of the subscription manager tool, to register, you would then supply your username and password. So what I would do in this case is that I would say subscription manager and then register and then I would be prompted for my username and password. The next step would be to attach your server to a subscription and typically you would make use of the command subscription manager and then attached. Once you've done that you can then go and enable and disable the repos. So to do management you would use the subscription manager a repos command like this and you would go and disable certain repos and you would enable the repos that you would want to make use of. So what I would typically do is that I would say disable everything and then I would go and only enable the repos that I'm interested in.

Of course if you want to get a listing of all the repos that you that you can make use of you can always make use of subscription manager repos and then --list.

Now if you have many Linux Servers in your organization you may not want to download rpm files over the internet for every single system. So what you could do is that you could deploy a satellite server. 

Now the satellite server from Red Hat has got a number of use cases one of them is to host rpm files and provide them over the local network. So how this would work is that you would go and set up a satellite service and the satellite server is going to want a sort of host repositories for your organization and the satellite server would point to the Red Hat content delivery network. Your satellite server would would download the packages only once from the Red Hat content delivery network, it's got synchronization capabilities. So whenever there are new packages new updates that are posted on the Red Hat content delivery network your satellite server would automatically go and download them your Linux Servers internally would then go and point to the satellite server to get their content. So servers a b and c would now look at the satellite server to get the packages that are going to be installed to get its updates because the satellite server hosts a copy of the software that servers a b and c make use of and this means that service a b and c don't have to go to the Internet individually and download the packages one by one by one on a per system basis, something else that you could do is that you could host local repositories and these are repositories that are not supported by Red Hat. 

So vendors would often go and set up a web server in order for your machines to communicate with that repository you would need to go and create a repository definition file. These repository definition files exist below etc/yum.repos.d. You could create the file with your favorite text editor in other words Vim or what you could do is make use of yum config manager to add your repositories. Now software is managed with the yum command which typically looks for software to be installed and to update from the repositories that are connected to your system.

So what I'm going to do right now is do a yum repolist all and i'm going to show you the repositories that this particular machine is connected to.

So as you can see over here I've got two repositories that are making use of we have this one over here rhel-8 for x86 up appstream rpms you could see a bit of a friendly a name over here and then on the right hand side you could see its status it's currently enabled and it provides me with 4,617 packages as opposed to the one below that which is you can see the name over here rhel-8-baseos-rpms you can see a much friendlier string over here it's also currently enabled. However it only provides me with 1,670 packages. 

Now how I connected these machines or how are connected my server to those repositories is not by using subscription manager. subscription manager is for Red Hat supported repositories. So if you want to find out what your subscription status is you can make use of the command subscription manager status. And as you can see over here that this machine is not subscribed.

So where are these repositories coming from, where they're defined.

So like I said we have a bunch of files below etc/yum repos.d and these files end in .repo and they contain the repository definitions and you can have a look at this file for more information about the URL that is being used along with the other properties for the repositories that I have. So to install software at its very simplest we can make use of the yum command particularly yum installed.

So I want to get information about a package called nmap, nmap is not yet installed I can always test to see if it is installed by using yum info and then the name of the package and map and you can see over here that it says nmap, you can see some versioning information, the release information as well as a bit of a description. And it's not installed because it doesn't tell me that it's installed right now. So we want to go ahead and install in map. 

So the before picture looks as follows nmap is not installed, the command is not there, and we're going to go along right now and install nmap. So I'm going to say yum install and I'm going to say -y because I'm going to try and make this as non-interactive as possible. So any questions that it may ask me I'm going to automatically answer yes. So let's get install nmap right now and you can see it didn't get I didn't get any prompts it's gone ahead, it's downloaded nmap from the repositories that I'm connected to and it's always and this is the default behavior. 

It's always going to download the latest version of that particular software package. Now you can see that nmap is installed. So let's going to compare it to the output that we saw previously we're going to run the command yum info nmap and in this particular case guys look at the repo over here where it says add son that tells us that it's that it's installed right now. So let's go find out by running the in map command. There we go.

So the nmap command is installed and it is available on my machine.

Should you want to update your software, you could always go and run the command yum update and that will do a general update of all the installed software packages.

If you wanted to do an update of an individual software package. you could use yum update and then the software package name. So you can see that in this particular case there's no nothing to be done over here, because I already have the latest version of nmap as per my repositories. If I were just go and do a yum update in general like this it's going to want to update all software packages.

So what it does is that it looks at what is currently installed and it looks to see if there are newer versions of those software packages available in your repositories and all repositories are evaluated should they be enabled to remove software you would use the command yum remove.

So I'm go ahead and remove nmap and one thing that I don't do that I would discourage you from doing is to automatically answer yes, because sometimes software may have dependencies and you may accidentally remove those dependencies as well.

So what I like to do is that when I do a removal, I would say yum removed in the package name and that will inform me of the dependencies and would tell me about what exactly is going to be removed and I get to say yes I would like to go ahead with this transaction as opposed to doing something like this. If I said yum remove and then I'm going to go and remove setup yeah look at that. Now guys here we have a complete listing of packages that are also going to be removed. So not only what about uninstalling or removing setup I'm also going to be removing some dependent packages.

So these packages over here are all dependent on setup and if you remove setup.

It would render the packages that I've highlighted right now useless.

And as a consequence a grater consequence, a number of other packages are been going to be uninstalled as well.

So do I want to go and remove 60 packages well likely not. So let's go and answer no in this particular case. So again you would get your software from repositories I would encourage you to only get your software from trusted vendors we have a number of repositories that we provide to our customers using the subscription model you could go and connect your systems to repositories that are supported by Red Hat by using a satellite server and to the general Management of Software we would make use of the yum command.

So guys that is a basic overview I will see you in the next video.

About the Author
Students36232
Labs33
Courses93
Learning paths23

Jeremy is the DevOps Content Lead at Cloud Academy where he specializes in developing technical training documentation for DevOps.

He has a strong background in software engineering, and has been coding with various languages, frameworks, and systems for the past 20+ years. In recent times, Jeremy has been focused on DevOps, Cloud, Security, and Machine Learning.

Jeremy holds professional certifications for both the AWS and GCP cloud platforms.
 

Covered Topics