Installing Debian Etch from the Net

Introduction

Here's a quick guide on how to install Debian 4.0, a.k.a. "Etch" from the 150MB NetInst CD and fetch the rest of the files from the Net.

Setup

  1. Burn the ISO image, boot with it and follow the install procedure
  2. Once the OS is installed, run "apt-get update ; apt-get upgrade"

Post-Setup

USB

The server did detect the USB pen drive, but didn't auto-mount it. To do this, edit /etc/fstab, and add the following, using TABs in between columns:

/dev/sda1    /mnt/pen    vfat    noauto,users    0    0

Bash

alias ll='ls -al --color=auto'

SSH

  1. If you chose to install the basic configuration, SSHd should not be installed : apt-get install ssh. Once it's up and running, you can connect to the server from a remote host if you need to

Terminal

CTRL-Z to cancel?

  1. ll : uncomment /root/.bashrc
  2. No mouse
  3. USB KVM
  4. Beep : editing /etc/inputrc to uncomment those two lines stops the beep in bash when using the backspace key while in column 1, but doesn't stop vi/vim from being when using either the left arrow while in column 1 or hitting the ESC key:

    set bell-style none
    set bell-style visible
  5. Bad backspace key in vim: edit /etc/profile, and add the following:

    stty erase ^H
    alias ll='ls -al --color=auto'

  6. While in vi, arrow keys show ABCD : use vim
  7. Grub : no keyboard

http://www.ibb.net/~anne/keyboard.html

http://www.vim.org/tips/tip.php?tip_id=550

User-friendly text editor

SetEdit

Jed

McEdit

Packages to remove

  1. apt-get -s remove portmap
  2. uninstalling packages leaves scripts and symlinks under /etc/init.d/ and /etc/rc3.d/

Apt

vi /etc/apt/sources.list

#deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 NETINST Binary-1 20070407-11:29]/ etch contrib main

apt-get update

dpkg -l php*

dpkg -l apache* | grep ^i

dpkg -L php5-mysql

dpkg -S php.ini

Apache

apt-get install apache2

Why need to edit /etc/apache2/sites-available/default to remove RedirectMatch ^/$ /apache2-default/?

debian:/etc/apache2# pwd

/etc/apache2

debian:/etc/apache2# ll

total 60

drwxr-xr-x  7 root root  4096 2007-07-16 22:08 .

drwxr-xr-x 59 root root  4096 2007-07-16 23:25 ..

-rw-r--r--  1 root root 24175 2007-03-27 14:53 apache2.conf

drwxr-xr-x  2 root root  4096 2007-07-16 22:08 conf.d

-rw-r--r--  1 root root   895 2007-03-27 14:58 envvars

-rw-r--r--  1 root root     0 2007-07-16 22:08 httpd.conf

drwxr-xr-x  2 root root  4096 2007-07-16 23:25 mods-available

drwxr-xr-x  2 root root  4096 2007-07-16 23:25 mods-enabled

-rw-r--r--  1 root root    10 2007-07-16 22:08 ports.conf

drwxr-xr-x  2 root root  4096 2007-07-16 23:26 sites-available

drwxr-xr-x  2 root root  4096 2007-07-16 22:08 sites-enabled

PHP5

apt-get install php5

/usr/share/php5/php.ini-dist

vi /etc/php5/apache2/php.ini

extension=mysql.so

MySQL5

apt-get install mysql-server
apt-get install php5-mysql
apt-get install phpmyadmin php5-mcrypt php4-mcrypt php5-gd php4-gd
 
# mysql -u root
mysql> use mysql;
mysql> update user set password=password('test') where user='root';
mysql> flush privileges;
mysql> exit;
 
# mysql -u root -p
mysql> exit;

Postfix

apt-get install postfix postfix-mysql postfix-pgsql postfix-ldap postfix-pcre sasl2-bin libsasl2-modules resolvconf postfix-cdb

/etc/postfix/main.cf

/etc/init.d/postfix reload

debian:/etc/apache2# ll /var/spool/postfix/

total 76

drwxr-xr-x 19 root    root     4096 2007-07-16 23:54 .

drwxr-xr-x  4 root    root     4096 2007-07-16 23:55 ..

drwx------  2 postfix root     4096 2007-07-16 23:50 active

drwx------  2 postfix root     4096 2007-07-16 23:50 bounce

drwx------  2 postfix root     4096 2007-07-16 23:50 corrupt

drwx------  2 postfix root     4096 2007-07-16 23:50 defer

drwx------  2 postfix root     4096 2007-07-16 23:50 deferred

drwxr-xr-x  2 root    root     4096 2007-07-16 23:54 etc

drwx------  2 postfix root     4096 2007-07-16 23:50 flush

drwx------  2 postfix root     4096 2007-07-16 23:50 hold

drwx------  2 postfix root     4096 2007-07-16 23:50 incoming

drwxr-xr-x  2 root    root     4096 2007-07-16 23:54 lib

drwx-wx--T  2 postfix postdrop 4096 2007-07-16 23:50 maildrop

drwxr-xr-x  2 postfix root     4096 2007-07-16 23:50 pid

drwx------  2 postfix root     4096 2007-07-16 23:54 private

drwx--s---  2 postfix postdrop 4096 2007-07-16 23:54 public

drwx------  2 postfix root     4096 2007-07-16 23:50 saved

drwx------  2 postfix root     4096 2007-07-16 23:50 trace

drwxr-xr-x  3 root    root     4096 2007-07-16 23:50 usr

 

debian:/etc/apache2# postfix set-permissions

chown: cannot access `/usr/lib/postfix/dict_sdbm.so': No such file or directory

debian:/etc/apache2# apt-get -s install postfix-sdbm

E: Couldn't find package postfix-sdbm

Nano

DEL doesn't work in Nano : deletes previous character instead of following character -> edit /etc/nanorc, and add this "set rebinddelete"

Doesn't support FR keyboard: "un problοΏ½me de connexion"

Doesn't go to end of line when hitting End key

Midnight Commander

ALT-letter doesn't work to open menus

How to stay in current directory when exiting?

F5-F10 don't work, so must use kill to close MC

Wrong graphic characters over SSH:

 Left     File     Command     Options     Right                                                                                  -

β<─/tmp/punbb-1.2.15/uplo──────€β”€β”€β”€β”€β”€β”€βv>β”β”Œ<─/tmp/punbb-1.2.15/upload”€β”€β”€β”€β”€β”€β”€β”€β”€β”€βv>”‚                   Name                   β”‚ Size  β”‚   MTime     β”‚β”‚                   Name                   β”‚ Size  β”‚β/..                                       β”‚UP--DIRβ”‚             .                                       β”‚UP--DIRβ”‚           /cache                                    β”‚   4096β”‚Apr 11 16:06 β–’—β”‚/cache                                    β”‚   4096β”‚β/img                                      β”‚   4096β”‚Apr 11 16:06 ●–’β”‚/img                                      β”‚   4096β”‚β/include                                  β”‚   4096β”‚Apr 11 16:06 ●–’β”‚/include                                  β”‚   4096β”‚β/lang                                     β”‚   4096β”‚Apr 11 16:06 ●–’β”‚/lang                                     β”‚   4096β”‚β/plugins                                  β”‚   4096β”‚Apr 11 16:06 ●–’β”‚/plugins                                  β”‚   4096β”‚β/style                                    β”‚   4096β”‚Apr 11 16:06 ●–’β”‚/style                                    β”‚   4096β”‚β”admin_bans.phphp                         β”‚  13517β”‚Oct 14  2006 6 β–’β”‚ admin_bans.php                           β”‚  13517β”‚β”admin_categories.phphp                   β”‚   9013β”‚Apr 11 01:37 7 β–’β”‚ admin_categories.php                     β”‚   9013β”‚β”admin_censoring.phphp                    β”‚   5934β”‚Apr  7  2005 5 β–’β”‚ admin_censoring.php                      β”‚   5934β

Q&A

Ubuntu 7.04 doesn't like my network cards

Tried a RealTek, then a DLink, same error:

eth0: ERROR while getting interface flags: No such device
 
There is already a pid file /var/run/dhclient.eth0.pid with pid 134993416
 
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
 
SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device
eth0: ERROR while getting interface flags: No such device
Bind socket to interface: No such device
Failed to bring up eth0.

How to search package repositories for a package?

PunBB, etc. http://packages.debian.org/stable/web/

# less /etc/dpkg/origins/debian

Vendor: Debian

Vendor-URL: http://www.debian.org/

Bugs: debbugs://bugs.debian.org

Dpkg vs. dselect vs. apt-get

dpkg  is  a  tool  to install, build, remove and manage Debian packages. The primary and more user-friendly front-end for dpkg is dselect. dpkg can be also be used as a front-end to dpkg-deb.

apt-get is the command-line tool for handling packages, and may be considered the user's "back-end" to other tools using the APT library. Several "front-end" interfaces exist, such as dselect), aptitude, synaptic, gnome-apt and wajig.

apt-get update vs. upgrade

"update" is used to resynchronize the package index files from their sources. The indexes of available packages are fetched from the location(s) specified in /etc/apt/sources.list. "upgrade" is used to install the newest versions of all packages currently installed on the system from the sources enumerated in /etc/apt/sources.list.

Windows-like text editor

SetEdit : OK

MCEdit : OK

ne : OK (F1 for menu)

Jed : OK

Nano/MicroEmacs?

Le Editor : only old version in Debian repository

Managing packages

To search repositories for new software to install:

apt-get update ; apt-get search

apt-cache search "*emacs" = BAD???

http://newbiedoc.sourceforge.net/tutorials/apt-get-intro/info.html.en

Resources