Posts Tagged: Linux

From a Single EC2 Instance to a 14-Node Multi-Cloud K3s Cluster: Networking, Firewalls, Self-Healing, and DevOps

Back when I first started this blog, everything ran on one tuned EC2 t1.micro instance sharing memory between Apache, PHP, and MySQL. Over the years that single VM grew into a 14-node multi-cloud Kubernetes (K3s) cluster running across Oracle Cloud Infrastructure and Google Cloud Platform Always Free tiers. Instead of relying on expensive managed services, every layer of networking, firewall filtering, ingress TLS, media storage, observability, and disaster recovery is built declaratively and maintained by closed-loop self-healing automation.

Isometric illustration of a resilient multi-cloud Kubernetes cluster connected over encrypted WireGuard tunnels and firewall perimeters
Multi-cloud K3s topology connected through an encrypted WireGuard mesh and zero-trust firewall policies.
Continue reading

Proxy using an SSH tunnel

Browse the web through your SSH server by turning it into a proxy server.
Proxy using an SSH tunnel
Continue reading

How to auto-start services on boot in CentOS / Red Hat / Oracle Linux?

To auto-start services in CentOS, Red Hat, or Oracle Linux, you can use the built-in chkconfig utility. It is located in the /sbin directory. If you are a regular user (non-root), /sbin may not be in your PATH, so you may have to use the full path to run the chkconfig utility.

centos

Continue reading

htop

htop

htop is an interactive text-mode system-monitor process viewer for GNU/Linux. It aims to be a better ‘top’. It shows a frequently updated list of the processes running on a computer, normally ordered by the amount of CPU usage. Unlike top, htop provides a full list of processes running, instead of the top resource-consuming processes. htop uses color and gives visual information about processor, swap and memory status.

Continue reading

Simplify your life with an SSH config file and ClusterSSH

Simplify your life with an SSH config file and ClusterSSH

If you’re anything like me, you probably log in and out of a half dozen remote servers on a daily basis. And if you’re even more like me, you have trouble remembering all of the various usernames, remote addresses and command line options for things like specifying a non-standard connection port or forwarding local ports to the remote machine. And if you sometimes have to do the same thing across many servers, this post is for you.

Continue reading

Apache: restrict access based on IP address to selected directories

apacheThe Apache web server lets you control access based on various conditions. For example, suppose you want to restrict access to http://subdomain.domain.com/ (mapped to the /var/www/subdomain directory) from the 192.168.1.0/24 network (within an intranet).

Apache provides access control based on client hostname, IP address, or other characteristics of the client request using mod_authz_core in Apache 2.4 (or mod_authz_host / mod_access in legacy Apache 2.2).

Continue reading

How to solve “Falling back to the standard locale” in Ubuntu

ubuntuSometimes you may get an error like this:

perl: warning: Setting locale failed.

perl: warning: Please check that your locale settings:

LANGUAGE = (unset),

LC_ALL = (unset),

LC_PAPER = “pt_BR.UTF-8”,

LC_ADDRESS = “pt_BR.UTF-8”,

LC_MONETARY = “pt_BR.UTF-8”,

LC_NUMERIC = “pt_BR.UTF-8”,

LC_TELEPHONE = “pt_BR.UTF-8”,

LC_IDENTIFICATION = “pt_BR.UTF-8”,

LC_MEASUREMENT = “pt_BR.UTF-8”,

LC_TIME = “pt_BR.UTF-8”,

LC_NAME = “pt_BR.UTF-8”,

LANG = “en_US.UTF-8”

are supported and installed on your system.

perl: warning: Falling back to the standard locale (“C”).

Click Continue reading to see how to fix this!

Continue reading

How to use a different user and group for just one Virtual Host in Apache

apacheWith mpm-itk, a multi-processing module (MPM), you can run each VirtualHost with its own user ID and group ID. This is commonly used to secure shared hosting, since you don’t have to make every VirtualHost folder readable by the Apache user.

mpm-itk is based on the traditional prefork MPM, which means it’s non-threaded; in short, this means you can run non-thread-aware code (like many PHP extensions) without problems.

Continue reading

How to fix “Can’t locate Search/Xapian.pm in @INC”

perlError: Can’t locate Search/Xapian.pm in @INC (you may need to install the Search::Xapian module) (@INC contains: /path/to/something /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at (eval 143) line 2. BEGIN failed–compilation aborted at (eval 143) line 2.

To fix this on Ubuntu 14.04, just run:

sudo apt update && sudo apt install libsearch-xapian-perl

How to fix “Can’t locate Sort/Naturally.pm in @INC”

perlCan’t locate Sort/Naturally.pm in @INC (you may need to install the Sort::Naturally module) (@INC contains: /path/to/something /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at (eval 145) line 2.
BEGIN failed–compilation aborted at (eval 145) line 2.

To fix this on Ubuntu 14.04, just run:

sudo apt update && sudo apt install libsort-naturally-perl