How Do You Install Erlang on a Debian/Ubuntu Server?

Problem scenario
You want to install Erlang on a Debian or Ubuntu Server (e.g., Linux Mint or Kali Linux). What should you do?

Solution
Run this script with sudo (e.g., sudo bash /tmp/erlang.sh):

# Written by www.continualintegration.com
#/bin/bash

echo "This script can take 20 minutes to run"
apt -y update
apt -y install autoconf 
apt -y install libncurses5-dev 
apt -y install libncursesw5-dev
apt -y install gcc
apt -y install python3
apt -y install make
cd /bin/
git clone https://github.com/erlang/otp.git
cd otp
./otp_build autoconf
./configure
echo "This next portion may take 15 minutes"
date > /tmp/datetime.txt
make
make install
ln -s /usr/local/lib/erlang/bin/erl /usr/bin/erl
ln -s /usr/local/bin/erlc /usr/bin/erlc
ln -s /etc/alternatives/python3 /usr/bin/python
echo "Script run completed."
echo " "
echo "Many errors above (if there are any) may be ignorable"
echo "try the 'erl' command with no quotes to see if Erlang was installed"
echo 'If you get to a carrot prompt, use Ctrl-c, then type the "a" key and then press Enter.'

How Do You Create an EC-2 Instance Running RHEL 8.x in the AWS Web UI?

Problem scenario
You want to use the AWS Management Console to create a server. What do you do?

Solution
Prerequisite

This assumes you have already configured a .ppk file, and you know its password. If you need assistance, see this posting.

Procedures

  1. Log into the AWS management console (aws.amazon.com).
  2. Go to the EC2 Dashboard.
  3. Click "Launch instances"
  4. Find "Red Hat Enterprise Linux 8…" and choose "Select"
  5. Choose the various options, and then click "Next…". Often the default settings work -- except for the "Configure Security Group" setting. Find the appropriate Security Group and click "Review and Launch".
  6. Click "Launch". To the pop up, choose "Select a key pair" associated with the .pem file that created the .ppk file for which you know the password.
  7. Click "I acknowledge that I have access…", and click "Launch instances".

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

Problem scenario
You run a "yum-config-manager" on a Linux server, but you get an error about the command not being found. What should you do?

Possible solution
Run this: sudo yum -y install yum-utils

This should install it. If it doesn't, you may not have a "yum" distribution of Linux. You may be using SUSE, Debian or Ubuntu Linux. Run this command to find out what family of Linux you need: cat /etc/*-release

How Do You Install StackStorm?

Problem scenario
You want to try this automation tool called Stack Storm. How do you install it on Linux?

Solution
Prerequisites

  • We recommend a server with four CPUs. The load on a server with one CPU can be above 20 when trying to install it -- if it is possible to install it correctly on a server with one CPU.
  • Your Linux server must be either a Debian (e.g., Ubuntu, Kali Linux, Linux Mint) derivative or a Red Hat (e.g., RHEL, Fedora or CentOS) derivative. SUSE will not work with this solution below.
  • You must also have access to the internet from your Linux server.
  • You have a server that has not had StackStorm installed on it, and the installation of StackStorm has not been attempted on the server either.

Procedures
Run this command (but change "contintuser" to the username of your choice and change "Gre@tP@$$w0rd" to the password of your choice):

curl -sSL https://stackstorm.com/packages/install.sh | bash -s -- --user=contintuser --password='Gre@tP@$$w0rd'

How Do You Securely Connect an EC-2 Instance in a VPC to a DynamoDB?

Problem scenario
You have a server in AWS that is in a VPC. You want it to access an S3 bucket. How do you do this?

Solution
Use a VPC endpoint, specifically, use a Gateway Endpoint.

Source: https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints.html

How Do You Get conjure-up To Provide an Option for AWS, Azure or GCP when Deploying Kubernetes?

Problem scenario
You run "conjure-up kubernetes", but on the page "Where would you like to deploy?" you do not see an option for AWS, Azure, or GCP (Google Cloud Platform).

You see options for maas, openstack, and vsphere. But the public cloud options are missing. What should you do?

Solution
With newer versions of conjure-up, you need to first configure a public cloud. Run one of the following commands based on what public cloud you want to see as an option (and follow the interactive prompts):

juju add-credential aws
juju add-credential azure
juju add-credential google

How Do You Troubleshoot the Python3 Error “No such file or directory: ‘/usr/local/lib/python3.6/site-packages/” on RHEL 8.x?

One or more of the following problems are happening to you:

Problem scenario #1
You run python3 setup.py install on RHEL 8.x, but you get an error message like this:

running install
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 2] No such file or directory: '/usr/local/lib/python3.6/site-packages/test-easy-install-52191.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /usr/local/lib/python3.6/site-packages/

This directory does not currently exist.  Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).

Problem scenario #2
You try to "--install-dir" flag, but you get a message like this: error: option --install-dir not recognized

Problem scenario #3
You saw an error message about "error: bad install directory or PYTHONPATH", but you do not know what to do.

What should you do?

Solution

  1. First, identify which directory is attempted. sudo python3 setup.py install --prefix=/tmp
  2. Secondly, find where the site-packages (or most child, or most "sub", subdirectory) that was in the first error. Run a command like this (but replace "site-packages" with the most child subdirectory in the error): sudo find / -name site-packages -type d
  3. Figure out how to use the --prefix= option based on the findings of the above. We do not recommend using absolute paths to have logic to get the directory to be passed (for this specific purpose of using setup.py). We recommend using relative paths. Here is an example that could work:

sudo python3 setup.py install --prefix ../..

How Do You Install Puppet Master Version 6 on a RHEL Version 8.x Server?

Problem scenario
You want to install Puppet Master version 6.x on a RHEL version 8.x server. What do you do?

Solution
Run this script:

#!/bin/bash
# Written by continualintegration.com

yum -y update
rpm -ivh https://yum.puppetlabs.com/puppet6/puppet6-release-el-8.noarch.rpm
# rpm -ivh https://yum.puppetlabs.com/puppetlabs-release-el-8.noarch.rpm
# To install a legacy version of Puppet (3.x), comment out the first rpm stanza and uncomment out the second.

yum -y install puppetserver
ln -s /opt/puppetlabs/puppet/bin/puppet /usr/bin/puppet

How Do You Get Screws to Remain in Place when the Holes Are Too Big?

Problem scenario
The threads of the door frame hinges in your house have been stripped. The door latch is not secure to the frame now. Is there an affordable method to secure the door latch to the frame/wall?

Solution
Push a part of a cleanex or tissue paper into the hole. Use a skinny screwdriver or ice pick to jam the tissue paper into the hole. Now the screw should stay in the hole as it will hold on to the tissue paper after it is screwed in.