diff --git a/01-debian-networking.txt b/01-debian-networking.txt old mode 100644 new mode 100755 diff --git a/01-fedora-rhel-networking.txt b/01-fedora-rhel-networking.txt old mode 100644 new mode 100755 diff --git a/02-ssh-help.txt b/02-ssh-help.txt old mode 100644 new mode 100755 diff --git a/03-firewalld.txt b/03-firewalld.txt old mode 100644 new mode 100755 diff --git a/03-ufw.txt b/03-ufw.txt old mode 100644 new mode 100755 diff --git a/COPYING b/COPYING old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/bash_completion.txt b/bash_completion.txt old mode 100644 new mode 100755 diff --git a/bind9.txt b/bind9.txt old mode 100644 new mode 100755 diff --git a/clonezilla b/clonezilla old mode 100644 new mode 100755 diff --git a/debian-security-hardening.txt b/debian-security-hardening.txt old mode 100644 new mode 100755 diff --git a/disks-kvm.txt b/disks-kvm.txt old mode 100644 new mode 100755 diff --git a/disks-partitioning.xlsx b/disks-partitioning.xlsx old mode 100644 new mode 100755 index 90bbe3a..1952d5d Binary files a/disks-partitioning.xlsx and b/disks-partitioning.xlsx differ diff --git a/disks-xfs.txt b/disks-xfs.txt old mode 100644 new mode 100755 diff --git a/disks.txt b/disks.txt old mode 100644 new mode 100755 index acce90d..8da8acf --- a/disks.txt +++ b/disks.txt @@ -1,23 +1,21 @@ # https://linuxconfig.org/linux-lvm-logical-volume-manager # apt-get install lvm2 # sudo dnf install lvm2 # fdisk -l -# lsblk -# lsblk -fe7 +# lsblk # lsblk -fe7 # lsblk -o NAME,FSTYPE,LABEL,MOUNTPOINT,SIZE,MODEL # blkid -# parted -l -# parted /dev/sde u s p -# df -hT -# du -sh /home +# parted -l # parted /dev/sde u s p +# df -hT # df -TH +# du -sh /home # du -h /var | sort -hr | head -n10 # Check FREE SPACE # sfdisk --list-free /dev/vda # hwinfo --short --block # cat /proc/partitions # # Check SPEED # sudo hdparm -t --direct /dev/nvme0n1p1 # pvs, vgs, lvs, pvdisplay, vgdisplay, lvdisplay - +---------------------------------------------------------- # WIPE DESTROY DISK CONTENTS # shred -n 5 -vz /dev/sdb # scrub -p dod /dev/sdb umount /dev/vgiso/iso && umount /dev/vgvm/vm && umount /dev/vgbackups/backups dd if=/dev/zero of=/dev/sdb bs=512 count=1 - +---------------------------------------------------------- # PARTITION ON CMD LINE # cfdisk /dev/sdb fdisk /dev/sdb # then m, p, g, n, w, q @@ -28,7 +26,7 @@ Device Start End Sectors Size Type mkfs.ext4 -L VM /dev/sdb1 mkfs.ext4 -L ISO /dev/sdb2 mkfs.ext4 -L BACKUPS /dev/sdb3 - +---------------------------------------------------------- # CREATE LVM VOLUME(s) pvcreate /dev/sdb1 vgcreate vgvm /dev/sdb1 @@ -52,7 +50,7 @@ vi /etc/fstab /dev/vgbackups/backups /backups ext4 defaults 0 0 systemctl daemon-reload mount -a - +---------------------------------------------------------- # REMOVE LVM VOLUME # df -hT # vi /etc/fstab umount /dev/vgiso/iso && umount /dev/vgvm/vm && umount /dev/vgbackups/backups lvchange -an /dev/vgiso/iso && lvchange -an /dev/vgvm/vm && lvchange -an /dev/vgbackups/backups @@ -60,7 +58,7 @@ lvremove /dev/vgiso/iso && lvremove /dev/vgvm/vm && lvremove /dev/vgbackups/back lvscan vgremove vgiso && vgremove vgvm && vgremove vgbackups pvremove /dev/sdd1 --force --force && pvremove /dev/sdd2 --force --force && pvremove /dev/sdd3 --force --force - +---------------------------------------------------------- # RESIZE LVM AS ROOT: https://www.golinuxcloud.com/lvm-shrink-logical-volume/ df -hT /home lsblk -f @@ -75,7 +73,40 @@ lvextend -L+4G /dev/mapper/zeus--vg-var # resize the ext4 filesystem in logical volume zeus-vg/var to the new volume size resize2fs /dev/mapper/zeus--vg-var # lvextend --resizefs -l +100%FREE /dev/mapper/vg_debian-lv_root +---------------------------------------------------------- +# SHRINK REDUCE LVM GROUP AS ROOT:https://unix.stackexchange.com/questions/67702/how-to-reduce-volume-group-size-in-lvm +# https://www.rootusers.com/lvm-resize-how-to-decrease-an-lvm-partition/ +sudo lvresize --verbose --resizefs -L -150G /dev/ubuntu/root +sudo pvresize --setphysicalvolumesize {any size here} /dev/sda5 +# The last command, pvresize, may yield the error +# /dev/sda5: cannot resize to xxxxx extents as later ones are allocated. +# You have to rearrange the unallocated space at the end of the LVM. That means after root and swap_1 partition. You can see the current arrangement of space with this command + +pvs -v --segments /dev/sda5 +pvs -v --segments /dev/nvme0n1p3 + +pvs will show output like this + +/dev/sda5 ubuntu lvm2 a-- 698.04g 150g 0 xxx+1 root 0 linear /dev/sda:0-xxx +/dev/sda5 ubuntu lvm2 a-- 698.04g 150g xxx+1 iii 0 free +/dev/sda5 ubuntu lvm2 a-- 698.04g 150g yyyy jjj swap 0 linear /dev/sda5:yyyy-end + +Now use pvmove to remove external fragmentation: + +sudo pvmove --alloc anywhere /dev/sda5:yyyy-end + +pvs -v --segments /dev/sda5 + +should show the new order of volumes: + +/dev/sda5 ubuntu lvm2 a-- 698.04g 150g 0 xxx+1 root 0 linear /dev/sda:0-xxx +/dev/sda5 ubuntu lvm2 a-- 698.04g 150g xxx+1 iii swap 0 linear /dev/sda5:xxx+1-yyyy +/dev/sda5 ubuntu lvm2 a-- 698.04g 150g yyyy+1 end 0 free +pvs -v --segments /dev/nvme0n1p3 + +After that, use GParted and resize the LVM to the maximum used area. The rest will be in unallocated space. +---------------------------------------------------------- #RESIZE ext4 - # unmount /home because an ext4 filesystem cannot be reduced while mounted umount /home fsck -f /dev/mapper/zeus--vg-home @@ -95,7 +126,7 @@ mkdir 1TBNVME vi /etc/fstab /dev/sda1 /media/2TBSEAGATE ext4 defaults 0 2 /dev/nvme1n1p1 /media/1TBNVME ext4 defaults 0 2 - +---------------------------------------------------------- # CREATE NEW SNAPSHOT lvcreate /dev/mapper/ -L 1G -s -n snapshot_name lvs diff --git a/files-find.txt b/files-find.txt old mode 100644 new mode 100755 diff --git a/freeipa-firewall.txt b/freeipa-firewall.txt old mode 100644 new mode 100755 diff --git a/freeipa.txt b/freeipa.txt old mode 100644 new mode 100755 diff --git a/git-help.txt b/git-help.txt old mode 100644 new mode 100755 diff --git a/gitea-upgrade.txt b/gitea-upgrade.txt old mode 100644 new mode 100755 diff --git a/grub.pdf b/grub.pdf old mode 100644 new mode 100755 diff --git a/grub.txt b/grub.txt old mode 100644 new mode 100755 diff --git a/jitsi.txt b/jitsi.txt new file mode 100644 index 0000000..dfb7ed6 --- /dev/null +++ b/jitsi.txt @@ -0,0 +1,24 @@ +https://wiki.opensourceisawesome.com/books/jitsi-meet/page/jitsi-meet-with-authentication + +curl https://get.docker.com ! sh +usermod -aG docker myusername # replace myusername with yours +# exit & log back in +docker ps + +mkdir -p docker/jitsi +cd docker/jitsi +wget $(curl -s https://api.github.com/repos/jitsi/docker-jitsi-meet/releases/latest | grep 'zip' | cut -d\" -f4) +sudo apt install unzip +mv jitsi-docker-jitsi-meet-aae3756 jitsi-meet +cd jitsi-meet + +# Copy Docker Compose and Environment Files +# We'll make copies of two of the files to work from. First, let's copy the 'env.example' file to a new hidden file called '.env'. This is the file docker compose uses by default for configurations. + +cp env.example .env + +Next, let's copy the docker-compose.yml file to a new file called 'compose.yaml' (this is the newer naming convention used by Docker Compose). Then we'll rename the original file by adding a '.bak' extension to the end, so Docker Compose will default to our 'compose.yaml' file. + +cp docker-compose.yml compose.yaml + +'mv docker-compose.yml docker-compose.yml.bak' diff --git a/keepassxc.txt b/keepassxc.txt old mode 100644 new mode 100755 diff --git a/kubernetes.txt b/kubernetes.txt old mode 100644 new mode 100755 diff --git a/kvm-bridge-nmtui.pdf b/kvm-bridge-nmtui.pdf old mode 100644 new mode 100755 diff --git a/kvm-clone.sh b/kvm-clone.sh old mode 100644 new mode 100755 diff --git a/kvm-debian-ovmf-uefi-boot-fix.pdf b/kvm-debian-ovmf-uefi-boot-fix.pdf old mode 100644 new mode 100755 diff --git a/kvm-debian.txt b/kvm-debian.txt old mode 100644 new mode 100755 diff --git a/kvm-export-import.sh b/kvm-export-import.sh old mode 100644 new mode 100755 diff --git a/kvm-export-import.txt b/kvm-export-import.txt old mode 100644 new mode 100755 diff --git a/kvm-fedora.txt b/kvm-fedora.txt old mode 100644 new mode 100755 index 2b07766..73e685e --- a/kvm-fedora.txt +++ b/kvm-fedora.txt @@ -11,6 +11,7 @@ lsmod | grep kvm sudo dnf install virt-install virt-viewer -y sudo dnf install libvirt -y sudo dnf install virt-manager -y +#Almalinux10, RHEL 10, Rocky 10# dnf --enablerepo=crb install virt-manager sudo dnf install -y virt-top libguestfs-tools -y sudo systemctl start libvirtd sudo systemctl enable --now libvirtd diff --git a/kvm-openvswitch-debian.sh b/kvm-openvswitch-debian.sh old mode 100644 new mode 100755 diff --git a/mariadb.txt b/mariadb.txt old mode 100644 new mode 100755 diff --git a/misc.txt b/misc.txt old mode 100644 new mode 100755 index eff3a56..d0048c9 --- a/misc.txt +++ b/misc.txt @@ -2,8 +2,16 @@ # OPEN SOURCE BENCHMARKS speccpu, netperf, memtier_benchmark, aerospike, hpcc +sudo apt purge apport apport-gtk apport-retrace apport-symptoms + inxi -Fxxc0 | nc termbin.com 9999 +sudo dnf environment list --available | grep desktop + +sudo dnf install switchdesk switchdesk-gui + +# sudo dnf install @kde-desktop-environment + dnf grouplist -v dnf groupinstall "Fedora Workstation" dnf groupinstall "Cinnamon Desktop" @@ -89,3 +97,37 @@ sudo mkfs.ext4 -N 33554432 -m 0 /dev/zram0 sudo mount -o discard /dev/zram0 build/ sudo chown -R myuser build/ +--------------------------------------------- +Recover the Root Password + +If you need to recover credentials, use this method to gaining access to the instance. + + Reboot the system. + + Interrupt the grub2 menu by pressing "e" to edit when prompted with the grub menu. + + Move the cursor to the end of the line that specifies the kernel (vmlinuz). You may want to remove all other consoles other than TTY0, however, this step may not be necessary for your environment. + + Append rd.break (no quotes), which will break the boot process just before the control is handed from initramfs to the actual system. + + Ctrl+x to boot. + +A root shell is presented with the root filesystem mounted in read-only mode on /sysroot. + +Remount it with write privileges as /sysroot. + +# mount -oremount,rw /sysroot + +Switch to a chroot jail. + +# chroot /sysroot + +Change the password for the desired user. + +# passwd example-username + +If you use SELinux, you should consider re-labeling all files before continuing the boot process. Skip this part if you don't use SELinux. + +# touch /.autorelabel + +Use the exit to exit the chroot jail. Use exit a second time, and the system will cleanly boot from the point we interrupted it. diff --git a/nfs-samba-zfs.txt b/nfs-samba-zfs.txt old mode 100644 new mode 100755 diff --git a/nginx.txt b/nginx.txt old mode 100644 new mode 100755 diff --git a/nvme.txt b/nvme.txt new file mode 100755 index 0000000..8554bd1 --- /dev/null +++ b/nvme.txt @@ -0,0 +1,54 @@ +apt install nvme-cli +nvme list +lspci | grep -i nvme +lspci -s 04:00.0 -vv | grep -iE 'LnkCap|LnkSta' +nvme smart-log /dev/nvme1n1 +# lsblk -fe7 +# lsblk -o NAME,FSTYPE,LABEL,MOUNTPOINT,SIZE,MODEL + +nvme smart-log /dev/nvme0n1 | grep -i '^temperature' + +for d in /dev/nvme{0..1} +do + echo "$d - $(sudo nvme smart-log $d | grep -i '^temperature')" +done + +***** DESTRUCTIVE ***** + +# Sequential Read/Write (Large Files, 1MiB Block Size) +fio --name=seqreadwrite \ + --filename=/dev/nvme0n1 \ + --ioengine=libaio \ + --direct=1 \ + --rw=readwrite \ + --bs=1M \ + --numjobs=2 \ + --iodepth=32 \ + --runtime=30 \ + --time_based \ + --group_reporting + +# Sabrent +# Run status group 0 (all jobs): +# READ: bw=1297MiB/s (1360MB/s), 1297MiB/s-1297MiB/s (1360MB/s-1360MB/s), io=38.0GiB (40.9GB), run=30036-30036msec +# WRITE: bw=1302MiB/s (1365MB/s), 1302MiB/s-1302MiB/s (1365MB/s-1365MB/s), io=38.2GiB (41.0GB), run=30036-30036msec +# +# Samsung +Run status group 0 (all jobs): + READ: bw=892MiB/s (936MB/s), 892MiB/s-892MiB/s (936MB/s-936MB/s), io=26.2GiB (28.1GB), run=30034-30034msec + WRITE: bw=901MiB/s (945MB/s), 901MiB/s-901MiB/s (945MB/s-945MB/s), io=26.4GiB (28.4GB), run=30034-30034msec + +***** DESTRUCTIVE ***** + +# Latency Focused Test (1 I/O at a Time, 4KiB Random Read) +fio --name=latency_test \ + --filename=/dev/nvme3n1 \ + --ioengine=sync \ + --direct=1 \ + --rw=randread \ + --bs=4k \ + --iodepth=1 \ + --numjobs=1 \ + --runtime=10 \ + --time_based \ + --group_reporting diff --git a/openssl.txt b/openssl.txt old mode 100644 new mode 100755 diff --git a/openvswitch.md b/openvswitch.md new file mode 100644 index 0000000..6dfea69 --- /dev/null +++ b/openvswitch.md @@ -0,0 +1,68 @@ +https://cloudspinx.com/build-open-vswitch-from-source-on-rocky-almalinux-rhel/ +https://docs.openvswitch.org/en/latest/intro/install/general/ + +# Install from Git - Clone Repository: Fedora 42 & Bash, /usr/local/etc/openvswitch /usr/local/var +sudo dnf -y install epel-release +sudo dnf config-manager --set-enabled crb +sudo dnf install @'Development Tools' rpm-build dnf-plugins-core +sudo dnf -y install gcc make python3-devel openssl-devel \ + kernel-devel kernel-debug-devel rpm-build desktop-file-utils \ + groff-base libcap-ng-devel numactl-devel selinux-policy-devel \ + systemtap-sdt-devel unbound-devel unbound python3-sphinx \ + libbpf-devel libxdp-devel groff network-scripts +sudo dnf install python3-sphinx python3-devel libxdp-devel \ + numactl-devel selinux-policy-devel systemtap-sdt-devel \ + unbound unbound-devel + +mkdir Repos && cd Repos +# VER=3.5.0 && wget https://www.openvswitch.org/releases/openvswitch-$VER.tar.gz + +# cd openvswitch-$VER +git clone https://github.com/openvswitch/ovs.git +cd ovs +git checkout v3.5.0 +./boot.sh +./configure +make rpm-fedora +# make rpm-fedora RPMBUILD_OPT="--with dpdk --without check" + +export PATH=$PATH:/usr/local/share/openvswitch/scripts +# sudo ovs-ctl start +sudo -E env "PATH=$PATH" ovs-ctl start +ovs-vsctl show + +cd rpm/rpmbuild/RPMS/x86_64 +ls -al + +-------------------------------------- + + +sudo systemctl enable --now openvswitch +systemctl status openvswitch.service +● openvswitch.service - Open vSwitch + Loaded: loaded (/usr/lib/systemd/system/openvswitch.service; enabled; vendor preset: disabled) + Active: active (exited) since Wed 2025-04-16 00:17:18 EAT; 5s ago + Process: 93926 ExecStart=/bin/true (code=exited, status=0/SUCCESS) + Main PID: 93926 (code=exited, status=0/SUCCESS) + +Apr 16 00:17:18 rocky01.cloudspinx.com systemd[1]: Starting Open vSwitch... +Apr 16 00:17:18 rocky01.cloudspinx.com systemd[1]: Started Open vSwitch. + +The command above will start other OVS services: + +systemctl status ovs-vswitchd ovsdb-server + +Log out of your current shell session, then log back in: + +logout + +Run the ovs-vsctl show command to verify the Open vSwitch (OVS) version: + +$ ovs-vsctl show +8d2d42ed-88e7-45bc-b2d2-eb43e25763b1 + ovs_version: "3.5.0-1.el8" +# Kernel Compatibility: Ensure kernel-devel matches your running kernel (uname -r). If mismatched, update the kernel or install the correct kernel-devel package. +# DPDK (Optional): For high-performance setups, install dpdk and dpdk-devel, then add --with-dpdk to ./configure. +# Troubleshooting: Check logs in /var/log/openvswitch/ if services fail to start. Ensure the user has permissions (e.g., sudo usermod -aG openvswitch $USER). +# Source: The tarball is downloaded from openvswitch.org, and the Git repository is at github.com/openvswitch/ovs, tag v3.5.0 + diff --git a/ovirt.txt b/ovirt.txt old mode 100644 new mode 100755 diff --git a/podman-cockpit.txt b/podman-cockpit.txt old mode 100644 new mode 100755 diff --git a/postfix.txt b/postfix.txt old mode 100644 new mode 100755 diff --git a/postgres-pgadmin-python3-django-gunicorn-nginx b/postgres-pgadmin-python3-django-gunicorn-nginx old mode 100644 new mode 100755 diff --git a/postgresql-pgadmin4.txt b/postgresql-pgadmin4.txt old mode 100644 new mode 100755 diff --git a/postgresql.txt b/postgresql.txt old mode 100644 new mode 100755 diff --git a/proxmox.txt b/proxmox.txt old mode 100644 new mode 100755 diff --git a/rhel8.0-install.pptx b/rhel8.0-install.pptx old mode 100644 new mode 100755 diff --git a/semaphore.txt b/semaphore.txt old mode 100644 new mode 100755 diff --git a/sources.list b/sources.list old mode 100644 new mode 100755 diff --git a/sources.list.ubuntu b/sources.list.ubuntu old mode 100644 new mode 100755 diff --git a/tmux.conf b/tmux.conf old mode 100644 new mode 100755 diff --git a/ubuntu-networking.txt b/ubuntu-networking.txt old mode 100644 new mode 100755 diff --git a/user-disabled-password.txt b/user-disabled-password.txt old mode 100644 new mode 100755 diff --git a/virsh-virt-clone-help.txt b/virsh-virt-clone-help.txt old mode 100644 new mode 100755 diff --git a/vnc-xrdp-help.txt b/vnc-xrdp-help.txt old mode 100644 new mode 100755 index 980a537..14be521 --- a/vnc-xrdp-help.txt +++ b/vnc-xrdp-help.txt @@ -1,6 +1,10 @@ #FEDORA - ADD GRAPHICAL FOR VNC XRDP HEADLESS SERVER sudo dnf group install "Server with GUI" sudo systemctl set-default graphical.target +sudo dnf install epel-release -y +dnf update +dnf install yum-utils + sudo systemctl reboot sudo dnf install -y xrdp tigervnc-server # sudo apt install xrdp tigervnc-standalone-server @@ -41,16 +45,17 @@ geometry=1920x1080 nolisten=tcp localhost -------------------------------------- -restorecon -RFv ~/.vnc -[root]# rm /etc/systemd/system/vncserver@.service - sudo systemctl daemon-reload sudo systemctl enable --now vncserver@:1.service sudo systemctl enable --now vncserver@:2.service sudo systemctl status vncserver@:1.service sudo systemctl status vncserver@:2.service +------------------------------------- +restorecon -RFv ~/.vnc +[root]# rm /etc/systemd/system/vncserver@.service +------------------------------------- + # VNC OVER SSH - EXIT BACK TO CLIENT MACHINE ssh -L 5901:localhost:5901 iw@192.168.1.121 vncviewer -via iw@192.168.1.121 localhost:1 diff --git a/webmin.md b/webmin.md new file mode 100755 index 0000000..fdd7577 --- /dev/null +++ b/webmin.md @@ -0,0 +1 @@ +WEBMIN for DNS GUI