Created 17/11/2003
WARNING: This documentation is a mixture of userspace programs like apt-get(1) and configuration and setup like mkswap(8).
Todo: Refactor, extract out relevant sections such as "samba" and "apt-*", "swap space" and etc.
Use the "unstable" option to install the absolutely latest untested version of an application. E.g., to install the most recent code base for "Eterm",
# apt-get -t unstable install eterm
o Upgrading packages
# apt-get update # apt-get -dy dist-upgrade # apt-get dist-upgrade
bash # wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -
o Removing packages Once a package is installed using apt(1) (or even dpkg from a .deb file), then package management must be done using the dpkg(1) app. To remove (purge) an app,
dpkg -r pkg will remove the package named "pkg", but will leave configuration files dpkg -P pkg will purge the package named "pkg", including configuration files
Get:1 http://ftp.au.debian.org unstable/main mozilla-js-debugger 2:1.1-1 [226kB] Failed to fetch http://ftp.au.debian.org/pub/debian/pool/main/m/mozilla/mozilla-js-debugger_1.1-1_i386.deb MD5Sum mismatch
occurs during an "apt-get install" then it's because the mozilla-js-debugger can't be found (or is wrong). to get around this run wget(1) to get the missing package:
wget http://ftp.au.debian.org/pub/debian/pool/main/m/mozilla/mozilla-js-debugger_1.1-1_i386.deb /tmp
then copy the deb package into the apt archive, as root, thus,
sudo cp /tmp/mozilla-js-debugger_1.1-1_i386.deb /var/cache/apt/archives/
then run run the apt-get command.
It's possible to see the dependencies (what a package depends on, and what dependends on a package) by using the showpkg and show options of apt-cache. The showpkg option prints the package description and reverse dependencies. The show option prints the dependencies (but not the reverse dependencies) along with the package description. Both options print the package version and the md5 sum of the package.
bash $ apt-cache showpkg remind
Package: remind Versions: 03.00.22-1.1(/var/lib/apt/lists/transmission:9999_main_dists_unstable_main_binary-i386_Packages)(/var/lib/dpkg/status)
Reverse Depends: Dependencies: 03.00.22-1.1 - libc6 (2 2.2.5-13) tcl (0 (null)) wish (0 (null)) Provides: 03.00.22-1.1 - Reverse Provides:
Debian packages have a short description of what the package does, where it's cached, what's it's name is, the size of the package (.deb) and so on. To show the package description, use apt-cache's "show" option as in:
The show option prints a few more attributes such as the repository section to which the package belongs, the package maintainer, package archiecture and suggeted packages that should be installed along with the package. Like it's counterpart, the show option also prints the package description and the package dependencies:
bash $ apt-cache show remind
Package: remind Priority: optional Section: utils Installed-Size: 632 Maintainer: Paul Haggart <phaggart@debian.org> Architecture: i386 Version: 03.00.22-1.1 Depends: libc6 (>= 2.2.5-13) Suggests: tcl, wish Filename: pool/main/r/remind/remind_03.00.22-1.1_i386.deb Size: 224874 MD5sum: 98ba2eb54aabecaac44dba1a96f2d911 Description: a sophisticated reminder service Remind allows you to remind yourself of upcoming events and appointments via a reasonably easy to understand config file. Each reminder or alarm can consist of a message sent to standard output, or a program to be executed. . It also features: sophisticated date calculation, moon phases, sunrise/sunset, Hebrew calendar, alarms, PostScript output, tcl/tk front-end, multilingual messages, and proper handling of holidays. . Includes scripts for making a nice WWW calendar server (in the /usr/share/doc/remind/examples directory). And provides a graphical front-end for people who don't want to learn the scripting language.
This section has been moved to :hdd section #4.
Note: moved to :smb section 4
The entries for apt are kept in a plain text file, with pathname /etc/apt/sources.list. The format of the file is described in "man sources.list". After modifying the sources.list, it is a good idea to execute an update so that the apt cache is brought up to date with respect to the new apt sources locations:
bash $ apt-get update
The following example shows two sources.list entries. The first entry specifies a cdrom location and the second entry specifies an http location for debian stable at iinet:
deb cdrom:[Debian GNU/Linux 3.0 r0 _Woody_ - Official i386 Binary-1 (20020718)]/ unstable contrib main non-US/contrib non-US/main deb http://ftp.iinet.net.au/pub/debian/debian stable main contrib non-free
The search order for sources.list is first in, first out, so that in the previous example, the cdrom is searched first and then failing that, the iinet http entry is used.
find gtk themes by:
apt-get install xfonts-100dpi xfonts-75dpi ttf-bitstream-vera edit /etc/X11/XF86Config-4 add the new directories under the "Files" sections as in:
FontPath "/usr/share/fonts/truetype/ttf-bitstream-vera"
may need to "mkttfdir" for the bitstream vera true type fonts.
mkttfdir -e /usr/share/fonts/truetype/ttf-bitstream-vera
make sure the "msttcorefonts" (ms core fonts) are installed (dpkg -l msttcorefonts), if not install them via apt-get.
edit the font config file (font config v2) in /etc/fonts. e.g.,
vi /etc/fonts/local.conf
add the new font entries, under the <fontconfig> section <fontconfig> <dir>/usr/X11R6/lib/X11/fonts</dir> <dir>/usr/share/fonts/truetype</dir> <dir>/usr/local/share/fonts/jdk</dir> </fontconfig>
add the same to the font config v1 file which is /etc/X11/XftConfig. this is interim and will be replaced with the font config v2 xml (see above). Anyway, entires are (e.g.,)
dir "/usr/X11R6/lib/X11/fonts/Type1" dir "/usr/share/fonts/truetype" dir "/usr/share/fonts/truetype/ttf-bitstream-vera" dir "/usr/local/share/fonts/jdk"
add the new fonts to the font path with xset(1) or reboot the X server.
xset fp+ /usr/share/fonts/truetype/ttf-bitstream-vera xset fp+ /usr/X11R6/lib/X11/fonts/75dpi/ xset fp+ /usr/X11R6/lib/X11/fonts/100dpi/
rehash the font path with
xset fp rehash
a lot of the configuration and preference settings for a particular gnome/gtk app my not be settable by the application being run. instead there's a central configurator that handles global settings such as helper aplications and look and feel and etc. this is run by
gnome-control-center
by default debian uses /usr/lib/cgi-bin, stick stuff in there instead of /var/www/cgi-bin
alien(1) will convert an *.rpm into another format (*.deb package by default). It needs to run as root as it uses fakeroot to extract the rpm. Execution is straight forward and alien takes an optional switch, which is the archive format to convert to) and the name of the rpm to convert. E.g., to convert an .rpm to .deb format:
# alien some.rpm
Which will produce a deb package called "some.deb" in the same directory. as the rpm it was made from. To extract an .rpm and to create a .deb package, the various components for rpm and dpkg must be installed.
To build a tgz from an rpm:
# alien --to-tgz some.rpm
there's a console application called "minicom" that can be used to access devices attached via a rs232 serial cable. usage: minicom
The automounter in debian is autofs(1). It uses the file /etc/exports, exports(5), and it's entries are made available via running the exportfs(1) command.
On the client side, the auto mounter must be restarted to pick up any changes made on the server side. This is done with /etc/init.d/autofs stop and /etc/init.d/autofs start. Once this is done, the entries made available on the server will be accessible on /var/autofs. Consider:
host called "server". Entries in /etc/exports is to provide "rw" access to /data/www. This is done with:
# cat /etc/exports /data/www/javadoc 192.168.1.0/24(rw,sync)
Then "server" makes this available with:
# exportfs -a
The currently exported filesystems on "server" are accessed by running the exportfs(1) command with no arguments:
# exportfs /data/public 192.168.1.0/24
on the client machine called "client", we have to start the automounter (or restart it if it's already running) to get access to the remote file system. The auto mount point is typically /var/autofs/net:
# /etc/init.d/autofs start # ls /var/autofs/net/transmission/data/www/javadoc apache-ant-1.5.3-1/ j2se/ jdo/ log4j/
The auto mounter's configuration on "client" is handled by the files /etc/auto.*, see autofs(5) e.g.,:
# cat /etc/auto.master /var/autofs/misc /etc/auto.misc /var/autofs/net /etc/auto.ne
# cat /etc/auto.misc kernel -ro ftp.kernel.org:/pub/linux boot -fstype=ext2 :/dev/hda1 removable -fstype=ext2,sync,nodev,nosuid :/dev/hdd cd -fstype=iso9660,ro,sync,nodev,nosuid :/dev/hdc floppy -fstype=auto,sync,nodev,nosuid :/dev/fd0
The file /etc/auto.net is a script. Don't know what it's used for.
Note: This section may still be useful. Consider reworking and integrating into :smb
On "client", the samba share can be accessed using "smbclient", which provides for ftp-like access or it can be mounted with "smbmount", which provides nfs-like access. The smbmount is only available under the linux version of samba (not sun) and must be compiled into the executable.
The smbclient can be run by any user as it runs unpriviledged. The user must have an password on "server", which may be configured to use the remote machines user authentication (e.g., pam) or it may be configured to use the samba passwd authentication (which is the default). In the latter case, the user entry must exist in /etc/samba/passwd. Entries can be added with the smbpasswd(1) script.
# smbclient -W fluency //transmission/public Password: Domain=[FLUENCY] OS=[Unix] Server=[Samba 3.0.4-Debian] smb: \> dir . D 0 Fri Jun 25 15:13:37 2004 .. D 0 Wed Jun 23 11:07:44 2004 common D 0 Fri Jun 25 15:13:21 2004 streamline D 0 Fri Jun 25 15:13:37 2004
34162 blocks of size 524288. 3662 blocks available smb: \>
Note: This section has been moved to :bash (section #25)
This section has been moved to :gnu (section #6)
Stuart Moorfoot © 17 Nov 2007 foo@bund.com.au