How Do You Get a Script with Yum Commands That Rely on a Public Website to Work when you have No Access to the Internet?

Problem scenario
You have a Bash script that cannot be modified that runs yum commands.  The script runs on a RedHat distribution of Linux and uses URLs with SSL (e.g., https://continualintegration.com).  The script expects a yum repository to be set up at this URL.  This script must run without access to the Internet due to enterprise security policies.  What do you do if you are behind enough security to not need SSL to be set up properly (given that you have no Internet access) and need to get the script to work immediately?

Software Firewall and Anti-Virus Program

Looking for a downloadable anti-virus or anti-spyware solution on Amazon?  You will not find this on Amazon: The latest Lavasoft Ad-Aware Total Security is an all-in-one solution for Windows computers.  Ad-Aware Total Security has a great OS firewall and strong anti-spyware capabilities. Its virus database and scanning technology provides great all-around protection.  To learn more about this under-rated security solution for Windows computers or to buy it, click on this link.

How Do You Solve The “No route to host” Error When You Try To Use The wget Command?

Problem scenario
You can ping a web server, but you cannot use the “wget https://www.continualintegration.com” command (with no quotes and where www.continualintegration.com is the URL or IP address of the web server).  You get the error result “No route to host.”  How do you use wget to retrieve the files on the web server?

Solution
Try one of these four diagnostic methods to isolate the problem:

  1. Verify the firewall is not blocking web requests on the Apache server. 

How Can Puppet’s Logging Stay With a Manifest That Has a Long Duration On A Windows Server?

Problem scenario:  Some manifests kick off a non-Puppet script that has a long duration.  By default the manifest will time out after 300 seconds.  That means the manifest will not run properly if it cannot complete in five minutes.  How do you run long-duration manifests?

Solution (Part 1 of 2):  Use the timeout => directive.  For example in the Puppet manifest, have a stanza like this:

How Do You Get The sar Utility to Work On Ubuntu?

Problem scenario:  On some servers you try this command: “apt-get -y install sar”, but this command does not work.  On some servers with sar installed, you get an error when you run “sar”.  The error says “Cannot open /var/log/sysstat/sa25: No such file or directory.”

Background:  The sar utility comes from the acronym for system activity report.  It is useful in performance tuning situations.

Solution: If you type “man sar” and get a man page,

How Do You Print One Attribute (or Element) From The Results of a Built-in PowerShell Command?

Problem Scenario
You are writing a PowerShell script.  You want to extract one value from the results of a command.  You get a set of values all on one line.  It is difficult to parse just what you need. The output values for each attribute are separated by spaces.  Sometimes the output values are blank.  You want to reliably extract one property value from the command. You know that piping the output to an “sls” command will retrieve an entire row. 

In a Bash Script How Do You Assign a Variable a Value of a Complex Linux Expression?

Problem scenario:  You know how to assign variables in a Bash script. But how do you assign the output of a complex command such as this?

cat foo.txt | grep continual | grep integration | uniq

To push the output of some compound statement into a text file is simple.  Sometimes you want to redirect everything to a variable. How do you do this?

Solution: 

How Do You Configure Linux To Be Ready for Cloudera 5 (Hadoop)?

Two problem scenarios and solutions.

Problem scenario:  You installed Cloudera 5 (Hadoop) on CentOS 7.2 for the first time. You tried to start the Cloudera database service. But you get an error that it failed.

You run this: systemctl status cloudera-scm-server-db.service

The results include this fragment:  ”  … Failed to start LSB: Cloudera SCM Server’s Embedded DB.”

How do you start the Cloudera DB service?

How To Troubleshoot Mounting a File Share With The Error “mount: wrong fs type, bad option, bad superblock”?

Problem scenario:  You try to mount a file share with this command:
mount continualintegration.com:/export/path/to /mnt

You get this error:

” mount: wrong fs type, bad option, bad superblock on continualintegration.com:/export/path/to,
       missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount.<type> helper program)
       In some cases useful info is found in syslog – try dmesg | tail”

Solution:

#1 

How Do You See The Time Previous Commands Were Entered On A Linux Server?

Question:  How do you see the exact time when previous commands were entered on a Linux server when you use the “history” command?  

Background:  Linux by default logs the time and day when commands were issued.  (There is a limit to the number of previous commands that stay logged.)  The timestamps by default are not visible.

Solution:  For the session, until you log out,