Post Installation Guide DEBIAN 8/9 - 2016 - Part I

In this opportunity we will talk about some essential steps that we can all take after install a GNU Linux DEBIAN distribution in its version 8 Jessie (Stable) or 9 Stretch (Testing), or one based on it.

Recommendation: When executing these steps, I carefully watched the console messages, and be especially careful to accept those that indicate packages will be removed ...«.

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

STEP 0: INITIATE OPERATING SYSTEM AND ROOT TERMINAL

STEP 1: PERFORM BASIC NETWORK CONFIGURATIONS

STEP 1.1 OPTIMIZE NETWORK MANAGER AND NETWORK INTERFACE

  • Setup Network Manager:
nano /etc/NetworkManager/NetworkManager.conf
  • Change the word «false" by "true«
  • Save changes
  • Restart the service:
service network-manager restart
  • Setup Network interface:
nano /etc/network/interfaces
  • Change the current configuration to the new one:
NUEVA POR DHCP
============

auto lo
iface lo inet loopback

auto eth0
allow-hotplug eth0
#iface eth0 inet dhcp

Note: The last line is commented since if it has the Network Manager activated (true) this will perform the management DHCP. Uncomment in case you disable (false) or do not have the 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
  • Restart the service:
service networking restart

Note: If you have the Network Manager installed and activated can perform management DHCP via graphics.

STEP 1.2 CONFIGURE THE TEAM DOMAIN

  • Edit the file resolve.conf:
cat /etc/resolv.conf

- Add the following content by setting your network parameters: # Generated by NetworkManager search your_domain.com nameserver 192.168.1.1

STEP 1.3 CONFIGURE THE SYSTEM PROXY AND WEB BROWSER

Note: Perform this step in case your computer is in an Infrastructure with Proxy (Not Transparent) to Surf the Internet.

USER MENU -> CONTROL PANEL BUTTON (SYSTEM PREFERENCES) WITH NUT SYMBOL WITH SCREWDRIVER -> "NETWORK" OPTION -> "NETWORK PROXY" OPTION -> MANUAL OPTION -> MAKE THE NECESSARY CHANGES.

BROWSER BASED ON «FIREFOX» LIKE «ICEWEASEL» -> PREFERENCES -> ADVANCED -> NETWORK -> CONFIGURATION -> MANUAL PROXY CONFIGURATION

1.4 OPTIMIZE THE SOURCES.LIST

  • Edit and add the appropriate content:
nano /etc/apt/sources.list

Note: If you are a user of medium or advanced knowledge, I recommend implementing all the lines of the DEBIAN native repositories, but if you are a novice or basic knowledge user, I recommend only using the first 3 lines of said official Repositories for a while to go assimilating knowledge. That is, comment out the lines belonging to "Jessie-backports" y "Deb-multimedia.org", for stability and security reasons.

#####################################################
# 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 -
#
#####################################################

Note: Google Earth it is only for 32 Bit distributions

#####################################################
# 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 -
# #####################################################

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

STEP 2: CONFIGURE PROXY (TEMPORARILY) IN CONSOLE / TERMINAL

Note: Skip this step if you do not have a proxy or it is configured transparently in your Company or Organization. Or if your repositories are local (internal).

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

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

STEP 3: PERFORM SYSTEM MAINTENANCE AND UPDATE

STEP 3.1 MAINTENANCE AND BASIC UPDATE

  • Run:
apt-get update / apt update

Note 1: If when performing «apt-get update / apt update»The system tells you:

E: Could not lock / var / lib / dpkg / lock open (11: Resource temporarily unavailable),

E: Could not lock the admin directory (/ var / lib / dpkg /), maybe there is some other process using it?

W: The vault file could not be locked. This usually means that dpkg or another apt tool is installing packages. It will open in read-only mode, all changes you make to the state of the packages will be LOST!

Run:

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

To be able to carry out any activity in the terminal. If the message persists, close the user session and restart the Operating System to start the user session again.

Note 2: Remember that in terms of security, the DEBIAN Multimedia Repositories are not very reliable or trustworthy, in addition, when mixed with those of DEBIAN 8, they ask to remove some packages or libraries from it to replace them with their own. I personally have not had problems with it, but the warning is not too much!

Note 3: If your Distro (Distribution) DEBIAN or based on DEBIAN does not bring the package «aptitude»By default installed, proceed to install it with:

apt-get install aptitude

I continued with the installation of the keys of all the inserted extra repositories:

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 -

Note: In case the Google repository key is not installed due to connectivity problems (proxy) to the Internet from an institutional network (internal), execute the following command directly so that the keys of this repository are installed:

aptitude install google-chrome-stable google-talkplugin

and then comment / delete the external repositories (duplicates or not) from Google if necessary so that it does not report duplication of Repositories:

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

Then proceed with updating the package lists from the repositories again:

aptitude update / apt-get update / apt update

Note: You can see what will be updated with:

apt list --upgradable

Then perform a safe update of the new packages available:

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

Note: Only if you are an Advanced user or an experienced Technician do:

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

I continued to solve any existing package problems in the Operating System:

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

STEP 3.1 PERFORM MAINTENANCE MAINTENANCE

  • Install:
aptitude install localepurge

- Run:

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

STEP 3.2  PERFORM ADVANCED MAINTENANCE AND UPDATE

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

STEP 3.3 REBOOT THE SYSTEM AND EXPERIENCE THE CHANGES
=========================================================== ===


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   chiwy said

    Good tutorial, I'm just not clear on what changes to add the Stretch repositories if I add them and then install a program, will you prefer the newer version?

    Greetings.

  2.   tr said

    EXCELLENT TUTE.

  3.   Jose Albert said

    If you use DEBIAN 8 or 9, the repositories should be as is, each one separately. If you want to add Stretch (Testing) in DEBIAN 8 (Stable) I recommend only the first and second lines, nothing else. And yes, always the Operating System to choose to recommend the newest version of the Repositories. Only recommend you, you will decide whether to install or not, solving possible dependency problems.

    The second part of the Guide will soon be at hand.

  4.   rlsalgueiro said

    I have a question why use aptitude if apt did a package update and left aptitude behind?

  5.   Jose Albert said

    You're right. I did it with aptitude because it is more known (familiar) to basic users. Media and Advanced we can choose between aptitude / apt-get / apt.

  6.   oscar said

    Impressive contribution to humanity !!

    Thank you!

  7.   Chaparral said

    Extraordinary guide to install Debian, although some things are not understandable for a neboot. I keep it to study it more thoroughly and that it helps me to install Debian. I have my doubts about installing Debian stable or testing. And the experience is very important. Thanks to the author for his work.

  8.   Joaquin said

    I have a question. Why is it necessary to change the repositories that come by default if, in addition, the ones that we put are official? What is the reason why it is not configured at the "factory"?

  9.   EL MALAMEN said

    Good night brother, I need your help.

    After installing a program an unpleasant problem occurred to me, now it is not updated and I can not install any problem, I do not have much knowledge on the matter but I go step by step the error in question is the following at least it is what appears in the report «Http://200.11.148.219/seguridad/dists/jessie/updates/InRelease» then here is the report «++ 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 »
    I don't know what else you might need to send you, thank you in advance for what you can do for me.
    THANK YOU ELMALAMEN

  10.   Jose Albert said

    These are the current repositories for DEBIAN.

    ##########################################
    # OFFICIAL LINUX DEBIAN 8 (JESSIE) REPOSITORIES #
    # Base repository
    deb http://ftp.us.debian.org/debian/ Jessie main contrib non-free
    # Security updates
    deb http://security.debian.org/ jessie / updates main contrib non-free
    # Updates for the stable base
    deb http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free
    # Future updates for the stable base
    deb http://ftp.us.debian.org/debian/ jessie-proposed-updates main contrib non-free
    # Retro-adaptations for the stable base
    deb http://ftp.us.debian.org/debian/ jessie-backports main contrib non-free
    # Unofficial Multimedia Updates
    #deb http://www.deb-multimedia.org Jessie main non-free
    # Unofficial Multimedia Repository Key
    # aptitude install deb-multimedia-keyring #
    ####################################

    Replace them in your sources.list file and then run the following command lines to see how it works:

    aptupdate; 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

    localpurge; 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 / *

    Then you comment how did it go?