Guia Post Instal·lació DEBIAN 8/9 - 2016 - Part I

En aquesta oportunitat parlarem sobre alguns passos essencials que tots puguem fer després de instal·lar un distribució GNU Linux DEBIAN en la seva versió 8 Jessie (Estable) o 9 Stretch (Testing), O una basada en ella.

recomanació: A l'executar aquests passos, vaig observar acuradament els missatges de la consola, i tingui especial cura en acceptar aquells que indiquen que s'eliminessin paquets ...".

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

PAS 0: Inici de SISTEMA OPERATIU I TERMINAL DE ROOT

PAS 1: REALITZAR CONFIGURACIONS BÀSIQUES DE XARXA

PAS 1.1 OPTIMITZAR NETWORK MANAGER I NETWORK INTERFACE

  • Configura Xarxa Manager:
nano /etc/NetworkManager/NetworkManager.conf
  • Canviar la paraula «false»Per«veritable«
  • Guardar els canvis
  • Reiniciar el servei:
service network-manager restart
  • Configura Interfície de xarxa:
nano /etc/network/interfaces
  • Canviar la configuració actual per la nova:
NUEVA POR DHCP
============

auto lo
iface lo inet loopback

auto eth0
allow-hotplug eth0
#iface eth0 inet dhcp

Nota: La ultima línia està comentada ja que si té el Xarxa Manager activat (veritable) Aquest realitzarà la gestió DHCP. Descomenteu en cas que desactivi (false) O no tingui instal·lat el Xarxa 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 servei:
service networking restart

Nota: Si té el Xarxa Manager instal·lat i activat pot realitzar la gestió DHCP via gràfica.

PAS 1.2 CONFIGURAR EL DOMINI DE L'EQUIP

  • Editeu el fitxer resolv.conf:
cat /etc/resolv.conf

- Afegiu el contingut següent col·locant els paràmetres de la seva xarxa: # Generated by NetworkManager search tu_dominio.com nameserver 192.168.1.1

PAS 1.3 CONFIGURAR EL PROXY DEL SISTEMA I NAVEGADOR WEB

Nota: Feu aquest pas en cas que el seu equip aquest en una Infraestructura amb Proxy (No Transparent) per Navegar l'Internet.

MENÚ D'USUARI -> BOTÓ DE PANELL DE CONTROL (PREFERÈNCIES DEL SISTEMA) AMB SÍMBOL DE ROSCA AMB TORNAVÍS -> OPCIÓ «XARXA» -> OPCIÓ «PROXY DE LA XARXA» -> OPCIÓ MANUAL -> REALITZI ELS CANVIS NECESSARIS.

NAVEGADOR BASAT EN «FIREFOX» COM «Iceweasel» -> PREFERÈNCIES -> AVANÇAT -> XARXA -> CONFIGURACIÓ -> CONFIGURACIÓ MANUAL DE PROXY

1.4 OPTIMITZAR EL sources.list

  • Editeu i afegiu el contingut adequat:
nano /etc/apt/sources.list

Nota: Si és un usuari de coneixements mitjans o avançats li recomano implementar totes les línies dels repositoris nadius de DEBIAN, però si és un usuari novell o de coneixements bàsics li recomano només utilitzar les 3 primeres línies d'aquests Repositoris oficials per un temps perquè vagi assimilant coneixements. És a dir, comenteu les línies pertanyents a «Jessie-backports» y «Deb-multimedia.org», Per motius d'estabilitat i seguretat.

#####################################################
# 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 només és per a distribucions 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 -
# #####################################################

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

PAS 2: CONFIGURAR PROXY (TEMPORALMENT) A CONSOLA / TERMINAL

Nota: Ignoreu aquest pas si no posseeix un intermediari o aquesta configurat de forma transparent en la seva Empresa o organització. O si els seus dipòsits són locals (interns).

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

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

PAS 3: REALITZAR MANTENIMENT I ACTUALITZACIÓ DEL SISTEMA

PAS 3.1 MANTENIMENT I ACTUALITZACIÓ BÀSICA

  • executeu:
apt-get update / apt update

Nota 1: Si a l'realitzar «apt-get update / apt update»El sistema li diu:

E: No s'ha pogut bloquejar / var / lib / dpkg / lock open (11: Recurs no disponible temporalment),

E: No s'ha pogut bloquejar el directori d'administració (/ var / lib / dpkg /), ¿potser hi hagi algun altre procés utilitzant-?

W: No s'ha pogut bloquejar el fitxer de magatzem. Això vol dir habitualment que dpkg o una altra eina apt està instal·lant paquets. S'obrirà en mode de només lectura, es desarà els canvis que realitzi a l'estat dels paquets!

executeu:

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

Per poder realitzar qualsevol activitat en el terminal. Si el missatge continua tancament sessió d'usuari i reinicieu el Sistema Operatiu per tornar a iniciar sessió d'usuari.

Nota 2: Recordeu que en matèria de seguretat dels Repositoris de DEBIAN Multimèdia no són molt fiables o fiables, a més a l'barrejar-los amb els de DEBIAN 8 demanen eliminar alguns paquets o llibreries de el mateix per a substituir-los pels seus. Jo personalment no he tingut problemes amb això, però l'advertència no aquesta altres!

Nota 3: si el seu Distro (Distribució) DEBIAN o basada en DEBIAN no porta el paquet «aptitude»Per defecte instal·lat, procedeixi a instal·lar-lo amb:

apt-get install aptitude

Vaig continuar amb la instal·lació de les claus de tots els repositoris extres inserits:

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 cas de no instal·lar-se la clau de l'repositori de Google per problemes de connectivitat (proxy) a l'Internet des d'una xarxa institucional (interna), executi directament l'ordre de comanda per que les claus d'aquest repositori quedin instal·lades:

aptitude install google-chrome-stable google-talkplugin

i després comenti / esborri els repositoris externs (duplicats o no) de Google en cas de ser necessari perquè no reporti duplicació de Repositoris:

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

Després procedeixi amb l'actualització de les llistes de paquets dels repositoris novament:

aptitude update / apt-get update / apt update

Nota: Podeu veure el que s'actualitzés amb:

apt list --upgradable

A continuació realitzi una actualització segura dels paquets nous disponibles:

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

Nota: Només si vostè és un usuari avançat o un tècnic experimentat realitzi:

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

Vaig continuar solucionant qualsevol problema existent de paqueteria existent en el Sistema Operatiu:

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

PAS 3.1 REALITZAR UN MANTENIMENT MAJOR

  • Instal:
aptitude install localepurge

- Executeu:

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

PAS 3.2  REALITZAR UN MANTENIMENT I UNA ACTUALITZACIÓ AVANÇADA

  • executeu:
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

PAS 3.3 reinicieu des I vaig experimentar ELS CANVIS
================================================== ===


Deixa el teu comentari

La seva adreça de correu electrònic no es publicarà. Els camps obligatoris estan marcats amb *

*

*

  1. Responsable de les dades: Miguel Ángel Gatón
  2. Finalitat de les dades: Controlar l'SPAM, gestió de comentaris.
  3. Legitimació: El teu consentiment
  4. Comunicació de les dades: No es comunicaran les dades a tercers excepte per obligació legal.
  5. Emmagatzematge de les dades: Base de dades allotjada en Occentus Networks (UE)
  6. Drets: En qualsevol moment pots limitar, recuperar i esborrar la teva informació.

  1.   Chiwy va dir

    Bon tutorial, només no em quedo clar en què canvia afegir els repositoris de Stretch si els afegeixo i després instal un programa ¿va a preferir la versió mes nova?

    Salutacions.

  2.   tr va dir

    EXCEL·LENT TUTO.

  3.   Eng. Jose Albert va dir

    Si fan servir DEBIAN 8 o 9, els repositoris haurien de ser tal qual com hi són cada un per separat. Si desitgen afegir els de Stretch (Testing) en DEBIAN 8 (Estable) et recomano només la primera i segona línia res més. I si, sempre el Sistema Operatiu a optar per recomanar-te la versió mes nova dels Repositoris. Només recomanar-, tu decidiràs si instal·les o no, resolent-ne possibles problemes de dependències.

    Ja aviat estarà a la mà, la segona part de la Guia.

  4.   rlsalgueiro va dir

    Tinc una pregunta perquè utilitzar l'aptitude si apt va fer una actualizacion de l'paquet i deixo darrera a aptitude?

  5.   Eng. Jose Albert va dir

    Tens raó. Ho vaig fer amb l'aptitude perquè és més conegut (familiar) per als usuaris bàsics. Els Mitjans i Avançats podem triar entre aptitude / apt-get / apt.

  6.   oscar va dir

    Impressionant aportació a la humanitat !!

    Gràcies!

  7.   Chaparral va dir

    Extraordinària guia per poder instal·lar Debian, encara que algunes coses no són comprensibles per a un neboot. La guardo per estudiar-la més a fons i que em serveixi per instal·lar Debian. Tinc els meus dubtes respecte a instal·lar Debian estable o testing. I és que l'experiència és molt important. Gràcies a l'autor pel seu treball.

  8.   Joaquín va dir

    Tinc una pregunta. Per què raó cal canviar els repositoris que venen per defecte si, a més els que posem són oficials? Quina és la raó per la qual no ve configurat de «fàbrica»?

  9.   ELMALAMEN va dir

    Bona nit germà necessito de la teva ajuda.

    Després d'instal·lar un programa m'ocurrio un desagradable problema, ara no s'actualitza i no puc instal·lar cap problema, no tinc molt coneixement en la matèria però vaig pas a pas l'error en qüestió és el següent a el menys és el que surt a l'informe «http://200.11.148.219/seguridad/dists/jessie/updates/InRelease» després aqui aquesta l'informe «++ Launching MintUpdate
    ++ Starting refresh
    ++ Auto-refresh timer és 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 és 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 és 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 és 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 és 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 és 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 és 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 és 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 és 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 és 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 és 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 és 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 és 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 és 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 és 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 és 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 és 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 és 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 és 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 és 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 és 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 és 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 és 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 és 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 és 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 és 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 és 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 és 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 és 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 és 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 es que una altra cosa podries necessitar per enviar-te, per endavant gràcies pel que puguis fer per mi.
    GRÀCIES ELMALAMEN

  10.   Eng. Jose Albert va dir

    Aquests són els repositoris actuals per DEBIAN.

    ##########################################
    # DIPÒSITS OFICIALS DE LINUX DEBIAN 8 (JESSIE) #
    # Repositori base
    deb http://ftp.us.debian.org/debian/ Jessie main contrib non-free
    # Actualitzacions de seguretat
    deb http://security.debian.org/ Jessie / updates main contrib non-free
    # Actualitzacions per a la base estable
    deb http://ftp.us.debian.org/debian/ Jessie-updates main contrib non-free
    # Futures actualitzacions per a la base estable
    deb http://ftp.us.debian.org/debian/ Jessie-proposed-updates main contrib non-free
    # Retro-adaptacions per a la base estable
    deb http://ftp.us.debian.org/debian/ Jessie-backports main contrib non-free
    # Actualitzacions Multimèdia no oficials
    # deb http://www.deb-multimedia.org Jessie main non-free
    # Clau de l'Repositori Multimèdia no oficial
    # Aptitude install deb-multimèdia-keyring #
    ####################################

    Substitueix-en el teu sources.list i després executa les següents línies de comandament a veure que tal:

    apt update; sudo update-apt-Xapian-index; suo 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; suo aptitude clean; suo aptitude autoclean; sudo apt-get autoremove; sudo apt autoremove; sudo apt purga; sudo apt remove

    suo 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 / *

    Després comentes que tal et va anar?