deb/rst
This commit is contained in:
parent
72e3068b6a
commit
5055c374fa
2 changed files with 136 additions and 138 deletions
|
@ -5,7 +5,7 @@ Mirror
|
||||||
apt-mirror
|
apt-mirror
|
||||||
==========
|
==========
|
||||||
|
|
||||||
.. todo::
|
.. todo:: syntax
|
||||||
|
|
||||||
debmirror
|
debmirror
|
||||||
=========
|
=========
|
||||||
|
|
|
@ -4,11 +4,7 @@ Debian GNU/Linux distribution installation
|
||||||
|
|
||||||
.. todo::
|
.. todo::
|
||||||
|
|
||||||
* /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
|
============== ===============================================
|
||||||
|
|
||||||
```bash
|
.. code:: shell
|
||||||
apt-get install "debootstrap squashfs-tools"
|
|
||||||
```
|
apt-get install "debootstrap squashfs-tools"
|
||||||
|
|
||||||
Create a base file hierarchy
|
Create a base file hierarchy
|
||||||
============================
|
============================
|
||||||
|
@ -66,26 +62,27 @@ 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
|
|
||||||
mkdir -p "chemin"
|
.. code:: shell
|
||||||
cd "chemin"
|
|
||||||
```
|
mkdir -p "chemin"
|
||||||
|
cd "chemin"
|
||||||
|
|
||||||
generate the minimal base
|
generate the minimal base
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
```bash
|
.. code:: shell
|
||||||
debootstrap \
|
|
||||||
--arch="amd64" \
|
debootstrap \
|
||||||
--include="locales,apt-utils,dialog" \
|
--arch="amd64" \
|
||||||
--variant="minbase" \
|
--include="locales,apt-utils,dialog" \
|
||||||
"stretch" \
|
--variant="minbase" \
|
||||||
. \
|
"stretch" \
|
||||||
"miroir"
|
. \
|
||||||
```
|
"miroir"
|
||||||
|
|
||||||
Configure preinstalled packages
|
Configure preinstalled packages
|
||||||
===============================
|
===============================
|
||||||
|
@ -95,42 +92,42 @@ define default keyboard layouts
|
||||||
|
|
||||||
* /etc/default/keyboard
|
* /etc/default/keyboard
|
||||||
|
|
||||||
```bash
|
::
|
||||||
XKBMODEL="pc105"
|
|
||||||
XKBLAYOUT="fr,fr"
|
XKBMODEL="pc105"
|
||||||
XKBVARIANT="oss,bepo"
|
XKBLAYOUT="fr,fr"
|
||||||
XKBOPTIONS=""
|
XKBVARIANT="oss,bepo"
|
||||||
BACKSPACE="guess"
|
XKBOPTIONS=""
|
||||||
```
|
BACKSPACE="guess"
|
||||||
|
|
||||||
define default locales to generate
|
define default locales to generate
|
||||||
----------------------------------
|
----------------------------------
|
||||||
|
|
||||||
* etc/default/locale
|
* etc/default/locale
|
||||||
|
|
||||||
```
|
::
|
||||||
LANG=en_US.UTF-8
|
|
||||||
LANGUAGE=en_US
|
LANG=en_US.UTF-8
|
||||||
LC_CTYPE="fr_FR.UTF-8"
|
LANGUAGE=en_US
|
||||||
LC_NUMERIC="fr_FR.UTF-8"
|
LC_CTYPE="fr_FR.UTF-8"
|
||||||
LC_TIME="fr_FR.UTF-8"
|
LC_NUMERIC="fr_FR.UTF-8"
|
||||||
LC_COLLATE="fr_FR.UTF-8"
|
LC_TIME="fr_FR.UTF-8"
|
||||||
LC_MONETARY="fr_FR.UTF-8"
|
LC_COLLATE="fr_FR.UTF-8"
|
||||||
LC_MESSAGES="en_US.UTF-8"
|
LC_MONETARY="fr_FR.UTF-8"
|
||||||
LC_PAPER="fr_FR.UTF-8"
|
LC_MESSAGES="en_US.UTF-8"
|
||||||
LC_NAME="fr_FR.UTF-8"
|
LC_PAPER="fr_FR.UTF-8"
|
||||||
LC_ADDRESS="fr_FR.UTF-8"
|
LC_NAME="fr_FR.UTF-8"
|
||||||
LC_TELEPHONE="fr_FR.UTF-8"
|
LC_ADDRESS="fr_FR.UTF-8"
|
||||||
LC_MEASUREMENT="fr_FR.UTF-8"
|
LC_TELEPHONE="fr_FR.UTF-8"
|
||||||
LC_IDENTIFICATION="fr_FR.UTF-8"
|
LC_MEASUREMENT="fr_FR.UTF-8"
|
||||||
```
|
LC_IDENTIFICATION="fr_FR.UTF-8"
|
||||||
|
|
||||||
* etc/locale.gen
|
* etc/locale.gen
|
||||||
|
|
||||||
```
|
::
|
||||||
en_US.UTF-8 UTF-8
|
|
||||||
fr_FR.UTF-8 UTF-8
|
en_US.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,152 +159,153 @@ Install additional packages
|
||||||
switch into context
|
switch into context
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
```bash
|
.. code:: shell
|
||||||
mount --bind /proc proc
|
|
||||||
mount --bind /sys sys
|
mount --bind /proc proc
|
||||||
chroot .
|
mount --bind /sys sys
|
||||||
```
|
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
|
|
||||||
|
|
||||||
useradd -s /bin/bash user
|
apt-get install sudo
|
||||||
mkdir /home/user
|
|
||||||
chown user: /home/user
|
|
||||||
adduser user sudo
|
|
||||||
|
|
||||||
useradd -s /bin/bash guest
|
useradd -s /bin/bash user
|
||||||
chown guest: /home/guest
|
mkdir /home/user
|
||||||
```
|
chown user: /home/user
|
||||||
|
adduser user sudo
|
||||||
|
|
||||||
|
useradd -s /bin/bash 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 upgrade
|
apt-get update
|
||||||
```
|
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
|
================= ==================================================
|
||||||
|
|
||||||
```bash
|
.. code:: shell
|
||||||
apt-get install -t stretch-backports "linux-image-amd64"
|
|
||||||
apt-get install "live-boot"
|
apt-get install -t stretch-backports "linux-image-amd64"
|
||||||
```
|
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.swappiness=0
|
vm.max_map_count=1048576
|
||||||
```
|
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 \
|
|
||||||
bash-completion \
|
|
||||||
lxc \
|
|
||||||
less nano vim \
|
|
||||||
pciutils usbutils \
|
|
||||||
python3 \
|
|
||||||
squashfs-tools \
|
|
||||||
```
|
|
||||||
|
|
||||||
```bash
|
apt-get install \
|
||||||
apt-get install -t "stretch-backports" \
|
bash-completion \
|
||||||
debootstrap \
|
lxc \
|
||||||
```
|
less nano vim \
|
||||||
|
pciutils usbutils \
|
||||||
|
python3 \
|
||||||
|
squashfs-tools \
|
||||||
|
|
||||||
|
.. code:: shell
|
||||||
|
|
||||||
|
apt-get install -t "stretch-backports" \
|
||||||
|
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 -t stretch-backports "package1" …
|
apt-get install "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 proc
|
umount sys
|
||||||
```
|
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
|
||||||
============================
|
============================
|
||||||
|
|
Loading…
Reference in a new issue