How to Run Redis in Podman Container

This is just a quick note on how to run Redis as a container using Podman on Ubuntu 22.04 (i.e. there will be no mention about SELinux.) Create a persistent volume for the Redis container I like storing all data/volume for containers under /srv/data. So I’ll create a sub-directory called redis-data under the same location. # mkdir -p /srv/data/redis-data Pull the Redis image # podman pull docker.io/redis Create and run the Redis container # podman run -d --name redis_server \ -v /srv/data/redis-data:/var/redis/data \ -p 6379:6379 redis Create systemd service for the Redis container I like creating a systemd service to enable/start the container....

February 22, 2023 · 1 min · 189 words · kenno

How to check cpu temp on Debian and Ubuntu

This is just a quick note for me to display CPU temperature on one of my fanless device which runs Debian. Install the required package lm-sensors Run the sensors command. Here is a sample output: root@pve:~# sensors coretemp-isa-0000 Adapter: ISA adapter Package id 0: +45.0°C (high = +105.0°C, crit = +105.0°C) Core 0: +37.0°C (high = +105.0°C, crit = +105.0°C) Core 1: +37.0°C (high = +105.0°C, crit = +105.0°C) Core 2: +37....

August 29, 2022 · 1 min · 105 words · kenno

How to Enable Persistent Logging for Systemd Journal

On RHEL 7/8, CentOS 7/8 and even Ubuntu (??), by default the journal log data is stored only in memory (/run/log/journal/ directory). There are 2 ways to retain the journal log messages. The first one is to set the variable Storage to persistent in the /etc/systemd/journald.conf. [Journal] Storage=persistent Then restart the systemd-journald service. Another solution is simpler and it looks like it’s the recommended way of achieving this. All we have to do is to create a directory, /var/log/journal (with correct ownership and permission), and journald will automatically store the log messages there....

August 29, 2020 · 2 min · 418 words · kenno

Getting rid of old initrd files on Ubuntu

Occasionally I see some of our Ubuntu machines having /boot partition filled up by the initrd files generated from old kernels which no longer were no longer installed on the machines. root@matht232:/boot# uname -a Linux matht232 5.3.0-40-generic #32~18.04.1-Ubuntu SMP Mon Feb 3 14:05:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux root@matht232:/boot# dpkg -l linux-image-\* | grep ^ii ii linux-image-5.3.0-40-generic 5.3.0-40.32~18.04.1 amd64 Signed kernel image generic ii linux-image-generic-hwe-18.04-edge 5.3.0.46.102 amd64 Generic Linux kernel image root@matht232:/boot# ls -1 /boot config-5....

April 21, 2020 · 2 min · 252 words · kenno

How to Label an XFS Filesystem

When I plugged in an external drive to my laptop, the drive was displayed as a string consits random letters and numbers. Here is an example: ❯❯❯ df -Th | grep sdb /dev/sdb1 xfs 481M 26M 456M 6% /run/media/kenno/5428b182-c92e-466b-89d2-b5b31b80ba48 Though the drive worked perfectly fine, I think it’s ugly, and I wanted to properly give it a good name. Let’s call it externo. But how to do this? You may not believe it, I forgot how to do this....

October 27, 2019 · 2 min · 304 words · kenno

Connect to a WPA2-Enterprise Connection Using nmcli

This is like a re-post of a question from askubuntu.com. To get to that post, I usually had to google it. So, I’ll post it here so I know where to look for when I need it again. At work, we use WPA2-Enterprise for wireless connection. To create a new connection on my laptop with wlp3s0 as Wifi device, follow this step: That’s it if you know how to do it....

August 27, 2018 · 1 min · 81 words · kenno

How to set system locale on Ubuntu 16.04

TLDR; just follow this guide. At home I run DHCP and DNS servers on Odroid U3, a system on a chip (SoC) computer. This allows me to have lots of control over my home network and most importantly – fun. I also run some web sites and Postgresql databases for testing purposes. The SoC computer runs Ubuntu 16.04 as the operating system. Recently, the Odroid U3 died. A coworker also has an SoC, an Odroid XU4....

December 31, 2017 · 2 min · 223 words · kenno

Install Grub on GPT

I came across a problem with grub being broken recently on a system running Ubuntu 16.04. This happened after the grub2 package got upgraded. This post will explain how I solved the problem. If you have similar issues, please do not just copy and paste the commands and execute on your machine. First read on, and try to understand it. Usually, when this happened in the past, we just need to chroot into the system and reinstall grub....

September 25, 2017 · 4 min · 690 words · kenno

របៀបប្តូរ​ time zone ពីខំម៉ាន​ឡាញ​ក្នុង​អ៊ូប៊ុនធូ

ថ្ងៃ​នេះ ខ្ញុំ​បានទទួល Odroid-C2 ដែល​បាន​ទិញ​ពី​ Hardkernel កាលពីអាទិត្យ​មុន។ OS ដែល​អាច​ដើរលើ​វាបាន ​ក្នុង​ពេលនេះ​​ មាន​តែ Ubuntu Mate 16.04 LTS ដែល​ជាបេតា នៅឡើយ។ Time zone ដែល​មាន​ស្រាប់ជាដើម​គឺ EST (American Eastern Standard Time)។​ ខ្ញុំ​ត្រូវការ AEST (Australian Eastern Standard Time) ព្រោះខ្ញុំ​នៅ​ស៊ីដនី។ នេះ​ជាខំម៉ាន​ដែល​អាចប្តូរ Time zone បាន ដោយ​វាយ ពី ធើរមិណល់។ មុន​ដំបូង ឆែក​មើលមុនសិន៖ odroid64:~# date Fri Mar 11 08:13:04 EST 2016 ប្រើខំមាន នេះ​ដើម្បី​ប្តូរ​ time zone៖ odroid64:~# dpkg-reconfigure tzdata ជ្រើសយក​ប្រទេស រួច​ទីក្រុង។​ នេះជាលទ្ធផល៖ Current default time zone: 'Australia/Sydney' Local time is now: Sat Mar 12 00:13:57 AEDT 2016....

March 11, 2016 · 1 min · 85 words · kenno

Docker with OverlayFS on Ubuntu 15.10

As of today, the default storage for Docker on (K)Ubuntu 15.10 is AUFS. I want to switch it to OverlayFS. Personally, I’m still new to Docker, but I did hear that OverlayFS is better than AUFS. You can read more about OverlayFS here. Anyway, the purpose of this post is how to switch OverlayFS and avoid head-scratching. On Ubuntu 15.10 (wily), one can start/stop services either using Upstart or systemd. Since I want to get more accustomed to using systemd, I’ve been trying to use it anywhere possible....

December 26, 2015 · 2 min · 366 words · kenno