Server Installation: Unterschied zwischen den Versionen
Erscheinungsbild
Inhalt gelöscht Inhalt hinzugefügt
→Basisinstallation: Grub2 |
|||
| Zeile 18: | Zeile 18: | ||
::* root spiegeln: rsync -axz --numeric-ids root@izumi.on:/ /mnt/ |
::* root spiegeln: rsync -axz --numeric-ids root@izumi.on:/ /mnt/ |
||
::* Minimale Device-Nodes anlegen (bei UDEV): MAKEDEV null console zero |
::* Minimale Device-Nodes anlegen (bei UDEV): MAKEDEV null console zero |
||
* Bootloader installieren (''grub''): |
|||
** via chroot und grub-Skripte: (chroot...); grub-install --no-floppy /dev/<device>; update-grub |
|||
** oder manuell, dabei /boot/grub/menu.lst selbst anpassen/erstellen: grub --no-floppy (root (hd0,0) / setup (hd0) / quit) |
|||
* Kernel bauen / aktualisieren |
|||
** cd /usr/src/linux; make menuconfig; make; make install; make modules_install; update-grub |
|||
** ggf. local-version neu setzen |
|||
==== Hilfsmittel: RAID mit mdadm ==== |
==== Hilfsmittel: RAID mit mdadm ==== |
||
| Zeile 33: | Zeile 27: | ||
** Daten in /hda3 einspielen |
** Daten in /hda3 einspielen |
||
** ''mdadm --manage /dev/md0 --add /dev/hdc3'' |
** ''mdadm --manage /dev/md0 --add /dev/hdc3'' |
||
==== Grub2 ==== |
|||
* Grub2 installieren und Kernel einbinden |
|||
grub-install /dev/hdX |
|||
update-grub |
|||
* Kontrolle über ''/boot/grub/grub.cfg'' und ''/boot/grub/device.map'' und ggf. |
|||
grub-install --recheck /dev/hdX |
|||
==== Minimalkonfiguration ==== |
==== Minimalkonfiguration ==== |
||
Version vom 15. Februar 2011, 20:31 Uhr
Basisinstallation
- Booten, z.B. per CD oder PXE mit Knoppix
- Dateisystem vorbereiten:
- cfdisk /dev/<device>, z.B. /dev/hda (IDE) oder /dev/sda (SCSI)
- primäre Partitionen: 32 MB boot (Typ 83 + bootable), 500 MB swap (Typ 82), Rest für / (Typ 83)
- boot mit EXT2: mkfs.ext2 /dev/<device>1
- swap mit SWAP: mkswap /dev/<device>2
- root mit XFS: mkfs.xfs /dev/<device>3
- Debian (aktuelle Stable) installieren
- a) Neuinstallation, vgl. Debian GNU/Linux-Installationsanleitung
- c) per debootstap von Knoppix aus, vgl. Debian GNU/Linux-Installationsanleitung - C.4
- b) als Kopie von vorhandenem GW, z.B. izumi
- Filesysteme auf izumi ggf. mounten, crontab Einträge ggf. deaktivieren (CPU-Last)
- boot einbinden: mount /dev/<device>1 /mnt/
- boot spiegeln: rsync -axz --numeric-ids root@izumi.on:/boot/ /mnt/
- root einbinden: umount /mnt; mount /dev/<device>3 /mnt/
- root spiegeln: rsync -axz --numeric-ids root@izumi.on:/ /mnt/
- Minimale Device-Nodes anlegen (bei UDEV): MAKEDEV null console zero
Hilfsmittel: RAID mit mdadm
- spezieller Partitionstyp FD (Linux raid autodetect), mit cfdisk einstellen
- direkt: mdadm --create --verbose /dev/md0 --level=raid1 --raid-devices=2 /dev/hda3 /dev/hdc3
- oder auch schrittweise:
- mdadm --create --verbose /dev/md0 --level=raid1 --raid-devices=2 /dev/hda3 missing
- Daten in /hda3 einspielen
- mdadm --manage /dev/md0 --add /dev/hdc3
Grub2
- Grub2 installieren und Kernel einbinden
grub-install /dev/hdX update-grub
- Kontrolle über /boot/grub/grub.cfg und /boot/grub/device.map und ggf.
grub-install --recheck /dev/hdX
Minimalkonfiguration
- Hostname /etc/hostname + /etc/mailname
- Zeitzone /etc/timezone -> UTC
- Kernelmodule /etc/modules
- Dateisysteme /etc/fstab
/dev/<device>1 /boot ext2 noauto,noatime 1 1 /dev/<device>3 / xfs noatime 0 0 /dev/<device>2 none swap sw 0 0 /dev/cdrom /mnt/cdrom iso9660 noauto,ro 0 0 none /proc proc defaults 0 0 none /dev/shm tmpfs defaults 0 0
Dienste
Trac (Projektmanagement)
siehe Server Installation/Trac
Monitoring
apticron
- prüft den Update Status des Debian OS
- Default-Installation ausreichend, liefert Änderungen per Mail an root
- werden durch postfix dann automatisch an das ONI-NOC gesendert
munin
- erzeugt Graphen zum Systemzustand, inbesondere Netztraffic
- Default-Installation ausreichend, Zugriff via Web (apache)
monit
- Debian Default-Installation ausführen und Config-File ersetzen
- Check auf Default-GW (IP) und PID-Files (Pfade) prüfen
- überwacht dann dauerhaft Prozesse und startet diese ggf. neu
- Zugriff per https://<host> und Username/Passwort (siehe Config-File)
vnstat
- vnstat installieren: apt-get install vnstat; vnstat -u -i <wan-interface>
- wird regelmässig durch den cron gestartet
- Werte können an der Console abgefragt werden, z.B. Monatswerte per vnstat -m
logcheck
- prüft Logdateien auf Anomalien und sendet dieses per E-Mail
- Installation per apt-get install logcheck und Konfiguration von /etc/logcheck/logcheck.conf:
FQDN=0 MAILASATTACH=0 REPORTLEVEL="server" SENDMAILTO="noc@opennet-initiative.de" TMP="/tmp"
- Ausnahmen bitte in /etc/logcheck/ignore.d.server/opennet ablegen
Nagios
Siehe Gateway Installation/Nagios.