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
==========
.. todo::
.. todo:: syntax
debmirror
=========

View file

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