How Do You Deploy a LAMP Stack Application Powered by Kubernetes?

Problem scenario
You want to deploy your own LAMP stack with the power of Kubernetes.  You do not want to rely on official Docker Hub images for the underlying Docker containers.  How do you do this?

Solution
1.  Deploy Kubernetes to AWS.  If you need help to deploy Kubernetes to AWS, see this link.  If you need assistance installing kubectl on any type of Linux (CentOS/RHEL/Fedora,

How Do You Write a Chef Recipe to Deploy a Apache Web Server to Linux Servers?

Problem scenario
You have Linux servers that need Apache web server installed on them.  How do you write a Chef recipe to deploy Apache web server?

Solution
Prerequisite

This solution requires that the Chef server must have access to GitHub.  If you want to install Chef server, see this posting.  If you want to install Chef client, see this posting

How Do You Troubleshoot the Error “curl: (6) Could not resolve host: Unknown error”?

Problem scenario
You are using RedHat Enterprise Linux in AWS.  curl commands are not working.  DNS names are not resolving accurately.  For example, you try this command:  curl http://icanhazip.com

You get this error:
“curl: (6) Could not resolve host: icanhazip.com; Unknown error”
How do you fix this to get curl commands to work (and make sure that FQDNs resolve properly)?

Solution
Do these four things:

1. 

How Do You Prepopulate Text Fields in a Web Page with Values from a SQL Database?

Problem scenario
You have a web page from an .php file that includes HTML code.  There are fields visible in the web page to the user.  These fields accept text. You want the fields to not be blank; you want the fields to have suggested values of text in them. You want the data in the fields to be taken from the result of a SQL statement.  How do you prepopulate text fields in a LAPP web page with values from SQL statements?

How Do You Create a Certificate Signing Request (CSR) File and Set up an HTTPS Server for Basic Testing?

Problem scenarios
This is a two-in-one posting.  The same solution works for two different problem scenarios.

Problem scenario A
You want to create a certificate signing request permissions file (a csr.pem) to learn more about it.  You also want to try to use HTTPS as a test.  How do you do these things?

Problem scenario B
You want to implement a solution with TLS. 

How Do You Troubleshoot Nginx Not Being Removed from Ubuntu Linux Like It Should?

Problem scenario
You want to remove Nginx from an Ubuntu server.  You run this: sudo apt-get remove nginx

But you receive this error:

Reading package lists… Done
Building dependency tree
Reading state information… Done
You might want to run ‘apt-get -f install’ to correct these:
The following packages have unmet dependencies:
 nginx-dbg : Depends: nginx (= 1.12.1-1~xenial)
E: Unmet dependencies.

How Do You Deploy Nginx to a Docker Container on an AWS Linux Server?

Problem scenario
You installed Docker (on either Ubuntu or RedHat, see the links if you actually need help with that).  You do not want to create a Docker network on your server. How do you create a simple Docker container with Nginx without creating a user-defined network?

Solution
#1  Run these two commands:
docker pull nginx
docker run –name docker-nginx -p 80:80 nginx

# If the command hangs,

How Do You Generate a Load for Your Nginx or Apache Web Server?

Problem scenario
You set up a load balancing mechanism for your Nginx or Apache web server.  You want to test it and set up an artificial load of traffic.  You want to generate a significant amount of traffic to test the HTTP load balancing mechanism.  How do you do this?

Solution
Here are three scripts that can, by themselves, download a web page 100 times when they execute. 

How Do You Install Zabbix Server on RHEL 7.x Running in AWS?

Problem scenario
You have a RedHat Linux server with only 1 vCPU and 1 GB of RAM.  You want to install Zabbix Server to monitor other servers.  How do you deploy Zabbix server to an AWS instance of RHEL?

Solution
1. Install the LAMP stack components by running this command:
sudo yum -y install php httpd mariadb-server

2.  Install essential Zabbix components with these four commands:
sudo rpm –import http://repo.zabbix.com/RPM-GPG-KEY-ZABBIX

sudo rpm -Uv