Linux Assessment Research and Rehearsal - Hsanokklis/2023-2024-Tech-journal GitHub Wiki

What the heckerooney is happening and how are ya gonna do it?

  • web02 will be DESTROYED and replaced with blog02
  • You will need to configure a new server and install blogging or content management software on it.

What is blogging software?

  • Blogging software is designed for creating and managing blogs
  • Its primary purpose is to facilitate the creation of indiviudal blog posts
  • Blogging software is ideal for individuals, hobby bloggers, or small organizations who want to focus on regular, time-sensitive content updates.

What is Content management software?

  • CMS - used to organize and facilitate collaborative content creation (think of making a website on wordpress)
  • Offer a broad range of capabilities for managing content across various types of websites
  • CMS is used to build entire websites, online stores, or any content-heavy digital platform, including blogs. Its purpose is to manage a wide range of content beyond just blog posts, such as pages, images, videos, documents, and more.

The Play by Play!

Rehearsal tasks:

  • Practice/document installing blogging/content management software on web02

Keep in mind that that web02 will not be accessible so you will need to setup the host (on ad02) with an IP under .11

  • After joining AD domain, install HTTP server and blog software(with AD account)
  • demonstrate your working blog

Initial Set-up

  • Sign into the box with username root and pw Ch@mpl@1n!22
  • adduser hannelore
  • passwd hannelore
  • usermod -aG wheel hannelore

Setting up a server

This should be done on the NEW web server that is set up (evil evil evil)

  1. nmtui
  2. 10.0.5.20/24 ---> make sure you have CIDR
  3. hostname blog01-hannelore
  4. Gateway: 10.0.5.2
  5. DNS: 10.0.5.6

You might have to do a system reboot

IP configuration should be automatic


Add blog01-hannelore to DNS manager

Within the server manager in ad02

  1. hannelore.local
  2. new host
  3. blog01-hannelore
  4. IP address: 10.0.5.10
  5. Create a PTR record with it

Install Apache

  1. use sudo yum install httpd
  2. firewall-cmd --zone=public --add-port=80/tcp --permanent
  3. firewall-cmd --zone=public --add-port=443/tcp --permanent
    • add ports 80/tcp or http and https defined services to the firewall permanently
  4. firewall-cmd --reload
  5. systemctl enable --now httpd

Install PHP 7

Required for Wordpress and this specific version as well

  1. yum install -y yum-utils epel-release
  2. yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm
  3. yum-config-manager ––enable remi–php73
  4. yum install php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysql –y

MySQL

  1. yum install -y mariadb-server
  2. systemctl enable --now mariadb

Wordpress

  1. yum install -y wget unzip nano
  2. wget https://wordpress.org/latest.zip
  3. unzip latest.zip
  4. rm -r /var/www/html
  5. mv wordpress /var/www/html

Make MySQL Database

  1. mysql -u root

within the SQL prompt:

  • CREATE DATABASE ;
  • GRANT ALL ON .* to 'username'@localhost identified by 'apassword';
  • FLUSH PRIVILEGES;
  • exit;

End SQL

  1. =setenforce 0
  2. chown -R apache:apache /var/www/html
  3. cp /var/www/wp-config-sample.php /var/www/wp-config.php
  4. nano /var/www/html/wp-config.php

fill in SQL details (db name, user name, password)

systemctl restart httpd

browse to http://your_ip/ and set up wordpress!


Install realmd

  1. sudo yum install -y realmd samba samba-common oddjob oddjob-mkhomedir sssd

Join the domain

  1. realm join [email protected] hannelore.local
  2. realm list

Resources:

Apache lab ---> https://github.com/Hsanokklis/2023-2024-Tech-journal/wiki/Apache-Lab

Later who ha

image

cd /var/www/html && rm wp-config.php && cp wp-config-sample.php wp-config.php ????

⚠️ **GitHub.com Fallback** ⚠️