So, if working with SQLinux is all about applying the right context, how do you find it?
Well, there's a couple of things that you can do.
If you apply a non-default configuration, the easiest way is to check the default configuration
and take the context setting from there and apply it to the non-default configuration.
You should get pretty far with that on the RHCSA exam.
Alternatively, you can use SEAlert, which I will show you more about later.
And there's also the man pages from SQLinuxPolicyDoc.
But do realize that these man pages contain a lot, really a lot of information.
And on the exam, you don't have time for it.
But I want to show you anyway.
And maybe we have a bonus SQLinux-related demo as well.
So, I am going to do a DNF install, SELinuxPolicyDoc.
And oh, that's a typo.
Well, we can fix that.
And is that okay?
Oh, no.
I'm getting all types of error messages.
And why do I get all types of error messages?
Well, status 404 for local host repo.
Oh, no.
I changed the Apache document route.
And because I changed the Apache document route, I don't have access to my repositories
anymore.
Hey, can we fix that?
Well, shall we give it a try?
I'm going to the web directory.
And in the web directory, I am going to ln minus s on var www.html.repo.
And then I am going to do what?
I'm going to do a systemctl restart httpd.
And ls minus l is showing what?
Well, it's showing that we have a repo pointing to var www.html.repo.
Now that's interesting because that's a symbolic link.
And what do we see in the symbolic link?
Well, look at that.
Isn't that nice?
We have httpd syscontent T. So, let's do a DNF clean all.
To make sure that we have nothing in cache that is going to be used.
And do this DNF install se-linux again.
And there it has found the package.
And it will install the package.
So symbolic links also need the appropriate context.
But as you can see, everything is all right here.
And now I can show you man minus k underscore se-linux.
And that is showing a lot.
Oh, boy.
How much?
Well, let's pipe it through wc minus l.
That's one of my favorite methods to find out how much.
Now we have 890 lines of output in total.
Oh, my goodness.
That's really a lot.
But man minus k underscore se-linux.
Pipe, grab, http is showing me different se-linux man pages,
including httpd se-linux.
I'm saved.
Httpd underscore se-linux.
Let's go read it.
Line by line, really?
This is screen 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18.
Do I need to go on?
I think you get the idea.
If this is what you need on the exam, it's not going to work.
On the exam, it's only going to work
if already you have an idea what you are going
to need for your solution.
These man pages are way too much information.
You don't need them.
Apply the rule about the default configuration.
Use se-alert in addition, and you should get there.
Avoid these man pages, please, because it's
too much information.
You will run out of time.