List of packages installed manually
apt-get install kernel-source-2.6.8
apt-get install kernel-headers-2.6.8-2-386
apt-get install alsa-source
apt-get install cdfs-src
apt-get install pcmcia-source
apt-get install kernel-package
apt-get install kernel-image-2.6.8-2-386
apt-get install ksymoops
To configure the kernel sources so that you are able to build modules against them,
proceed as follows:
(cd /usr/src && tar jxvf kernel-source-2.6.8.tar.bz2 > debian.extract.out)
(cp /boot/config-2.6.8-2-386-smp /usr/src/kernel-source-2.6.8/.config)
cd /usr/src/kernel-source-2.6.8
make-kpkg --append-to-version "-2-386" --revision 2.6.8-2-386 \
--config old configure > debian.make_kpkg.out 2>&1
ln -sf /usr/src/kernel-source-2.6.8 /lib/modules/2.6.8-2-386-smp/build
Note: For non-SMP systems, I've found that it's quite a lot simpler to stick to using 386
as the architecture rather than bothering to build for 686
,
as there's quite a lot of manual modifications required to get foreign
modules to build and load correctly when the debian kernel is built for 686
.
In any case, to build foreign modules manually (i.e. without using the
module-assistant), you'll need to set your environment as follows before
launching the build:
export KVERS=`uname -r` KSRC=/usr/src/kernel-headers-`uname -r`
The cdfs
module allows you to mount audio and mixed-mode
CDs as if they were regular data CDs, so that you can examine their
contents using ls
and easily access files using cp
as if they were data files rather than audio tracks. To build the cdfs module according to the instructions in /usr/share/doc/cdfs-src/README.Debian
, use the module assistant m-a
to build it. Load the cdfs
module into the kernel, and mount your CD device (for example /dev/hdd
). So the steps would be as follows:
apt-get install kernel-headers-2.6.8-2-386
m-a a-i cdfs
modprobe cdfs
mkdir /mnt/cdrom_cdfs
mount -t cdfs /dev/hdd /mnt/cdrom_cdfs
At the moment, this list of packages isn't in any particular sequence. To find a description
of the purpose of any package, search for it in the summary files ending with the name _Packages
under the directory /var/lib/apt/lists
. For example, to see the description for unison
, search
for the string Package: unison
.
apt-get install --yes nfs-kernel-server
apt-get install --yes ntpdate
apt-get install --yes ntp
apt-get install --yes ntp-doc
apt-get install --yes ntp-simple
apt-get install --yes kdm
apt-get install --yes unison
apt-get install --yes unison-gtk
apt-get install --yes nasm
apt-get install --yes autofs
apt-get install --yes automake
apt-get install --yes libtool
apt-get install --yes automake1.8
For automake
, you'll often need to choose which version to use for building the
./configure
file for a given product. To do this, use Debian's update-alternatives
and choose option 2:
to select automake-1.8
as follows:
/usr/sbin/update-alternatives --config automake
More packages...
apt-get install --yes libx11-dev
apt-get install --yes libgtk1.2-dev
apt-get install --yes libgtk2.0-dev
apt-get install --yes libdvdread3-dev
apt-get install --yes libjpeg62-dev
apt-get install --yes libjpeg-progs
apt-get install --yes libjpeg-mmx-dev
apt-get install --yes libjpeg-mmx-progs
apt-get install --yes libjasper-runtime
apt-get install --yes liba52-0.7.4-dev
apt-get install --yes libmpeg3-dev
apt-get install --yes mpeg3-utils
apt-get install --yes libpng2-dev
apt-get install --yes libquicktime-dev
apt-get install --yes liblzo-dev
apt-get install --yes libsdl1.2-dev
apt-get install --yes libsdl1.2debian-alsa
apt-get install --yes libdv4-dev
apt-get install --yes libxml2-dev
apt-get install --yes libtheora-dev
apt-get install --yes libogg-dev
apt-get install --yes glibc-doc
apt-get install --yes hwinfo
apt-get install --yes lshw
apt-get install --yes rpm
apt-get install --yes xterm
apt-get install --yes cvs
apt-get install --yes subversion
apt-get install --yes k3b
apt-get install --yes dvd+rw-tools
apt-get install --yes xsane
apt-get install --yes grip
apt-get install --yes cdparanoia
apt-get install --yes cdrdao
apt-get install --yes hdparm
apt-get install --yes cdda2wav
apt-get install --yes kwave
apt-get install --yes snd
apt-get install --yes alsa-utils
apt-get install --yes jack
apt-get install --yes libvorbis-dev
apt-get install --yes kino
apt-get install --yes ogle-mmx
apt-get install --yes ogle-gui
apt-get install --yes xine-ui
apt-get install --yes alsaplayer
apt-get install --yes somaplayer
apt-get install --yes mpg321
apt-get install --yes audacity
apt-get install --yes libid3tag0-dev
apt-get install --yes timidity
apt-get install --yes pmidi
apt-get install --yes gkrellm
apt-get install --yes gkrellshoot
apt-get install --yes torsmo
apt-get install --yes sysstat
apt-get install --yes lm-sensors
apt-get install --yes wireshark # formerly ethereal
apt-get install --yes tshark # formerly tethereal
apt-get install --yes tcpdump
apt-get install --yes vpnc
After installing vpnc, you may find that you need to create the device node which the "tun" module needs:
cd /dev && mkdir net
cd /dev/net && mknod tun c 10 200
Firewall packages and useful security packages.
apt-get install --yes fwbuilder-linux
apt-get install --yes guarddog
apt-get install --yes guidedog
apt-get install --yes nmap
apt-get install --yes kismet
apt-get install --yes snort
apt-get install --yes airsnort
Some games, useful for testing DRI if your graphics card is supported. Planet Penguin racer is the new Tuxracer.
apt-get install --yes planetpenguin-racer
apt-get install --yes tuxracer
apt-get install --yes chromium
apt-get install --yes gltron
More packages...
apt-get install --yes ttf-freefont
apt-get install --yes fuse-source
apt-get install --yes fuse-utils
apt-get install --yes libfuse-dev
apt-get install --yes python2.3-fuse
apt-get install --yes python2.3-pyopenssl
apt-get install --yes python-dev
apt-get install --yes gnucash
apt-get install --yes gnumeric
apt-get install --yes gnupg
apt-get install --yes cryptplug
apt-get install --yes gnupg-doc
apt-get install --yes grub-doc
apt-get install --yes syslinux
apt-get install --yes mozilla-thunderbird
apt-get install --yes mozilla-firefox
Thanks to Jason Creighton for this tip: To configure Firefox so that Google Mail (a.k.a. "gmail") can be viewed using a
fixed-width (monospace) font, install the URLid and the User File Editor extensions, then (either using chromeEdit under the Tools
menu Edit User Files
or manually) add the following in your $HOME/.mozilla/firefox/*.default/chrome/userContent.css
:
body#mail-google-com .mb, textarea.tb {
font-family: monospace !important;
font-size: 12px !important;
}
If you have trouble finding the right directory to install userContent.css
, if you have findutils
installed then you can use locate userContent-example.css
and this should give the some more directories to try.
Last but not least, there's also the incredibly convenient Gmail Notifier extension developed by Doron Rosenberg.
apt-get install --yes mozilla-mailnews
apt-get install --yes fetchmail
apt-get install --yes mutt
apt-get install --yes screen
apt-get install --yes mc
apt-get install --yes minicom
apt-get install --yes sudo
apt-get install --yes recode
apt-get install hylafax-client
Note: Before installing the fax server hylafax-server
, make sure your modem is turned on.
apt-get install hylafax-server
apt-get install --yes hylafax-doc
apt-get install --yes samba
apt-get install --yes netatalk
apt-get install --yes linneighborhood
apt-get install --yes a2ps
apt-get install --yes qemu
apt-get install --yes fbi
apt-get install --yes fbiterm
apt-get install --yes gaim
apt-get install --yes kopete
apt-get install --yes lyx
apt-get install --yes cupsys
apt-get install --yes cupsys-client
apt-get install --yes gs-esp
apt-get install --yes cupsys-bsd
apt-get install --yes gnome-ppp
apt-get install --yes python-glade2
apt-get install --yes python-gnome2
apt-get install --yes wajig
apt-get install --yes unzip
apt-get install --yes pwgen
apt-get install --yes corkscrew
apt-get install --yes valgrind
apt-get install --yes valgrind-callgrind
apt-get install --yes kcachegrind
apt-get install --yes kcachegrind-converters
apt-get install --yes john fcrackzip crack
apt-get install --yes ltrace
apt-get install --yes cscope
apt-get install --yes exuberant-ctags
apt-get install --yes kdevelop3
apt-get install --yes kdevelop3-doc
apt-get install --yes dpatch quilt
apt-get install --yes manpages-posix manpages-posix-dev
apt-get install --yes libgdchart-gd2-xpm
apt-get install --yes python-gdchart2 python-gdchart2-doc
apt-get install --yes apache2 apache2-doc
Understanding the Debian Init Scripts
See the explanation here on the DebianHELP Wiki.
Building a Cross-Compiler
If you are involved in cross-compiling packages for other architectures,
you may decide to use dpkg-cross
to automate many of the setup steps. Thanks to Oliver Kurth for this tip.
The dpkg-cross
tool is similar in usage to dpkg
, and can be used to install and manage packages, libraries and header files for cross-compiling in a convenient way.
Debian supports the following architectures for cross-compiling:
alpha, arm, hppa, i386, ia64, m68k, mips, mipsel, powerpc, s390, sh, sparc.
To get started, first install the following packages.
apt-get install toolchain-source toolchain-source-gdb toolchain-source-newlib dpkg-cross
apt-get install autoconf2.13 dejagnu libgmp3-dev gperf doxygen
apt-get install amd64-libs-dev libgc-dev gnat help2man g77 realpath
Then to build the cross-compiler (for example for sparc-linux), the quick way is to use:
nohup tpkg-install sparc-linux
This will first go off and download the binary libc
debian packages from the specified
architecture and install them using dpkg-cross
. Then binutils
, gcc
and
gdb
source packages will be created using tpkg-make
. These packages will
be compiled and installed.
The exact steps are described in /usr/share/doc/toolchain-source/README
.
Remember to check the nohup.out
for any errors, in case you are missing any of the install dependencies.
To get a list of all the packages finally built using tpkg-install
, use for example:
apt-cache search sparc-cross
apt-cache search sparc-linux
which gives for example this list:
lib64gcc1-sparc-cross - GCC support library (64bit)
linux-kernel-headers-sparc-cross - Linux Kernel Headers for development (for cross-compiling)
libc6-sparc-cross - GNU C Library: Shared libraries and Timezone data (for cross-compiling)
libc6-dev-sparc-cross - GNU C Library: Development Libraries and Header Files (for cross-compiling)
lib64stdc++6-sparc-cross - The GNU Standard C++ Library v3 (64bit)
libstdc++6-pic-sparc-cross - The GNU Standard C++ Library v3 (shared library subset kit)
libdb1-compat-sparc-cross - The Berkeley database routines [glibc 2.0/2.1 compatibility] (for cross-compiling)
libc6-dev-sparc64-sparc-cross - GNU C Library: 64bit Development Libraries for UltraSPARC (for cross-compiling)
libstdc++6-dbg-sparc-cross - The GNU Standard C++ Library v3 (debugging files)
libc6-sparc64-sparc-cross - GNU C Library: 64bit Shared libraries for UltraSPARC (for cross-compiling)
libgcc1-sparc-cross - GCC support library
libstdc++6-dev-sparc-cross - The GNU Standard C++ Library v3 (development files)
libstdc++6-sparc-cross - The GNU Standard C++ Library v3
g++-3.4-sparc-linux - The GNU C++ compiler
cpp-3.4-sparc-linux - The GNU C preprocessor
gdb-sparc-linux - The GNU Debugger for sparc-linux
binutils-sparc-linux - Binary utilities for cross-developing for sparc-linux
gcc-3.4-sparc-linux - The GNU C compiler
Packages installed from other sources
Christian Marillat makes some tools available as Debian packages from his Unofficial Debian Packages repository. Read the instructions provided on his page, for the latest instructions on what to add to your /etc/apt/sources.list
If you're running Debian Sarge, for example, then to install packages
from his repository you'll need to edit the Debian installer's
configuration file /etc/apt/sources.list
and add the following line:
deb ftp://ftp.nerim.net/debian/ sarge main
Remember to run the command apt-get update
to get the new package lists available from this source, before trying to
install packages, for example:
apt-get install acroread
apt-get install mplayer-nogui
apt-get install mjpegtools
apt-get install lame
apt-get install liblame-dev
apt-get install libdvdread3-dev
apt-get install libdvdcss2-dev
apt-get install flashplayer-mozilla
Note that this repository uses the FTP protocol rather than HTTP, so it won't be accessible via the Squid configuration.
If you are working behind an http proxy firewall, then according to man apt.conf
you can't simply add an entry to the /etc/apt/apt.conf
file. Instead, it is possible to proxy FTP over HTTP by setting the environment variable ftp_proxy
to a HTTP url, as follows:
export ftp_proxy="http://your-proxy.your-domain:80"
Of course, what you download in this way won't be included in your Squid cache.
To reiterate: you can't set an ftp entry in the /etc/apt/apt.conf
configuration file to an http proxy.
In any case, it's not recommended to use FTP over HTTP due to its low efficiency, so only use the ftp-proxy
environment variable in this way if there's no alternative. The Debian Multimedia
repository is a good alternative, available over the http protocol.
Other Unofficial Repositories
Best of Both Worlds? Using apt
with RPM
By now you're probably feeling quite comfortable with using apt
and were perhaps getting a hankering to use it to update machines running distributions other than Debian. The apt4rpm guide will get you started, and the SuSE Wiki describes Install-apt4suse,
a utility to install apt
automatically.
Adam Doxtater's Multimedia on SuSE article describes how to install apt
for SuSE
.
For RedHat
, Fedora and RHEL ATrpms is the homepage describing the repository. If you have some other RPM-based distro, you might find a link to an apt
repository for it in the Repositories section of apt4rpm
.
Configuration changes for some packages
This section describes some of the default Debian configurations that seem awkward to use,
and that you may prefer to change rather than getting used to them.
Turn off autoindent
in vim
If you tend to do a lot of cut and paste between web browser and vim
, turning off autoindent
may
save some time.
You can make local changes to the vim
behaviour for a given user by adding the following to that user's $HOME/.vimrc
configuration file:
set noautoindent
You could also make the change system-wide by editing the file /etc/vim/vimrc
and commenting out
the line:
set autoindent
If you choose to do that, then remember that the next time you run apt-get dist-upgrade
, and there is an
update to the vim
package available, the update will pause waiting for you to choose whether to retain your
change, or to use the vim
maintainer's version, by presenting you with a message like the following:
Configuration file `/etc/vim/vimrc'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : background this process to examine the situation
The default action is to keep your current version.
*** vimrc (Y/I/N/O/D/Z) [default=N] ?
Reconfiguring an installed package
You can use dpkg-reconfigure to reconfiguring an installed package.
Debian Documentation
It's always worthwhile reading through the Debian Documentation. The time you spend in getting a better understanding pays off in many ways.
Debian Python Policy
If you are interested in using Python, the Debian Python Policy
is well worth reading, as it explains how multiple versions of Python
are packaged in such a way that they can co-exist on your system and
still be found by the scripts that use them.
Debian Perl Policy
If you are using Perl, the Debian Perl Policy explains how multiple versions of Perl are packaged in such a way that they can co-exist on your system.
Debian Java
To avoid getting Sun-burned, it's always good to use some Sun-screen.
With Java, using a clean free Java SDK and JVM will help keep you cool
and avoid any chance of Sun-stroke.
Look no further than the SableVM project.
The following will install SableVM
along with the headers needed for compiling "impure" JNI code, which you'll enjoy using in the next section:
apt-get install free-java-sdk
apt-get install libsablevm1-dev
Sun Java
To install Sun's proprietary Java runtime environment in such a way that it is managed by the Debian
packaging system, there is an article on the Debian Administration website here. Thanks to Eric De Mund for
this link. The main reason to do this is to allow your browser to work with Java applets. For now, the
reason Java applets don't work with SableVM is that there doesn't yet seem to be an Open JVM Integration (OJI) for any JRE other than Sun's proprietary one.
Rick is maintaining a Java section in the devtools section of his knowledgebase on the subject.
Impure thoughts
Why stick to writing "pure" code when your competitors are outperforming you by writing
in C? Although sticking to pure code is probably wise in the long run, the temptation
to use C for performance is always there.
Or maybe your reason to use C is more mundane: you already have a C library as part of
your product (maybe it implements the performance-critical sections), and you'd like to
call into it from a modern scripting language like Python to write a testsuite, but were
put off by the complexity of writing the all of the required C Python extension code.
Using a scripting language for writing testcases is especially convenient and far
easier to maintain than having to write them all in C.
You may be pleasantly surprised to learn that the SWIG
folks have already done all of the hard work: they've built a tool which
generates all of the tedious and
tricky C interface code for you.
So nowadays, to build an interface to a C library so that you can use it
from Python, Perl, Java and a host of other languages, one of the
easiest and most consistent ways to do it
is to use SWIG:
apt-get install swig
In Python 2.5 the ctypes
package, written by Thomas Heller, has been added to the standard
library. The ctypes package lets you call arbitrary functions in shared
libraries from Python.
How about a SWIG of Java?
If you are planning to build a standalone executable from your Java
program, remember that
the GNU Compiler Collection now includes a Java compiler. And not just
any mere Java bytecode compiler, this is the Java compiler your parents
warned you about.
It merrily compiles Java code (and even JARs of class files, as you'll
see later)
into native object code for your architecture, just like the GNU C
compiler does for C code.
So let's install gcj
and the development headers for building JNI using:
apt-get install gcj libgcj4-dev
Now you're probably wondering if you could build a standalone executable
which uses
a SWIG-generated JNI. Indeed you can, and although the preferred way of
calling
into C from gcj-compiled Java code is to use CNI rather than JNI, let's
use JNI in this
example as it's probably what you are more familiar with.
Let's say the SWIG API definition for your library is "myapi.swg" and
your library
is called "mylib.a", then the steps to build the Java files generated by
SWIG into a natively-compiled library "libmyapi_native.so" are as
follows:
swig -java myapi.swg
javac *java
jar cvf myapi_classes.jar *.class
gcj -fjni -shared -Wall -o libmyapi_native.so myapi_classes.jar
To compile and link the SWIG JNI library with your library "mylib.a", use:
gcc -fpic -I/usr/include/sablevm -c myapi_wrap.c
gcc -shared myapi_wrap.o mylib.a -o libmyapi.so
Then to compile, link and run your executable "mytestcase" would go as follows:
gcj -fjni -c -g -O mytestcase.java
gcj --main=mytestcase -o mytestcase -L. -lmyapi_native -lmyapi mytestcase.o
LD_LIBRARY_PATH=. ./mytestcase
Installing VMware on Debian
Let's use a new page for the topic of VMware On Debian, as the description of all the steps is somewhat involved.
There are also open-source alternatives to using VMware
.
Although each takes time to learn and each has a different goal, they
all have many strong points and can be used in many situations.
- The generic processor emulator QEMU (now with a Java GUI)
- Think inside the bochs
- The Xen virtual machine monitor
Be a Debian Package Maintainer
See here
for a guide to compiling a deb using a debian/rules subtree. Tools
exist to write a debian/rules tree for you, notably Joey Hess's
novice-friendly
debhelper
tool.