install web server on debian 6

$ sudo apt-get install postfix postfix-mysql postfix-doc mysql-client mysql-server
$ sudo vi /etc/mysql/my.cnf
uncomment #bind-address = 127.0.0.1
$ sudo /etc/init.d/mysql restart
check sql is enabled:
$ sudo netstat -tap | grep mysql
install bind9
$ sudo apt-get install bind9 dnsutils
install apache, php
$ sudo apt-get install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap phpmyadmin php5-cli php5-cgi libapache2-mod-fcgid apache2-suexec php-pear php-auth php5-mcrypt mcrypt php5-imagick imagemagick libapache2-mod-suphp libruby libapache2-mod-ruby
$ sudo /etc/init.d/apache2 restart
edit /etc/hosts and
$ echo server1.example.com > /etc/hostname
$ /etc/init.d/hostname.sh start
edit /etc/network/interface to set up static ip address:
sample:

 

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
#allow-hotplug eth0
#iface eth0 inet dhcp
auto eth0
iface eth0 inet static
        address 192.168.0.100
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1
$sudo /etc/init.d/networking restart
 
edit /etc/hosts:
127.0.0.1       localhost.localdomain   localhost
192.168.0.100   yiznix.com    host
# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
 
edit /etc/hostname:
$sudo echo yiznix.com > /etc/hostname
$sudo /etc/init.d/hostname.sh start
 
check hostname:
$sudo hostname
$sudo hostname
both of them must be yiznix.com

post installation of debian 6

Edit the repositories:
Clike here.
Install commonly used apps
$sudo aptitude install vim ssh open-ssh git  google-chrome gimp gparted  kate  ksnapshot chmsee mpg123 vlc mplayer acrobat acread-plugins rar unrar
 Install google's open sources:
 glog, gtest, gflags, snappy, protocol buffers, closure
Install python:
sudo aptitude install python python-dev python-pip build-essential
Install awesome desktop manager
sudo aptitude install awesome
To prevent nautilus to display desktop: open gconf-editor, then choose apps-->nautilus-->preferenceuncheck show-desktop.
To enable dual monitors, click here.
Install virtualbox: 
-- add the following line to /etc/apt/sources.list $
deb http://download.virtualbox.org/virtualbox/debian squeeze contrib non-free
-- and then add the public key:
$wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
-- and install $ sudo apt-get update
 $sudo apt-get install virtualbox-4.1
-- finally, install extension pack
Install Java plguin, flash player, java JDK
sudo aptitude install sun-java6-plugin sun-java6-jdk sun-java6-jre sun-java6-bin sun-java6-sources
sudo aptitude install flashplugin-nonfree
Install multimedia players and codecs
aptitude install w64codecs libdvdcss2 gstreamer0.10-fluendo-mp3 ffmpeg sox twolame vorbis-tools  lame faad gstreamer0.10-ffmpeg gstreamer0.10-plugins-bad avifile-divx-plugin libfacc0
Install locales
sudo apt-get install locales sudo dpkg-reconfigure locales
Install Chinese fonts
apt-get install ttf-arphic-newsung apt-get install ttf-arphic-ukai ttf-arphic-uming apt-get install ttf-arphic-gbsn00lp ttf-arphic-bkai00mp ttf-arphic-bsmi00lp ttf-arphic-gkai00mp apt-get install ttf-bitstream-vera ttf-dejavu apt-get install msttcorefonts
Install SCIM input method
sudo apt-get install scim scim-pinyin scim-tables-zh scim-gtk2-immodule scim-qtimm 
sudo vi /etc/X11/Xsession.d/95xinput
add the following lines:
/usr/bin/scim -d
XMODIFIERS="@im=SCIM"
export XMODIFIERS
export GTK_IM_MODULE=scim
Change the default shell
The default shell under Debian is dash. To use bash,
$ dpkg-reconfigure dash
and select No to the question "Use dash as the default system shell (/bin/sh)?". This will link /bin/sh to /bin/dash.