Atelier SysRes SE2a5 2023/2024 E2
Aller à la navigation
Aller à la recherche
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
- tasksel (xfce)
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
- mv /var/* /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
- nano /etc/fstab
/dev/xvdb1 /home ext2 defaults 0 2
/dev/xvdb2 /var ext4 defaults 0 2
- 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
ajout des interfaces sur la machine de service berlin :
auto eth1
iface eth1 inet static
address 192.168.165.3/24
gateway 192.168.165.1
post-up ethtool -K eth1 tx off
Séance du 10/11:
Modification: nano /etc/bind/db.berlin2.lol
$TTL 1H
berlin2.lol. IN SOA ns1.berlin2.lol. quoicoubeh@mail.com. (
2011041902 ; Serial
1H ; Refresh
15M ; Retry
2W ; Expire
3M ; Minimum TTL
)
berlin.lol. IN NS ns1.berlin2.lol.
berlin.lol. IN A 193.48.57.165
ns1.berlin2.lol. IN A 193.48.57.165
ns1.berlin2.lol. IN AAAA 2001:660:4401:60a0:216:3eff:fe9b:446d
www.berlin2.lol. IN CNAME ns1.berlin2.lol.