¡Esta es una revisión vieja del documento!
Tabla de Contenidos
Conozca Slackware
Introducción
Este documento pretende que la gente que ya ha utilizado otro sistema “tipo-Unix” conozca rápidamente Slackware. Asumimos que el lector:
- conoce los comandos principales de Unix y sus conceptos asociados,
- conoce cómo editar un archivo de texto (tal como un archivo de configuración)
- sabe leer un script de shell sencillo
Recursos
La web de Slackware
El sitio web slackware.com
es un punto de entrada a los siguientes recursos
- La Tienda para apoyar financieramente Slackware,
- El árbol de archivos desde la versión 1.01,
- El gestor de paquetes que permite encontrar los paquetes para todas las versiones desde Slackware 8.1
Directorios y documentos en la raíz del árbol de archivos de la distribución
Estos documentos están disponibles también en la raíz de cada una de las Imágenes ISO
Aquí está una lista incompleta de los directorios principales y documentos útiles para los recién llegados a Slackware.
. |-- CHANGES_AND_HINTS.TXT Ver al final: OTROS CAMBIOS NOTABLES Y PISTAS |-- README.TXT presentación de la versión, incluidas las series de paquetes |-- README.initrd cómo crear un "initrd" para arrancar el sistema[1] |-- Slackware-HOWTO requisitos, instalación y configuración |-- EFI/ instalador para la UEFI 64-bit de la version 14.1 |-- extra/ paquetes y fuentes adicionales |-- isolinux/ instalador |-- kernels/ kernels |-- pasture/ fuentes y paquetes obsoletos |-- patches/ paquetes y fuentes actualizados tras un lanzamiento |-- slackware/ paquetes base (para 32-bit) |-- slackware64/ paquetes base (para 64-bit) |-- testing/ paquetes para los aventureros `-- usb-and-pxe-installers/ métodos de instalación alternativos
[1] Ver también /usr/share/mkinitrd/mkinitrd_command_generator.sh tras la instalación.
Los nombres de los otros documentos con la extensión TXT dan pistas acerca de su contenido.
Otras fuentes de información
El propósito de la web de la comunidad SlackDocs es ser la principal fuente de información sobre Slackware. Visítela preferentemente para profundizar los temas tratados en este documento.
Los recién llegados a Slackware (y otros) tienen el Foro de Slackware en el sitio web Linuxquestions.org, abreviado con frecuencia como LQ.
Puede hallar otras fuentes de información siguiendo los Enlaces de Slackware propuestos por onebuck de LQ.
Después de la instalación, lea el email de Patrick Volkerding, contiene información adicional: simplemente teclee mail
como root, o lea el archivo /var/spool/mail/root con less
.
==== Installation, configuration, startup ====
Instalación, configuración, arranque
Instalación
Los medios de instalación se pueden obtener en el sitio web de Slackware (ver arriba).
Slackware proporciona un instalador de texto, el documento de Slackware-COMO ilustra el proceso de instalación.
El auténtico instalador sólo está disponible en Inglés pero el proyecto Slint ofrece instaladores multilenguaje, que complementan también la configuración del sistema: elegir el lenguaje, la distribución del teclado y la creación de los usuarios normales. Un paquete Slint, asimismo instalado, proporciona versiones multilenguaje de las herramientas principales de administración y/o sus páginas de manual. Desde la versión 14.1 los instaladores Slint se pueden controlar en un terminal Braille, que igualmente se puede usar para controlar el sistema instalado.
Configuración post-instalación
Las tareas de configuración y administración se deben llevar a cabo como root. Si está conectado como usuario normal, teclee su
(para obtener los privilegios de root) o su -
(para cambiar a root). El comando sudo
, si bien disponible, se usa raramente para administrar Slackware.
- Para crear usuarios “normales”, teclee
adduser
- Para cambiar la fuente de la consola teclee
setconsolefont
- Para cambiar la distribución del teclado de la consola edite /etc/rc.d/rc.keymap y hágalo ejecutable
- Para cambiar el LANG edite /etc/profile.d/lang.sh y en su caso /etc/profile.d/lang.csh. Nota: en Slackware /bin/sh es un enlace simbólico a /bin/bash.
- Para modificar los ajustes de teclado para X (en modo gráfico), copie usr/share/X11/xorg.conf.d/90-keyboard-layout.conf a /etc/X11/xorg.conf.d, entonces edite la copia. El archivo etc/X11/xkb/rules/evdev.lst lista todos los valores conocidos para XkbModel, XkbLayout, XkbVariant y XkbOptions bajo los respectivos encabezamientos
! model
,! layout
,! variant
y! option
- Puede relanzar los scripts de instalación (ya utilizados al final de la instalación) utilizando el comando
pkgtool
, en la entrada de menúSetup
.
Slackware incluye los editores de texto principales, tales como pico, nano, elvis y vim, y los gestores de archivos mc y thunar y, por supuesto, todas las utilidades y shells, útiles para configurar y administrar el sistema.
En general, Slackware no prejuzga el cómo se va a utilizar el sistema. Depende del administrador adaptarlo para sus intenciones editando los archivos de configuración situados en /etc o en sus sub-directorios. Ayuda tanto leer los comentarios en los archivos de administración de los servicios en /etc/rc.d como los archivos de configuración.
El arranque
Al primer arranque tras la instalación el sistema estará en modo “consola”, sin GUI. Si prefiere arrancarlo en modo gráfico, sustituya “id:3:initdefault:” con “id:4:initdefault:” (runlevel 4 en vez de 3) en el archivo /etc/inittab
De otra manera, para cambiar de modo consola a modo gráfico, elija primero su gestor de ventanas predeterminado mediante el comando xwmconfig
bien como root (para todos) o bien como usuario normal (para ese usuario). Entonces teclee startx
para iniciar dicho gestor de ventanas o escritorio tras el arranque del sistema.
En Slackware los niveles de ejecución configurados en /etc/inittab son:
- 0: apagado
- 1: usuario simple
- 3: multi-usuario (nivel predeterminado)
- 4: igual que 3, pero con gestor de sesión en X
- 7: reinicio
A estos niveles les corresponden scripts en /etc/rc.d:
- rc.S se ejecuta en el arranque, inicializa el sistema, revisa y monta los sistemas de archivos.
- rc.M en el modo multi-usuario inicia la mayoría de los servicios (demonios lanzados por los scripts en /etc/rc.d si son ejecutables).
- rc.K lleva al modo usuario simple (ejecuta el nivel 1 o S).
- rc.4 arranca el gestor de sesiones: gdm, kdm o xdm, otros se pueden añadir editando ese script.
- rc.0 apaga el sistema (enlaza simbólicamente a rc.6)
- rc.6 limpiamente reinicia o apaga el sistema (si se llama como rc.0).
Nota. El administrador puede añadir scripts de servicios (gestores de demonios) en /etc/rc.d. Situe el start
de los demonios en /etc/rc.d/rc.local y el stop
en /etc/rc.d/rc.local_shutdown. /etc/rc.d/rc.local se ejecuta por /etc/rc.d/rc.M, /etc/rc.d/rc.local_shutdown por /etc/rc.d/rc.6
Slackware incluye adicionalmente una estructura para manejar los servicios por nivel de ejecución al modo sysvinit
para aquel software no incluido en la distribución (el comercial, claramente) que lo necesite.
La gestión de los servicios a ejecutar en el arranque se puede hacer:
- Manualmente haciendo ejecutable: (
chmod 755 <nombre del script>
) o no: (chmod 644 <nombre del script>
) al correspondiente script en /etc/rc.d - Utilizando el comando
pkgtool
(elijaSetup
y despuésservices
en el menú).
Nota. Como todas las herramientas administrativas, pkgtool
deber ser ejecutada como root.
Management of software packages
Presentation of Slackware software packages
Slackware is distributed as a set of software packages containing applications and associated documents, and if necessary scripts executed during installation, noticeably for creating symbolic links or manage the configuration files and services' management scripts.
A Slackware package consists in a file tree archived with tar
and once
compressed with gzip
, nowadays with xz
.
A shell script called “SlackBuild” compiles binaries to be shipped in the
archive and installs them in the package's tree alongside other files. It
usually ends with the execution of the makepkg
command, which makes the
archive from the package's file tree, including case occuring the
appropriate installation scripts, cf. “man makepkg”.
The software packages are in the directories of installation media indicated above. Each of these directories contains following files:
- PACKAGES.TXT ⇒ Name, size, and description of each package.
- FILE_LIST ⇒ All files included in the directory.
- MANIFEST.bz2 ⇒ The characteristics of each file (to be) installed by each package (file compressed with
bzip2
)
The directories slackware/ or slackware64/ gather package “series” like a/, ap/, d/, etc. These series are described in README.TXT and Slackware-HOWTO at the root of the installation media. They are presented during installation.
During a full installation, all the packages in slackware/ or slackware64/ are proposed.
Important: as Slackware does not automatically manage dependencies between software, it is recommended to beginners to perform a complete or “full” installation: all the files needed to run the applications are provided in Slackware packages, thus installing them all guarantees that all dependencies will be met.
To each software package corresponds a source directory, located:
- in the source/ sub-directory of directories extra/, pasture/ et testing/
- in the source/ directory of the files trees and in specific ISO images in directories (32-bit edition) of ISOs for the packages in slackware/ or slackware64/
For instance, for version 14.1 the contents of the directory source/ap/tmux/ is:
. |-- slack-desc application's description |-- tmux-1.8.tar.xz source archive `-- tmux.SlackBuild should be (made) executable
This allows in particular to build a package with other compilation options and/or for a newer version by editing the SlackBuild, and case occuring by copying in the package source directory a different version of the software's source archive.
In our example to modernize tmux
, just download the most recent (at time of writing) source archive
tmux-1.9a.tar.gz from the tmux website, place
it in source/ap/tmux/ and type as root from that directory
'VERSION=1.9a./tmux.SlackBuild' to build a/tmp/tmux-1.9a-i486-1.txz package
that can replace the previous one with the command 'upgradepkg
/tmp/tmux-1.9a-i486-1.txz'
The Slackware packages database
It consists of text files in the directory /var/log of installed system:
/var/log/packages/<package>: provides summary data about the package and
lists installed files
/var/log/scripts/<package>: lists case occurring the
commands run by installation scripts
/var/log/removed_packages/<package>:
provide information about deleted package
/var/log/removed_scripts/<package>: lists the commands run by installation
scripts of removed packages
As they are text files, you can read them with less
or with a text
editor. They are updated and used by package management programs. They allow
for example to know the contents of a package, in which packages(s) is
shipped an installed file or whether a file was modified or deleted since
installation.
The files PACKAGES.TXT and FILE_LIST included in the package directories are also used for their management.
Installing, removing and updating software packages
These functions are provided respectively by the commands installpkg
,
removepkg
, upgradepkg
, cf. their man pages.
Caution: ugradepkg
would be better named replacepkg
as that command
installs the specified package then removes the previously installed one,
regardless of their respective versions.
The command pkgtool
, menu driven, allows to install, remove, examine the
content of packages and more generally administer the system: pkgtool
is
the “Swiss army knife” of Slackware. In addition to “man pkgtool”, get to
know the tool browsing its menu.
The command slackpkg
, build atop other Slackware package tools, provides
in addition an access to a local or remote mirror of official Slackware
packages. This allows e.g. to download and install a set of packages or keep
the system up to date with a single command. Its operation is governed by
the configuration files /etc/slackpkg/slackpkg.conf and
/etc/slackpkg/mirrors, see “man slackpkg” and “man slackpkg.conf”.
The software package's database on Slackware's website
The Slackware Package Browser allows to make a search using following criteria:
- Package
- Label
- Description
- Content
in one or more packages directories, for all versions of Slackware from 8.1
up to “current”.
It also provides access to the files' tree of each of
these versions.
Complete Slackware with third party packages
Slackware doesn't provide all existing software. As wrote Patrick Volkerding:
When I started this project, it really wasn't my intent to provide every possible package, application, desktop, etc. My goal was to make a platform upon which things could be built easily and that followed upstream as closely as was possible. Of course, some applications had to be included, but the idea was to try to stick to the essentials that everyone would miss if they weren't there.
Most of the applications missing from Slackware are available on the community website http://slackbuilds.org that offers, not third party packages, but everything needed to build them minus the sources files.
For information on using the provided materials, see http://slackbuilds.org/howto/.
The sbopkg
software available here: http://www.sbopkg.org/ facilitates
usage of Slackbuilds available in http://slackbuilds.org/, automating the
download of everything needed, then the construction and installation of
packages. See “man sbopkg” and the configuration file
/etc/sbopkg/sbopkg.conf.
Furthermore the sqg
application, available after installing sbopkg
in
/usr/doc/sbopkg-<version>/contrib/sqg, eases usage of sbopkg in
automatically forming ordered dependencies lists or “queue files”. Type 'sqg
-h' for details. You should edit the beginning of the script sqg
before
use.
Finally, some trusted third party offer packages already built. See especially those offered by Eric Hameleers aka Alien BOB, Robby Workman and Matteo Bernardini aka ponce, Slackware contributors.
The website http://www.slackware.org.uk/ also hosts packages or Slackbuilds such as those proposed by distributions derived from Slackware, as Salix maintained mainly by George Vlahavas, or desktops not included in Slackware, such as Mate proposed by Chess Griffin and Willy Sudiarto Raharjo, or provided by slacky.eu
Packages that can be installed on Slackware are also available elsewhere. Important warnings:
- Know who proposes these packages and preferably trust contributors of Slackware or at least of http://slackbuilds.org
- Carefully inspect the contents of packages before installation, including a check of the permissions of files and any changes to existing directories and files. Use
less
,tar
and/orexplodepkg
, see “man explodepkg”. - Never install a package whose sources and SlackBuild are not available.
Finally, the unofficial plugin slackpkg+ extends the use of slackpkg to directories containing “unofficial” Slackware packages.
Build your own packages
This is the recommended method if no SlackBuild is available, to benefit of the Slackware package management tools and maintain a “clean” system.
The software slacktrack
, included in Slackware, can help you, as “man
makepkg”. Inspecting existing Slackbuilds and
templates proposed at slackbuilds.org can
inspire you. Browse SlackDocs with the key word
“package” or “install” to learn more.
Maintainance of the system
To be informed of the availability of software packages that meet security breaches, email majordomo@slackware.com with the phrase “subscribe slackware-security” in the body.
The page Slackware Changelogs gathers Changelogs of stable and current versions.
For a stable version updates are few, because they are only intended to fill a security breach or to correct a major bug and not just to provide a more recent version of software included in the distribution. Users are expected to modernize their software themselves if they wish, see previous chapter for how to do that: Slackware is not a rolling releases, but publishes a succession of stable versions.
Updating or reinstalling a package can lead to reinstall a file (usually a configuration file) already installed. In this case if they don't match the system will install a new file next to the precedent with a .new extension and you get to decide what to do on a case by case basis: merge the two files, keep the former as is or replace it with the new one.
The practice of installing on a system a software package shipped in another version of Slackware is discouraged and often fails. Better try to rebuild a package for the installed version, running the SlackBuild in a copy of the source directory of that package, gathered from the other version. And of course, it is strongly unadvised to install packages intended for or included in another distribution, unless it be deemed 100% compatible with Slackware's identical version.
The dissemination of “Slackware-current” fastens and helps to finalize the development of the future stable version, allowing those who wish to test the work in progress and report problems. It should neither be used in production nor considered as a proper way of updating a stable release.
Sources
- Originally written by Didier Spaier