fichier échantillon pour le CT
authorWilly MANGA <willy.manga@auf.org>
Tue, 7 Feb 2012 16:18:37 +0000 (17:18 +0100)
committerWilly MANGA <willy.manga@auf.org>
Tue, 7 Feb 2012 16:18:37 +0000 (17:18 +0100)
scripts/creationCT.sample [new file with mode: 0644]

diff --git a/scripts/creationCT.sample b/scripts/creationCT.sample
new file mode 100644 (file)
index 0000000..3febe74
--- /dev/null
@@ -0,0 +1,69 @@
+lvcreate -L 1G -n 121 systeme
+lvcreate -L 500M -n 121-srv systeme
+lvcreate -L 500M -n 121-tmp systeme
+lvcreate -L 1G -n 121-var systeme
+lvcreate -L 500M -n 121-var-log systeme
+lvcreate -L 500M -n 121-var-lib-spip systeme
+mkfs.ext4 -c /dev/mapper/systeme-121
+mkfs.ext4 -c /dev/mapper/systeme-121--srv
+mkfs.ext4 -c /dev/mapper/systeme-121--tmp && mkfs.ext4 -c /dev/mapper/systeme-121--var
+mkfs.ext4 -c /dev/mapper/systeme-121--var--lib--spip
+mkfs.ext4 -c /dev/mapper/systeme-121--var--log
+vi /etc/vz/conf/121.mount
+cd /etc/vz/conf/
+chmod u+x 121.mount
+git status
+git log  
+vi /etc/fstab
+vzctl --verbose create 121 --ostemplate debian-squeeze-ready --config fifty --hostname web
+cd /var/lib/vz/private/
+ls
+mv 121 121.tmp
+mkdir 121
+mount /dev/systeme/121 121
+cd 121
+mkdir var tmp srv
+ls
+mount /dev/systeme/121-tmp tmp
+mount /dev/systeme/121-srv srv
+mount /dev/systeme/121-var var/
+cd var/
+mkdir -p {log,lib/spip}
+ls
+ls lib/
+ls lib/spip/
+mount /dev/systeme/121-var-lib-spip lib/spip
+mount /dev/systeme/121-var-log log
+cd ../..
+rsync  -av --numeric-ids /var/lib/vz/private/121.tmp/ /var/lib/vz/private/121
+cd 121
+ls
+mount | grep 121
+umount var/lib/spip
+umount var/log
+umount var
+umount srv
+umount tmp
+mount | grep 121
+cd ..
+cd 121
+ls
+vi etc/apt/sources.list
+vi etc/apt/sources.list
+vi etc/network/interfaces
+cd ..
+cd
+vi /var/lib/vz/private/121/etc/network/interfaces
+vzctl set 121 --netif_add "eth0,02:00:00:00:12:2A,veth122.0,02:00:00:00:12:2B,vz1" --save
+view /etc/vz/conf/121.conf
+cd /etc/vz/conf
+vi 120.conf
+vzctl start 121
+vzctl enter 121
+cd /etc/
+git status
+git add lvm
+git status
+git add vz/conf/121*
+git status
+git commit -a -m "mise en place CT121: web"