Skip to content

Instantly share code, notes, and snippets.

View SecurityPhoton's full-sized avatar
🎯
Focusing

Secure.it SecurityPhoton

🎯
Focusing
View GitHub Profile
@SecurityPhoton
SecurityPhoton / NFS.md
Last active December 19, 2024 20:06
Mount NFS disk in linux

Mount NFS disk in Debian \ Ubuntu

Asume the share is created on NFS server.

Run in bash:

sudo apt update
sudo apt install nfs-common
sudo mkdir -p /mnt/nfs_data_folder
sudo mount nfs_server_ip:/export/nfs_storage /mnt/nfs_data_folder
@SecurityPhoton
SecurityPhoton / resize.md
Created November 12, 2024 15:31
RESIZE (EXTEND) DISK IN LINUX 🐧

RESIZE (EXTEND) DISK IN LINUX 🐧

Summary of high level steps

  • Resize the partition using fdisk.
  • Extend the physical volume with pvresize.
  • Expand the logical volume with lvextend.
  • Resize the filesystem with resize2fs.

Asume we have added HW or virtual disk in Hypervisor. Make snapshot if possible before any action just to sleep well 😴.

@SecurityPhoton
SecurityPhoton / install-k8s-2node.sh
Created October 14, 2024 10:54
This bash script sets up a Kubernetes cluster by configuring either a master or a worker node based on user input. It updates the system, configures network settings, disables swap, and installs necessary components like Containerd and Kubernetes tools (kubelet, kubeadm, kubectl). For the master node, it initializes the cluster and deploys the C…
#!/bin/bash
# Setting IP and DNS names for each server
MASTER_IP="10.10.10.1"
WORKER_IP="10.10.10.2"
MASTER_DNS="k8s-master"
WORKER_DNS="k8s-worker"
# Checking the role of the node (master or worker)
if [ "$1" == "master" ]; then

Build Squid 6.10 from source

All next steps are made on Debian 12.5.

Remove older versions

  1. Check if we have older Squid versions.
dpkg -l | grep squid