Tuesday, April 8, 2008

Debian Guide

This is a unofficial Debian Guide. This is a Guide to Debian 3.1 aka Sarge. This is the latest stable release. This guide is designed for all, and is based off the Ubuntu Starter Guide - except it's for Debian, because Debian is far better. This Guide is basically how to tailor make your Debian install to be as good as (and better than) Ubuntu Linux.

This guide is a guide for information found through using Debian - so it's mainly custom solutions, applications and extra things to make Debian even better.

Introduction

What is Debian?

Debian is a free operating system (OS) for your computer. An operating system is the set of basic programs and utilities that make your computer run. Debian uses the Linux kernel (the core of an operating system), but most of the basic OS tools come from the GNU project; hence the name GNU/Linux.

Debian GNU/Linux provides more than a pure OS: it comes with over 15490 packages, precompiled software bundled up in a nice format for easy installation on your machine.

For more information, visit: http://www.debian.org/intro/about

How can I get Debian?

There are many ways. The best place to start is here: http://www.debian.org/distrib/

Where can I download Debian?

You can download Debian and burn to CD:

http://www.debian.org/CD/

Where can I find further Debian help?

There are many places around the web. Here is a short list:

*

http://www.debian.org/support
*

http://www.debian-administration.org/
*

http://www.debianhelp.org/
*

http://planet.debian.net/

Installation

Basic Installing

TBC.

Post-Reboot Setup

TBC.

Installing Core Packages

TBC.

Installing the X-Window-System and GNOME

TBC.

Installing Nifty Extras

TBC.

Further Applications

There are many further applications I have not covered above. They are thus documented just below, each is of course optional. Each is free (but not all below are open source).

Installing Applications & Updating Debian

What is Apt?

Apt is a core tool inside Debian. Apt makes it possible to:

* Install applications
* Remove applications
* Keep your applications up to date

Apt works with dpkg, another tool, which handles the actual installation and removal of packages (applications). Apt is very powerful, and can be used on the command line (console/terminal), and there are many GUI/Graphical tools to let you use Apt without having to touch the command line.

The documentation which follows is broken down into how you want to configure and use apt (either via the command line, or the graphical manager - synaptic).

Apt Command Line Tools

Configuring Apt

Apt downloads and installs, updates (and removes) packages (applications) from your debian. operating system. You can configure Apt to use a source (or multiple sources) to get these packages from. There are many sources - web (HTTP) servers, FTP servers, CD-ROM disks, network servers (etc). To configure apt from the command

Use apt-setup

Apt-setup lets you add an extra source to your Apt configuration.

1. Open a root console window (Applications -> System Tools-> Root Terminal in GNOME)
2. Type "apt-setup"
3. Follow the Wizard!

Edit sources.list

It's best to add new sources to Apt by using the apt-setup tool (see above). But, you may want to remove old source, and add your own directly:

1. Open a root console window (Applications -> System Tools-> Root Terminal in GNOME)
2. Type "nano /etc/apt/sources.list" (for a console editor) or "gedit /etc/apt/sources.list" (for a graphical editor)
3. Edit the sources file!
4. For help with the file, exit Nano (Ctrl+X) or gedit (Alt+F4) and type "man sources.list"

Installing an Application

1. Open a root console window (Applications -> System Tools-> Root Terminal in GNOME)
2. Type "apt-get install " where package is the name of the package (application) you want to install.

Removing an Application

1. Open a root console window (Applications -> System Tools-> Root Terminal in GNOME)
2. Type "apt-get remove " where package is the name of the package (application) you want to remove.

Updating an Application

1. Open a root console window (Applications -> System Tools-> Root Terminal in GNOME)
2. Type "apt-get update " where package is the name of the package (application) you want to update.

Keeping your system up-to-date

1. Open a root console window (Applications -> System Tools-> Root Terminal in GNOME)
2. Type "apt-get update".
3. Type "apt-get dist-upgrade"

Search for applications

1. Open a console window (Applications -> System Tools-> Terminal in GNOME)
2. Type "apt-cache search " where is the pattern to search for.

You may want to pipe the output (redirect the output) into "less" (a scrollable viewer) since the list may be huge:

apt-cache search | less

List installed packages

1. Open a console window (Applications -> System Tools-> Terminal in GNOME)
2. Type "dpkg --list"
3. You may want to pipe (redirect) that to a program called "less" since the list will be long (type "dpkg --list | less")

Find what package a binary belongs to

This is a really neat function of dpkg. Basically, if you want to find out what debian package a particular binary belongs to, do the following:

1. Open a console window (Applications -> System Tools-> Terminal in GNOME)
2. Type "dpkg -S /bin/foo" where /bin/foo is the full path to the binary

Simulate Upgrades

With apt-get you can simulate an upgrade - that is - show which packages would be installed if you did upgrade.

1. Open a root console window (Applications -> System Tools-> Root Terminal in GNOME)
2. Type "apt-get -s upgrade"

Delete used package files

If you want to delete the packages you've already installed applications from (via apt-get install) then you can do the following (and retrieve a lot of disk space!):

1. Open a root console window (Applications -> System Tools-> Root Terminal in GNOME)
2. Type "apt-get clean"

apt-spy

apt-spy will generate a sources.list file (the configuration file for apt package sources) for you! It measures the latency and bandwidth to servers, and picks the best one.

To get started, you'll need to install it, and then read how to use it:

1. Open a root console window (Applications -> System Tools-> Root Terminal in GNOME)
2. Type "apt-get install apt-spy"
3. Read about how to use apt-spy: type "man apt-spy"

configure packages

When packages are installed, you are asked to configure them via a wizard (note: most packages don't require configuration). To reconfigure packages, do this:

1. Open a root console window (Applications -> System Tools-> Root Terminal in GNOME)
2. Type "dpkg-reconfigure " where package is the name of the package

Graphical Apt Tool

There is a tool called Synaptic which lets you use all of the power of apt from one tool.

First, you must install it:

1. Open a root console window (Applications -> System Tools-> Root Terminal in GNOME)
2. Type "apt-get install synaptic".

Configuring Apt

1. Open Synaptic (Applications -> System Tools-> Synaptic Package Manager in GNOME)
2. Click the Settings Menu, and choose Repositories.
3. Configure!

Browsing, Installing, Removing

First - open Synaptic (Applications -> System Tools-> Synaptic Package Manager in GNOME)

Synaptic shows you all the packages available to you - and marks each one as installed or not installed. You can now navigate and find packages, marking packages you want to install (or remove) by clicking the tick box, and then click "Apply" to make changes.

Extra (Non-Standard) Applications

Network / Internet

Web Browsers

There are many web-browsers available in Debian GNU/Linux. Epiphany - the GNOME web-browser will have been installed if you have followed the "Install" part of this guide, or if you have installed GNOME.

Firefox

Firefox is perhaps the best web-browser available. It is highly recommended. To install:

1. Open a root console window (Applications -> System Tools-> Root Terminal in GNOME)
2. Type "apt-get install mozilla-firefox"

For more information: http://www.mozilla.org/products/firefox/

Galeon

Galeon is a lightweight web-browser designed for GNOME. It uses the same web-page rendering engine as Firefox.

1. Open a root console window (Applications -> System Tools-> Root Terminal in GNOME)
2. Type "apt-get install galeon"

For more information: http://galeon.sourceforge.net/

Mozilla Suite

The Mozilla Suite is a cross-platform integrated Internet suite. It contains the Navigator (web browser), Communitcator (Mozilla Mail & Newsgroups), a web page developer (Mozilla Composer), an IRC-Client (ChatZilla) and an electronic adress book.

1. Open a root console window (Applications -> System Tools-> Root Terminal in GNOME)
2. Type "apt-get install mozilla"

For more information: http://www.mozilla.org/

Konqueror

The Konqueror is the standard web browser in KDE.

1. Open a root console window (Applications -> System Tools-> Root Terminal in GNOME)
2. Type "apt-get install konqueror"

For more information: http://www.konqueror.org/

Dillo

Dillo is a small (~350kb), minimalistic multi-platform web browser. It has no CSS, JavaScript and Frame support.

1. Open a root console window (Applications -> System Tools-> Root Terminal in GNOME)
2. Type "apt-get install dillo"

For more information: http://www.dillo.org/

Opera

Opera is a web browser and Internet suite developed by the Opera Software company. Opera handles common Internet-related tasks such as displaying web sites, sending and receiving e-mail messages, managing contacts, IRC online chatting, downloading files via BitTorrent, and reading web feeds. Opera is offered free of charge for personal computers and mobile phones, but for other devices it must be paid for.

1. Download Opera here: http://www.opera.com/download/index.dml?platform=linux
2. Open the downloaded .deb-file with "GDebi-Installer".
3. Install Opera

For more information: http://opera.com/
Mail Clients

Evolution will have been installed.

Thunderbird

Mozilla Thunderbird is a free, open source, cross-platform e-mail and news client developed by the Mozilla Foundation.

1. Open a root console window (Applications -> System Tools-> Root Terminal in GNOME)
2. Type "apt-get install thunderbird"

For more information: http://www.mozilla.com/thunderbird

Sylpheed

Sylpheed is an open source e-mail and news client licensed under the GPL. It offers easy configuration and an abundance of features. It stores mail in the MH Message Handling System. Sylpheed runs on both Unix-like systems such as Linux, BSD, and Mac OS X and Windows. It uses GTK+.

1. Open a root console window (Applications -> System Tools-> Root Terminal in GNOME)
2. Type "apt-get install sylpheed"

For more information: http://sylpheed.sraoss.jp/en/

mutt

Mutt is a text-based e-mail client for Unix-like systems. It was originally written by Michael Elkins in 1995 and released under the GNU General Public License. Initially it resembled elm. Now the program most similar to it may be the newsreader slrn.

Mutt supports most mail formats (notably both mbox and Maildir) and protocols (POP3, IMAP, etc). It also includes MIME support, notably full PGP/GPG and S/MIME integration.

1. Open a root console window (Applications -> System Tools-> Root Terminal in GNOME)
2. Type "apt-get install mutt"

For more information: http://www.mutt.org/

FTP/SFTP/SCP Clients

gFTP

nautilus

Peer2Peer

Azureus

BitTorrent

eMule Client (aMule)

Instant Messaging

gAIM

Skype

X-Chat

irssi + screen

Media Players

Beep Media Player

Xine

MPlayer

Totem (w/ Xine)

Real Player

VLC

XMMS

Plugins, Runtimes and Viewers

Java Runtime Environment

Mono Runtime Environment

Adobe/Macromedia Flash Player/Plugin

PDF Viewer

CD and DVD

CD and DVD Burner

Compression Apps

Zip

Rar

Editing and Development

CLI Editors

GUI Editors

IDE's

Eclipse

NetBeans

Office / Authoring Applications

Gnome Office

OpenOffice.org

Other

Diagram Editor (Dia)

Nvu

System Configuration

Services and Boot Up

BUM

Gnome System Tools

etc.

Partition Manager

gParted

Firewall

Firestarter

Misc

aterm

Fonts

Compiling Applications

gDesklets

User Administration

Hardware

Networking

Tips and Tricks

Installing the ClearLooks GNOME Theme

Using the XFCE Desktop Environment

Sound: Using ALSA and ESD

Network Services

Remote Desktop

Windows File Server

SSH Server

Installing an SSH server is surprisingly simple and will allow you to access programs and files on your computer from anywhere that has access to port 22 on your computer. It's all done over an encrypted connection so any data transferred is going to be completely secure. This does open you up a little to anyone who can guess your password being able to log in, so it's good practice to ensure that either your root password is fairly complex or you disable root logins from elsewhere altogether.

1. Open a root console window (Applications -> System Tools-> Root Terminal in GNOME)
2. Type "apt-get install ssh"
3. Most users can leave all the options as their defaults when asked.

In order to make your SSH server more secure and more useful, it's well worth editing your sshd_config file to disable root logins and allow X forwarding (so you can run graphical applications on your computer but displayed on another computer providing it is also running X, either as part of a Linux/Unix/BSD system or under Cygwin in Windows).

1. Still in your root terminal, type "nano /etc/ssh/sshd_config".
2. Press Ctrl+W (for "Where Is").
3. Type "PermitRoot" and press enter.
4. You should see the option "PermitRootLogin", change it from "yes" to "no".
5. Press Ctrl+W again.
6. Type "X11For" and press enter.
5. Change "X11Forwarding" from "no" to "yes".
6. Press Ctrl+X to exit, and Y to confirm that you want to save.
7. Type "/etc/init.d/ssh restart" to restart your SSH server and confirm the changes.

If you need to do root things over SSH, SSH in as your normal user and type "su".

DHCP Server

Database Server

Web Server

FTP Server
D

No comments: