Difference between revisions of "Debian"

From Bobs Projects
Jump to: navigation, search
(Package Format)
 
(15 intermediate revisions by one user not shown)
Line 1: Line 1:
 
[[Category:Computing]]
 
[[Category:Computing]]
 
Debian GNU/Linux is a distribution of [[Linux]] which supports many platforms.
 
Debian GNU/Linux is a distribution of [[Linux]] which supports many platforms.
 +
 +
== Debian Packages ==
 +
[[wikipedia:Dpkg|dpkg]] is the main Debian (and Ubuntu) package management tool. It is usually used as a backend to apt or aptitude.
 +
 +
=== Getting Source Packages ===
 +
<pre>
 +
apt-get source <pkg>
 +
</pre>
 +
will download and unpack the sources for package <pkg> in the current directory. This is not a privileged operation.
 +
 +
=== Building packages ===
 +
[http://wiki.debian.org/BuildingAPackage BuildingAPackage] discusses building a package.
 +
 +
An alternative is to use dpkg-buildpackage (see the man page).
 +
 +
To get all dependies required for building a source package:
 +
apt build-dep $PKG
 +
 +
=== Package Format ===
 +
(see [[wikipedia:Deb_(file_format)|Deb_(file_format)]] at Wikipedia)
 +
 +
use:
 +
ar x $PKG.deb
 +
 +
to extract two bzip2'd tar files and a version file from .deb (in following order):
 +
 +
* debian-binary - 4 byte ascii version of the .deb format (eg. "2.0")
 +
* control.tar.xz - bzip2'd tar file of control files, typically ending up in /var/lib/dpkg/info/$PKG.*
 +
* data.tar.xz - bzip2'd tar file of files to end up in file system
 +
 +
=== Finding reverse dependencies ===
 +
use:
 +
apt-cache --installed rdepends <pkg>
 +
 +
* [http://askubuntu.com/questions/13296/how-do-i-find-the-reverse-dependency-of-a-package How do I find the reverse dependency of a package?] at askubuntu
 +
 +
=== Fixing signatures ===
 +
Sometimes, during an upgrade from an older Debian, a message such as:
 +
Release: The following signatures couldn't be verified because the public key is not available: ...
 +
will occur.
 +
 +
Fix by running:
 +
# apt-get install debian-archive-keyring
 +
then
 +
# apt-get update
 +
 +
== sudo ==
 +
Many system administration operations require "root" (superuser) access. Often it is "safer" to do this as a non-root user using the "sudo" (SuperUser DO) command.
 +
 +
Install sudo:
 +
<pre>
 +
#apt-get install sudo
 +
</pre>
 +
 +
Enable members of the sudo group to have sudo access, by uncommenting the appropriate line in /etc/sudoers:
 +
<pre>
 +
#visudo
 +
</pre>
 +
 +
Then add the respective users to the sudo group:
 +
<pre>
 +
#vi /etc/group
 +
</pre>
 +
 +
== debootstrap ==
 +
Debian can be installed from onto a running [[Linux]] system using debootstrap. The debootstrap() manpage contains a useful example of how to use it.
 +
 +
=== Locales ===
 +
debootstrap does not install locales, which results in messages such as the following appearing as other packages are installed:
 +
 +
<pre>
 +
perl: warning: Setting locale failed.
 +
perl: warning: Please check that your locale settings:
 +
LANGUAGE = "en_AU:en",
 +
LC_ALL = (unset),
 +
LANG = "en_AU.UTF-8"
 +
    are supported and installed on your system.
 +
perl: warning: Falling back to the standard locale ("C").
 +
locale: Cannot set LC_CTYPE to default locale: No such file or directory
 +
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
 +
locale: Cannot set LC_ALL to default locale: No such file or directory
 +
</pre>
 +
 +
The solution is to install and then configure locales:
 +
<pre>
 +
sudo apt-get install locales
 +
sudo dpkg-reconfigure locales
 +
</pre>
 +
 +
== Caching Name Server ==
 +
* [http://wiki.debian.org/Bind9 Bind9] on Debian Wiki
 +
 +
== See also ==
 +
* [[Linux]]
 +
* [[Ubuntu]]
  
 
== External links ==
 
== External links ==
 
* [http://www.debian.org Debian website]
 
* [http://www.debian.org Debian website]
 
* [http://www.debian.org/releases/stable/i386/ Debian GNU/Linux Installation Guide]
 
* [http://www.debian.org/releases/stable/i386/ Debian GNU/Linux Installation Guide]
 +
* [https://www.debian.org/doc/debian-policy/ Debian Policy Manual] at debian.org
 
* [http://users.wowway.com/~zlinuxman/Kernel.htm Creating a Custom Linux Kernel in Debian GNU/Linux]
 
* [http://users.wowway.com/~zlinuxman/Kernel.htm Creating a Custom Linux Kernel in Debian GNU/Linux]
 
* [http://newbiedoc.sourceforge.net/system/kernel-pkg.html Creating custom kernels with Debian's kernel-package system]
 
* [http://newbiedoc.sourceforge.net/system/kernel-pkg.html Creating custom kernels with Debian's kernel-package system]
Line 11: Line 107:
 
* [http://gabeortiz.net/2009/debian-diskless-cluster-howto/ Debian Diskless Cluster Howto] at [http://gabeortiz.net Gabe Ortiz]
 
* [http://gabeortiz.net/2009/debian-diskless-cluster-howto/ Debian Diskless Cluster Howto] at [http://gabeortiz.net Gabe Ortiz]
 
* [http://www.debian.org/distrib/packages Debian Packages]
 
* [http://www.debian.org/distrib/packages Debian Packages]
 +
* [https://www.debian.org/releases/stable/amd64/ch04s03.html.en 4.3. Preparing Files for USB Memory Stick Booting] at debian.org

Latest revision as of 10:55, 27 October 2020

Debian GNU/Linux is a distribution of Linux which supports many platforms.

Contents

Debian Packages

dpkg is the main Debian (and Ubuntu) package management tool. It is usually used as a backend to apt or aptitude.

Getting Source Packages

apt-get source <pkg>

will download and unpack the sources for package <pkg> in the current directory. This is not a privileged operation.

Building packages

BuildingAPackage discusses building a package.

An alternative is to use dpkg-buildpackage (see the man page).

To get all dependies required for building a source package:

apt build-dep $PKG

Package Format

(see Deb_(file_format) at Wikipedia)

use:

ar x $PKG.deb

to extract two bzip2'd tar files and a version file from .deb (in following order):

  • debian-binary - 4 byte ascii version of the .deb format (eg. "2.0")
  • control.tar.xz - bzip2'd tar file of control files, typically ending up in /var/lib/dpkg/info/$PKG.*
  • data.tar.xz - bzip2'd tar file of files to end up in file system

Finding reverse dependencies

use:

apt-cache --installed rdepends <pkg>

Fixing signatures

Sometimes, during an upgrade from an older Debian, a message such as:

Release: The following signatures couldn't be verified because the public key is not available: ...

will occur.

Fix by running:

# apt-get install debian-archive-keyring

then

# apt-get update

sudo

Many system administration operations require "root" (superuser) access. Often it is "safer" to do this as a non-root user using the "sudo" (SuperUser DO) command.

Install sudo:

#apt-get install sudo

Enable members of the sudo group to have sudo access, by uncommenting the appropriate line in /etc/sudoers:

#visudo

Then add the respective users to the sudo group:

#vi /etc/group

debootstrap

Debian can be installed from onto a running Linux system using debootstrap. The debootstrap() manpage contains a useful example of how to use it.

Locales

debootstrap does not install locales, which results in messages such as the following appearing as other packages are installed:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = "en_AU:en",
	LC_ALL = (unset),
	LANG = "en_AU.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

The solution is to install and then configure locales:

sudo apt-get install locales
sudo dpkg-reconfigure locales

Caching Name Server

See also

External links