All posts by Nathan Ruffing

Set Up Server with LAMP Stack on Ubuntu 20.04

Purchase VPS (Virtual Private Server)

I purchased a VPS from Hostwinds. There are various operating systems available. I used Ubuntu 20.04.

Login to the Server

I login using the MobaXterm SSH Client. The server is a remote computer to which you do not have physical access, so instead of plugging in a keyboard, mouse and screen, you establish a connection that gives you access to command prompt. SSH stands for secure shell, meaning the data you transfer between your computer and the server are encrypted.

Remote host is the IP address of your server (available in your Hostwinds account)

Username is “root”

password is whatever you set in Hostwinds

Useful Linux Commands

https://vitux.com/40-most-used-ubuntu-commands/

Update Server Operating System

Update Ubuntu (only required if there is a new version of Ubuntu). Be sure you can login as the non-root user before doing this as the new install will not allow root login.:

sudo do-release-upgrade

Update the advanced package tool:

sudo apt-get update (without the -get is newer, so I use it)

sudo apt update

Install the “L-A-M-P” Programs

L: Linux, already installed. I used 20.04.

A: Apache. The Apache2 default site appears immediately by typing server IP address in browser.

sudo apt install apache2

P: php

sudo apt install php php-mysql

sudo reboot

php -v

M: MySQL. Mariadb seems to be the most widely-used version of MySQL, so I installed mariadb instead of the standard MySQL. The XAMPP controller that establishes localhost for developing uses mariadb. Mariadb is a version of MySQL.

sudo apt install mariadb-server

(I don’t think this was necessary) Enable mysqli in /etc/php/7.2/apache2/php.ini by removing comment ‘;’

extension=mysqli    ; nate enabled this

also:

sudo phpenmod mysqli

You can test the php functionality by making index.php file in the /html/ directory and visiting the file in a browser:

<?phpphpinfo();

Create Non-Root Super-User, Make It Useful

Logging in as a non-root sudo user is safer. For example, some installations of Ubuntu default to external root login disabled, which means for a remote server you would be locked out if this were set.

sudo adduser new_username

usermod -a -G sudo new_username

Change the password for the current user as desired with:

passwd

Grant all privileges to the user with:

visudo

and add a line in the .ini file below the root user line:

new_username ALL=(ALL:ALL)ALL

This only allows the user to give itself privileges. The user does not have all read/write privileges like the root itself. Log in as the new user through SSH.

Now, make a new group:

sudo addgroup servermanager

add the new user to the group:

sudo adduser new_username servermanager

groups new_username

make the new group the owner of the required directories:

sudo chown -v -R :servermanager /var/www/

sudo chown -v -R :servermanager /etc/apache2/sites-available/

sudo chown -v -R :servermanager /etc/apache2/sites-enabled

then modify the directory permission to be written by the owner group:

sudo chmod -v -R g+w /var/www/

sudo chmod -v -R g+w /etc/apache2/sites-available

sudo chmod -v -R g+w /etc/apache2/sites-enabled

Useful “Permissions” Commands

Linux has a group and user structure to manage permissions and it is very useful to be able to view the current state:

List all users in the system:

cat etc/passwd

List all groups on the system:

cat etc/group or less etc/group

or

getent group

for all members of a single group:

getent group group_name

check ownership of a directory, for example:

ls -ld /var/www/

check ownership of a file:

ls -l /var/www/

Find all the files owned by a particular user (may take some time):

sudo find / -user username

You may have to change the active group for the session, possibly not:

newgrp servermanager

delete a group:

sudo groupdel group_name

delete a user (-r removes the user’s directory and mail spool):

sudo userdel -r username

search “linux octal permissions” to understand the numbering system.

Show all currently logged in users on a system:

w

Upload and Enable a Site

You can now login as the non-root user with sufficient permission to set up sites.

Upload any site directory to /var/www/html/your_site/

Go to /etc/apache2/sites-available/ and copy the default .conf file:

cp 000-default.conf your_site.conf

and modify with the following information:

ServerName your_site.com

ServerAlias www.your_site.com

ServerAdmin you@email.com

DocumentRoot /var/www/html/your_site

Use the following command to enable the site. What it actually does is copy the .conf file from /sites-available/ to /sites-enabled/:

sudo a2ensite your_site opposite is sudo a2dissite your_site

sudo systemctl reload apache2

to show some server information:

ps aux | grep apache2 | less

#q

to get out of this command.

MySQL

From the MySQL command prompt, which is “MariaDB” – a version of MySQL, same thing:

mysql -u root

MariaDB [(none)]> CREATE user 'new_username'@'localhost';

SELECT user, host, authentication_string FROM mysql.user;

DROP user 'new_username'@'localhost'

CREATE USER 'new_username'@'localhost' IDENTIFIED BY 'yourpassword';

CREATE database yourdatabasename;

GRANT SELECT, INSERT, UPDATE ON yourdatabasename.* TO 'new_username'@'localhost';

ALTER USER 'new_username'@'localhost' IDENTIFIED BY 'yournewpassword';

USE yourdatabasename;

Create the appropriate table(s) using the database code you keep with your website code.

CREATE table ...

To Do: Establish an SSH Connection with SSH Keys for the Non-Root User

Normally, you generate a public and private key on your local computer then copy the public key to the server along with some settings. Hostwinds has an option in server management to generate the key, download the private key, and install the public key on the server. Reboot required.

Time v3 and Daylight Savings Time

There is a certain a group of people who hates the daylight savings time change because it “arbitrarily disconnects us from nature.” One day we wake up and the sun is up. The next day we wake up at the “same time” and it is dark (or vice versa when we go off daylight savings time).

To my timekeeping-conscious friends out there, we have something in common: a dislike of brutish machine timekeeping. However, I believe what we really dislike is industrial timekeeping as a whole, not just daylight savings time. The daylight savings time change is like a tiny semiannual glitch in the matrix of industrial timekeeping that draws our attention just enough to feel something is wrong but passes before we really focus the energy to investigate the true enormity of the problem.

The problem is industrial time – since the 18th century – and the solution is Time v3.

Zero to Hero in Audio Tech Class

Price: $200 for a group of up to 4

Pretty much all audio tech revolves around the idea that a sound wave can be converted to an electrical signal and converted back to sound we hear. In just two hours, see and understand how this is done and be a smarter audio tech consumer for life.

You will be presented demonstrations of the following during the class:
  • sound waves
  • microphones
  • electric analog audio signals
  • digital audio signals
  • speakers
  • headphones

Besides learning the underlying concepts, you will learn the standard terminology and how it applies to everyday consumer products:

https://nathanruffing.com/audio-terminology/

Sign up today by calling or sending an email.

Car Radio Installation

I do not do car radio installation. I offer better for a comparable price. Take the Time v3 Zero to Hero in Audio Tech class and understand how straightforward a car radio is and how similar a car radio is to most other consumer audio tech.

Bluetooth to phone is one tech feature worth having in your vehicle. If you have basic tools like screwdrivers and if you can strip and connect two wires together, I recommend installing your own Bluetooth radio. The radio itself is not so expensive. Allowing a shop to install is often more costly than the radio itself, but you can do it yourself in just a few hours.

How Difficult Will This Be?

By far the most difficult part of installing a radio in your car is removing the old radio and the dash around it. Everybody hates removing radios and dashboards. Some vehicles are very easy, others are difficult. Fortunately you can know how difficult yours is without touching your car. Just search on YouTube “[ vehicle make / model ] + remove radio ]” and decide if you want to tackle the project.

Watching somebody remove the dash on video helps you greatly by showing which panels must be removed, which are held on by screws, where the screws are, and which panels are snap-fitted.

Disconnect the vehicle battery first, it prevents making a mistake and blowing a fuse or worse, causing an electrical problem.

Which Radio?

Go to Crutchfield.com, enter your vehicle’s make and model, and Crutchfield automatically shows you radios that fit your vehicle. There are two main standard sizes, single DIN and double DIN.

If your car fits a double DIN radio, I recommend a Kenwood DPX504BT. (or a Kenwood DPX304MBT, same as the first but without a CD player). If your car fits only single DIN, I recommend a Kenwood KDC-BT278U.

  • These radios are not touch screen, so you use buttons while driving, which is more responsive, more convenient, and safer while driving.
  • These radios have an external microphone, which is a million times better call quality for the user’s voice, as in very very good versus often unacceptable for a microphone built-in to the radio.
  • These radios offer a quality Bluetooth connection, including dual phone connection, meaning a passenger can “DJ” while the calls go to the driver’s phone, for example. Once set up, they connect automatically when the radio comes on.
How to Physically Mount the New Radio?

Order the radio on Crutchfield along with the installation kit for your vehicle, which is usually included when you put the radio in your shopping cart online. The installation kit fits your car’s dashboard to the standard aftermarket radio size.

How to Connect the Wires?

The Crutchfield installation kit includes a wire harness made to adapt your vehicle’s harness to the standard wire coloring scheme of aftermarket radios. You can use their harness and just connect the matching color wires or you can look on the provided harness which colors go to what and connect the new standard radio wire harness directly to the vehicle’s existing wires for a better connection with no extra work. You will have to connect one set of radio wires no matter what.

I recommend soldering with a butane-powered soldering iron. Gas powered is much hotter than electric and more heat means easier and faster when soldering.

Ebola, How Bad?

No sources, but I am unaware of any dispute in the following quick summary:

Really Bad

  • Ebola causes internal and even external bleeding.
    • (The book The Hot Zone describes the virus “liquefying organs,” but this description is widely regarded as overly-sensational to the point of being inaccurate).
  • Very high fatality rate and recovered patients experience ongoing symptoms.
  • Ebola is known to lay dormant within individual human organs for many years.
  • The latest outbreaks are believed to have originated from recovered patients from previous outbreaks in whom the virus lay dormant for years.
  • Scientists believe it is theoretically possible for an Ebola virus to become airborne.

“Not So Bad”

  • As yet, Ebola has been contagious only by bodily fluid contact so outbreaks are almost always contained to just a few hundred people.
  • Infected persons are contagious only when symptomatic and the symptoms are too extreme to ignore. Little or no asymptomatic spread.

The Time v3 Technology Company

Mission

The mission of Time v3 Technology is to promote better implementation of existing technology with brilliance at the basics because less is more in technology.

Electronics Repair

While most modern electronics malfunctions and damage are difficult or impossible to repair, the right tools and know-how make some repairs worthwhile.

  • Watch battery replacement.
  • Maintenance and repair of select mechanical watches.
  • Screen replacement for select smartphones.

Consumer Consulting

As retail moves online, especially for electronics, consumers often lack basic information required to make a purchase among the myriad options. This is especially true when ordering accessories, customizing, or replacing parts. Good accessories can transform tech from useless to – useful.

  • Answer common consumer questions in blog post format to maintain online presence and streamline support.
  • Online conferencing audio equipment consultation for businesses.
  • Home audio equipment consultation. For example, parents enabling effective online classes for their kids, to include music lessons.

https://nathanruffing.com/conferencing-studio-with-music-equipment/

Zero to Hero Tech Concepts Education

Everyday tech remains a mystery to most people. Most people are starting at zero. Even if schools taught tech effectively, much of the tech did not exist when today’s adult generations were in school. The underlying concepts are both unbelievably simple and usually apply to a wide range of consumer products even if the products look very different. The underlying concepts behind modern technology are life education worth investing in. Plus, as users we are so familiar with everyday tech, it can be fun to see how it works.

1. Audio technology.

Time v3 Zero to Hero in Audio Tech Class

2. The internet. What the internet is physically. Demonstrate how we are communicating electronically from physical buildings to underwater cables to server software to web browsers. OstranderNet!

(Currently a draft post, more than half complete)

3. “Ownership and renting” on the internet. How the internet can be owned or rented just like real estate and how ownership is important on the internet just like in real estate. Vimeo versus YouTube, Linux versus Windows, domains and websites versus social media.

https://nathanruffing.com/tag/to-blog/

4. Software selection. Software is made by people who are paid to control how consumers interact with computers and each other. Understanding underlying business motivations of software creators can help you select software that works for you.

https://nathanruffing.com/picking-your-friends-in-computer-software/

https://nathanruffing.com/software/

5. Home electric power. Electric power is a staple in the modern home. Simple demonstrations of what electric power is, where it comes from, and how it actually does things.

From Tesla versus Westinghouse/Edison to transformers to the AC waveform on an oscilloscope to watts and watt-hours to your circuit breaker box.

6. Data encryption. How can two computers send a message that can only be read by the two participants even if a hacker can see all of the traffic? OstranderNet.

7. Batteries. From lithium ion to lithium ion to lithium ion, performance measures and how batteries drive modern tech.

https://nathanruffing.com/smartphone/

8. Tech basics of digital cameras. Electrical engineers are often into photography because digital cameras nerdize art.

https://nathanruffing.com/zeroherocamera/

9. General tech consumer:

https://nathanruffing.com/feedback/

New Products

  • Time v3 Clock
  • Phone corral / “smartphones to home phone converter”.
  • Chess board integrated into computer
  • Chess board modification to Bluetooth
  • Gaming headset to standard audio adapter
  • Time v2 graphic clock
  • Game timer
Member

Member IEEE, Institute of Electrical and Electronics Engineers, Consumer Technology Society, Society on Social Implications of Technology

Member AWCI, American Watchmakers-Clockmakers Institute

Member NAWCC, National Association of Watch and Clock Collectors

  • Registered w state? per Jeff?

Snitch Lines

Citizens in Delaware Ohio and Columbus Ohio are encouraged to snitch on each other, even anonymously, for not covering their face or for large gatherings. Fact.

Delaware Ohio

To snitch in Delaware, go to this address:

https://delawarehealth.org/covid-19/

or call the hotline at 833-427-5364

Delaware is seeking mask snitching specifically:

Columbus Ohio

To snitch in Columbus, call 614-645-3111, or go to this address:

https://311.columbus.gov/311_main.aspx

and submit a service request.

Columbus is more concerned with gatherings, both indoors and outdoors, which are “violations”:

Gathering and mask snitching is currently the #10 service request in Columbus:

Watches and Clocks Career

Ohio is home to one of the main professional institutes:

https://www.awci.com/

NAWCC in Pennsylvania

Various schools around the country:

https://www.awci.com/rec-schools-2/

Gem City, Illinois

Paris Junior College, Texas

NAIOSWM WOSTEP program, Dallas

SAWTA Curriculum

Central Ohio

Local Retail Resource

Existing American Companies

Made in USA?

Not made in USA

Other

During the quartz crisis in Switzerland, Swatch bought Eta, who made 90% of the movements at the time. Swatch made movements nearly impossible to obtain for mechanical watches. Tag Haur and Breitling stood up to Swatch and bought movements from a new company, Saleta, who copied the movement from the old Eta.