EX200 Red Hat Certified System Administrator RHCSA – Linux command line Part 4
9. Yum packet manager part 2.
Okay, so we’re back, let’s just continue. We’ve talked about Yum in the previous tutorial, the default packet manager, and later on we will be adding repositories and messing around with that probably one of the follow up tutorials, but for the time being, I just want to show you a few basic options. Few essential options would be a proper term that you will use on daily basis in order to manage packets here in Red Hat and pretty much any other Linux distro, although other Linux distros will use different packet managers. For example, debian packet managers will use Aptitude or Aptget. Well, not app get just apt, I guess. And in open source you have zipper. I don’t know, I just know those three like App, Zipper and Yum. There could be some others, but those are the major ones. Anyway, let’s just go ahead and see what we can do with Yum. So if I type in Yum well, before any of this happens, you need to run Yum update. I have already ran it, so no problems there. And it might take a bit longer for you than it has for me, because no packages were marked for update.
And you can also Yumm upgrade. This shouldn’t last for long either for me, because I do believe that I ran it already. Excellent. So no packages were marked for update. Fantastic. For you it might take a bit longer, for me it doesn’t, because I’ve already done these things. But anyway, pause the tutorial if you need. Let’s type in Yum search, because before we can install anything on our systems, we first need to figure out what is the true name of a package.
So for example, we can take the simple text editing tool called G Edit g Edit and search for it. Now this is a simple example, but there’s other software for which the names are far more complex. I wouldn’t say far more complex, but they don’t have a lot of resemblance to what you’re used to. For example, you see, G Edit is basically G Edit just with a different arch.
Here it’s well, not a different arch, just says the arches basically have 64 bit. But if I typed in, for example, Yum search SQL would go down and of course these search results will expand as we add other repositories which we will need in order to install various servers. Down below you will see immediately that it’s actually called a Maria DB, which is a fork of the SQL provided by the MySQL database provided by Oracle. It says a community develop branch of MySQL.
It does run faster. Indeed, that is what I figured out, but the support for it is lacking, as if compared to for example, the MySQL database provided by the Oracle, because you can always contact Oracle chat, phone, whatever, and they will be there for you. Of course, that version, that support you have to pay for, while for MariaDB you don’t have to pay anything and it functions in pretty much the same way and it’s fantastic for learning as well.
Anyway, let’s just go ahead and clear the screen and let’s say that I want to install G Edit. So I would type in Yum install. This would be the syntax for it. G Edit of course it’s not going to install it because I already have it installed. There you go. But if I typed in Yum reinstall G Edit we are going to experience a completely different story here. You see, there are a few things that says running a transaction check package will be reinstalled finish dependency resolution. This is very important. You need to have all the dependencies that are necessary.
And these are the sort of questions, the one that I mentioned previously that you’re going to get that you can bypass with Y command. Well, I might as well. This is going to be a relatively short reinstallation. I want to show you how you can actually bypass this and I will as soon as the reinstallation finishes. But you see it’s asking you to confirm it. Okay, I get a warning here. Warnings are fine. Public key for G Edit rpm is not installed retrieving key okay, so that shouldn’t be a problem. We can accept it. Just be sure that you see where is the key being pulled from as that is quite important. Yes, there we go. So if it’s from Red Hat, it’s fine. But be sure to actually confirm it. Just read through what the text says. User ID red Hat incorporate auxiliary key fingerprint package from and up above we have pretty much the same information. But just read through it. If it seems fishy or something like that, don’t do it. However, repository attacks for band in the middle are well, they do happen, but not as often. Let’s just go ahead and clear it says installed, clear the screen.
And now we can say jump reinstalled space. Why? And we will not be asked any questions in regard to the installation of the package. So you see, it immediately skips the question as it already answers it by default with yes. I would recommend that you actually don’t skip this, that you pass in the command without the argument y just so you can see what just so you can see what you will encounter along the way. Now, if I want to learn more information about package G Edit, I can just type in Yumin info g Edit press Enter, wait a while and you will be there we go. So you will be given proper information. So we have name g Edit arch x 86 64 epoch version release size but usually these are the sort of things that people are interested in. It says installed. Excellent. And it says from which repository was it actually installed as well, which is very nice. Text editor summary. What is it? It’s basically a text editor for the Gnome desktop and you can go to this URL to learn more about it. Probably there will be a separate download link so you can get it from the website as well. Anyway, this is some sort of a general information that will be provided for you for every package in the repositories that you choose or don’t actually need to install it or download it or anything like that, you can select a completely random package and ask for some info on it. So I can type in, let’s go about this path. So Yum search SQL as before, and we’re going to get and we want the name of MariaDB.
So there we go. It’s MariaDB. Yuminfo. And I’m just going to paste MariaDB here. Let’s see, what do we get? Got to be patient a little bit and allow some time for the information to be pulled. Excellent. So it says pretty much the same thing. It says repo this one, it’s going to be pulled from here. However, it is definitely not installed. You can see that there is a difference between the two. Again, you have website where you can go to inquire further, have the licensing information, the size, the name, the art, pretty much the same things along with the description as you would have for any other package, like for G Edit. So the complexities between Maria, MariaDB and G Edit are obviously Maria database is far more complex. And basically you can make a course about MariaDB which would contain like 100 videos and you still wouldn’t cover everything. And G Edit, you could probably summarize in about 20 minutes or so, but still you get pretty much the same information about the packages. This is universal across the board. You will be able to figure things out.
Now, another important tool, another important command actually with Yum is how do you uninstall a package? So you type in Yum Remove and then you type in I’m just using G Edit here for demonstration purposes, because I know even if I delete it or if I mess it up or anything like that, I don’t care, no vital systems will be harmed, nothing will happen. That is why I’m using it for this demonstration. Because probably you will be using the same package to practice this out. And if you can do with it whatever you want, you’re not going to harm your system to any significant point. So if I just type in Yummy Remove, G Edit again, I’m prompted with a question, do I really want to remove it? And if I type in yes. Excellent. It says erasing removed, gone. It is no longer here, which is fantastic. So we’ve learned how to remove a package, we’ve learned how to install a package, we’ve learned how to search for a package name. And just keep in mind that you can search SQL.
You can also combine Grep with this. What we have learned in the previous lessons. So if you type in Grep and if you type in Maria, no, this is not what I want. If you type in Grab I Space Maria, you will very soon see that our search results are far shorter. So look, we only have three now as opposed to the amount we had before, okay, the amount that we had before is not too terrible either, but it’s very wise to shorten the search results to filter them through as much as you can, as much as it’s possible, you will save yourself time. And if you get like a hundred search results, that’s not good because you have to sip through them manually and that is not something you want to do. You would only do that if you absolutely had to. Better solution would be to go on the net and to see and to figure out more information in regard to the package so that you would be able to create better filters upon search.
So this is an example how you can combine Grep and Pipe along with Yum in order to improve your search results as well. So, as I was saying, we learned how to search for a package, we learned how to remove a package or install it. We’ve learned how to install one, how to reinstall one. I suppose you can just type in Remove and then you can type in install, but you can do both of those things with one command, which is far more efficient. Anyway, we will be continuing on and expanding upon this because we still need to mess around with the repositories from where the packages are being pulled and we will be adding a few. How we shall do this? Well, don’t worry about it, don’t worry about it, but don’t be frightened if you see a file which you need to edit, it’s not too complicated, you basically just copy paste. Also you can add repositories with an Rpm command and that command can also be used to find packages, to install packages and to modify the repositories as well. Later on. We will deal with these things in the follow up tutorials because there’s more than one way to install remove a software in Linux, using the default packet manager is probably the safest option, but there are plenty of others. So we will explore one more, if I’m not mistaken, in the terminal itself, because that is also the one that you should really know as well, which will be of great use to you primarily because not always can you find everything that you need in the repositories.
And I know that in the previous tutorial, I have stated that most of the time you can, but there’s always like 1020 percent of the time when you are not able to find exactly what you need, or somebody has compiled a custom package for you or something of a kind, and you need to know how to install those things. It is very important for you to do so. Sometimes for certain packages the updates won’t come out, and on their official websites you will usually be able to find newer versions of the software, so you can go directly to their sites where the software is.
But make sure that you trust these sites. For example, if you’re downloading something from Oracle, you can trust them that there is no malicious code in their software or something of a kind. But if you’re going, I don’t know, some website that nobody has ever heard about, that you don’t really feel comfortable with, or that you haven’t heard about it before, I definitely wouldn’t recommend doing it in the second way through the Rpm, from performing any installation through Rpm from there, rather instead just run code from verified places. As this will be a server machine and on a server machine you want to be really, really careful with those things to the point of extreme. In any case, I bid you farewell here and I hope to see you all in the follow up tutorial.
10. Rpm packet manager.
Welcome back, everybody, to this tutorial. Today, I will talk a little bit about the Rpm and the way you can install a package through the Rpm anyway, if you just type in Rpm as before help. There are a ton load of options here. More so that we can possibly be hoped to cover in the entire course. But don’t worry about it. You generally won’t be using a lot of those. You will be using only a couple. Of them, to erase packages, to delete them, to uninstall them, to install packages, and to query whether a certain package is already installed on your system, which are very nice features to have. Again, you would use Rpm to install something that you would download from the internet provided, of course, that it’s properly packaged for Red Hat which means that it needs to have an extension of Rpm and there are plenty of Linux distributions out there which actually use a Rpm extension like Fedora Centaus and Red Hat. Those three I can think of the bad perhaps there are some others, but I am uncertain of this anyway, you would download a package from the Internet and let me just show you.
I have actually downloaded three to test them out. I have downloaded Apache Rpm flash plugin and I have downloaded nmap. Nmap is basically a security tool for scanning your network for vulnerabilities. You can also use it to confirm that certain ports are open, that certain services are running, and so on and so forth. But there has been a lot of misuse. However, it is a fantastic networking tool. Anyway, let’s just go. Ahead and clear the screen. Now, do ll nmap. There we go. So we see it there that has a rpm extension, this red package that you can see there. And if I wanted to, for example, install it, well, perhaps I should see first whether it is installed. That wouldn’t be a bad idea, but it now, so just type in Nmap. So without the Rpm, just the name of the package itself. Without the extension, press Enter and you can see that the package nmap x 86 64 is indeed not installed at all. So let’s just go ahead and now type in I and let’s add a V for verbose output or can’t open map failed? No. Such file. Oh, yeah. So you need to type in Rpm, of course.At the end, press Enter and there you go. It says preparing packages and Nmap of that. And that version is now here and on our systems. To confirm that it is installed. Just do query Nmap without the Rpm again. And it says there you go. It lists it there as installed. It is up and running on your system. Suppose we wanted to delete a package. To completely remove it from our system, we would simply use Rpm, space key and map. And there you go. Press Enter. It is now removed. To confirm that it is removed, you can just query it again and you can see that the package is indeed not installed. So it’s a very nice feature we have there. So query, erase and Install can just run a confirmation check. This is a bit of a good example of grab. So let’s type in Help space pipe grep and we’re now going to use quotation marks because we’re going to want to use one of the special characters. So the dash and what shall we query for?
Let’s do the erase. Excellent. There we go. So we’ve used an escape character as before and use and then e under the quotation marks as well. Anyway it says E erase and then a package erases or uninstalls the package. There are some other variants but e will in fact erase the package that you have selected. Anyway, if you wanted to know where I have downloaded it. Look, I have just went to the Nmap. org website and I have found the let’s just do a bit of a zoom in. I have found the Rpm package here for 64 bit Linux distribution. Now as a system administrator you most likely will at some point of time use Nmap. I can assure you of that as it is a high quality tool for scanning and probing your network and figuring out where is what, what is functional, what is not, what ports are open and so on. But that’s not the point here. That’s not the objective of this particular tutorial here. I just want to show you that you can actually go onto the net and download a package. Now, a word of caution or a word of warning, take it as you wish. Be very careful in terms of your sources. Be very careful. Where are you downloading the Rpm packages from?
Make sure that the sources are in good standing in terms of reputation on the net and download from verified sources such as Nmap. org. Or you can even go to Adobe Flash Player here, let me just show you. We can type in Adobe Rpm. So if I go to the Adobe website I know that they’re legit. I know that they are not going to have, I don’t know any viruses or anything of a kind in their software. But you see we also have these sort of websites and I don’t know, I’m not familiar with this one. I think I have downloaded something for my virtual machines from this one but I definitely wouldn’t download something for my main machine. So I’m just looking for the website here whereas on this one they actually explain how to pull it from the repositories. Let’s just say Adobe Flash and let’s go to their website immediately. Should have done that straight away.
So Adobe Flash player download. Anyway, this is just another example of me downloading something from a website somewhere. It says select a version to download and you can definitely select the Rpm for other linux, it says here, for other Linux, but you can just okay, there is even a Yum package. But for this particular tutorial we are downloading the Rpm for other Linux and you can download it and install it in pretty much the same way that we have installed Nmap. Very simple with Rpm command and with arguments I for install, Q for query and e for erase. Feel free to add V into all of that in order to get the verbose output and the most information out of it. Anyway, this is a bit of a short tutorial on how to use Rpm. We generally won’t be using it that much, but it’s also one of the ways to install software on Linux. The third way would be to actually compile it from the source. However, that is not frequently done, that frequently done as for example, you would use Yum or Rpm. Anyway, I bid you all farewell here and I hope, since I sincerely hope to see you in the followup tutorial.
Interesting posts
The Growing Demand for IT Certifications in the Fintech Industry
The fintech industry is experiencing an unprecedented boom, driven by the relentless pace of technological innovation and the increasing integration of financial services with digital platforms. As the lines between finance and technology blur, the need for highly skilled professionals who can navigate both worlds is greater than ever. One of the most effective ways… Read More »
CompTIA Security+ vs. CEH: Entry-Level Cybersecurity Certifications Compared
In today’s digital world, cybersecurity is no longer just a technical concern; it’s a critical business priority. With cyber threats evolving rapidly, organizations of all sizes are seeking skilled professionals to protect their digital assets. For those looking to break into the cybersecurity field, earning a certification is a great way to validate your skills… Read More »
The Evolving Role of ITIL: What’s New in ITIL 4 Managing Professional Transition Exam?
If you’ve been in the IT service management (ITSM) world for a while, you’ve probably heard of ITIL – the framework that’s been guiding IT professionals in delivering high-quality services for decades. The Information Technology Infrastructure Library (ITIL) has evolved significantly over the years, and its latest iteration, ITIL 4, marks a substantial shift in… Read More »
SASE and Zero Trust: How New Security Architectures are Shaping Cisco’s CyberOps Certification
As cybersecurity threats become increasingly sophisticated and pervasive, traditional security models are proving inadequate for today’s complex digital environments. To address these challenges, modern security frameworks such as SASE (Secure Access Service Edge) and Zero Trust are revolutionizing how organizations protect their networks and data. Recognizing the shift towards these advanced security architectures, Cisco has… Read More »
CompTIA’s CASP+ (CAS-004) Gets Tougher: What’s New in Advanced Security Practitioner Certification?
The cybersecurity landscape is constantly evolving, and with it, the certifications that validate the expertise of security professionals must adapt to address new challenges and technologies. CompTIA’s CASP+ (CompTIA Advanced Security Practitioner) certification has long been a hallmark of advanced knowledge in cybersecurity, distinguishing those who are capable of designing, implementing, and managing enterprise-level security… Read More »
Azure DevOps Engineer Expert Certification: What’s Changed in the New AZ-400 Exam Blueprint?
The cloud landscape is evolving at a breakneck pace, and with it, the certifications that validate an IT professional’s skills. One such certification is the Microsoft Certified: DevOps Engineer Expert, which is validated through the AZ-400 exam. This exam has undergone significant changes to reflect the latest trends, tools, and methodologies in the DevOps world.… Read More »