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

Installing Htop on Oracle Linux 8

I want to install htop on Oracle Linux 8.7. How hard could it be? TL;DR; - it’s not hard, but it took me a little while to get htop installed. I’m not new to (most) Linux distros, but this is the first time I’m using Oracle Linux. So, let’s start by showing some basic information. [root@catbus ~]# cat /etc/os-release | grep -i pretty PRETTY_NAME="Oracle Linux Server 8.7" [root@catbus ~]# rpm -qi htop package htop is not installed [root@catbus ~]# dnf search htop Last metadata expiration check: 0:23:03 ago on Mon 06 Feb 2023 11:32:58 AM GMT....

February 6, 2023 · 3 min · 635 words · kenno

How to Install AWS CLI on RockyLinux

The awscli package is available from the EPEL repository, which is not enabled by default on RockyLinux. Enable the EPEL repo by installing epel-release pacakge. $ sudo dnf install epel-release Once the EPEL repo is successfully enabled, we can install awscli package. $ sudo dnf install awscli Enable and verify that the awscli is installed on the system. $ aws --version aws-cli/1.18.156 Python/3.6.8 Linux/4.18.0-425.10.1.el8_7.x86_64 botocore/1.18.15 As a bonus, here is how to configure the AWS credential....

January 31, 2023 · 1 min · 144 words · kenno

Check disk usage on root (/) partition excluding other partitions

While checking the root partition on my desktop today, I noticed that its usage is at 89% with just 6GiB free. For this reason, I wanted to find out what’s consuming most spaces and whether I can clean it up a bit. # df -h / Filesystem Size Used Avail Use% Mounted on /dev/mapper/fedora_watamem-root 56G 47G 6.3G 89% / The first two commands that come to my mind are du and ncdu....

September 22, 2022 · 3 min · 544 words · kenno

How to add additional remote git repository

Though it’s not very common in my daily work, I occasionally need to add additional remote Git repositories mainly for pushing. In fact, I did this about 4 to 5 times already, and thought that it’d be the last time. Today, I need do this again, and I forgot! Currently, I have the following remote repository set for ‘origin’: ❯ git remote -v origin git@git.homeserver.local:kenno/ansible.git (fetch) origin git@git.homeserver.local:kenno/ansible.git (push) I wanted to add https://kenno@gitea....

September 3, 2022 · 1 min · 193 words · kenno

How to reset Rhythmbox library

Rhythmbox stores its music database as an XML file located in ~/.local/share/rhythmbox/rhythmdb.xml. The easiest way to reset this database is to close the Rhythmbox program, and completely remove the rhythmdb.xml file. ➜ pkill rhythmbox ➜ rm ~/.local/share/rhythmbox/rhythmdb.xml ➜ rhythmbox & Reference: How does one clear the Rhythmbox music library database?

September 2, 2022 · 1 min · 50 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 upgrade FreeBSD from 13.0 to 13.1

I feel upgrading FreeBSD from 13.0 to 13.1 is so minor that it might not worth a blog post. The thing is, I just did this upgrade on one of my 2 nas servers a month ago, and now I forgot how to do this already. This post should be short, and I will include the reference(s) at the end if you’d like to learn more about this update process....

July 19, 2022 · 2 min · 307 words · kenno

How to Deploy Xen Orchestra Appliance on XCP-ng

This is a quick note on how I got the Xen Orchestra Appliance (XOA) on a new XCP-ng server. I know there are many guides out there, and in fact this is not my original content, but I want to capture what I did to get it working. Here are the steps I performed on my server in order to install XOA: [14:16 xcpng ~]# bash -c "$(curl -sS http://xoa.io/deploy)" Welcome to the XOA auto-deploy script!...

July 10, 2022 · 1 min · 211 words · kenno

Restoring Postgresql DB backup with different owner role

Like the title says, when restoring a Postgresql database onto a different server which happens to have a dfferent role owner, extra care is needed, otherwise similar error message below will come up: pg_restore: from TOC entry 217; 1259 17163 TABLE users_collections webdev1 pg_restore: error: could not execute query: ERROR: role "webdev1" does not exist Command was: ALTER TABLE public.users_collections OWNER TO webdev1; pg_restore: from TOC entry 218; 1259 17168 TABLE users_organizations webdev1 pg_restore: error: could not execute query: ERROR: role "webdev1" does not exist Command was: ALTER TABLE public....

July 3, 2022 · 1 min · 213 words · kenno