How Do You Set up a Send-Only (Postfix) Email Server on a Linux RHEL AWS Instance?

Problem scenario
You have a monitoring tool on a RedHat Enterprise Linux Linux server that needs to send out emails upon certain events happening. You want to install and configure an email server. You need to send outbound emails, but you do not need to receive inbound emails. How do you configure RHEL to be able to send out regular emails over the internet?

Solution
1.

 » Read more..

How Do You Find the Default Kubernetes Web UI Credentials?

Problem scenario
You try to go to the default Kubernetes web UI (the dashboard), but you are being prompted for a username and password.

Solution
From the server with kubectl, run this:
kubectl config view

 » Read more..

How Do You Install pip on an Ubuntu or Debian Server?

Problem scenario
You want to install pip to work with Python packages and Python features. How do you install this on an Ubuntu or Debian Linux server?

Solution
Run these commands:
sudo apt-get -y update
sudo apt-get -y install python-pip

 » Read more..

What Are The Kubernetes Concepts “pod label,” “label selector,” and “pod selector”?

Question
What is the difference between these three two-word terms “pod label,” “label selector,” and “pod selector”?

Answer
This answer provides details on what these are and provides some information on how they are different.

pod label: It is an inherent attribute of the pod. It can be changed via a command like this: kubectl label pod new-podlabel version=5.5 These statements were based on Assistanz.com.

 » Read more..

How Do You Get the mysql Command to Work from an Ubuntu Linux Command Line?

Problem scenario
The mysql command does not work from Ubuntu. You try to run a “mysql” command but you get “command not found.” What do you do to install a mysql CLI utility?

Solution
Run one of the following:

sudo apt -y install mysql-client-core-5.7
sudo apt -y install mariadb-client-core-10.1

 » Read more..

What Do You Do when Cassandra Stalls on “Initializing IndexInfo”?

Problem scenario
When you start Cassandra you see a message such as this:

INFO [main] 2018-02-03 08:45:55,257 ColumnFamilyStore.java:389 – Initializing system.IndexInfo

What should you do?

Possible Solution #1
Try rebooting the server. This could help the problem.

Possible Solution #2
This next one is merely a workaround. It is not a best practice.

 » Read more..

How Do You Use Terraform to Create a Server in GCP?

Problem scenario
You want to use infrastructure as a code with Terraform and GCP. How do you use a .tf file to create a virtual machine in Google Cloud Platform?

Solution
Prerequisite

This assumes you have installed Terraform. If you need assistance with this, see this posting.

Procedures

1. Obtain the account.json file for your GCP account.

 » Read more..

How Do You Troubleshoot Error Messages in a Bash Script?

Problem scenario
You run a shell or bash script but you receive an error message such as one of the following:

$’\r’: command not found
line:55 syntax error: unexpected end of file

Solution
Did you download the file from the internet directly to the Unix system? The root cause could be that there are invisible characters in the file.

If you can copy the content of the text into the Linux machine and have it run as a script,

 » Read more..

How Do You Delete VM Instances from GCP That Pertain to GKE?

Problem Scenario
You have some GKE standard clusters that you want deleted. You try to delete them, but they do not go away. What should you do?

Solution
Root cause: Kubernetes clusters are self-healing. They are acting as they were designed. Once the instance group is deleted, you will be able to delete the instances via the web UI or via Google’s Cloud Shell.

 » Read more..

Why Would a MongoDB Container Work on an Ubuntu Host but Not a SUSE Host?

Problem scenario
You have two Linux servers in AWS, and each one has the same flavor (i.e., same amount of RAM and same number of processors). One is Ubuntu and another is SUSE. These commands will create working containers in Ubuntu:

docker run –name name1-mongo -d mongo
docker run –name name2-mongo -d mongo:2

This command will not create a working container in SUSE:

docker run –name name2-mongo -d mongo:2

The container that is created will never start.

 » Read more..