« Atelier SysRes SE2a5 2023/2024 E2 » : différence entre les versions
Aller à la navigation
Aller à la recherche
Aucun résumé des modifications |
|||
Ligne 65 : | Ligne 65 : | ||
lvcreate -L10G -nberlin-home virtual | lvcreate -L10G -nberlin-home virtual | ||
== 05/10/2023 == | |||
mkfs /dev/xvdb1 | |||
mkfs /dev/xvdb2 | |||
mkdir new-var | |||
mkdir new-home | |||
mount /dev/xvdb1 /new-home | |||
mount /dev/xvdb2 /new-var | |||
lsblk<syntaxhighlight lang="linux-config"> | |||
xvda1 202:1 0 512M 0 disk [SWAP] | |||
xvda2 202:2 0 10G 0 disk / | |||
xvdb1 202:17 0 10G 0 disk /root/new-home | |||
xvdb2 202:18 0 10G 0 disk /root/new-var | |||
</syntaxhighlight>umount /root/new-var | |||
umount /root/new-home | |||
mount -a | |||
lsblk<syntaxhighlight lang="linux-config"> | |||
xvda1 202:1 0 512M 0 disk [SWAP] | |||
xvda2 202:2 0 10G 0 disk / | |||
xvdb1 202:17 0 10G 0 disk /home | |||
xvdb2 202:18 0 10G 0 disk /var | |||
</syntaxhighlight>reboot |
Version du 5 octobre 2023 à 13:47
IP : 172.26.145.112
13/09/2023 :
Création de la VM
xen-create-image --hostname=berlin --ip=172.26.145.112 --dir=/usr/local/xen --dhcp
- vi /etc/network/interfaces : remplacer DHCP par static
address 172.26.145.112/24
gateway 172.26.145.254
14/09/2023 :
Configuration
Configuration de l'interface:
nano /etc/network/interfaces
Modifications:
auto eth0
iface eth0 inet static
address 172.26.145.109/24
gateway 172.26.145.254
Création d’un conteneur à la main
Sous machine Zabeth:
su -
dd if=/dev/zero of=toto bs=1024k count=10240
mkfs /home/pifou/toto
mkdir tmp/mnt
mount -oloop /home/pifou/toto /tmp/mnt
apt install debootstrap
debootstrap stable /tmp/mnt
echo "proc /proc proc defaults 0 0" >> /tmp/mnt/etc/fstab
unshare -p -f -m chroot /tmp/mnt /bin/sh -c "mount /proc ; /bin/bash"
Docker
docker run -i -t debian /bin/bash
02/10/2023
- Configuration du ssh
nano /etc/ssh/sshd_config
PermitRootLogin yes
- Installer apache2 et bind9
lvcreate -L10G -nberlin-var virtual
lvcreate -L10G -nberlin-home virtual
05/10/2023
mkfs /dev/xvdb1
mkfs /dev/xvdb2
mkdir new-var
mkdir new-home
mount /dev/xvdb1 /new-home
mount /dev/xvdb2 /new-var
lsblk
xvda1 202:1 0 512M 0 disk [SWAP]
xvda2 202:2 0 10G 0 disk /
xvdb1 202:17 0 10G 0 disk /root/new-home
xvdb2 202:18 0 10G 0 disk /root/new-var
umount /root/new-var
umount /root/new-home
mount -a
lsblk
xvda1 202:1 0 512M 0 disk [SWAP]
xvda2 202:2 0 10G 0 disk /
xvdb1 202:17 0 10G 0 disk /home
xvdb2 202:18 0 10G 0 disk /var
reboot