Last active
December 12, 2015 04:29
-
-
Save martinsnygg/4715131 to your computer and use it in GitHub Desktop.
RPi minimizer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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