This commit is contained in:
Marc Beninca 2018-05-10 12:54:35 +02:00
parent 72e3068b6a
commit 5055c374fa
2 changed files with 136 additions and 138 deletions

View file

@ -5,7 +5,7 @@ Mirror
apt-mirror apt-mirror
========== ==========
.. todo:: .. todo:: syntax
debmirror debmirror
========= =========

View file

@ -6,10 +6,6 @@ Debian GNU/Linux distribution installation
* /etc/motd * /etc/motd
::
Choices Choices
======= =======
@ -48,14 +44,14 @@ decide the desired type of system
Install required tools Install required tools
====================== ======================
||| ============== ===============================================
||| debootstrap générer un système de fichiers de base minimal
| debootstrap | générer un système de fichiers de base minimal squashfs-tools compresser ou décompresser une image de système
| squashfs-tools | compresser ou décompresser une image de système ============== ===============================================
.. code:: shell
```bash
apt-get install "debootstrap squashfs-tools" apt-get install "debootstrap squashfs-tools"
```
Create a base file hierarchy Create a base file hierarchy
============================ ============================
@ -66,18 +62,20 @@ prepare the system's directory
* devenir root * devenir root
* créer un répertoire, et s’y positionner * créer un répertoire, et s’y positionner
```bash .. code:: shell
su su
```
```bash .. code:: shell
mkdir -p "chemin" mkdir -p "chemin"
cd "chemin" cd "chemin"
```
generate the minimal base generate the minimal base
------------------------- -------------------------
```bash .. code:: shell
debootstrap \ debootstrap \
--arch="amd64" \ --arch="amd64" \
--include="locales,apt-utils,dialog" \ --include="locales,apt-utils,dialog" \
@ -85,7 +83,6 @@ debootstrap \
"stretch" \ "stretch" \
. \ . \
"miroir" "miroir"
```
Configure preinstalled packages Configure preinstalled packages
=============================== ===============================
@ -95,20 +92,21 @@ define default keyboard layouts
* /etc/default/keyboard * /etc/default/keyboard
```bash ::
XKBMODEL="pc105" XKBMODEL="pc105"
XKBLAYOUT="fr,fr" XKBLAYOUT="fr,fr"
XKBVARIANT="oss,bepo" XKBVARIANT="oss,bepo"
XKBOPTIONS="" XKBOPTIONS=""
BACKSPACE="guess" BACKSPACE="guess"
```
define default locales to generate define default locales to generate
---------------------------------- ----------------------------------
* etc/default/locale * etc/default/locale
``` ::
LANG=en_US.UTF-8 LANG=en_US.UTF-8
LANGUAGE=en_US LANGUAGE=en_US
LC_CTYPE="fr_FR.UTF-8" LC_CTYPE="fr_FR.UTF-8"
@ -123,14 +121,13 @@ LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8" LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8" LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8" LC_IDENTIFICATION="fr_FR.UTF-8"
```
* etc/locale.gen * etc/locale.gen
``` ::
en_US.UTF-8 UTF-8 en_US.UTF-8 UTF-8
fr_FR.UTF-8 UTF-8 fr_FR.UTF-8 UTF-8
```
[configure command shell](../bash/index.md) [configure command shell](../bash/index.md)
------------------------------------------- -------------------------------------------
@ -141,9 +138,9 @@ fr_FR.UTF-8 UTF-8
redefine hostname redefine hostname
----------------- -----------------
```bash .. code:: shell
echo "hostname" > "etc/hostname" echo "hostname" > "etc/hostname"
```
provide known file systems provide known file systems
-------------------------- --------------------------
@ -152,9 +149,9 @@ provide known file systems
Volume temporaire en RAM Volume temporaire en RAM
``` ::
tmpfs /tmp tmpfs auto,mode=1777 0 0 tmpfs /tmp tmpfs auto,mode=1777 0 0
```
Install additional packages Install additional packages
=========================== ===========================
@ -162,31 +159,33 @@ Install additional packages
switch into context switch into context
------------------- -------------------
```bash .. code:: shell
mount --bind /proc proc mount --bind /proc proc
mount --bind /sys sys mount --bind /sys sys
chroot . chroot .
```
TODO ? /dev .. todo:: /dev
generate locales generate locales
---------------- ----------------
```bash .. code:: shell
locale-gen locale-gen
```
define root password define root password
-------------------- --------------------
```bash .. code:: shell
passwd passwd
```
user, guest, sudo user, guest, sudo
----------------- -----------------
```bash .. code:: shell
apt-get install sudo apt-get install sudo
useradd -s /bin/bash user useradd -s /bin/bash user
@ -196,73 +195,73 @@ adduser user sudo
useradd -s /bin/bash guest useradd -s /bin/bash guest
chown guest: /home/guest chown guest: /home/guest
```
authentications: passwords, SSH keys authentications: passwords, SSH keys
------------------------------------ ------------------------------------
TODO .. todo:: files
upgrade system upgrade system
-------------- --------------
* dans tous les cas : * dans tous les cas :
```bash .. code:: shell
apt-get update apt-get update
apt-get upgrade apt-get upgrade
```
* si besoin, car des paquets rétroportés modifient la distribution : * si besoin, car des paquets rétroportés modifient la distribution :
```bash .. code:: shell
apt-get dist-upgrade apt-get dist-upgrade
```
apply system type elements apply system type elements
-------------------------- --------------------------
||| ================= ==================================================
||| linux-image-amd64 s’il ne s’agit pas d’un conteneur
| linux-image-amd64 | s’il ne s’agit pas d’un conteneur live-boot si à destination de boot live
| live-boot | si à destination de boot live systemd-sysv sans quoi le système ne démarrera pas complètement
| systemd-sysv | sans quoi le système ne démarrera pas complètement ================= ==================================================
.. code:: shell
```bash
apt-get install -t stretch-backports "linux-image-amd64" apt-get install -t stretch-backports "linux-image-amd64"
apt-get install "live-boot" apt-get install "live-boot"
```
---- ----
initialization settings initialization settings
----------------------- -----------------------
```bash .. code:: shell
apt-get install -t stretch-backports "systemd-sysv" apt-get install -t stretch-backports "systemd-sysv"
```
* etc/sysctl.conf * etc/sysctl.conf
Espace mémoire maximum allouable (à augmenter si hébergement de conteneurs) Espace mémoire maximum allouable (à augmenter si hébergement de conteneurs)
Pourcentage de RAM disponible avant utilisation de la partition d’échange Pourcentage de RAM disponible avant utilisation de la partition d’échange
```ini .. code:: ini
vm.max_map_count=1048576 vm.max_map_count=1048576
vm.swappiness=0 vm.swappiness=0
```
keeping things light keeping things light
-------------------- --------------------
```bash .. code:: shell
apt-get install --no-install-recommends … apt-get install --no-install-recommends …
```
install useful packages install useful packages
----------------------- -----------------------
```bash .. code:: shell
apt-get install \ apt-get install \
bash-completion \ bash-completion \
lxc \ lxc \
@ -270,44 +269,43 @@ less nano vim \
pciutils usbutils \ pciutils usbutils \
python3 \ python3 \
squashfs-tools \ squashfs-tools \
```
```bash .. code:: shell
apt-get install -t "stretch-backports" \ apt-get install -t "stretch-backports" \
debootstrap \ debootstrap \
```
install other packages install other packages
---------------------- ----------------------
[Choix de paquets commentés](packages.md) [Choix de paquets commentés](packages.md)
```bash .. code:: shell
apt-get install "package1" … apt-get install "package1" …
apt-get install -t stretch-backports "package1" … apt-get install -t stretch-backports "package1" …
```
properly switch back from context properly switch back from context
--------------------------------- ---------------------------------
* vider le cache d’APT * vider le cache d’APT
```bash .. code:: shell
apt-get clean apt-get clean
```
* s’extraire de l’environnement * s’extraire de l’environnement
```bash .. code:: shell
exit exit
```
* démonter les liens au système hôte * démonter les liens au système hôte
```bash .. code:: shell
umount sys umount sys
umount proc umount proc
```
clean up commands history clean up commands history
------------------------- -------------------------
@ -317,7 +315,7 @@ clean up commands history
Configure installed packages Configure installed packages
============================ ============================
.. todo:: .. todo:: files
Archive prepared file system Archive prepared file system
============================ ============================