linux

Ubuntu autoinstall

HowTo
https://ubuntu.com/server/docs/install/autoinstall-quickstart?_ga=2.43495907.737493104.1708712193-1301017873.1682412256

Prepare

sudo apt install qemu-system-x86
sudo mount -r ~/Downloads/ubuntu-22.04.4-live-server-amd64.iso /mnt
<code>
 
<strong>Download Server Live iso</strong>
https://releases.ubuntu.com/21.04/ubuntu-21.04-live-server-amd64.iso
<code>
wget https://releases.ubuntu.com/21.10/ubuntu-21.10-live-server-amd64.iso -O ubuntu-21.10-live-server-amd64.iso

Copy files (to GRML boot USB pen)

logrotate

Install

apt-get install -y logrotate

/etc/logrotate.d/rsyslog

/var/log/syslog
{
	rotate 7
	daily
        size 100M
	missingok
	notifempty
	delaycompress
	compress
	postrotate
		/usr/lib/rsyslog/rsyslog-rotate
	endscript
}
 
/var/log/mail.info
/var/log/mail.warn
/var/log/mail.err
/var/log/mail.log
/var/log/daemon.log
/var/log/kern.log
/var/log/auth.log
/var/log/user.log
/var/log/lpr.log
/var/log/cron.log
/var/log/debug
/var/log/messages
{
	rotate 4
	weekly
	missingok
	notifempty
	compress
	delaycompress
	sharedscripts
	postrotate
		/usr/lib/rsyslog/rsyslog-rotate
	endscript
}

Force logrotate

sysctl

configure parameter

# determine the maximum size of a shared memory segment
cat /proc/sys/kernel/shmmax
 
# set default shared memory limit for shmmax (16 GB)
echo 17179869184 > /proc/sys/kernel/shmmax
 
# add the following line to /etc/sysctl.conf to make a change permanent
echo "kernel.shmmax=4294967296" >> /etc/sysctl.d/90-shmmax.conf
 
# load parameter
/sbin/sysctl -p /etc/sysctl.d/90-shmmax.conf

reduce swap usage
https://en.wikipedia.org/wiki/Swappiness