-
configure docker host with remote api on your linux machine
step 1: install docker engine. follow steps for your os from the docker documentation here – https://docs.docker.com/engine/install/ step 2: assuming that you’re using ubuntu, open the file docker.service located at the path /lib/systemd/system/docker.service step 3: search for the line which says ExecStart. by default it should have something like this ExecStart=/usr/bin/dockerd -H fd:// –containerd=/run/containerd/containerd.sock . […]
-
Swap file appears to have holes
error message – solution – you need to zero-fill the file you are using as swap steps to remediate this – first of all, remove the existing file with the holes. create the new swap file using the following command: check the file type being displayed now. it’s just a data file. change the permissions […]
-
unexport a variable in the shell
say you have assigned some value to a variable from the shell or a shell script using the export command and now you want to remove that variable, either programatically or manually.
-
list all versions of an available package using yum/dnf
dnf list <packagename> –showduplicates Example: [ec2-user@ip-172-31-39-90 ~]$ sudo dnf list kmod-kvdo –showduplicates Updating Subscription Management repositories. Unable to read consumer identity This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. Last metadata expiration check: 0:04:00 ago on Thu 03 Jun 2021 23:54:45 UTC. Available Packages kmod-kvdo.x86_64 6.2.0.293-50.el8 rhel-8-baseos-rhui-rpms […]
-
autofs mounts
autofs is a nice traditional way to mount the nfs directories on-demand on the nfs clients. was originally used to mount the user home directories to the clients to make them sort of roaming user profiles, but this doesnt stop us from using it to configure nfs mounts in other ways. using autofs saves unnecessary […]
-
selinux prevents mounted directories for serving content for httpd
error message (13)Permission denied: [client <ipaddress>:<port>] AH00035: access to /index.html denied (filesystem path ‘/opt/rh/httpd24/root/var/www/html/index.html’) because search permissions are missing on a component of the path fix run this on the host directory serving the content chcon –user system_u –type httpd_sys_content_t -Rv <dir> if you’ve worked with selinux before, you will realise that chcon is a temporary […]
-
setup and use nfs server on rhel 8
default nfs version in rhel 8 is version 4 install nfs-server dnf -y install nfs-server nfs-utils most probably the nfs-utils package is there on your server already. ensure nfs server starts up automatically systemctl enable –now nfs-server firewall stuff firewall-cmd –add-service=nfs –add-service=rpc-bind –add-servicemountd –permanent firewall-cmd –reload add directories to share on the nfs server file […]
-
awk tricks
some of the awk tricks listed here. might come in handy in any of my future shell scripts.
-
gpg2 – importing, exporting and revoking your keys
lets start by listing your keys gpg2 –list-keys
-
gpg2 – using the OpenPGP encryption and signing tool to encrypt and decrypt
most standard versions of linux distro’s come with the newer gpg2 command comes by default. the previous version of gpg is linked to the newer gpg2 packages. this means you may use the gpg and gpg2 command and it will always run the gpg2 command. an excerpt from a centos 7 below explains that