Skip to content

Instantly share code, notes, and snippets.

@alexhaller
Last active January 22, 2017 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexhaller/10ef0e7205ea449dcc4c1a06a2685990 to your computer and use it in GitHub Desktop.
Save alexhaller/10ef0e7205ea449dcc4c1a06a2685990 to your computer and use it in GitHub Desktop.
#!/bin/bash
sudo -i
## variables
HOSTNAME_NEW=rasple
## Delete some packages
apt-get purge wolfram-engine
apt-get purge libreoffice*
apt-get clean
apt-get autoremove
## Updates
apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y
apt-get autoremove -y && apt-get clean -y && apt-get autoclean -y && rm -rf /var/lib/apt/lists/*
## rpi-update
rpi-udpate
# sudo BRANCH=next rpi-update
## Set new hostname
hostname -b {HOSTNAME_NEW}
echo hostname
## New ssh keys
rm /etc/ssh/ssh_host_*
dpkg-reconfigure openssh-server
service ssh restart
## webmin installation
echo "deb http://download.webmin.com/download/repository sarge contrib" >> /etc/apt/sources.list
wget http://www.webmin.com/jcameron-key.asc -qO - | apt-key add -
apt-get update && apt-get install -y webmin=1.831* && apt-get clean -y && apt-get autoclean -y && rm -rf /var/lib/apt/lists/*
## Docker installation
# https://docs.docker.com/engine/installation/linux/raspbian/
# http://blog.alexellis.io/getting-started-with-docker-on-raspberry-pi/
curl -sSL https://get.docker.com | sh
# The Docker client can only be used by root or members of the docker group. Add pi or your equivalent user to the docker group
usermod -aG docker pi # ${USER}
# set Docker to auto-start
systemctl enable docker
# start the Docker daemon
systemctl start docker
## docker-compose installation
# Installation with pip due to no official armv7 binaries
# Available versions: https://pypi.python.org/pypi/docker-compose/
pip3 install docker-compose # ==<version>
##
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment