How Do You Enter the PostgreSQL Command Line from the Linux Command Prompt?

Problem scenario
You are using Debian or Ubuntu Linux and you want to enter the PostgreSQL command prompt. What do you do?

Solution
Run these commands:

sudo su postgres
psql

You are done. Optionally you can run these passwords if you want:
postgres=# create user jdoe with password ‘goodpassword’;
postgres=# create database foobar with OWNER=jdoe;

How Do You Disable the Knock Code Security Feature on an Android Tablet or Phone?

Problem scenario
You want to change the knock code itself or totally disable it on your Android tablet or phone. What do you do?

Solution
To remove the knock code:
Go to Settings -Display -Lock Screen -Select screen lock
Enter the knock code and click “next”.
Click on “None”.
You are done.

How Do You Install and Configure Chef Client on a Linux Server in AWS or Azure?

Updated 11/9/17

Problem scenario
In AWS or Azure you have Linux instances that you want to be configured to use a Chef Server.  How do you install Chef client and configure it to work with a Chef server?

Solution
These directions have been tested in Azure (with an Ubuntu 16.x server as either the Chef client node or the Chef server) and AWS (with a Red Hat Enterprise Linux 7.x server as the Chef client node or the Chef server).

What Are Some Common kubectl Commands?

Problem scenario
You want to know about some common kubectl commands. What should you do?

Solution
The below was taken from running “kubectl help”. Here are some kubectl commands:

Basic Commands (Beginner):
create Create a resource from a file or from stdin.
expose Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service
run Run a particular image on the cluster
set Set specific features on objects

Basic Commands (Intermediate):
explain Documentation of resources
get Display one or many resources
edit Edit a resource on the server
delete Delete resources by filenames, …

How Do You Change the Apache Web Server Default Directory for a Website’s Files?

Problem scenario
You updated the Directory section of apache2.conf. You changed the DocumentRoot stanza in apache2.conf too. But when you browse to the website, you are not getting to the files in the directory you changed it to. You are getting files from /var/www/html/. Apache has been installed on Debian Linux. What do you do?

Solution

  1. Find this file: 000-default.conf
  2. Back it up.