Apache Lab - InaFricke/SYS-255 GitHub Wiki
Setting Up Web01
| Required | Fill in |
|---|---|
| IP Address and Netmask | 10.0.5.4/24 |
| Gateway | 10.0.5.2 |
| DNS | 10.0.5.6 |
| Search Domain | ina.local |
| Hostname | web01-ina |
-
ifconfigto check for assigned IP -
nmtuito thenedit the connection -
locate the device name
-
use the tab key to navigate
-
change IPV4 configuration to manual
-
showthe configuration -
enter address including / notation subnet
10.0.5.4/24 -
enter the gateway (upstream)
10.0.5.2 -
enter DNS
10.0.5.6 -
enter domain controller
ina.local -
make sure there is an X next to automatically connect
-
select ok
-
set system hostname
web01-ina -
quit -
exit -
systemctl restart network
Named sudo user
-
useradd ina -
passwd ina -
usermod -aG wheel ina
Dissable Root login for SSH
-
enter sudo and PW
-
vi /etc/ssh/sshd_config -
press I to type
switch yes to no
-
delete the # to uncomment it
-
esc
-
: wq
w= writes it q= quits vi
-
run
sudo systemctl restart sshd -
systemctl restart sshd
AD SSH
-
ssh ina@web01-ina -
used my web01 password
Running Apache
-
sudo yum install httpd -
wait for it to say complete
-
Add ports 80/tcp & 443/tcp or HTTP and HTTPS defined services to your firewall permanently
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --zone=public --add-port=443/tcp --permanent
sudo firewall-cmd --reload
Helpfull link: https://docs.rackspace.com/docs/allow-web-traffic-in-a-firewalld-software-firewall
systemctl enable httpd
systemctl start httpd
https://www.layerstack.com/resources/tutorials/Installing-Apache-server-on-Linux-Cloud-Servers
- on WKS enter
web01-ina/into google
sudo -i
cd /etc/httpd/conf.d
rm welcome.conf
a. i to incert text
b. welcome to Ina's First Attempt
c. esc to exit incert
d. :wq to save and quit
PHP
yum install -y php
systemctl restart httpd
systemctl status httpd
from the HTML directory
vi index.php
-
ito insert -
enter the following
- on google enter web01-ina/index.php
Install realmd
-
dateto check they will merge well -
sudo yum install -y realmd samba samba-common oddjob oddjob-mkhomedir sssd
Join the domain
realm join [email protected] ina.local
realm list
- Test by checking if a domain-joined user can SSH into web01