Server Installation: Unterschied zwischen den Versionen
Aus Opennet
(dito) |
(→munin) |
||
Zeile 75: | Zeile 75: | ||
* erzeugt Graphen zum Systemzustand, inbesondere Netztraffic | * erzeugt Graphen zum Systemzustand, inbesondere Netztraffic | ||
* Default-Installation ausreichend, Zugriff via Web (''apache'') | * Default-Installation ausreichend, Zugriff via Web (''apache'') | ||
+ | * '''Allow from All''' in /etc/apache2/conf.d/munin aufnehmen | ||
==== monit ==== | ==== monit ==== |
Version vom 20. Februar 2011, 00:06 Uhr
Inhaltsverzeichnis |
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
Virtualisierung
Bezüglich KVM siehe Server Installation/KVM.
Dienste
Ferm (Firewall)
Siehe Server Installation/ferm.
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)
- Allow from All in /etc/apache2/conf.d/munin aufnehmen
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.