apt-get install wget wget https://raw.github.com/gist/3257593/pi-setup.sh --no-check-certificate sh ./pi-setup.sh
Created
August 4, 2012 13:00
-
-
Save dominikgrygiel/3257593 to your computer and use it in GitHub Desktop.
Pi setup
This file contains hidden or 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
| dpkg-reconfigure tzdata | |
| dpkg-reconfigure console-data | |
| dpkg-reconfigure locales | |
| apt-get update | |
| apt-get upgrade -y | |
| #rpi-update | |
| apt-get install git-core ca-certificates binutils htop vim -y | |
| wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && chmod +x /usr/bin/rpi-update | |
| rpi-update 240 | |
| #disable tty2-6 | |
| sed -i '/[2-6]:23:respawn:\/sbin\/getty 38400 tty[2-6]/s%^%#%g' /etc/inittab | |
| #use noop | |
| sed -i 's/deadline/noop/g' /boot/cmdline.txt | |
| #use dash | |
| dpkg-reconfigure dash | |
| #disable IPv6 | |
| 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 | |
| #overclock PI | |
| echo -e "arm_freq=850\nsdram_freq=500\ncore_freq=450" >> /boot/config.txt | |
| #remove useless logs | |
| apt-get -y remove --purge rsyslog | |
| apt-get -y install inetutils-syslogd | |
| service inetutils-syslogd stop | |
| for file in /var/log/*.log /var/log/mail.* /var/log/debug /var/log/syslog; do [ -f "$file" ] && rm -f "$file"; done | |
| for dir in fsck news; do [ -d "/var/log/$dir" ] && rm -rf "/var/log/$dir"; done | |
| echo -e "*.*;mail.none;cron.none\t -/var/log/messages\ncron.*\t -/var/log/cron\nmail.*\t -/var/log/mail" > /etc/syslog.conf | |
| mkdir -p /etc/logrotate.d | |
| echo -e "/var/log/cron\n/var/log/mail\n/var/log/messages {\n\trotate 4\n\tweekly\n\tmissingok\n\tnotifempty\n\tcompress\n\tsharedscripts\n\tpostrotate\n\t/etc/init.d/inetutils-syslogd reload >/dev/null\n\tendscript\n}" > /etc/logrotate.d/inetutils-syslogd | |
| service inetutils-syslogd start | |
| #restart | |
| shutdown -r now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment