[ Content | View menu ]

Setup-Script nach Debian Installation

Written on 23.10.2008

Nach einer Debian Installation passt man meist als erstes die Arbeitsumgebung an, d.h. installiert nützliche Pakete, Konfiguriert das Aussehen der Bash-Shell, installiert Crontabs und Konfiguriert Pakete nach eigenem Wunsch.

Mein Basis-Setup, was ich grundsätzlich nach jeder Debian-Installation durchführe, findet hier ihr:

#!/bin/bash
 
# install packages
apt-get install vim screen mc vnstat ntpdate ssh
 
# add crontabs
cat >> /etc/crontab <<EOF
# vnstat
* *     * * *   root    /usr/bin/vnstat -u -i eth0
 
# time
5 1     * * *   root    /usr/sbin/ntpdate ntp.fhg.de
EOF
 
# add .bashrc
cat > /root/.bashrc <<EOF
umask 022
 
export LS_OPTIONS=' --color=auto'
eval \$(dircolors)
alias ls='ls \$LS_OPTIONS -l'
alias ll='ls \$LS_OPTIONS -l'
alias l='ls \$LS_OPTIONS -lA'
 
alias t-sys='tail -f /var/log/syslog'
 
BLACK="\[\033[0;30m\]"
BLUE="\[\033[0;34m\]"
GREEN="\[\033[0;32m\]"
CYAN="\[\033[0;36m\]"
RED="\[\033[0;31m\]"
PURPLE="\[\033[0;35m\]"
BROWN="\[\033[0;33m\]"
LIGHT_GRAY="\[\033[0;37m\]"
DARK_GRAY="\[\033[1;30m\]"
LIGHT_BLUE="\[\033[1;34m\]"
LIGHT_GREEN="\[\033[1;32m\]"
LIGHT_CYAN="\[\033[1;36m\]"
LIGHT_RED="\[\033[1;31m\]"
LIGHT_PURPLE="\[\033[1;35m\]"
YELLOW="\[\033[1;33m\]"
WHITE="\[\033[1;37m\]"
NO_COLOUR="\[\033[0m\]"
 
export PS1="\u\$DARK_GRAY@\$NO_COLOUR\h\$DARK_GRAY:\$NO_COLOUR\w\$GREEN\\\$\$NO_COLOUR "
EOF
 
# edit vimrc to enable syntax highlighting
sed -e 's/\"syntax/syntax/g' -i /etc/vim/vimrc

Download setup.sh

Filed in: Allgemein.

No Comments

Write comment - TrackBack - RSS Comments

Write comment