Posts Tagged Under: httpd

RHCE – rough notes

page 4:

systemctl –type=service

list all running services:

systemctl –list-units –type=service

list all services, running and not running:

systemctl –list-units –type=service

page 6:

lists the units that this unit depends on:

systemctl list-dependencies UNIT

shows what other services depends on the following unit:
systemctl list-dependencies UNIT –reverse

this forcefully disables a unit, so that it doesn’t start up at boot time or manually started. this
is so to prevent accidentally starting a unit. e.g. don’t accidentally start chronyd if already using ntpd
systemctl mask unit

Opposite of umask:

systemctl umask unit

page 26

the following command is best practice because it is persistent:

nmcli dev dis device

and don’t use (because it isn’t persistent):

nmcli connection down device

page 27:

The following set’s static ip address 192.0.5.20/24 as well as default gateway address of 192.0.5.254:

nmcli con mod static-eth0 ipv4.addresses “192.0.5.20/24 192.0.5.254”

note: you can omit the default gateway address.


RHCE – Setting up an Apache Web Server (httpd) on CentOS/RHEL 7

In this series of articles we’re going to set up an Apache Web Server and walkthrough the various Apache configurations and features. To start with this article will cover setting up a basic Apache server with the default out-of-the-box apache configurations.

You can follow along with this Apache Vagrant project. This vagrant project is made up of 2 CentOS7 boxes, one box will act as our webserver (webserver.local – 10.0.5.10) and the other will act as our client (box1.local – 10.0.5.11).

We will also ensure:

  1. firewalld is running and not blocking web server traffic
  2. SELinux is in targeted mode

But for this walkthrough we will initially keep them turned off:

[root@webserver ~]# systemctl stop firewalld
[root@webserver ~]# setenforce Permissive

Installing Apache Software

This is done using yum to install httpd:

[root@webserver ~]# yum install httpd

This

Take the RHCSA Quiz

This article is part of our RHCSA Study guide (click on the yellow tab on the far left). By the end of this article you should be able to answer the following questions:


What is the command to install Apache web server?

$ yum group install ‘Basic Web Server’

What is the commadn to install a few text based web browsers?

$ yum install elinks lynx

What is the command to start+enable the apache service?

$ systemctl start httpd
$ systemctl enable httpd

What is the command to open up the firewalls?

$ firewall-cmd –add-service=http
$ firewall-cmd –add-service=https
$ systemctl restart firewalld