translation: [:Manual-HowtoPolish:Polski],[:fr/ManualHowto:Français],[:Manual-HowtoSpanish:Spanish],[:Manual-HowtoDutch:Dutch].

How to install and configure various software on Debian. Step by step.

?TableOfContents(2)

Keywords: Debian GNU Linux, Manual, How To, How-To,howto, Installation, Configuration, Easy, From Windows XP to Debian, Wireless WPA2, anti-spam, fax, Documentation, MoinMoin Wiki, Linux, servers, Windows, Windows NT, Documentation, howto, ?HowTo, vmware, installation, vmwaretools, vmware tools, vm, tools, tool, AMD64, 64 bit

Debian Services

Installing and Configuring Postfix on Debian

See ["Postfix"]

Debian Postfix and smtp.sbcglobal.yahoo.com

See ["Postfix"]

Ampache (Music Server) on Debian

See ["Ampache"]

MoinMoin Wiki with Apache2 and Mod Python

See ["?ApachePython"]

Fax Server

See ["HylaFax"]

Network Time Synchronization

See ["NTP"]

FTP Server

Install

aptitude update
aptitude install vsftpd

Configure

vi /etc/vsftpd.conf

anonymous_enable=NO

write_enable=YES

ftpd_banner=Welcome to example.com FTP service. Enjoy.

local_enable=YES

Photo Album Server

http://lucasmanual.com/mywiki/PhotoAlbumServer

Domain Controller, Samba

http://lucasmanual.com/mywiki/SambaDomainController

NFS Server

See the Debian Wiki page ["NFSServerSetup"].

VMware Server On Debian

http://lucasmanual.com/out/Debian-vmware-windows-xp.jpg

VMware Kernel Upgrade

aptitude update
aptitude install linux-headers-$(uname -r)
/usr/bin/vmware-config.pl

VMware on amd64

aptitude install linux-headers-`uname -r` libx11-6 libx11-dev x-window-system-core x-window-system xspecs libxtst6 psmisc build-essential ia32-libs

Debian Anti-Spam Anti-Virus Gateway Email Server

http://lucasmanual.com/mywiki/DebianAntiSpamGatewayEmailServer

RSA Authentication Manager

Debian Printing

http://lucasmanual.com/mywiki/DebianPrinting

Debian Configuration

Change from dhcp to static ip

iface eth0 inet static
[tab]address 192.168.1.200
[tab]network 192.168.1.0
[tab]netmask 255.255.255.0
[tab]broadcast 192.168.1.255
[tab]gateway 192.168.1.1

#iface eth0 inet dhcp
iface eth0 inet static
    address 192.168.1.200
    network 192.168.1.0
    netmask 255.255.255.0
    broadcast 192.168.1.255
    gateway 192.168.1.1

iface eth0 inet static
    address 192.168.5.200
    network 192.168.5.0
    netmask 255.255.255.0
    broadcast 192.168.5.255
    gateway 192.168.5.254

Subversion

apt-cache search svn
aptitude install subversion

/home/lucas/my_best_project

/home/lucas/my_best_project/trunk/install.c
/home/lucas/my_best_project/trunk/readme.txt

/usr/local/src/

svnadmin create /usr/local/src/my_best_project

svn import /home/lucas/my_best_project file:///usr/local/src/my_best_project -m "initial import"

svn checkout file:///usr/local/src/my_best_project

/home/lucas/new_folder/my_best_project

* Optional, you could use subversion over ssh. You need to install subversion on your computer and then:

svn co svn+ssh://your.remote-server.com/usr/local/src/my_best_project

* Done. Now its time to make that tool great.

Multimedia player and codec on Debian

/etc/apt/source.list

deb http://mirrors.ecology.uni-kiel.de/debian/debian-multimedia testing main

wget http://www.debian-multimedia.org/pool/main/d/debian-multimedia-keyring/debian-multimedia-keyring_2007.02.14_all.deb
dpkg -i debian-multimedia-keyring_2007.02.14_all.deb

aptitude update
aptitude install xine-ui

aptitude install w32codecs

Ati binary driver

Steps borrowed from [http://michael.susens-schurter.com/blog/2006/11/20/installing-fglrx-ati-drivers-in-debian-etch/ Michael Schurter's blog]. Tips borrowed from [http://gentoo-wiki.com/HOWTO_ATI_Drivers Gentoo wiki].

aptitude update
aptitude install fglrx-control fglrx-driver fglrx-kernel-src module-assistant mesa-utils

cd /usr/src

module-assistant prepare

module-assistant a-i fglrx

cp /etc/X11/xorg.conf /etc/X11/xorg.conf.todaysdate

Section "Device"
   Driver "fglrx"
   Option "VideoOverlay" "on"
EndSection

Section "Extensions"
   Option "XVideo" "Enable"
EndSection

/etc/init.d/gdm stop

Or KDE Display Manager

/etc/init.d/kdm stop

Or X Display Manager

/etc/init.d/xdm stop

modprobe -r radeon

modprobe fglrx

/etc/init.d/gdm start

glxinfo | grep direct

xvinfo

Mount Windows Share

aptitude update
aptitude install smbfs

mkdir somefolder

mount -t smbfs -o username=administrator,password=password
//windowsservername/folder /home/lucas/somefolder

If you don' want the password to show up you could do

mount -t smbfs -o username=administrator //windowsservername/folder /home/lucas/somefolder

[Optional] You can replace administrator with your username. You can also replace windowsservername with ip address //192.168.1.10/folder ....

Add a network card

lspci -v

ifconfig eth1 hw erher 00:00:..:00 uo

Raid 1 Setup

http://lucasmanual.com/mywiki/DebianRAID

Power Users

Sudo

aptitude update
aptitude install sudo

visudo

yourusername    ALL=(ALL) ALL

Disable ssh root access

vi /etc/ssh/sshd_config

PermitRootLogin no

/etc/init.d/ssh force-reload

Security Events
=-=-=-=-=-=-=-=
Feb  5 07:21:15 localhost sshd[8586]: Failed password for root from xx.xx.xx.xx port 60618 ssh2
Feb  5 07:21:15 localhost sshd[8588]: Failed password for root from xx.xx.xx.xx port 60637 ssh2

AWStats on Debian

aptitude update
aptitude awstats

cp /usr/share/doc/awstats/examples/apache.conf /etc/apache2/conf.d/awstats

LogFile="/var/log/apache2/access.log"
SiteDomain="mysite.org"
LogFormat=1

chmod o+r /var/log/apache2/access.log

 create 644 root adm

prerotate
    /usr/lib/cgi-bin/awstats.pl -config=awstats.www.mysite.org.conf  -update
  endscript

/var/log/apache2/*.log {
        weekly
        missingok
        rotate 52
        compress
        delaycompress
        notifempty
        create 644 root adm
        sharedscripts
        prerotate
            /usr/lib/cgi-bin/awstats.pl -config=awstats.conf -update        endscript
        postrotate
                if [ -f /var/run/apache2.pid ]; then
                        /etc/init.d/apache2 restart > /dev/null
                fi
        endscript
}

/etc/init.d/apache2 reload

http://localhost/cgi-bin/awstats.pl?config=awstat.conf or http://www.mysite.com/cgi-bin/awstats.pl?config=awstat.conf [Optional]

RedirectMatch ^/logs /cgi-bin/awstats.pl?config=awstat.conf

http://www.mysite.com/logs

unixODBC

aptitude update
aptitude install tdsodbc unixodbc

vi /etc/freetds/tds.driver.template

[TDS]
Description     = FreeTDS Driver for Linux & MSSQL on Win32
Driver          = /usr/lib/odbc/libtdsodbc.so
Setup           = /usr/lib/odbc/libtdsS.so

vi /etc/freetds/tds.dsn.template

[DSN_NAME]
Description     = Descripton of you DSN connection.
Driver          = TDS
Trace           = No
Database        = DefaultDatabase [replace with your database name]
Server          = mysqlserver.inter.net [replace with your SQL server's host,ip]
Port            = 1433 [replace with the port that SQL is listening on]

odbcinst -i -d -f /etc/freetds/tds.driver.template

odbcinst -i -s -l -f /etc/freetds/tds.dsn.template

odbcinst -i -s -f /etc/freetds/tds.dsn.template

isql -v DSN_NAME username password

**********************************************
* unixODBC - isql                            *
**********************************************
* Syntax                                     *
*                                            *
.
.
.
more
.

Troubleshooting

telnet myserver 1433

Trying 10.3.3.10...
Connected to myserver.
Escape character is '^]'.

If you still get connection refused try telnet from windows and see if you get same answer.

Debian User Configuration

Change default editor

aptitude update
aptitude install vim

update-alternatives --config editor

Change default pdf viewer

Java Runtime Enviroment (JRE)

You will need to add 'non-free' to your /etc/apt/source.list then do:

aptitude update
aptitude install sun-java5-jre
aptitude install sun-java5-plugin

Flash player

aptitude update
aptitude install flashplugin-nonfree

cp /home/lucas/Desktop/libflashplayer.so /usr/lib/mozilla/plugins/
cd /usr/lib/iceweasel/plugins/
ln -s /usr/lib/mozilla/plugins/libflashplayer.so

Laptop and Debian

Intel ipw2200 wireless card

http://ipw2200.sourceforge.net/firmware.php?fid=7

tar xzvf ipw2200-fw-3.0.tgz -C /lib/firmware
mv /lib/firware/ipw2200-fw-3.0/* /lib/firmware

uname -a

aptitude update
aptitude install ipw2200-modules-2.6.18-5-486
or
aptitude install ipw2200-modules-$(uname -r)

iwconfig

Authenticate with wpa using PSK TKIP

* Install wpasupplicant

aptitude update
aptitude install wpasupplicant

* Open /etc/network/interfaces

vi /etc/network/interfaces

*If you see "iface eth2..." add the following lines, but change ssid and password:

iface eth2 inet dhcp
wpa-ssid thisismynetworkname
wpa-key_mgmt WPA-PSK
wpa-proto WPA
wpa-pairwise TKIP
wpa-group TKIP
wpa-psk thisismypassword
wpa-driver wext

*Exit, and now type:

ifup eth2

*Done. If you want you your wireless card to connect each time you boot your computer add this above "iface eth2.."

auto eth2

*Done. [Optional](see the [:WPA:WPA page] for status on wpa support in debian)

Broadcom (Dell) Wireless Card 1390

See: ["bcm43xx"]

Intel Graphic card - Higher reolution

aptitude install 915resolution

915resolution -l

sudo 915resolution 5c 1280 800 24

User Manuals

DVD9 to DVD5

[http://lucasmanual.com/mywiki/DVD9toDVD5 DVD9toDVD5]

DVD9 to AVI

[http://lucasmanual.com/mywiki/DVD9toAVI DVD9toAVI]

rsync

[http://lucasmanual.com/mywiki/rsync rsync]

Troubleshooting

SSH terminal connection timeout

Read from remote host example.com: Connection reset by peer
Connection to example.com closed

ClientAliveInterval 150

Dynamic MMap ran out of room

{{{Reading package lists... Error! E: Dynamic MMap ran out of room E: Error occurred while processing vlc (?NewVersion1) }}}

apt-get update -o APT::Cache-Limit=25165824

MySQL

[http://lucasmanual.com/mywiki/MySQL MySQL]

Useful Debian Programs

Digital Camera

* Digikam, for all your digital camera needs

aptitude update
aptitude install digikam

CD and DVD

* K3B, for burning cd/dvd.

aptitude update
aptitude install k3b

Players and Viewers

Flash

aptitude update
aptitude install flashplugin-nonfree

Debian inside VMWare

VMWare Tools Installation

--> Adjust the version number of VMWare-Tools in the commands below to your needs!

Become root

su

Unmount the ISO from which you installed debian in VMWare

umount /dev/cdrom

Start the VMWare Tools installation from the Menu of VMWare and select Install VMWare Tools... Mount the CD with VMWare Tools

mount /dev/cdrom

Copy the VMWare Tool File from the CD to folder tmp

cp /media/cdrom/VMwareTools-6.0.2-59824.tar.gz /tmp

Change to folder tmp

cd /tmp

Unzip The file

gzip -d VMWareTools-6.0.2-59824.tar.gz 
tar xf VMWareTools-6.0.2-59824.tar

Delete files we don't need anymore

rm /tmp/VMWareTools-6.0.2-59824.*

Download and install the linux headers

aptitude install linux-headers-$(uname -r)

Download and install gcc

aptitude install gcc

Start the installation

/tmp/vmware-tools-distrib/vmware-install.pl

Accept all suggestions or modify them to your needs

Previous (aborted) installation

Not tested. In case of an aborted installation you can try this before you try to install again.

su
/usr/bin/vmware-uninstall-tools.pl

Configure VMWare Tools

su
/usr/bin/vmware-toolbox