Skip to content

Instantly share code, notes, and snippets.

View pawaanv's full-sized avatar

Pawan pawaanv

View GitHub Profile
@pawaanv
pawaanv / sysctl.conf
Created June 23, 2020 14:39 — forked from voluntas/sysctl.conf
Sysctl configuration for high performance
### KERNEL TUNING ###
# Increase size of file handles and inode cache
fs.file-max = 2097152
# Do less swapping
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
@pawaanv
pawaanv / sysctl.conf
Created June 23, 2020 14:39 — forked from voluntas/sysctl.conf
Sysctl configuration for high performance
### KERNEL TUNING ###
# Increase size of file handles and inode cache
fs.file-max = 2097152
# Do less swapping
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
############################# ON ERL3 #############################
# First SSH to the ELR3 then edit the configuration
configure # drops you into the configuration terminal
# Set the boot file.
set service dhcp-server shared-network-name LAN1 subnet 172.16.24.0/22 bootfile-name pxelinux.0
# Set the boot server.
set service dhcp-server shared-network-name LAN1 subnet 172.16.24.0/22 bootfile-server 172.16.24.90
@pawaanv
pawaanv / leeroy.cfg
Created July 10, 2018 18:26 — forked from atuttle/leeroy.cfg
This is my preseed file for auto-installing Ubuntu 11.04 on my Jenkins server
#### Contents of the preconfiguration file (for squeeze)
### Localization
# Preseeding only locale sets language, country and locale.
# The values can also be preseeded individually for greater flexibility.
#d-i debian-installer/language string en
#d-i debian-installer/country string NL
#d-i debian-installer/locale string en_GB.UTF-8
# Optionally specify additional locales to be generated.
#d-i localechooser/supported-locales en_US.UTF-8, nl_NL.UTF-8
d-i debian-installer/locale string en_US
@pawaanv
pawaanv / gist:f8d78ee3f1a62f32492731c19a4aaeb5
Created July 5, 2018 11:40 — forked from hugoduncan/gist:1001548
debian squeeze preseed late_command for automated install of virtualbox guest additions
# Install virtualbox additions.
# Requires the guest additions iso connected to the secondary slave.
# This seems overly complicated, but is a combination
# that seems to work:
# the vbox ose packages were somehow being installed by the standard task,
# the LSB header is required for update-rc.d, which in turn is needed,
# due to straight linking to rc2.d not working (automatic boot sequence,
# and dependency management),
# cdrom source not being removed at the point when this script runs.
# Deletes /etc/udev/rules.d/70-persistent-net.rules to allow cloning.
@pawaanv
pawaanv / make-pxe-environment.sh
Created June 17, 2018 11:59 — forked from gdamjan/make-pxe-environment.sh
Make and start a PXE server
#!/bin/sh
mkdir /home/tftproot
# install syslinux from package and symlink it or just download and extract it
ln -s /usr/lib/syslinux /home/tftproot/syslinux
mkdir /home/tftproot/pxelinux.cfg/
cat > /home/tftproot/pxelinux.cfg/default <<EOF
@pawaanv
pawaanv / README
Created June 11, 2018 11:51 — forked from kalxas/README
Customize ubuntu live image
# first, get the iso from http://releases.ubuntu.com/
# make working dir hierarchy in /tmp (you'll need enough ram for this)
sudo mkdir -p /tmp/custom/{_squash,_work,iso,newiso,newlive,project}
sudo mount -o loop ~/Downloads/ubuntu-15.10-desktop-amd64.iso /tmp/custom/iso
sudo mount -t squashfs /tmp/custom/iso/casper/filesystem.squashfs /tmp/custom/_squash
sudo mount -t overlay overlay -onoatime,lowerdir=/tmp/custom/_squash,upperdir=/tmp/custom/project,workdir=/tmp/custom/_work /tmp/custom/newlive
# customize the live fs with systemd-nspawn (a better chroot)
sudo systemd-nspawn --bind-ro=/etc/resolv.conf:/run/resolvconf/resolv.conf --setenv=RUNLEVEL=1 -D /tmp/custom/newlive
@pawaanv
pawaanv / setup
Created April 11, 2018 02:36
cipher-server-setup
#!/bin/bash
echo "cipher server setup........"
read -r -p "press y to continue , n to exit installation." choice
if [[ "$choice" =~ ^([yY][eE][sS]|[yY])+$ ]]
then
echo contining install
echo "setting up all basic required tools"
sudo dnf install wireshark sqlite vagrant bridge-utils qemu-kvm virt-manager virt-viewer virt-install qemu-img libvirt libvirt-python libvirt-client evolution bleachbit dovecot sendmail m4 sysstat libvirt-devel libxslt-devel libxml2-devel qemu-img libguestfs-tools virt-top spice-server spice-protocol sysstat ntop iotop atop wireshark iftop ethtool -y
else
echo "Aborting install.."
#!/bin/bash
if ! [ $# -eq 1 ]; then
echo "Usage: $0 <node-name>"
exit 1
fi
# Make sure you have all dependencies:
# yum -y install libguestfs-tools virt-install
@pawaanv
pawaanv / gist:63e4f775bf6c260b856c96e396f700c2
Created April 5, 2018 01:25
netdata installation on fedora26
bash <(curl -Ss https://my-netdata.io/kickstart.sh)
System : Linux
Operating System : GNU/Linux
Machine : x86_64
BASH major version: 4
--- Downloading script to detect required packages... ---
[/home/cipher]$ /usr/bin/curl https://raw.githubusercontent.com/firehol/netdata-demo-site/master/install-required-packages.sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 41916 100 41916 0 0 21175 0 0:00:01 0:00:01 --:--:-- 21169