Skip to content

Instantly share code, notes, and snippets.

@mikepenz
Last active February 2, 2017 10:08
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 mikepenz/bea8ef149c4c04917f04 to your computer and use it in GitHub Desktop.
Save mikepenz/bea8ef149c4c04917f04 to your computer and use it in GitHub Desktop.
Install & Configure Debian Essentials

#ABOUT

#INSTALLATION Run following commands:

apt-get install curl -y
curl https://gist.githubusercontent.com/mikepenz/bea8ef149c4c04917f04/raw/7fded476f46b156e3bc3cb8b0696fa27267c6b78/debianessentials.sh | sh;
#!/bin/sh
echo ## -----------------------------------------------
echo ## install default toolset
echo ## -----------------------------------------------
apt-get install zsh -y
apt-get install curl -y
apt-get install git -y
apt-get install multitail -y
apt-get install htop -y
apt-get install rsync -y
apt-get install ruby -y
echo ## -----------------------------------------------
echo ## install essential toolset
echo ## -----------------------------------------------
apt-get install -y build-essential make cmake scons curl git \
ruby autoconf automake autoconf-archive \
gettext libtool flex bison \
libbz2-dev libcurl4-openssl-dev \
libexpat-dev libncurses-dev
echo ## -----------------------------------------------
echo ## install linux brew and create the bash_linux_brew file
echo ## -----------------------------------------------
git clone https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew
bash_linux_brew='# Until LinuxBrew is fixed, the following is required.
# See: https://github.com/Homebrew/linuxbrew/issues/47
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH
## Setup linux brew
export LINUXBREWHOME=$HOME/.linuxbrew
export PATH=$LINUXBREWHOME/bin:$PATH
export MANPATH=$LINUXBREWHOME/man:$MANPATH
export PKG_CONFIG_PATH=$LINUXBREWHOME/lib64/pkgconfig:$LINUXBREWHOME/lib/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH'
if [ ! -f ~/.bash_linux_brew ]; then
touch ~/.bash_linux_brew
echo "-- created file ~/.bash_linux_brew (was missing)"
fi
echo "$bash_linux_brew" > ~/.bash_linux_brew
bashrc_content='if [ -f ~/.bash_linux_brew ]; then
. ~/.bash_linux_brew
fi'
if grep -q "bash_linux_brew" ~/.bashrc; then
echo "-- bash_linux_brew was already set"
else
echo "$bashrc_content" >> ~/.bashrc
echo "-- added bash_linux_brew source (was missing)"
fi
echo ## -----------------------------------------------
echo ## configure oh-my-zsh and add the source ~/.bashrc
echo ## -----------------------------------------------
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
sed -i 's/robbyrussell/jreese/g' ~/.zshrc
sed -i 's/plugins=(git)/plugins=(git debian)/g' ~/.zshrc
sed -i 's/# export MANPATH="\/usr\/local\/man:$MANPATH"/# export MANPATH="\/usr\/local\/man:$MANPATH"\n\nsource ~\/.bashrc/g' ~/.zshrc #we have to do this after the MANPATH as zsh would otherwise overwite the path
echo ## -----------------------------------------------
echo ## install the "log" command
echo ## -----------------------------------------------
curl https://gist.githubusercontent.com/mikepenz/a8a4a52f67a391895a4c/raw/0e142a381ddce88e7489d0753388bd9778cb246d/multitail.sh | sh;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment