Debian Essentials
1. The Essentials
1.1 Linode Stuff
1.2 Essential Stuff
1.3 Time
1.4 File Compression Tools
1.5 Colourised Prompt
1.6 Syntax Highlighting
The Essentials
Some essential tools and configurations I need in my life :-PLinode Stuff
I have a Linode VPS and the Ubuntu image requires some love ;-)Ubuntu Minimal and Standard
I have a Linode VPS and the Ubuntu image doesn't include the minimal and standard meta packages.aptitude install ubuntu-minimal ubuntu-standard
Kernel Modules
The Linode server also need a directory creating so that 'depmod' works.mkdir -p /lib/modules/`uname -r` depmod -a
Locale
When some packages were being installed/upgraded the following warning was being displayed. perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_GB.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
This is a common problem with installations that used 'debootstrap'.
First make sure the locales packages are installed
aptitude install locales localeconfFind out which locale your system is currently configure to use.
dpkg-reconfigure localesGenerate the locale your system is configure to use. In my case, from the original error above...
sudo locale-gen en_GB.UTF-8Finally, create '/etc/default/locale'.
nano /etc/default/localeAdd the following, then save the file.
LANG="en_GB.UTF-8"References
- http://ubuntuforums.org/showthread.php?t=319397
- http://blogs.prashu.com/linux/2007/07/setting-perl-locale.php
Essential Stuff
These are tools I have found I use on a daily basis or just can't do without. They may or may not be installed by default, it depends on the distro and/or image used.aptitude install curl dnsutils file ftp less loco pciutils psmisc screen sudo telnet tree vim wget
Time
If the timezone is not set or is wrong, the root user can run 'tzconfig' to configure it after installation or on Debian and Ubuntu you can run the following...dpkg-reconfigure tzdataIf you do not have root privileges or want to set for yourself a different timezone than the one the system uses, you can set the environment variable TZ. Use the command 'tzselect' to show you what changes you need to make.
tzselectYou should install an NTP client to synchronise your clock to a few tens of milliseconds precision periodically.
VMWare Guests
Enable...tools.syncTime = "TRUE"...in the .vmx for the virtual machine. Turn on the following kernel options in '/boot/grub/menu.lst' for the virtual machine.
clock=pit nosmp noapic nolapicReferences
High RAM Servers
If your server has > 128MB RAM, then just use 'ntp' to keep your server clock in sync.aptitude install ntpThat's it, job done.
Low RAM Servers
I prefer using ntpdate on low RAM system to avoid have a daemon running in memory all the time.aptitude install ntpdateNow configure ntpdate.
vi /etc/default/ntpdateFind...
NTPDATE_USE_NTP_CONF=yes...and change it to...
NTPDATE_USE_NTP_CONF=noCreate an hourly cron job for ntpdate.
vi /etc/cron.hourly/ntpdate chmod 755 /etc/cron.hourly/ntpdateSample
Add a User
Simply run the following and answer the questions when prompted.adduser fredNow add 'fred' the the 'admin group.
addgroup fred admin
Sudo
visudoAdd a line something like the one below to define which users can sudo. Sample
username ALL=(ALL) ALL
File Compression Tools
OK, so a good deal of these I do not need on a daily basis. Some, I need extremely rarely. So, why are they here? Well, some anti virus and and spam applications use them so I get them installed early on to ensure I have what I needaptitude install arc arj bzip2 cabextract cpio lha lzop pax p7zip p7zip-full rar sharutils tnef unrar unzip unzoo zip zoo
Colourised Prompt
'root' Account
To add a colourised prompt to the 'root' account do the following...nano /root/.bashrcFind the following and uncomment it.
# Comment in the above and uncomment this below for a color prompt
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
Syntax Highlighting
Syntax highlighting is an essential feature of any editor, it can often help identify typos and omissions. vim and nano are the two editors I use and both need syntax highlighting enabled.vim
nano /usr/share/vim/vimrcChange the following settings.
" Vim5 and later versions support syntax highlighting. Uncommenting the next " line enables syntax highlighting by default. syntax on set background=dark
nano
nano needs a little extra help to get syntax highlighting enabled for everything I might edit.wget -c http://bigvo.dyndns.org/nanosyntax.tar.bz2 tar jxvf nanosyntax.tar.bz2 cp nanosyntax/nanorc /etc cp nanosyntax/nano/*.nanorc /usr/share/nanoReferences
- http://gentoo-wiki.com/TIP_Nano_Context_Highlighting
- http://freethegnu.wordpress.com/2007/06/23/nano-shortcuts-syntax-highlight-and-nanorc-config-file-pt1/
- http://freethegnu.wordpress.com/2007/06/23/nano-shortcuts-syntax-highlight-and-nanorc-config-file-pt2/
$Id: DebianEssentials,v 1.29 2008/08/31 09:13:43 martin Exp $
Wiki Index All Recent Edit Top

