first commit
This commit is contained in:
10
serv-01-baselinux/files/etc/apt/sources.list
Normal file
10
serv-01-baselinux/files/etc/apt/sources.list
Normal file
@@ -0,0 +1,10 @@
|
||||
deb http://deb.debian.org/debian bookworm main non-free contrib
|
||||
deb-src http://deb.debian.org/debian bookworm main non-free contrib
|
||||
|
||||
deb http://security.debian.org/debian-security bookworm-security main contrib non-free
|
||||
deb-src http://security.debian.org/debian-security bookworm-security main contrib non-free
|
||||
|
||||
# bookworm-updates, to get updates before a point release is made;
|
||||
# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html # _updates_and_backports
|
||||
deb http://deb.debian.org/debian bookworm-updates main contrib non-free
|
||||
deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free
|
||||
90
serv-01-baselinux/files/etc/sysctl.d/999-tweaks.conf
Normal file
90
serv-01-baselinux/files/etc/sysctl.d/999-tweaks.conf
Normal file
@@ -0,0 +1,90 @@
|
||||
|
||||
# ===== Memory Management =====
|
||||
|
||||
# Reduce swappiness to avoid swapping until really necessary
|
||||
vm.swappiness = 10
|
||||
|
||||
# Increase max read/write I/O requests (helps with I/O-heavy VMs)
|
||||
vm.max_map_count = 262144
|
||||
|
||||
# Don't overcommit memory aggressively
|
||||
vm.overcommit_memory = 1
|
||||
vm.overcommit_ratio = 80
|
||||
|
||||
# Enable process memory reclaiming
|
||||
vm.dirty_ratio = 15
|
||||
vm.dirty_background_ratio = 5
|
||||
|
||||
# ===== File System & Descriptors =====
|
||||
|
||||
# Allow more open file handles (important for services handling many files/connections)
|
||||
fs.file-max = 2097152
|
||||
|
||||
# ===== Networking: Buffers =====
|
||||
|
||||
# Increase network buffer space (for high-throughput applications)
|
||||
net.core.rmem_max = 16777216
|
||||
net.core.wmem_max = 16777216
|
||||
net.core.rmem_default = 262144
|
||||
net.core.wmem_default = 262144
|
||||
|
||||
# Increase backlog queues
|
||||
net.core.netdev_max_backlog = 5000
|
||||
net.core.somaxconn = 1024
|
||||
|
||||
# ===== Networking: TCP Tweaks =====
|
||||
|
||||
# Enable TCP SYN cookies to prevent SYN flood DoS attacks
|
||||
net.ipv4.tcp_syncookies = 1
|
||||
|
||||
# Reduce FIN timeout to clean up closed connections faster
|
||||
net.ipv4.tcp_fin_timeout = 15
|
||||
|
||||
# Enable TCP keepalive probes more aggressively
|
||||
net.ipv4.tcp_keepalive_time = 300
|
||||
net.ipv4.tcp_keepalive_intvl = 60
|
||||
net.ipv4.tcp_keepalive_probes = 5
|
||||
|
||||
# Reduce time-wait connections held
|
||||
net.ipv4.tcp_max_tw_buckets = 2000000
|
||||
net.ipv4.tcp_tw_reuse = 1
|
||||
net.ipv4.tcp_tw_recycle = 0
|
||||
|
||||
# Increase TCP buffer limits
|
||||
net.ipv4.tcp_rmem = 4096 87380 16777216
|
||||
net.ipv4.tcp_wmem = 4096 65536 16777216
|
||||
|
||||
# ===== Networking: Connection Tracking =====
|
||||
|
||||
# (if conntrack is involved, increase bucket sizes – useful for iptables/nftables with many connections)
|
||||
net.netfilter.nf_conntrack_max = 262144
|
||||
|
||||
# ===== Security & Routing =====
|
||||
|
||||
# Disable IP source routing
|
||||
net.ipv4.conf.all.accept_source_route = 0
|
||||
net.ipv4.conf.default.accept_source_route = 0
|
||||
|
||||
# Disable ICMP redirects (security & performance)
|
||||
net.ipv4.conf.all.accept_redirects = 0
|
||||
net.ipv4.conf.default.accept_redirects = 0
|
||||
|
||||
# Do not send ICMP redirects (we are not a router)
|
||||
net.ipv4.conf.all.send_redirects = 0
|
||||
net.ipv4.conf.default.send_redirects = 0
|
||||
|
||||
# Enable Reverse Path Filterin
|
||||
net.ipv4.conf.all.rp_filter = 1
|
||||
net.ipv4.conf.default.rp_filter = 1
|
||||
|
||||
# ===== Performance =====
|
||||
|
||||
# Avoid using swap too eagerly under memory pressure
|
||||
vm.min_free_kbytes = 65536
|
||||
|
||||
# ===== IPv6 Tuning (disable if unused) =====
|
||||
|
||||
# Uncomment if IPv6 is not used
|
||||
# net.ipv6.conf.all.disable_ipv6 = 1
|
||||
# net.ipv6.conf.default.disable_ipv6 = 1
|
||||
|
||||
86
serv-01-baselinux/files/root/.bashrc
Normal file
86
serv-01-baselinux/files/root/.bashrc
Normal file
@@ -0,0 +1,86 @@
|
||||
##
|
||||
## Slightly nicer .bashrc
|
||||
## Makes pretty colors and stuff
|
||||
##
|
||||
|
||||
## Set $PATH, which tells the computer where to search for commands
|
||||
export PATH="$PATH:/usr/sbin:/sbin:/bin:/usr/bin:/etc:/usr/ucb:/usr/local/bin:/usr/local/local_dfs/bin:/usr/bin/X11:/usr/local/sas"
|
||||
|
||||
## Where to search for manual pages
|
||||
export MANPATH="/usr/share/man:/usr/local/man:/usr/local/local_dfs/man"
|
||||
|
||||
## Which pager to use.
|
||||
export PAGER=less
|
||||
|
||||
## Choose your weapon
|
||||
EDITOR=/usr/bin/vim
|
||||
#EDITOR=/usr/bin/emacs
|
||||
#EDITOR=/usr/bin/nano
|
||||
export EDITOR
|
||||
|
||||
## The maximum number of lines in your history file
|
||||
export HISTFILESIZE=50
|
||||
|
||||
## UVM!
|
||||
export ORGANIZATION="University of Vermont"
|
||||
|
||||
## Enables displaying colors in the terminal
|
||||
export TERM=xterm-color
|
||||
|
||||
# Uncomment the following lines if you are an ARC/INFO user
|
||||
#alias arc=/usr/local/bin/arc
|
||||
#alias arcdoc=/usr/local/bin/arcdoc
|
||||
#alias info=/usr/local/bin/arcinfo
|
||||
|
||||
## Disable automatic mail checking
|
||||
unset MAILCHECK
|
||||
|
||||
## If this is an interactive console, disable messaging
|
||||
#tty -s && mesg n
|
||||
|
||||
## Aliases from 'ol EMBA tcsh
|
||||
#alias bye=logout
|
||||
#alias h=history
|
||||
#alias jobs='jobs -l'
|
||||
#alias lf='ls -algF'
|
||||
#alias log=logout
|
||||
#alias cls=clear
|
||||
#alias edit=$EDITOR
|
||||
#alias restore=/usr/local/local_dfs/bin/restore
|
||||
|
||||
## Automatically correct mistyped 'cd' directories
|
||||
#shopt -s cdspell
|
||||
|
||||
## Append to history file; do not overwrite
|
||||
shopt -s histappend
|
||||
|
||||
## Prevent accidental overwrites when using IO redirection
|
||||
set -o noclobber
|
||||
|
||||
## Set the prompt to display the current git branch
|
||||
## and use pretty colors
|
||||
export PS1='$(git branch &>/dev/null; if [ $? -eq 0 ]; then \
|
||||
echo "\[\e[1m\]\u@\h\[\e[0m\]: \w [\[\e[34m\]$(git branch | grep ^* | sed s/\*\ //)\[\e[0m\]\
|
||||
$(echo `git status` | grep "nothing to commit" > /dev/null 2>&1; if [ "$?" -ne "0" ]; then \
|
||||
echo "\[\e[1;31m\]*\[\e[0m\]"; fi)] \$ "; else \
|
||||
echo "\[\e[1m\]\u@\h\[\e[0m\]: \w \$ "; fi )'
|
||||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||
|
||||
# Note: PS1 and umask are already set in /etc/profile. You should not
|
||||
# need this unless you want different defaults for root.
|
||||
# PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
|
||||
# umask 022
|
||||
|
||||
# You may uncomment the following lines if you want `ls' to be colorized:
|
||||
# export LS_OPTIONS='--color=auto'
|
||||
# eval "$(dircolors)"
|
||||
# alias ls='ls $LS_OPTIONS'
|
||||
# alias ll='ls $LS_OPTIONS -l'
|
||||
# alias l='ls $LS_OPTIONS -lA'
|
||||
#
|
||||
# Some more alias to avoid making mistakes:
|
||||
# alias rm='rm -i'
|
||||
# alias cp='cp -i'
|
||||
# alias mv='mv -i'
|
||||
alias pip=pip3
|
||||
PS1="\[\e[01;37m\][\[\e[0m\]\[\e[01;31m\]\u\[\e[0m\]\[\e[00;37m\]@\[\e[0m\]\[\e[01;34m\]\h\[\e[0m\]\[\e[00;37m\] \[\e[0m\]\[\e[00;37m\]\t\[\e[0m\]\[\e[01;37m\] \W]\\$ \[\e[0m\]"
|
||||
Reference in New Issue
Block a user