How Do You Send a Multi-Line Email from the Command Prompt Using Mailx on a RHEL Server?

Problem scenario
You want to send more than one line of text as the body of an email. You want to use the command prompt of a RedHat Enterprise Linux server.

Solution
Prerequisites
You have installed mailx. If you need to do this, run this command: sudo yum -y install mailx

Procedures
1.

How Do You Troubleshoot The Error “yum-config-manager: command not found”?

Problem scenario
You are trying to use the “yum-config-manager” command. But you get this error:

“yum-config-manager: command not found”

How do you troubleshoot this error “-bash: yum-config-manager: command not found”?

Solution
Run this command: sudo yum -y install yum-utils

How Do You Find the Version of Java that is Installed on Your Windows Server?

Problem scenario
You want determine what version of Java is installed (if any). What do you do?

Solution
Open PowerShell and run this command:
(Get-WmiObject Win32_Product | Where {$_.Name -match “Java”}).Version

Alternative way without PowerShell:
1. Go to Control Panel -Uninstall a Program
2. See if Java is installed

How Should You Automate Linux Tasks with Python 2 vs Python 3?

Problem scenario
You have been given a task to automate tasks in Python. You were advised to never use “import os” in a previous position. You were told that this time speed is very important. What should you do?

Possible Solution #1
If you are doing basic file manipulations such as copying or moving files, or changing files’ permissions, you may want to looking into “import shutil”.

How Do You Get Oracle VirtualBox Guest Servers to Communicate with Each Other?

Problem scenario
You want to allow for TCP/IP connectivity between two VMs running Linux in Oracle VirtualBox. What do you do?

Solution
The network settings for the VMs should be as follows:

  • The “Attached to:” setting hould be “Host-only Adapter”
  • The “Adapter type:” setting should be “Paravirtualized Network”
  • The “Cable connected” option should be checked.

Optional Reading
How Do You Connect to a VM in Oracle VirtualBox from a Desktop?

How Do You Troubleshoot the nmap Result “Host seems down. If it is really up, but blocking our ping probes”?

Problem scenario
You use nmap and get this error from one server but not another:

Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 3.05 seconds

There seems to be no intermediate firewall rule stopping one server. What should you do?

Solution
The error message suggests using “-Pn”.

Which Log File Shows a Record of Web Traffic on an Nginx Web Server Running on a Linux?

Problem scenario
You configured Nginx on a Linux server. You want to see if there has been activity on the website (e.g., via a web browser). What log file, visible on the back-end, has records of web browsing activity?

Solution
It is often here: /var/log/nginx/access.log

For general Nginx purposes, the nginx.conf file specifies the location of the Nginx logs and the names of the log files themselves.

What is a Continuous Application?

Question
What is a Continuous Application?

Answer
Databricks website says this “[w]e define a continuous application as an end-to-end application that reacts to data in real-time.”

The proper term should probably be “continual application” as there may be discrete moments where no data is coming in. Many streams can be interrupted. In fact, Structured Streaming, an aspect of Spark that is used in Databricks’ “continuous applications” is based on microbatching (according to this site).

How Do You Use the AWS CLI to List Aurora Databases?

Problem scenario
You have an Amazon Aurora database in you AWS account. You want to see the status of this database with the AWS CLI. How do you list information about your Aurora databases?

Solution
Prerequisites

You must have the AWS CLI installed and configured with a user that has the ability to view Aurora databases (e.g., an administrator of your AWS account).