installing DebianAfter installing Debian there are several things I like to do before considering it a base on which to build.
1. remove extraneous packagesdeborphan must be installed to complete this step. Remove this rubbish:
..then remove orphaned libraries with repeated incantations of: $ sudo dpkg -P `deborphan` 2. install my essential packages
3. upgrade or apply security updatesIf the system is to be upgraded to another release (say from "sarge" to "sid") then applying security updates to the existing "sarge" installation is a waste of time and bandwidth. Edit /etc/apt/sources.list and invoke: $ apt-get update $ apt-get dist-upgrade 4. configure syslogI don't like so many different logs in /var/log not least because all the information ends up in /var/log/syslog anyway by default and I'd rather have less written to disc. Edit /etc/syslog.conf and comment out:
..and then utter: $ sudo /etc/init.d/sysklogd reload $ cd /var/log $ sudo rm -Rf daemon.log kern.log lpr.log mail.* user.log uucp.log news/ debug m essages 5. configure bashI like all users to be able to inherit a .bashrc and the logical place to inherit from is /root since the root user must be able to log in when most of the rest of the file system is buggered. /root/.bashrc.global:
# global .bashrc file
#
# - sets a default PATH
# - overrides the default history size
# - overrides the default umask
# - sets some default aliases
# - sets a default prompt for interactive shells
#
PATH=/usr/local/sbin
PATH=$PATH:/usr/local/bin
PATH=$PATH:/usr/sbin
PATH=$PATH:/usr/bin
PATH=$PATH:/sbin
PATH=$PATH:/bin
PATH=$PATH:/usr/bin/X11
# set PATH so it includes user's private bin if it exists
if [ -d ~/bin ]; then
PATH=~/bin:"${PATH}"
fi
# do the same with MANPATH
if [ -d ~/man ]; then
MANPATH=~/man:"${MANPATH}"
fi
# and PERL5LIB
if [ -d ~/lib/libperl5 ]; then
PERL5LIB=~/lib/libperl5:"${PERL5LIB}"
fi
HISTSIZE=8192
HISTFILESIZE=8192
umask 027
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
alias ls='ls --color=auto '
alias ll='ls -l'
alias la='ls -A'
alias l='ls -lGF'
alias x=exit
alias hup='kill -HUP'
alias cp='cp -ia'
alias mv='mv -i'
alias findl='find -printf \"%p\"\ '
alias up=". up.sh"
# If running interactively, then:
if [ "$PS1" ]; then
mesg n
eval `dircolors`
export HISTCONTROL=ignoredups
# If this is an xterm set the title to user@host:dir
case $TERM in
xterm*|rxvt)
PROMPT_COMMAND='if [ "root" == ${USER} ]; then TEXTCOLOR=31; else TEXTCO
LOR=0; fi; case "$SSH_CLIENT" in 141.228.156.225*) TITLE="lsunds50.ldn.bzwint.co
m";; *) TITLE="${USER}@${HOSTNAME}:${PWD}";; esac; echo -ne "\033]0;${TITLE}\007
\033[${TEXTCOLOR}m"'
;;
*)
PROMPT_COMMAND='if [ "root" == ${USER} ]; then TEXTCOLOR=31; else TEXTCO
LOR=0; fi; echo -ne "\033[${TEXTCOLOR}m"'
;;
esac
# set a fancy prompt
PS1='\u@\h:\w\$ '
fi
# enable bash completion in interactive shells
#if [ "$PS1" -a -f /etc/bash_completion ]; then
# . /etc/bash_completion
#fi
export PATH HISTSIZE HISTFILESIZE PERL5LIB
/root/.bashrc.host:
# host .bashrc file
if [ -f /root/.bashrc.global ]; then
source /root/.bashrc.global
fi
JAVA_HOME=/usr/java/jdk
ANT_HOME=/usr/java/ant
export EDITOR=vi
PATH=$JAVA_HOME/bin:$PATH:$ANT_HOME/bin:/usr/games
export PATH JAVA_HOME
/root/.bashrc:
# ~/.bashrc: executed by bash(1) for non-login shells.
if [ -f /root/.bashrc.host ]; then
source /root/.bashrc.host
fi
/root/.profile:
# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
Users then link to /root/.bashrc.host for their .bashrc and to .profile for their .bash_profile. 6. configure /tmpEdit /etc/fstab to contain: file system mount point type options dump pass tmpfs /tmp tmpfs size=100M,mode=777 0 0 7. configure vim/root/.vimrc: set complete=.,w,b,u,t,i set list set listchars=tab:>-,trail:- set expandtab set ai set shiftwidth=4 set tabstop=4 set incsearch syntax enable :map <F12> :buffers<CR> :nmap <TAB> :bnext<CR> :nmap ` :bprevious<CR> :map <F10> :buffer10<CR> :map <F11> :cn<CR> 8. edit /etc/motdEdit /etc/motd to be of this form: Linux 2.4.19-earth 1000 MHz C3-2 1024 MB RAM 38200 MB disc ..and edit /etc/init.d/bootmisc.sh so it does not crap on /etc/motd on every boot. $Revision: 1.3 $, $Date: 2006/06/24 07:05:40 $ |