Guía Post Instalación DEBIAN 8 / 9 – 2016 – Parte I

En esta oportunidad hablaremos sobre algunos pasos esenciales que todos podamos realizar luego de instalar un distribución GNU Linux DEBIAN en su versión 8 Jessie (Estable) ó 9 Stretch (Testing), o una basada en ella.

Recomendación: Al ejecutar estos pasos, observé cuidadosamente los mensajes de la consola, y tenga especial cuidado en aceptar aquellos que indican que se eliminaran paquetes …«.

==========================================================

PASO 0: INICIAR SISTEMA OPERATIVO Y TERMINAL DE ROOT

PASO 1: REALIZAR CONFIGURACIONES BÁSICAS DE RED

PASO 1.1 OPTIMIZAR NETWORK MANAGER Y NETWORK INTERFACE

  • Configurar Network Manager:
nano /etc/NetworkManager/NetworkManager.conf
  • Cambiar la palabra «false» por «true«
  • Guardar los cambios
  • Reiniciar el servicio:
service network-manager restart
  • Configurar Network Interface:
nano /etc/network/interfaces
  • Cambiar la configuración actual por la nueva:
NUEVA POR DHCP
============

auto lo
iface lo inet loopback

auto eth0
allow-hotplug eth0
#iface eth0 inet dhcp

Nota: La ultima linea está comentada ya que si tiene el Network Manager activado (true) este realizará la gestión DHCP. Descomente en caso de que desactive (false) o no tenga instalado el Network Manager.

NUEVA POR STATIC
=============

auto lo
iface lo inet loopback

auto eth0
allow-hotplug eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.1.XXX
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

dns-nameservers 192.168.1.1
dns-search tu_dominio.com
  • Reiniciar el servicio:
service networking restart

Nota: Si tiene el Network Manager instalado y activado puede realizar la gestión DHCP vía gráfica.

PASO 1.2 CONFIGURAR EL DOMINIO DEL EQUIPO

  • Edite el archivo resolv.conf:
cat /etc/resolv.conf

– Agregue el contenido siguiente colocando los parámetros de su red: # Generated by NetworkManager search tu_dominio.com nameserver 192.168.1.1

PASO 1.3 CONFIGURAR EL PROXY DEL SISTEMA Y NAVEGADOR WEB

Nota: Realice este paso en caso de que su equipo este en una Infraestructura con Proxy (No Transparente) para Navegar el Internet.

MENÚ DE USUARIO —> BOTÓN DE PANEL DE CONTROL (PREFERENCIAS DEL SISTEMA) CON SÍMBOLO DE TUERCA CON DESTORNILLADOR —> OPCIÓN «RED» —> OPCIÓN «PROXY DE LA RED» —> OPCIÓN MANUAL —> REALICE LOS CAMBIOS NECESARIOS.

NAVEGADOR BASADO EN «FIREFOX» COMO «ICEWEASEL» —> PREFERENCIAS —> AVANZADO —> RED —> CONFIGURACIÓN —> CONFIGURACIÓN MANUAL DE PROXY

1.4 OPTIMIZAR EL SOURCES.LIST

  • Edite y agregue el contenido adecuado:
nano /etc/apt/sources.list

Nota: Si es un usuario de conocimientos medios o avanzados le recomiendo implementar todas las lineas de los repositorios nativos de DEBIAN, pero si es un usuario novato o de conocimientos básicos le recomiendo solo utilizar las 3 primeras lineas de dichos Repositorios oficiales por un tiempo para que vaya asimilando conocimientos. Es decir, comente las lineas pertenecientes a «jessie-backports» y «deb-multimedia.org», por motivos de estabilidad y seguridad.

#####################################################
# REPOSITORIOS OFICIALES DE LINUX DEBIAN 8 (JESSIE)
deb http://ftp.us.debian.org/debian/ jessie main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
deb http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free
deb http://ftp.us.debian.org/debian/ jessie-backports main contrib non-free
deb http://www.deb-multimedia.org jessie main non-free
# aptitude install deb-multimedia-keyring
#
#####################################################

#####################################################
# REPOSITORIOS OFICIALES DE LINUX DEBIAN 9 (STRETCH)
deb http://ftp.us.debian.org/debian/ stretch main contrib non-free
deb http://security.debian.org/ stretch/updates main contrib non-free
deb http://ftp.us.debian.org/debian/ stretch-updates main contrib non-free
deb http://www.deb-multimedia.org stretch main non-free
# aptitude install deb-multimedia-keyring
#
#####################################################

#####################################################
# REPOSITORIOS OFICIALES PARA ICEWEASEL
deb http://mozilla.debian.net/ jessie-backports iceweasel-release
# aptitude install pkg-mozilla-archive-keyring
#
#####################################################

#####################################################
# REPOSITORIOS OFICIALES PARA GOOGLE CHROME - TALKPLUGIN - GOOGLE EARTH
deb http://dl.google.com/linux/chrome/deb/ stable main
deb http://dl.google.com/linux/talkplugin/deb/ stable main
# deb http://dl.google.com/linux/earth/deb/ stable main
# wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
#
#####################################################

Nota: Google Earth solo es para distribuciones de 32 Bits

#####################################################
# REPOSITORIOS OFICIALES PARA VIRTUALBOX
deb http://download.virtualbox.org/virtualbox/debian jessie contrib
# wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
# #####################################################

=====================================================

PASO 2: CONFIGURAR PROXY (TEMPORALMENTE) EN CONSOLA /TERMINAL

Nota: Omita este paso si no posee un proxy o esta configurado de forma transparente en su Empresa u Organización. O si sus repositorios son locales (internos).

  • Ejecute:
export http_proxy=http://ip_proxy:puerto_proxy

=====================================================

PASO 3: REALIZAR MANTENIMIENTO Y ACTUALIZACIÓN DEL SISTEMA

PASO 3.1 MANTENIMIENTO Y ACTUALIZACIÓN BÁSICA

  • Ejecute:
apt-get update / apt update

Nota 1: Si al realizar «apt-get update / apt update» el sistema le dice:

E: No se pudo bloquear /var/lib/dpkg/lock open (11: Recurso no disponible temporalmente),

E: No se pudo bloquear el directorio de administración (/var/lib/dpkg/), ¿quizás haya algún otro proceso utilizándolo?

W: No se pudo bloquear el fichero de almacén. Esto significa habitualmente que dpkg u otra herramienta apt está instalando paquetes. Se abrirá en modo de sólo lectura, ¡se PERDERÁN todos los cambios que realice al estado de los paquetes!

Ejecute:

rm -f /var/lib/apt/lists/lock

Para poder realizar cualquier actividad en el terminal. Si el mensaje persiste cierre sesión de usuario y reinicie el Sistema Operativo para volver a iniciar sesión de usuario.

Nota 2: Recuerde que en materia de seguridad los Repositorios de DEBIAN Multimedia no son muy fiables o confiables, además al mezclarlos con los de DEBIAN 8 piden eliminar algunos paquetes o librerías del mismo para sustituirlos por los suyos. Yo personalmente no he tenido problemas con ello, pero la advertencia no esta demás!

Nota 3: Si su Distro (Distribución) DEBIAN o basada en DEBIAN no trae el paquete «aptitude» por defecto instalado, proceda a instalarlo con:

apt-get install aptitude

Continué con la instalación de las llaves de todos los repositorios extras insertados:

aptitude install pkg-mozilla-archive-keyring

aptitude install deb-multimedia-keyring

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -

Nota: En caso de no instalarse la llave del repositorio de Google por problemas de conectividad (proxy) al Internet desde una red institucional (interna), ejecute directamente la siguiente orden de comando para que las llaves de este repositorio queden instaladas:

aptitude install google-chrome-stable google-talkplugin

y luego comente / borre los repositorios externos (duplicados o no) de Google en caso de ser necesario para que no reporte duplicación de Repositorios:

rm -f /etc/apt/sources.list.d/google*

Luego proceda con la actualización de las listas de paquetes de los repositorios nuevamente:

aptitude update / apt-get update / apt update

Nota: Puede ver lo que se actualizara con:

apt list --upgradable

A continuación realice una actualización segura de los paquetes nuevos disponibles:

aptitude upgrade / aptitude safe-upgrade / apt-get upgrade / apt upgrade 

Nota: Solo si usted es un usuario Avanzado o un Técnico experimentado realice:

aptitude full-upgrade / apt-get dist-upgrade / apt full-upgrade

Continué solucionando cualquier problema existente de paquetería existente en el Sistema Operativo:

aptitude install -f / apt-get install -f / apt install -f
dpkg --configure -a

PASO 3.1  REALIZAR UN MANTENIMIENTO MAYOR

  • Instale:
aptitude install localepurge

– Ejecute:

localepurge update-grub; update-grub2; aptitude clean; aptitude autoclean; aptitude remove; aptitude purge

PASO 3.2  REALIZAR UN MANTENIMIENTO Y UNA ACTUALIZACIÓN AVANZADA

  • Ejecute:
aptitude install deborphan
aptitude remove --purge `deborphan --guess-all`
aptitude remove --purge `deborphan --libdev`
dpkg --purge $(deborphan --find-config)
aptitude install preload
aptitude install prelink
nano /etc/default/prelink
Sustituir PRELINKING=unknown por PRELINKING=yes
prelink -all

PASO 3.3 REINICIE EL SISTEMA Y EXPERIMENTE LOS CAMBIOS
=====================================================


10 comentarios, deja el tuyo

Deja tu comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

*

*

  1. Responsable de los datos: Miguel Ángel Gatón
  2. Finalidad de los datos: Controlar el SPAM, gestión de comentarios.
  3. Legitimación: Tu consentimiento
  4. Comunicación de los datos: No se comunicarán los datos a terceros salvo por obligación legal.
  5. Almacenamiento de los datos: Base de datos alojada en Occentus Networks (UE)
  6. Derechos: En cualquier momento puedes limitar, recuperar y borrar tu información.

  1.   Chiwy dijo

    Buen tutorial, solo no me quedo claro en que cambia agregar los repositorios de Stretch si los agrego y después instalo un programa ¿va a preferir la versión mas nueva?

    Saludos.

  2.   tr dijo

    EXCELENTE TUTO.

  3.   Ing. Jose Albert dijo

    Si usan DEBIAN 8 ó 9, los repositorios deberían ser tal cual como están ahí cada uno por separados. Si desean agregar los de Stretch (Testing) en DEBIAN 8 (Estable) te recomiendo solo la primera y segunda linea nada más. Y si, siempre el Sistema Operativo a optar por recomendarte la versión mas nueva de los Repositorios. Solo recomendarte, tu decidirás si instalas o no, resolviendo posibles problemas de dependencias.

    Ya pronto estará a la mano, la segunda parte de la Guía.

  4.   rlsalgueiro dijo

    Tengo una pregunta porque usar aptitude si apt hizo una actualizacion del paquete y dejo detras a aptitude?

  5.   Ing. Jose Albert dijo

    Tienes razón. Lo hice con aptitude porque es más conocido (familiar) para los usuarios basicos. Los Medios y Avanzados podemos elegir entre aptitude / apt-get / apt.

  6.   oscar dijo

    Impresionante aportación a la humanidad!!

    Gracias!

  7.   Chaparral dijo

    Extraordinaria guía para poder instalar Debian, aunque algunas cosas no son comprensibles para un neboot. La guardo para estudiarla mas a fondo y que me sirva para instalar Debian. Tengo mis dudas respecto a instalar Debian estable o testing. Y es que la experiencia es muy importante. Gracias al autor por su trabajo.

  8.   Joaquín dijo

    Tengo una pregunta. Por qué razon hay que cambiar los repositorios que vienen por defecto si, además los que ponemos son oficiales? Cuál es la razón por la que no viene configurado de «fábrica»?

  9.   ELMALAMEN dijo

    Buenas noches hermano necesito de tu ayuda.

    Luego de instalar un programa me ocurrio un desagradable problema, ahora no se actualiza y no puedo instalar ningun problema, no tengo mucho conocimiento en la materia pero voy paso a paso el error en cuestion es el siguiente al menos es lo que sale en el informe «http://200.11.148.219/seguridad/dists/jessie/updates/InRelease» luego aqui esta el informe «++ Launching mintUpdate
    ++ Starting refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ System is up to date
    ++ Refresh finished
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ Starting refresh
    ++ System is up to date
    ++ Refresh finished
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ Starting refresh
    ++ System is up to date
    ++ Refresh finished
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates
    ++ MintUpdate is in tray mode, performing auto-refresh
    ++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
    ++ Starting refresh
    — Error in checkAPT.py, could not refresh the list of updates»
    no se que otra cosa podrias necesitar para enviarte, de ante mano gracias por lo que puedas hacer por mi.
    GRACIAS ELMALAMEN

  10.   Ing. Jose Albert dijo

    Estos son los repositorios actuales para DEBIAN.

    #########################################
    # REPOSITORIOS OFICIALES DE LINUX DEBIAN 8 (JESSIE) #
    # Repositorio base
    deb http://ftp.us.debian.org/debian/ jessie main contrib non-free
    # Actualizaciones de seguridad
    deb http://security.debian.org/ jessie/updates main contrib non-free
    # Actualizaciones para la base estable
    deb http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free
    # Futuras actualizaciones para la base estable
    deb http://ftp.us.debian.org/debian/ jessie-proposed-updates main contrib non-free
    # Retro-adaptaciones para la base estable
    deb http://ftp.us.debian.org/debian/ jessie-backports main contrib non-free
    # Actualizaciones Multimedia no oficiales
    # deb http://www.deb-multimedia.org jessie main non-free
    # Llave del Repositorio Multimedia no oficial
    # aptitude install deb-multimedia-keyring #
    ###################################

    Sustitúyelos en tu archivo sources.list y luego ejecuta las siguientes lineas de comando a ver que tal:

    apt update; sudo update-apt-xapian-index; sudo aptitude safe-upgrade; sudo apt install -f; sudo dpkg –configure -a; sudo apt-get autoremove; sudo apt –fix-broken install

    localepurge; sudo update-grub; sudo update-grub2; sudo aptitude clean; sudo aptitude autoclean; sudo apt-get autoremove; sudo apt autoremove; sudo apt purge; sudo apt remove

    sudo rm -f /var/log/*.old /var/log/*.gz /var/log/apt/* /var/log/auth* /var/log/daemon* /var/log/debug* /var/log/dmesg* /var/log/dpkg* /var/log/kern* /var/log/messages* /var/log/syslog* /var/log/user* /var/log/Xorg* /var/crash/*

    Luego comentas que tal te fue?