How Do You Get Lynx (in Linux) to Automatically Accept Cookies?

Problem scenario
You are using Lynx, and the prompt to accept cookies is tedious or disruptive to a non-interactive process you want to develop.  How do you get Lynx (running on Linux) to automatically accept cookies?

Answer
To configure Lynx to always accept cookies, do these steps:

1.  Find lynx.cfg with this command:  find / -name lynx.cfg

2.

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 Do You Use a Text-Based Web Browser on RedHat Linux?

Background:  Text-based browsers are fast.  Operations can be scriptable and repeatable.

Question:  How Do You Use a Text-Based Web Browser on RedHat Linux?

Prerequisites:  You have access to the Internet and root access.

Solution:  As root, enter these two commands (where “#” is the command prompt).

# yum-config-manager –enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional
# yum -y install lynx

To test it out,

Puppet IIS Module Troubleshooting

Update on 3/30/17:  The Puppet IIS module has been updated, and the problem below has been eliminated.

Problem scenario:  You want Puppet to install IIS.  You install the IIS module and find the README.md file has this Puppet DSL (as of 12/13/16):

class mywebsite {
  iis::manage_app_pool {‘my_application_pool’:
    enable_32_bit           =true,
    managed_runtime_version =’v4.0′,
  }
   iis::manage_site {‘www.mysite.com’:
    site_path     =’C:\inetpub\wwwroot\mysite’,

How Do You Install IIS In An Automated Way Without The Install-WindowsFeature Command?

Problem scenario:  You want to install IIS on Windows Server 2016 in an automated way.  But you are prevented from using Install-WindowsFeature or Add-WindowsFeature commands for business related reasons.
Normally something like this would work: 
Import-module servermanager; Add-WindowsFeature web-server, web-webserver -Verbose
What do you do?

Solution:  Use PowerShell with the System.Windows.Forms.SendKeys feature.

servermanager
start-sleep 2
[System.Windows.Forms.SendKeys]::SendWait{%”M”}
[System.Windows.Forms.SendKeys]::SendWait{%”M”}
start-sleep 1
[System.Windows.Forms.SendKeys]::SendWait(“{DOWN}”)
[System.Windows.Forms.SendKeys]::SendWait({~})
[System.Windows.Forms.SendKeys]::SendWait({nnn})
start-sleep 1
[System.Windows.Forms.SendKeys]::SendWait({w})
[System.Windows.Forms.SendKeys]::SendWait{~~}
start-sleep 1
[System.Windows.Forms.SendKeys]::SendWait(“%{n}”)
[System.Windows.Forms.SendKeys]::SendWait(“%{n}”)
[System.Windows.Forms.SendKeys]::SendWait(“%{n}”)
[System.Windows.Forms.SendKeys]::SendWait(“%{n}”)
[System.Windows.Forms.SendKeys]::SendWait(“%{i}”)

Understanding CloudBolt’s Errors

Problem Scenario
In CloudBolt (the Cloud Management Platform), you run a job to create a server.  The job stops progressing.  The GUI shows “Failed Order … provisioning nameOfServer” with a bar that has the left most 5% red and the rest of the 95% gray.  What do you do to create the server?

Answer
The server may be created; there may have been a small error when the job ran. 

How Do You Download Big Files with PowerShell?

Problem scenario
You want to download a very large file using PowerShell (from a file share on your network or URL on the Internet).  But the file is larger than the available RAM on your server.  How do you download a large file using Powershell?

Solution
Invoke-restmethod, Invoke-webrequest, curl and wget (even with the redirect “” command) all put the file being downloaded into memory. 

How to Troubleshoot PowerShell Downloading a File From the Internet

Problem scenario:  When trying to use PowerShell to download a file, get you this error ‘Error calling “DownloadFile” with “2” argument(s): “An Exception occurred during a WebClient request.”‘

Solution:  Make sure you have ample space on the disk and make sure the destination folder exists.  A typo in the path or if the folder not existing could cause this error.  Insufficient disk space could also cause the problem. 

How To Port Forward (redirect traffic destined for an IP address to a specific port)

Scenario:  On a Linux server, it can be useful to send traffic destined to a certain IP address to a different port on the server.  The listening service could be unique insofar as its port number has been designated.  The listening service could be a Docker container or a guest virtual machine.
Method:  iptables -t nat -A PREROUTING -i eth3 -p tcp –dport 80 -j DNAT –to 91.91.91.91:81
Explanation: 

How To Enter the Web UI of Gitlab CE without Setting Up Its Backend Email

Problem scenario:  When you bring up the web UI for GitLab CE (Community Edition) for the first time, you are prompted to enter a new password twice.  This password will be for the admin@example.com username.  If someone else set it up and failed to provide you with the username, and the back end email has not been configured, follow these directions.
Prerequisite:  You must have root access.