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

Unable to Use tar to Decompress tar.bz2 File

I just setup a new server with a minimal installation of AlmaLinux 8. AlmaLinux is a variant of free Red Hat Enterprise Linux 8. It’s like a CentOS 8, but will have a full support until the end of RHEL 8 life cycle. This server is to serve as a new proxy for all VMs inside my home lab. I want to use tinyproxy which is need to be compiled from source as the RPM package is not available as of the time writing....

July 25, 2021 · 2 min · 406 words · kenno

Systemd List Failed Units and Services

This is a quick note to list failed services on systemd system. [root@zilla ~]# systemctl status ● zilla State: degraded Jobs: 0 queued Failed: 1 units Since: Fri 2020-09-04 02:20:47 AEST; 3 months 11 days ago CGroup: / ├─1 /usr/lib/systemd/systemd --system --deserialize 22 └─system.slice ├─httpd.service │ ├─21860 /usr/sbin/httpd -DFOREGROUND │ ├─21861 /usr/sbin/httpd -DFOREGROUND │ ├─21862 /usr/sbin/httpd -DFOREGROUND │ ├─21863 /usr/sbin/httpd -DFOREGROUND │ ├─21864 /usr/sbin/httpd -DFOREGROUND │ └─21865 /usr/sbin/httpd -DFOREGROUND ... [root@zilla ~]# systemctl list-units --failed UNIT LOAD ACTIVE SUB DESCRIPTION ● ipmi....

December 15, 2020 · 2 min · 233 words · kenno

Configure iSCSI Target on CentOS 8

I need to have an iSCSI storage to be used by my oVirt lab. The last time I had to create an iSCSI target was during the preparation of the RHCE 7 exam. Therefore, I think this is an opportunity to practice doing this again. First, install the required package. Then enable the target service, otherwise the target won’t work on the next reboot. [root@utility ~]# dnf install targetcli -y [root@utility ~]# systemctl enable target Run the targetcli command to create an iSCSI target/storage using the storage block (/dev/mapper/data_iscsi LVM volume)....

November 25, 2020 · 3 min · 615 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

SELinux Error ValueError: Port already Defined

Today, I want to run the httpd server on a custom port, 8002 on a CentOS 7 server. Of course, all my system has SELinux in enforcing mode. In order for the httpd to bind on port 8002, we need to add this port to the httpd_port_t port type list. First let’s confirm that port 8002 is not yet in the http_port_t list: [root@servera ~]# semanage port -l | grep ^http http_cache_port_t tcp 8080, 8118, 8123, 10001-10010 http_cache_port_t udp 3130 http_port_t tcp 80, 81, 443, 488, 8008, 8009, 8443, 9000 We know from the manual semanage-port(8), to add a port to an SELinux port type list, we run the following command:...

July 27, 2020 · 2 min · 359 words · kenno

How to Install Ansible on Centos 8

On most Linux distribution, Ansible can be installed either using python3-pip or ansible package. I’m going to show how to get Ansible installed using the second method on CentOS 8. First add the EPEL repository to the CentOS 8 server. # yum localinstall https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm Next, install ansible package: # yum install ansible Last metadata expiration check: 0:00:49 ago on Sun 10 Nov 2019 09:33:22 PM AEDT. Dependencies resolved. ======================================================================================================================= Package Arch Version Repository Size ======================================================================================================================= Installing: ansible noarch 2....

November 9, 2019 · 2 min · 233 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 Generate SELinux Policy Manual Page

It seems that by default, SELinux policy manpage is not available. Here’s how to make it available. First install selinux-policy-devel package Then generate the man page by running: # sepolicy manpage -a -p /usr/share/man/man8<br/> -a : all domains -p : path to store the manpage (by default it’s /tmp) /usr/share/man/man8 – section 8 of manpage is for system admin command Create or update manual page index caches # mandb Benefit...

August 26, 2018 · 1 min · 80 words · kenno

RHEL Recovering the Root Password

Early last year I started a blog post about the preparation for Red Hat Certified System Administrator (RHCSA) exam. My intention back then was to have more posts follow suit about the exam topics. Like many things in life, things don’t always go according to plan. That was the only post, but I passed the RHCSA exam. Today, I’m going to start another new post about the preparation for the Red Hat Certified System Engineer (RHCSE) exam....

August 12, 2018 · 2 min · 376 words · kenno