Skip to content

Instantly share code, notes, and snippets.

@martinsnygg
Last active December 12, 2015 04:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martinsnygg/4715131 to your computer and use it in GitHub Desktop.
Save martinsnygg/4715131 to your computer and use it in GitHub Desktop.
RPi minimizer
apt-get -y update && apt-get -y dist-upgrade && apt-get -y autoremove && apt-get -y autoclean
apt-get install vim vim-nox screen unzip zip python-software-properties aptitude curl ntp ntpdate git-core wget ca-certificates binutils raspi-config -y
wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && chmod +x /usr/bin/rpi-update
rpi-update 240
reboot
apt-get install dropbear openssh-client -y
/etc/init.d/ssh stop
sed -i 's/NO_START=1/NO_START=0/g' /etc/default/dropbear
/etc/init.d/dropbear start
apt-get purge openssh-server
sed -i '/[2-6]:23:respawn:\/sbin\/getty 38400 tty[2-6]/s%^%#%g' /etc/inittab
sed -i '/T0:23:respawn:\/sbin\/getty -L ttyAMA0 115200 vt100/s%^%#%g' /etc/inittab
dpkg-reconfigure dash
echo "CONF_SWAPSIZE=512" > /etc/dphys-swapfile
dphys-swapfile setup
dphys-swapfile swapon
sed -i 's/vm.swappiness=1/vm.swappiness=10/g' /etc/sysctl.conf
echo 'vm.vfs_cache_pressure=50' >> /etc/sysctl.conf
echo "net.ipv6.conf.all.disable_ipv6=1" > /etc/sysctl.d/disableipv6.conf
echo 'blacklist ipv6' >> /etc/modprobe.d/blacklist
sed -i '/::/s%^%#%g' /etc/hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment