Featured

It’s Under Control!

Data Sources: CDC, WHO, ECDC, NHC, JHU CSSE, DXY & QQ.

January 22, 2020: “We have it totally under control. It’s one person coming in from China. It’s going to be just fine.”

Deaths: 0

September 21, 2020: “It affects elderly people. Elderly people with heart problems and other problems. If they have other problems, that’s what it really affects. That’s it. You know, in some states, thousands of people, nobody young. Below the age of 18, like, nobody. They have a strong immune system, who knows. You look — take your hat off to the young, because they have a hell of an immune system. But it affects virtually nobody. It’s an amazing thing.”

Deaths: 203,180  (CDC, 26 Sep 2020)

9/11 + 19

It’s been 6,940 days since I watched the Pentagon burning through the office window – two wars and billions of “borrowed” dollars gone down the rabbit hole – Al Qaeda, Taliban, Iraq, Afghanistan, Libya, Arab Spring, NSA, ISIS, Syria, Iran.  Now we are in the midst of the worst Pandemic the world has seen since 1918.  And the USA is awash in cultural and political hate and discontent!

But not to worry!  It’s Under Control.

Windows Terminal and Friends

I recently installed the new Windows Terminal (WT) application on the my laptop.  In addition to the everyday stuff one does on a laptop, it is the primary source for the “care and feeding” of our web sites.

Fortunately, Windows Subsystem for Linux (WSL) and Ubuntu 20.04 LTS were already up and running on the laptop.  So what better to use as a WT Testbed?

Once I convinced myself that WT did work as advertised, I began thinking about what I could actually do with the WT/WSL/Ubuntu stuff.  Took me a while but, as usual, the obvious finally struck me! I was currently using XAMPP as the test and development web server on my local network.  I could build a LAMP server to replace the existing XAMPP server.  The following summarizes the “Good, Bad and Ugly” of this task.

Apache Installation

The “L” was already up and running so the next order of business was to install the “A.”  A quick “sudo apt1 install apache2″ installed the Apache2 HTTP Server.  The default configuration was used with one notable addition.  In the /etc/apache2/sites-enabled/000-default.conf file, do the following2:

  1. Disable this: # DocumentRoot /var/www/html
  2. Replace it with this: DocumentRoot /mnt/c/wslserver/www/default
  3. Add this:
    <Directory /mnt/c/wslserver/www>
       Options Indexes FollowSymLinks
       AllowOverride All
       Require all granted
    </Directory>

The server’s data files will then reside on the Windows C:\wslserver directory, thus making them visible to both the WSL and Windows 10 environments.  There is no special meaning to the “wslserver” directory name.  Whatever name floats your particular boat will do.

Thee were no major issues with the Apache2 installation.  I did the install, made the configuration changes noted above, entered “service apache2 start” did a “ps ax” and there it was.

MySql Installation

The next chore was the “M” install.  It wasn’t quite as simple as the Apache2 install but after a few self-inflicted wounds, the MySql Server was up and running.  The big issue here was getting the dependencies to load.  I finally resorted to getting down in the dirt and using the Debian dpkg3 manager, which to my amazement installed all the dependent software packages with no complaints.  The “service mysql start” did indeed start the MySql Server, so on to the next step.

PHP Installation

Not much to say about the “P.”  The PHP install was uneventful.  Here’s a sample of the output from the phpinfo function.

The Final Test – Part 1

We needed an application that would test the combination of Apache2, MySql and PHP.  PhpMyAdminsatisfied this requirement and also gave us a robust tool for database administration.  Once it was installed, we entered “http://localhost/phpadmin” in in browser address field and got the “Hmm. We’re having trouble finding that site.” response.  After recovering from the initial shock, this turned out to be a firewall issue.  For the Win 10 Pivate Network Firewall we needed to block incoming packets to XAMPP and formulate new rules that allowed incoming packets to WSL for ports 80 and 443.  Once that was done, everything worked as advertised.

he Final Test – Part 2

The second part of final testing was to move an existing web site from XAMPP to the new LAMP server and ensure that the site was still functional.  Using the Win 10 File explorer we did a copy/paste of the C:\xampp\htdocs\tools directory content to the c:\wslserver\www\default\tools directory.  We then accessed the site from local host and another PC on the local network. All went as expected.

The Final Touch

At present, the WSL/Ubuntu 20.04 administration is via command line only – no fancy point and click graphical stuff.  But not to worry, we do have a solution..Webmin.  We installed it and now have a web-based point & click interface for administering this stuff.


Notes:

  1. The majority of software package installations were done using the Ubuntu apt command line interface.
  2. Search the web for “wsl DocumentRoot /mnt/c/” for more on this subject.
  3. The Debian Dpkg software manager.

Adventures With WSL

Finally got around to installing Windows Subsystem for Linux (WSL) on my miniature desktop PC.

There are two Win 10 applications that must be “tweaked” for WSL to work as advertised: Command Prompt and PowerShell.  If your system has both Command Prompt and PowerShell installed, you must do the following to both.

  • Prior to installing WSL, open the Command/PowerShell menu by right clicking on the small icon in the upper left of the window.
  • Select the Properties entry.
  • In the Properties window, Select the Option Tab and uncheck the “Use legacy console” box.
  • Close this Command/PowerShell instance.
  • Open a new Command/PowerShell instance.
  • Open the Command/PowerShell menu.
  • Select the Properties entry.
  • In the Properties window, Select the Terminal Tab and uncheck both the “Use Separate Foreground” box and the “Use Separate Background” box.
  • Close this Command/PowerShell instance.

Once this is done, go to the Windows Store and download and install the WSL application.  There are a number of Linux distributions you can choose from.  Ubuntu is the default.

What this gives you is a standard Linux Terminal capability: a Linux kernel and a Bash Shell,i.e., a Linux command-line capability.  Sorry but no easy-peasy point and click stuff…maybe someday!!

Yesterday, Today and Tomorrow

While doing some maintenance on one of my websites, I found some stuff for the year 1987 in HR’s List that voters in this years Presidential Election should consider:

  • 1987, #37 – Blaming everybody else does not imply you are perfect.
  • 1987, #40 – Denouncing those who disagree with you is one way to cover your incompetence.

And I found one other that those who lust for power should remember:

  • 1987, #43 – Always remember that the “Man Who Would Be King” ended up losing his head. (courtesy R. Kipling)