Server Setup with Debian GNU/Linux 3.0 'Woody'


See our other documents on setting up desktop and server systems using Debian at

General configuration

Use the latest Debian 'stable' distribution from

Don't install applications using Tasksel or DSelect, just install the basic system and manually install any software specifically required.

Download and apply any security updates using 'apt-get update' then 'apt-get dist-upgrade'

Install any diagnostic programs for network card(s)

Make a rescue/boot floppy disk: mkboot

Partitioning scheme

Debian Installer's 'Multi-user workstation' option will create the following kind of partitions:

You may want to locate /home on a separate disk.

Apache - web server


If you instead need to use 'apache2', also install 'apache2-mpm-prefork' because "so long as you're using the prefork mpm. PHP isn't (yet) completely thread safe... it's a backend module for apache which behaves similarly to apache 1. i.e. one child process per request."

PHP - for programming databases


MySQL - database server



"MySQL will only install if you have a non-numeric hostname that is resolvable via the /etc/hosts file. E.g. if the "hostname" command returns "myhostname" then there must be a line like " myhostname""

The configuration file can live in a number of locations:

"Set a password for the MySQL root user. The default is none. If you use a /root/my.conf, write the 'user' and the 'password' lines in there, never only the password! See /usr/share/doc/mysql-server/README.Debian for more information."
Or, use either this

or this

MySQL on Debian defaults to not allowing remote networking connections. To enable remote connections the skip-networking setting in my.cnf needs to be commented out.


The location of database files is usually /var/lib/mysql/your-database-name (use mysqladmin variables | grep datadir to find it otherwise)

To open the mysql program: mysql -u <username> -p. The -p tells it a password is required, which you will be prompted for.

To create a database:

Set privileges on the database (this example may be more lapse than advisable):

See which users have privileges in MySQL:

See what databases have what users with privileges to access them:

MySQL server (mysqld) administration, using the command-line - these are the main MySQL clients and processes:

Further Information

MySQL 3.23, 4.0, 4.1 Reference Manual:

MySQL 5.0 Reference Manual:

MySql 4.1.x Database Survival Guide:

'MySQL Database Administration' - 'MySQL User Account Management' - 'MySQL Usernames and Passwords'

Samba - Windows file and print server


Generic configuration

Creating shares that can be mounted from a GNU/Linux workstation

This share can be mounted by root but files take the permission of whomever creates them.

This is what to do on the server, for what to do on the workstation see Desktop System Setup with Debian GNU/Linux 'Testing/Etch'#samba. or Desktop System Setup with Debian GNU/Linux 3.1 'Sarge''#samba.




Configuration file: /etc/dhcp3/dhcpd.conf

Upgrading to the next Debian Stable

In /etc/apt/sources.list change sarge or stable to old-stable.

Upgrade all software using apt-get update then apt-get dist-upgrade. Some softwares have been upgraded specifically to enable to upgrade to work.

'Release Notes for Debian GNU/Linux 3.1 ('sarge'), Intel x86 - Chapter 4 - Upgrades from previous releases':

'Debian Administration - Upgrading from Woody to Sarge: Part 1':