How Do You Use the screen Program in Linux?

Problem scenario
You would rather not create duplicate terminal windows in your Linux desktop or with PuTTy in Windows.  This may be an enforced security policy rather than a preference.  Some Linux systems only allow one log on session.  Perhaps you want the systems administrator to use the “who” or “w” command to see which users are logged in without seeing more than one session for your user.

How do you use the screen command to have different terminals simultaneously with the requirements above?

How Do You Trace the Route of a Network Path from One Server to an IP address elsewhere on the Network?

Problem scenario
You want to see the path that network traffic takes from one server to another network endpoint.  How do you find the intermediate path from the server your are on to a reachable IP address?

Solution
Use a tracing utility.  If your server is running Windows, use tracert.  Here is an example of how to use it:  tracert 8.8.8.8

If your server is running Linux,

How Do You Install MongoDB on a Debian/Ubuntu Linux Server?

Problem scenario
You want to install MongoDB on an Ubuntu/Debian Linux server.  How do you do this?

Solution
1.  If you know your distribution of Linux, go to step #2.  Otherwise try this command:  cat /etc/*-release

2.  Do one of the following that corresponds to your distribution of Linux:

On Debian:  sudo apt-get -y install mongodb mongodb-server

On Ubuntu 16.x or Ubuntu 17.x run these two commands (that may span three lines):

curl http://repo.mongodb.org/apt/ubuntu/dists/xenial/mongodb-org/3.6/multiverse/binary-amd64/mongodb-org-server_3.6.4_amd64.deb >

How Do You Install Groovy on Centos 7.X?

Problem scenario
You want to install Groovy on CentOS 7.x but no yum repositories are configured for directly installing it.  What should you do?

Solution
Run these commands:

sudo yum -y install ant ant-junit antlr-tool apache-commons-cli apache-commons-logging apache-ivy bsf jansi jline junit objectweb-asm tomcat-jsp-2.2-api tomcat-servlet-3.0-api xstream

curl http://rpmfind.net/linux/centos/7.4.1708/os/x86_64/Packages/groovy-1.8.9-7.el7.noarch.rpm > /tmp/groovy-1.8.9-7.el7.noarch.rpm

sudo rpm -i /tmp/groovy-1.8.9-7.el7.noarch.rpm

How Do You Create a Dockerfile and Build a Docker Image?

Problem scenario
You know how to use Docker containers.  You know how to use Docker images if they are already built.  Now you want to use a Dockerfile to understand how to build images.  How do you use Dockerfile and how do you create your own image?

Solution

Prerequisites
This assumes you have installed Docker on your Linux server.  If you have not,

How Do You Leverage Ansible to Deploy Salt Minion to an Ansible Managed Node?

Problem scenario
You have two configuration management servers: one is an Ansible control server and another is a Salt Master server.  You want Ansible to deploy Salt Minion to the managed nodes.  You want the managed nodes of Ansible to receive configurations from the Salt Master server.  This way one team can use SaltStack and another team can use Ansible.  How do you do this?

Solution

Prerequisites
This assumes you have deployed Salt Master and Ansible

How Do You Get Ansible Playbooks to Create Directories on Managed Nodes?

Problem scenario
You want Ansible to create directories on managed nodes.  How do you write a playbook to do this?

Solution
Prerequisites

This assumes that you have installed and configured Ansible.  If you do not know how to deploy Ansible, see this posting if you are using a Red Hat derivative.  If you are using Linux SUSE,

How Do You Find the Size of an RPM Package before You Install It?

Problem scenario
You want to find out how much disk space you will consume before you install a given yum or RPM package.  You want to list available packages and their size based on a near match of a name.  What is the Linux (e.g., yum) command to find size of the package before you actually install it?

Solution

Prerequisites
This assumes that you have installed yum-utils. 

How Do You Install npm and Node.Js on Any Distribution of Linux?

Problem scenario
You have Linux servers of different distributions (including Debian/Ubuntu, Red Hat derivatives such as CentOS, RHEL, or Fedora, and Linux SUSE).  You want to install npm and Node.js on them.  What do you do?

Solution
Prerequisites
i.  You need a server with at least 1 GB of RAM.  To add virtual memory, see this posting