Debian10 LXDE Install - ewsdocker/ewsdocker.github.io GitHub Wiki

Debian 10 + LXDE Desktop

    December 3, 2020 - Revised to Debian 10.6-0.

Contents


Refer to the resources listed at the end of this document for a list of additional resources and articles.


Hardware Overview

    In the following discussion, the computer is an AMD-64 Quad-core CPU desktop system with 16 GB memory, 2 physical (Ethernet) network adapters, and at least one virtual (Ethernet) network adapter.

    The system will be configured as a desktop workstation platform with 2 network adapters:

    enp0s3 - Internet Lan Adapter

    An Ethernet adapter, providing the global Internet (or External netwrok) interface. All Internet traffic passes through here.

    Host name: deb-10-6-ws
    Host fqn: deb-10-6-ws.internet.lan
    Host address: 192.168.0.254
      Network name: internet.lan
      Network address: 192.168.0.0
      Network mask: 255.255.252.0
      Network gateway: 192.168.0.1
    enp0s8 - Virtual Lan Adapter (Virtual / VirtualBox Hosts only)

    An internal virtual lan adapter interface providing communications between virtualized clients and with the Host operating system.

    Host name: deb-10-6-vir
    Host fqn: deb-10-6-vir.virtual.lan
    Host address: 172.20.2.254
      Network name: virtual.lan
      Network address: 172.20.2.0
      Network mask: 255.255.252.0
    enp0s9 - Local Lan Adapter (Optional)

    An Ethernet adapter, providing access to local network.

    Host name: deb-10-6-lcl
    Host fqn: deb-10-6-lcl.local.lan
    Host address: 10.0.2.254
      Network name: local.lan
      Network address: 10.0.2.0
      Network mask: 255.255.252.0

Install Debian 10.6.0 DVD

    Download Debian 10.6.0 ISO

      Go to the Debian release repository at

xhttp://www.debian.org/releases/stable/debian-installer/  

and select an appropriate image for the download. For the processor indicated above, the amd64-DVD-1 iso image is recommended.

For example: https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/debian-10.6.0-amd64-DVD-1.iso ONLY the first iso image in the 3-image DVD group is required if the Internet is available during installation.


Installation

    Log-in as root

      Or su, or sudo -s, or use sudo before restricted commands.

    The Debian 10 (Buster) Installation Steps with Screenshots web page provides a visual step-by-step instruction for installing Debian 10 from the newly created ISO boot disk.

    When the Choose Software to Install screen appears. Select only the following item:

      Standard system utilities  
      

    Press continue to complete the installation;

    After performing

      Step:8) Boot your newly installed system with Debian 10
      

    the system will be in console-mode.
    Sign-in as user root with the password created in the above installation.


    APT Setup and Additional Utilities

      Edit the file /etc/apt/sources.list. Comment out the cd repository, as follows:

#deb cdrom:  

Modify the following line in /etc/apt/sources.list

deb http://ftp.us.debian.org/debian/ buster main   

and replace it with

deb http://ftp.us.debian.org/debian/ buster main contrib non-free  

Update the apt cache

apt update
apt upgrade  

Install utilities

apt install apt apt-utils apt-transport-https gpm gdebi nano sudo curl wget net-tools network-manager resolvconf ssh openssh-server  

Create sudo users

usermod -aG sudo <username>  

Reboot to install the new software.


Login as user

    Log-in with your user name (not root) and password.

    Then login as a super-user with the sudo command.

sudo -s

This allows you to become root until the next exit command.


About GPM Mouse.

    After logging-in, a mouse device may be displayed, if one is active.

    The GPM mouse driver is enabled when the system is installed. If there is no mouse installed, or you don't want to use a mouse, the GPM driver may be disabled.

systemctl stop gpm.service
systemctl disable gpm.serivce  

To re-enable the GPM mouse driver,

systemctl enable gpm.service
systemctl start gpm.service

Networking and Resolver

    Setup Network Manager

    Edit the /etc/NetworkManager/NetworkManager.conf file and change the managed setting to true.

[ifupdown]
managed=true

netadptSetup network adapters

Edit the file /etc/network/interfaces, modify the enp0s3 interface definition, and configure additional interfaces, as follows:

source /etc/network/interfaces.d/*  

auto lo  
iface lo inet loopback  

auto enp0s3  
iface enp0s3 inet static  
     address 192.168.0.254  
     network 192.168.0.0  
     netmask 255.255.252.0  
     gateway 192.168.0.1  
          dns-nameserver 192.168.0.1  
          dns-nameserver 8.8.4.4  
          dns-search internet.lan  

auto enp0s8  
iface enp0s8 inet static  
     address 172.20.2.254  
     network 172.20.2.0  
     netmask 255.255.252.0  

auto enp0s9  
iface enp0s9 inet static  
     address 10.0.2.254  
     network 10.0.2.0  
     netmask 255.255.252.0  

Update the hosts file

Edit the local /etc/hosts file and modify the following ipV4 settings:

127.0.0.1		localhost
127.0.1.1		deb-10-6-ws.internet.lan

192.168.0.254		deb-10-6-ws.internet.lan   deb-10-6-ws  
172.20.2.254		deb-10-6-virt.virtual.lan
10.0.2.254        deb-10-6-lcl.local.lan

Do not remove the ipV6 settings - firewalld will not work properly if they are removed (a bug in iptables 1.8.2-4).

Setup hostname

Edit the /etc/hostname file and set a fully-qualified-name (fqn) for the host.

deb-10-6-ws.internet.lan  

Setup IP Resolver

    Install the resolvconf package

apt-get -y install resolvconf  

Enable and start resolvconf

systemctl enable resolvconf.service
systemctl start resolvconf.service

Setup the resolvconf database

    Create a head file

      Contents of the resolv.conf.d/head file are the first lines added to the resolver automatically. It normally starts with a comment. Additional lines may be added following the comments.

echo "# ewsdocker" >> /etc/resolvconf/resolv.conf.d/head

Create a base file

    Contents of the resolv.conf.d/base file are always added to the resolver automatically, and immediately following the contents of the resolv.conf.d/head file.

echo "nameserver 8.8.8.8" > /etc/resolvconf/resolv.conf.d/base
echo "search internet.lan" >> /etc/resolvconf/resolv.conf.d/base

These lines will appear after the contents of the head file in the dynamically created resolv.conf file.

Create a tail file

    Contents of the resolv.conf.d/tail file are added to the resolver automatically, and immediately following the contents of the resolv.conf.d/base file.
echo "nameserver 8.8.8.8" > /etc/resolvconf/resolv.conf.d/tail

These lines will appear after the contents of the base file in the dynamically created resolv.conf file.

Enable Resolver to auto start on boot start-up

systemctl enable systemd-resolved.service

Update the resolv.conf file from the database settings

resolvconf --enable-updates
resolvconf -u

Check the contents of the newly created /etc/resolv.conf (should be pointing to /run/resolv.conf). Then check the output of

cat /run/resolv.conf

Reboot.

    Install the software configuration changes and start the resolver.



Storage Drives

    Install additional storage drives.

      If additional storage drives need to be installed, follow the steps outlined in Linux Disk Drive Installation before proceeding to the next step.



Firewalls

    Install the nftables firewall.

      Check that the proper kernel modules are present.

modprobe nf_tables
echo $?

If the result is not 0, the kernel modules are not present.

nftables strategies

The approach chosen runs both the nftables and iptables systems together. This requires the removal of firewalld in favor of the nftables system in its place.

To do this successfully, the nftables rulesets must
  • be backwards compatible to tools using iptables;
  • replace inet table with an ip and ipv6 table;
  • name all chains exactly as in iptables: INPUT, OUTPUT & FORWARD;
  • start the nftables firewall (systemd) prior to starting iptables.

This approach will allow iptables-dependent applications to continue to operate, as long as the conditions above are adhered to.

    Stop and remove the firewalld package.

systemctl stop firewalld.service
systemctl disable firewalld.service
apt-get remove -y firewalld

Install the nftables package.

apt-get install -y nftables

Rename the current /etc/nftables.conf configuration file to /etc/nftables.conf.orig

mv /etc/nftables.conf /etc/nftables.conf.orig

Create an empty /etc/nftables.conf configuration file

touch /etc/nftables.conf

Copy the following block to the /etc/nftables.conf file:

#!/usr/sbin/nft -f
flush ruleset
# IPv4
table ip filter {
    chain INPUT {
        type filter hook input priority 0; policy drop;
        # accept any localhost traffic
        iif lo accept
        # accept traffic originated from us
        ct state established,related accept
        tcp dport { http, https, ssh, 53, 43, 8000 } accept
     }
    chain FORWARD {
        type filter hook forward priority 0; policy drop;
     }
    chain OUTPUT {
        # allow all outwards traffic
        type filter hook output priority 0; policy accept;
     }
 }
# IPv6
table ip6 filter {
    chain INPUT {
        type filter hook input priority 0; policy drop;
        # accept any localhost traffic
        iif lo accept
        # accept traffic originated from us
        ct state established,related accept
        # accept neighbour discovery otherwise connectivity breaks
        icmpv6 type { nd-neighbor-solicit, echo-request, nd-router-advert, nd-neighbor-advert } accept
     }
    chain FORWARD {
        type filter hook forward priority 0; policy drop;
     }
    chain OUTPUT {
        # allow all outwards traffic
        type filter hook output priority 0; policy accept;
     }
 }

Enable and start

systemctl enable nftables
systemctl start nftables

Setup FirewallD.

    If firewalld is being installed as the firewall service, follow the steps outlined in


    before proceeding to the next step.


Docker-CE



GUI Desktop

    Disable GPM Mouse.

      The GPM mouse driver is enabled when the system is installed. Before installing the X-11 Server, the GPM driver should be disabled, allowing the X-11 mouse system to take over.

systemctl stop gpm.service
systemctl disable gpm.serivce  

To re-enable the GPM mouse driver,

systemctl enable gpm.service
systemctl start gpm.service


Install X-11 Server (optional).

apt install xorg chameleon-cursor-theme comixcursors-lefthanded comixcursors-lefthanded-opaque comixcursors-righthanded comixcursors-righthanded-opaque  
reboot  


Install LXDE desktop (optional).

    NOTE:

      X-11 Server MUST be installed first.
    1. Install the Lightweight X-11 Desktop Environment, LXDE (installs openbox and lightdm)
        apt-get install lxde  
        reboot  
      
    2. At the LightDM login manager, change the Desktop type from Default xsession to LXDE


Complete Desktop Installation

    Install VirtualBox Client (VirtualBox Guests only).

      Install linux kernel support files for VirtualBox,
apt-get install dkms  

Insert the VirtualBox Guest Additions DVD in the dvd drive

Change to the mounted device

cd /media/cdrom0

and run the Guest Additions Installer

sh ./VBoxLinuxAdditions.run

When it is completed, unmount / remove the VirtualBox Guest Additions DVD;

To enable access to VirtualBox resources, on a per-user basis,

usermod -aG vboxsf <user name>

Reboot.



Install the Google Chrome browser

    cd to the download directory and run the following command:

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

Install the downloaded file

gdebi google-chrome*.deb

Cleanup.

rm *.deb

Console Display Mode

    Switch to Console Mode
systemctl set-default multi-user.target  
reboot

Switch to Graphical Mode

systemctl set-default graphical.target  
reboot

Intel oneAPIBase Toolkit (Optional)


    Remove any installed oneAPIBase Toolkit Artifacs

apt autoremove intel-hpckit intel-basekit  

Install the Intel repository public key

wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB  
apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB

Add the Intel repository

add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"  
apt-get update

Install the Base Toolkit

apt install -y intel-basekit

List Repository Contents

    List All Packages

apt-cache pkgnames intel  

or

apt-cache pkgnames intel | grep kit$  

List Toolkit Packages

apt-cache pkgnames intel | grep kit | grep -v runtime

List Standalone Components

apt-cache pkgnames intel | grep intel-oneapi | grep -v intel-oneapi-runtime

List Runtime Library Packages

apt-cache pkgnames intel | grep intel-oneapi-runtime


Resources
 

Debian 10 Installation

 
How to install a Debian 10 (Buster) Minimal Server  at   Howto Forge
How to Install a Debian 10 (Buster) Minimal Server  at   TechMint
Using GUI's with Docker  at   Docker Tutorials
 
Intel® oneAPI Base Toolkit - Cross Architecture  at   Intel Software

Debian 10 Network Installation and Setup

 
Debian -- Details of package resolvconf in buster  at   Debian -- Packages
Set permanent DNS nameservers on Ubuntu/Debian with resolv.conf  at   Ricmedia Tech Tutorials
Network Configuration in Debian 10  at   Vitux
How To Set Permanent DNS Nameservers in Ubuntu and Debian  at   TecMint
How to Resolve "Temporary failure in name resolution" Issue  at   TecMint
Controlling Network Traffic with iptables - A Tutorial  at   The Developer Cloud Simplified
 
PSA: Beware of Exposing Ports in Docker  at   The State Of Security
Configure the firewall for hosting with Docker  at   Server Guides
DFW - Docker Firewall Framework in Rust  at   DFW - Docker Firewall Framework in Rust
DFW - Docker Firewall Framework in Rust  at   Lib.rs
Getting started - nftables firewall backend  at   DFW - Docker Firewall Framework in Rust

Debian 10 nftables

 
debian, docker and nftables  at   Ehlers.Berlin
How To Install nftables In Ubuntu  at   Liquid Web Knowledge Base
Building and installing nftables from sources  at   nftables Wiki
Docker nftables configuration for Debian 10  at   GitHub Gist
Migrating Debian Buster from iptables to nftables  at   Gaelan Lloyd Blog
Howto: Set up a basic nftables firewall (Buster)  at   Debian User Forums
Nftables quick howto  at   To Linux and beyond
nftables-systemd  at   GitHub
How to Configure nftables Successor of iptables  at   LinOxide

Debian 10 Security

 
Securing a Web Server Using a Linux Namespaces Sandbox  at   Layer 3 Networking Blog
How to Restrict a Login Shell Using Linux Namespaces  at   Layer 3 Networking Blog

Debian 9 Desktop Installation

 
Welcome to the LXDE Wiki  at   LXDE Wiki
How to install Xfce  at   Debian Wiki

Debian 9 Network Setup

 
NetworkConfiguration  at   Debian Wiki
NetworkManager  at   Debian Wiki
FirewallD -- Open a Port or Service  at   FirewallD

Debian 9 Internet

 
Google Chrome Web Browser Installation  at   LinuxConfig.ORG

Home  <==  BACK      |      NEXT  ==> Debian9-Docker18-UserNs

⚠️ **GitHub.com Fallback** ⚠️