My Tech Notes
-
Installing just security updates with yum
Install just the security patches, but not kernel or java patches yum update –security –exclude=kernel* –exclude=java*
-
Using GitHub with SSH Keys
Generate SSH Key on your system$ ssh-keygen -t ed25519 -C “your_email@example.com” View you new SSH Key$ ~/.ssh/id_ed25519.pub Open github, go to setting, SSH and GPG Keys, click add a new key,page contents of id_ed25519.pub into box.
-
Yum Security Only Update
To update your system with YUM but only install the security patches, use the following: # yum update-minimal —security
-
Splunk Notes
To configure the Splunk Forwarder from the command line. # splunk add forward-server 192.168.1.176:9997# splunk add monitor /var/log/messages# splunk restart# splunk list forward-server On a Linux box, you may need to add these ports to the firewall. # firewall-cmd –add-port 8000/tcp –permanent# firewall-cmd –add-port 9997/tcp –permanent# firewall-cmd –reload
-
Podman Command to Generate Service File
podman generate systemd [options] container|pod http://docs.podman.io/en/latest/markdown/podman-generate-systemd.1.html
-
Podman requested IP address X is not available in range
Check for a ‘Dangling file’ in /var/lib/cni/networks/podman
-
cat a file and remove comments and blank lines
$ cat file.txt | grep -v “#” | grep -v “^$”
-
Using the label_replace function in PromQL
do something like the following: Then put {{short_hostname}} in the legend field in Grafana
-
Removing old servers from Prometheus Database
Use a command similar to the following from a linux command line.
-
Installing multiple packages from a list
cat packages.txt | xargs sudo apt-get install -y
Got any book recommendations?