Transform SSL cert to inline format

We all know that the content of SSL CRT and KEY is a long string of characters broken by new line characters. If we want to use those SSL .crt and .key files with Kubernetes as a TLS secret, they required to be encoded as base64 and be in one-line. How to do this? Well, there are at least two ways. The first one is my favorite: $ base64 -w0 drone....

February 27, 2024 · 1 min · 125 words · kenno

Set Alacritty default dimensions TOML version

I have previously posted a similar topic on how to set the default dimension for Alacritty at launch. However, recently, Alacritty switched to TOML for its configuration. Here is the setting needs to be added to ~/.config/alacritty/alacritty.toml: [window.dimensions] columns = 133 lines = 40 Reference: https://blog.khmersite.net/p/set-alacritty-default-dimensions/

February 14, 2024 · 1 min · 46 words · kenno

How to restore a VM to its previous state XCP-ng

This evening while I was running the system update on one of the guest VMs running on my XCP-ng host, I accidentally rebooted the XCP-ng host. Why? Accident! The guest VM is very important, it’s running Xen Orchestra for this XCP-ng server. Semi-fortunately, I remember I had a snapshot for this VM. The challenge for me was, how could I restore the VM using that previous snapshot without Xen Orchestra....

January 4, 2024 · 2 min · 216 words · kenno

Using df command showing size in megabytes

Happy New Year 2024! This is going to be a very short post on how to use ‘df’ command to display the disk space usage in megabytes. To display the output in MB (megabytes), we can use the -m flag with the df command as the following: ❯ df -m Filesystem 1M-blocks Used Available Use% Mounted on devtmpfs 4 0 4 0% /dev tmpfs 852 0 852 0% /dev/shm tmpfs 341 6 336 2% /run /dev/mapper/almalinux-root 7578 2068 5511 28% / /dev/vda2 1014 280 735 28% /boot /dev/vda1 599 8 592 2% /boot/efi tmpfs 171 0 171 0% /run/user/1000 It’s simple, isn’t it?...

January 1, 2024 · 1 min · 103 words · kenno

FreeBSD 14 shared object libssl.so.111 not found

FreeBSD 14.0-RELEASE just got relesed at the end of last month, and I wanted to upgrade my NAS server running FreeBSD 13.x-RELEASE to 14.0. Using the installation instruction from [1], I was able to upgrade smoothly without any issues. Here are the steps: # freebsd-update fetch # freebsd-update install # freebsd-update upgrade -r 14.0-RELEASE # freebsd-update install Reboot: # reboot After rebooting, freebsd-update(8)[2] needs to be run again to install the new userland components:...

December 2, 2023 · 1 min · 188 words · kenno

Upgrading RHEL 8 to RHEL 9 on AWS

So I have an EC2 instance running RHEL 8.9 which was recently upgraded from RHEL 7.9. Now, I want to upgrade it all the way to RHEL 9. Here is the worklog which recording the steps I performed to achieve that goal. Step 0, perform a snapshot of the root volume of the instance, or create an AMI from it. In my case, this is just a test instance, so I skip taking the snapshot....

November 22, 2023 · 9 min · 1876 words · kenno

Install EPEL repository on RHEL 9

This evening I’m trying to enable EPEL repository on a RHEL 9 server, by following instruction is taken from How to install EPEL on RHEL and CentOS Stream article [1] by Red Hat Enable Sysadmin. Enable the CodeReady Linux Builder repository. $ sudo subscription-manager repos --enable \ codeready-builder-for-rhel-9-$(arch)-rpms Repository 'codeready-builder-for-rhel-9-x86_64-rpms' is enabled for this system. Install the EPEL RPM. $ sudo dnf install \ https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm ...snip... Installed: epel-release-9-7.el9.noarch Complete! Let’s try to install htop (available from the EPEL repo) to verify that everything is working: $ sudo dnf install htop -y ....

November 22, 2023 · 1 min · 99 words · kenno

Find least common multiple (lcm) with Julia

One joy of being parents when your children are in higher grade (say year 4 or 5) is that you’ll get a chance to review math lesson again in order to explain or help your children with their math problem. Nowadays, things are much easier for us parents due to unlimited of resources on the Internet. Earlier this evening, after spending time learning with my grade 4 child about Least Common Multiple (LCM) [1], I wanted to know the quickest way to verify the answer when computing of some numbers....

November 19, 2023 · 1 min · 134 words · kenno

No support for RHEL with high availability in-place upgrade

Well, if you know you know, otherwise, you could have wasted the whole evening trying to upgrade RHEL 7.9 with High Availability to RHEL 8.x, and failed! If you read this post, head to the link at [1] and you’d see that Red Hat does not support i-place upgrades or rolling-upgrades of cluster nodes from one major release of RHEL to another. Here is an extract from [1]: Red Hat does not support in-place upgrades or rolling-upgrades of cluster nodes from one major release of RHEL to another....

November 15, 2023 · 2 min · 377 words · kenno

Here Documents

So, what’s “Here Docs”? Well, if you don’t know what it is yet, then hopefully by the time you finish reading this post you’ll know what it is. Here docs or here documents is a special block code, of which we can use a form of I/O redirection to feed a command list to an interactive program, e.g. cat or the ex text editor according to [1]. Here is an example where a file basic-ingress....

November 10, 2023 · 2 min · 341 words · kenno