Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.
| Nächste Überarbeitung | Vorherige Überarbeitung | ||
| projekte:openvz-cloud [26.06.2011 02:46] – angelegt zeus | projekte:openvz-cloud [05.08.2022 22:51] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
|---|---|---|---|
| Zeile 16: | Zeile 16: | ||
| Eigentlich geht alles bis jetzt ziemlich schnell, aber ich will euch mal mein Weg nicht vorenthalten: | Eigentlich geht alles bis jetzt ziemlich schnell, aber ich will euch mal mein Weg nicht vorenthalten: | ||
| - | ===== Debian Install: ===== | + | ===== Step 1: Debian Install ===== |
| ISO: debian-504-i386-xfce+lxde-CD-1.iso \\ | ISO: debian-504-i386-xfce+lxde-CD-1.iso \\ | ||
| Zeile 79: | Zeile 79: | ||
| * ssh installer@172.16.200.8 | * ssh installer@172.16.200.8 | ||
| * Start installer | * Start installer | ||
| + | |||
| + | ---- | ||
| + | |||
| * Choose a mirror of the Debian archive | * Choose a mirror of the Debian archive | ||
| * http | * http | ||
| Zeile 84: | Zeile 87: | ||
| * mirror.giantix-server.de | * mirror.giantix-server.de | ||
| * http:// | * http:// | ||
| + | |||
| + | ---- | ||
| + | |||
| * Configure the clock | * Configure the clock | ||
| * Use NTP | * Use NTP | ||
| * 0.debian.pool.ntp.org | * 0.debian.pool.ntp.org | ||
| + | |||
| + | ---- | ||
| + | |||
| * Detect disks | * Detect disks | ||
| * usb-storage Nicht laden ( auser bei einem HDD laufwerk! das will man aber nicht!) | * usb-storage Nicht laden ( auser bei einem HDD laufwerk! das will man aber nicht!) | ||
| + | |||
| + | ---- | ||
| + | |||
| * Partition disks | * Partition disks | ||
| * Guided - use entire disk | * Guided - use entire disk | ||
| Zeile 95: | Zeile 107: | ||
| * Finish partitioning and write changes to disk | * Finish partitioning and write changes to disk | ||
| * Write the changes to disks? - YES | * Write the changes to disks? - YES | ||
| + | |||
| + | ---- | ||
| + | |||
| * Install the base system | * Install the base system | ||
| * linux-image-2.6-686 | * linux-image-2.6-686 | ||
| * targeted: only include drivers needed for this system | * targeted: only include drivers needed for this system | ||
| + | |||
| + | ---- | ||
| + | |||
| * Set up users and passwords | * Set up users and passwords | ||
| * Enable shadow passwords? - YES | * Enable shadow passwords? - YES | ||
| Zeile 106: | Zeile 124: | ||
| * Login | * Login | ||
| * Passwort | * Passwort | ||
| + | |||
| + | ---- | ||
| + | |||
| * Configure the package manager | * Configure the package manager | ||
| * Use a network mirror? - YES | * Use a network mirror? - YES | ||
| Zeile 114: | Zeile 135: | ||
| * Use non-free software? - YES | * Use non-free software? - YES | ||
| * Services to use - YES | * Services to use - YES | ||
| + | |||
| + | ---- | ||
| + | |||
| * Select and install software | * Select and install software | ||
| * An der Paketverwendungserfassung teilnehmen? - MM joa muss jeder selber wissen | * An der Paketverwendungserfassung teilnehmen? - MM joa muss jeder selber wissen | ||
| * Wir brauchen Keine Packete. einfach Minimal insterlliern (Nix auswaehlen) | * Wir brauchen Keine Packete. einfach Minimal insterlliern (Nix auswaehlen) | ||
| + | |||
| + | ---- | ||
| + | |||
| * Install the GRUB boot loader on a hard disk | * Install the GRUB boot loader on a hard disk | ||
| * Install GRUB 2 instead of GRUB Legacy? - YES, WIr koennen ja auch grosse Platten Haben | * Install GRUB 2 instead of GRUB Legacy? - YES, WIr koennen ja auch grosse Platten Haben | ||
| * Install the GRUB boot loader to the master boot record? - YES auf jedenfall | * Install the GRUB boot loader to the master boot record? - YES auf jedenfall | ||
| - | | + | |
| + | ---- | ||
| + | |||
| + | | ||
| * Is the system clock set to UTC? - YES | * Is the system clock set to UTC? - YES | ||
| * Finish the installation - Fertig werden! | * Finish the installation - Fertig werden! | ||
| + | ===== Step 2: Die Software ===== | ||
| + | |||
| + | |||
| + | vi / | ||
| + | ha02# diff -u interfaces interfaces.bak | ||
| - | Step 2. ( Die Software )[[BR]] | + | < |
| - | vi / | + | |
| - | ha02# diff -u interfaces interfaces.bak[[BR]] | + | |
| - | {{{ | + | |
| --- interfaces | --- interfaces | ||
| +++ interfaces.bak | +++ interfaces.bak | ||
| @@ -6,8 +6,7 @@ | @@ -6,8 +6,7 @@ | ||
| - | iface lo inet loopback | + | iface lo inet loopback |
| # The primary network interface | # The primary network interface | ||
| Zeile 151: | Zeile 183: | ||
| - network 192.168.23.0 | - network 192.168.23.0 | ||
| - broadcast | - broadcast | ||
| - | }}} | + | </code> |
| - | vi /etc/ | + | |
| - | ha02# diff -u hosts hosts.bak hosts[[BR]] | + | |
| - | {{{ | + | |
| + | |||
| + | vi /etc/hosts | ||
| + | ha02# diff -u hosts hosts.bak hosts | ||
| + | |||
| + | < | ||
| --- hosts | --- hosts | ||
| +++ hosts.bak | +++ hosts.bak | ||
| Zeile 168: | Zeile 202: | ||
| # The following lines are desirable for IPv6 capable hosts | # The following lines are desirable for IPv6 capable hosts | ||
| :: | :: | ||
| - | }}} | + | </code> |
| - | [[BR]] | + | |
| - | vi /etc/ | + | |
| - | ha02# diff -u sources.list sources.list.bak[[BR]] | + | |
| - | {{{ | + | |
| + | |||
| + | vi / | ||
| + | ha02# diff -u sources.list sources.list.bak | ||
| + | |||
| + | < | ||
| --- sources.list | --- sources.list | ||
| +++ sources.list.bak | +++ sources.list.bak | ||
| Zeile 184: | Zeile 219: | ||
| deb http:// | deb http:// | ||
| | | ||
| - | }}} | + | </ |
| Netzwerk neustarten | Netzwerk neustarten | ||
| - | {{{ | + | |
| - | apt-get install screen | + | apt-get install screen |
| - | screen / | + | screen / |
| - | }}} | + | |
| SSH Keys um configs Schnell auszutauschen | SSH Keys um configs Schnell auszutauschen | ||
| - | {{{ | + | |
| - | ha01:/ | + | ha01:/ |
| + | < | ||
| Generating public/ | Generating public/ | ||
| Enter file in which to save the key (/ | Enter file in which to save the key (/ | ||
| Zeile 213: | Zeile 250: | ||
| |.. .o.o* | | |.. .o.o* | | ||
| +-----------------+ | +-----------------+ | ||
| - | ssh-copy-id -i ~/ | + | </ |
| - | }}} | + | |
| Host datei auf ha01 anpassen | Host datei auf ha01 anpassen | ||
| - | {{{ | + | |
| - | scp /etc/hosts ha01:/ | + | |
| - | }}} | + | |
| - | {{{ | + | apt-get install drbd8-utils drbd8-modules-2.6.26-2-openvz-686 linux-image-2.6.26-2-openvz-686 openssh-server screen gfs2-tools redhat-cluster-modules-2.6-openvz-686 cman |
| - | apt-get install drbd8-utils drbd8-modules-2.6.26-2-openvz-686 linux-image-2.6.26-2-openvz-686 openssh-server screen gfs2-tools redhat-cluster-modules-2.6-openvz-686 cman | + | |
| - | }}} | + | |
| - | Step 3. (Konfig) | + | |
| - | drbd.conf | + | |
| - | {{{ | + | **drbd.conf** |
| + | <file bash drdb.conf> | ||
| global { | global { | ||
| usage-count no; | usage-count no; | ||
| Zeile 257: | Zeile 294: | ||
| } | } | ||
| } | } | ||
| - | }}} | + | </ |
| Drbd Metadaten auf ha01 & ha02 Erstellen | Drbd Metadaten auf ha01 & ha02 Erstellen | ||
| - | {{{ | + | |
| - | drbdadm create-md r0 | + | drbdadm create-md r0 |
| - | / | + | / |
| - | }}} | + | |
| ha01 zum primary machen | ha01 zum primary machen | ||
| - | {{{ | + | |
| - | drbdsetup /dev/drbd0 primary -o | + | drbdsetup /dev/drbd0 primary -o |
| - | }}} | + | |
| - | AUf Syncronisation warten[[BR]] | + | AUf Syncronisation warten |
| - | watch -n 1 cat / | + | watch -n 1 cat / |
| - | {{{ | + | < |
| Every 1,0s: cat / | Every 1,0s: cat / | ||
| Zeile 280: | Zeile 318: | ||
| resync: used:2/61 hits:383367 misses:376 starving:0 dirty:0 changed:376 | resync: used:2/61 hits:383367 misses:376 starving:0 dirty:0 changed:376 | ||
| act_log: used:0/127 hits:0 misses:0 starving:0 dirty:0 changed:0 | act_log: used:0/127 hits:0 misses:0 starving:0 dirty:0 changed:0 | ||
| - | }}} | + | </ |
| - | / | + | |
| - | {{{ | + | **/ |
| + | <file plain cluster.conf> | ||
| <?xml version=" | <?xml version=" | ||
| <cluster alias=" | <cluster alias=" | ||
| Zeile 307: | Zeile 346: | ||
| <rm/> | <rm/> | ||
| </ | </ | ||
| - | }}} | + | </file> |
| - | {{{ | + | |
| - | scp /etc/ | + | |
| - | }}} | + | |
| - | {{{ | + | |
| - | / | + | |
| - | }}} | + | |
| - | {{{ | + | |
| - | gfs_mkfs -t openvz:data -p lock_dlm -j 2 / | + | |
| - | }}} | + | |
| - | {{{ | + | |
| - | mkdir /vserver | + | |
| - | mount /dev/drbd0 /vserver/ | + | |
| - | }}} | + | |
| - | {{{ | + | |
| - | cd /vserver | + | |
| - | mkdir ha01 | + | |
| - | mkdir ha02 | + | |
| - | }}} | + | |
| - | {{{ | + | |
| - | ha02:/ | + | |
| - | ln -s / | + | |
| - | mv / | + | |
| - | ln -s / | + | |
| - | mv / | + | |
| - | ln -s / | + | |
| - | mv / | + | |
| - | mv / | + | |
| - | mv / | + | |
| - | mv / | + | |
| - | mv / | + | |
| - | mv / | + | |
| - | mv / | + | |
| - | mv / | + | |
| - | }}} | + | |
| - | {{{ | + | |
| - | ha01:/ | + | |
| - | ln -s / | + | |
| - | mv / | + | |
| - | ln -s / | + | |
| - | rm / | + | |
| - | ln -s / | + | |
| - | mv / | + | |
| - | mv / | + | |
| - | mv / | + | |
| - | mv / | + | |
| - | mv / | + | |
| - | mv / | + | |
| - | mv / | + | |
| - | mv / | + | |
| - | }}} | + | |
| - | /etc/fstab | + | scp /etc/cluster/ |
| - | {{{ | + | |
| + | / | ||
| + | |||
| + | |||
| + | gfs_mkfs -t openvz:data -p lock_dlm -j 2 / | ||
| + | |||
| + | |||
| + | mkdir /vserver | ||
| + | mount /dev/drbd0 /vserver/ | ||
| + | |||
| + | |||
| + | cd /vserver | ||
| + | mkdir ha01 | ||
| + | mkdir ha02 | ||
| + | |||
| + | |||
| + | ha02:/ | ||
| + | ln -s / | ||
| + | mv / | ||
| + | ln -s / | ||
| + | mv / | ||
| + | ln -s / | ||
| + | mv / | ||
| + | mv / | ||
| + | mv / | ||
| + | mv / | ||
| + | mv / | ||
| + | mv / | ||
| + | mv / | ||
| + | mv / | ||
| + | |||
| + | |||
| + | ha01:/ | ||
| + | ln -s / | ||
| + | mv / | ||
| + | ln -s / | ||
| + | rm / | ||
| + | ln -s / | ||
| + | mv / | ||
| + | mv / | ||
| + | mv / | ||
| + | mv / | ||
| + | mv / | ||
| + | mv / | ||
| + | mv / | ||
| + | mv / | ||
| + | |||
| + | |||
| + | **/ | ||
| + | <file plain fstab> | ||
| # /etc/fstab: static file system information. | # /etc/fstab: static file system information. | ||
| # | # | ||
| Zeile 372: | Zeile 410: | ||
| / | / | ||
| - | }}} | + | </ |
| - | vi / | + | |
| - | {{{ | + | < |
| #!/bin/bash | #!/bin/bash | ||
| ST=$( drbdadm dstate r0 2> /dev/null) | ST=$( drbdadm dstate r0 2> /dev/null) | ||
| Zeile 388: | Zeile 426: | ||
| drbdadm primary all | drbdadm primary all | ||
| mount -a | mount -a | ||
| - | }}} | + | </ |
| ha02 | ha02 | ||
| - | {{{ | + | |
| - | chmod 777 / | + | |
| - | scp / | + | |
| - | update-rc.d drbdp defaults 21 | + | scp / |
| - | }}} | + | update-rc.d drbdp defaults 21 |
| + | |||
| ha01 | ha01 | ||
| - | {{{ | ||
| - | chmod 777 / | ||
| - | update-rc.d drbdp defaults 21 | ||
| - | }}} | ||
| - | {{{ | + | |
| - | ha01:/ | + | chmod 777 / |
| - | }}} | + | update-rc.d drbdp defaults 21 |
| + | |||
| + | |||
| + | |||
| + | | ||