1 / 155

Solaris - Systemadministration

Werner Sinz (RUS): Vorstellung WS, seit Anf.00 am RUS, Unteranderem Betreueung von Solaris-Servern, momentan vor allem fuer die UB. Vorher IPVR WS-Betreuung…. Solaris - Systemadministration. R echenzentrum U niversit ä t S tuttgart. sinz@rus.uni-stuttgart.de. 1. Einf ü hrung.

didier
Télécharger la présentation

Solaris - Systemadministration

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Werner Sinz (RUS): Vorstellung WS, seit Anf.00 am RUS, Unteranderem Betreueung von Solaris-Servern, momentan vor allem fuer die UB. Vorher IPVR WS-Betreuung… Solaris - Systemadministration Rechenzentrum Universität Stuttgart sinz@rus.uni-stuttgart.de

  2. 1. Einführung

  3. Werner Sinz (RUS): Zielgruppe - ist weder der UNIX-Anfaenger, der gerade von W-95 umsattelt -> UNIX Einfuehrung letzte Woche - noch der UNIX-Guru der jetzt die speziellen Solaris-Tricks bei der Crash-Dump-Analyse mit adb sucht (Wer das letzte verstanden hat, ist wahrscheinlich schon falsch). - sondern der Anwender des seine Maschinen selber verwalten will/soll, - oder der "angehende" Sysadmin mit grundlegenden UNIX-Kenntnissen - evtl. der Benutzer/Sysadmin der von einem anderen UNIX-System umsteigt 1. Einführung • Kursablauf • Inhalt • Umfang • Zielgruppe

  4. Einführung Solaris-Umfang Solaris-Installation Der Monitor Der Bootvorgang Softwareinstallation Patchinstallation Solaris-Dateisysteme Eigene Dateisysteme NFS NIS Benutzerverwaltung Netzwerkverwaltung Systemdienste Backup – Restore SUN-Serviceangebot Weitere Informationen Inhalt

  5. Aufgaben des Sysadmin What are system administrators? In general, sysadmins are those people we complain to when our computer systems aren't working the way weexpect. If they can make everything right, then they must be system administrators. Therefore, a system administrator is someone who solves problems in computer and networksystems operations. Tasks of the system administrators : The problem set in computing and network operations generally includes all those system tasks users mightwant to offload -- specification, evaluation, installation, configuration, integration, maintenance, data-integritymanagement, upgrade management, automation, security management, performance analysis, failure analysis,failure mitigation, recovery design, recovery implementation, testing, and more. From: Dr. Dobb's Journal Fall 1999 “The future looks bright for problem solvers”. By Barbara Dijker (vice president of the System Administrators' Guild (SAGE))

  6. Ziele • Grundlegende UND Solaris-spezifische Infos zum Betrieb von SUN-SPARC-Systemen (nicht INTEL!)

  7. Werner Sinz (RUS): • Demo: Mit netscape die Produkte anschauen bei Bedarf: s. Prospekte • Thin-Client • Workstation • Workgroup-Server • … SUN-Systeme http://www.sun.de/Produkte/Hardware/index.html

  8. 2. Solaris-Umfang

  9. Solaris-Software • Solaris-Aufbau: • SunOS (Kernel) für SPARC, Intel, PowerPC • Open Network Computing (TCP/IP, …) • Graphische Oberfläche (CDE, …) • Deskset-Tools (Shells, Audiotool, …) • Solaris 1 => SunOS 4.x (BSD) • Solaris 2.x => SunOS 5.x , bis 5.6 (SVR4) • Solaris 7 => SunOS 5.7 ( `` ) • Solaris 8 => SunOS 5.8 ( `` )

  10. Zusatz-Software • SUN Management Center(SyMON) • Oracle 8i Enterprise Edition (Solaris 8) • StarOffice • Netscape • Freeware • … • DiskSuite

  11. DiskSuite-Funktionen • Disk mirroring and RAID-5 • Hot-spare facility • Disk striping • UNIX logging • Alternate path support • A graphical user interface • A performance monitor • Concatenation and “grow file system” command • SNMP traps

  12. DiskSuite-Versionen • Solaris 7 oder Solaris 2.6 Server Version Bestandteil des Solaris Easy Access Server • Solaris 8: base platform

  13. 3. Solaris-Installation

  14. Installationsarten • Neuinstallation • Aktualisierung

  15. Werner Sinz (RUS): • s. Solaris 8 “Advanced Install-Guide”, S. 22. Und “Installation Guide” • Nach dieser Folie -> Demo “boot cdrom” => ca. 5 min bis Openwin getartet ist… Eingaben…=> Gesamt max. 10min • WebStart (2.8) braucht einiges laenger! • Zeigen, dass Konsole geoeffnet werden kann => Notboot • Boot-Server muss im gleichen Subnetz sein (ohne Router dazwischen) Installationsmethoden • Interaktive Installation • Von lokaler CD-ROM [> boot cdrom] • WebStart (ab Solaris 8) • Von lokaler CD-ROM [> boot cdrom] • Interaktive Netz-Installation • Installations- und Bootserver erforderlich [> boot net] • JumpStart • Bei Neusystemen von vorinstalliertem Image [autom.] • Custom JumpStart • Für “große” Installationen [> boot net]

  16. Werner Sinz (RUS): • Demo: Adresse anwaehlen im Browser Installation über Uni-Netz • s. “Installation SOLARIS 7 über das Rechnernetz der Universität Stuttgart” auf: http://sunswsrv.rus.uni-stuttgart.de/WS-Betreuung_HomePage/SUN/contents/solaris/sol7.html

  17. Werner Sinz (RUS): • Demo: • Shutdown • (Vorher Stop+A und resume…) • Boot cdrom, bis Fenster kommt, “Commandtool oeffnen … Notboot • Parallel zum Booten weitermachen mit naechster Folie, da zeitintensiv! Beginn der Installation • Monitor-Modus (Boot/ok-Prompt) • “shutdown –i0” oder • “halt” oder • [Stop]+[A] oder • [Break] • boot cdrom (net)

  18. Hostname IP-Adresse Netzmaske Nameservice Zeitzone Festplattenaufteilung Rechnertyp Standalone Server Umfang der Betriebssystem-software Root-Kennwort Daten für die Installation

  19. Werner Sinz (RUS): • /var scheint aber doch sinnvoll!!? Festplattenaufteilung - I • Benötigter Plattenplatz: • Entire Distribution Plus OEM Support2.4 Gbytes • Entire Distribution2.3 Gbytes • Developer System Support 1.9 Gbytes • End User System Support 1.6 Gbytes • Create a minimum number of file systems. By default, the Solaris 8 creates only • root (/), • /usr • /swap

  20. Festplattenaufteilung – II

  21. Werner Sinz (RUS): • Demo: • Nach dem Installwindow da • > folgt wieder Stop+A => Monitor 4. Der Monitor

  22. Diagnose test-all test floppy (memory/net) NVRAM-Parameter printenv Setenv pn pv Setdefault pn Set-defaults Booten boot [disk|net|cdrom|…] Hilfe help System Informationen .enet-addr probe-scsi probe-scsi-all show-disks • Werner Sinz (RUS): • Demo: • Probe-scsi • Show-disks • - help Monitor-Befehle

  23. Monitor: Printenv SunOS: eeprom > diag-level=max > keyboard-click?=false > output-device=screen > input-device=keyboard > boot-command=boot > auto-boot?=true > watchdog-reboot?=true > boot-device=disk net > security-mode=none > security-password: data not available. > diag-switch?=false > … Werner Sinz (RUS): Eeprom-Demo aus telnet/ssh-Fenster auf PC? NVRAM-Parameter

  24. 5. Der Bootvorgang

  25. Booten • Einschalten (wenn autoboot=true) • Reboot (aus OS, wenn autoboot=true) • Boot (im Monitor Prompt) • Kernel wird geladen (/kernel/genunix) • Nachladen von Kernelmodulen • /etc/system verarbeiten • Starten des init-Prozesses

  26. Werner Sinz (RUS): Demo: Admin> cat /etc/system /etc/system • Setzen von Kernelvariablen • rootdev: <device name> # rootdev:/sbus@1,f8000000/esp@… • rootfs: <type> # rootfs:ufs • moddir: # moddir: /kernel /other/modules • set [<mod>:]<sym> # set maxusers=40 = <value> # set shmsys:shminfo_shmmax=523288 • Ladbare Module • exclude: <subdir>/<name> # exclude: sys/shmsys • include: <subdir>/<name> # include: other/mymod • forceload:<subdir>/<name> # forceload: drv/socal

  27. Prozeßinitialisierung durch “init” • Init wird vom kernel beim booten gestartet • pid = 1 • Versetzt das System in den • Angegebenen Runlevel (z.B. init 0) oder • Default-Runlevel laut /etc/inittab • Startet die Scripte aus /etc/inittab

  28. Runlevel • 0 = Shutdown-Zustand • 1 = Administrations-Zustand • 2 = Mehrbenutzerbetrieb • 3 = Mehrbenutzerbetrieb mit Netzwerk • 5 = Reboot interaktiv (boot –a) • 6 = Reboot (inittab-Default) • S oder s = Single-User Zustand (boot –s)

  29. Werner Sinz (RUS): • Demo: • cat /etc/inittab auf admin… , • dann gleich naechste Folie zur Erklaerung /etc/inittab – I zsdjh:~<14:02-66> cat /etc/inittab ap::sysinit:/sbin/autopush -f /etc/iu.ap ap::sysinit:/sbin/soconfig -f /etc/sock2path fs::sysinit:/sbin/rcS>/dev/console … is:3:initdefault: p3:s1234:powerfail:/usr/sbin/shutdown -y -i5 -g0 >/dev/console … s0:0:wait:/sbin/rc0 >/dev/console … s1:1:wait:/usr/sbin/shutdown -y -iS -g0 >/dev/console … s2:23:wait:/sbin/rc2 >/dev/console … s3:3:wait:/sbin/rc3 >/dev/console … s5:5:wait:/sbin/rc5 >/dev/console …

  30. /etc/inittab - II s0:0:wait:/sbin/rc0 >/dev/console… Ausgabeumleitung Auszuführendes Kommando Steuerungsbefehl für init -> Runlevel fuer die Abarbeitung der Zeile Kennzeichen der Zeile (Label)

  31. wait sysinit initdefault respawn / ondemand off once boot bootwait powerfail powerwait Steuerungsbefehle für init

  32. Werner Sinz (RUS): • Demo: • cat /sbin/rc3 => Aufruf /etc/rc*.d/S* • Ls –l /etc/rc3.d => Links Von init ausgeführte Kommandos • Init führt aus: • /sbin/rc? (? =runlevel-Nummer) • /sbin/rc? Führt aus: • /etc/rc?.d/S* beim Start • /etc/rc?.d/K* beim Beenden (/etc/rc?.d/* sind Links nach /etc/init.d/*)

  33. 6. Softwareinstallation

  34. Werner Sinz (RUS): Demo1: pkginfo –l … Demo2: swmtool / admintool und SW-Auswahl Softwareinstallation • Packagemanagement über Befehlszeile • Pkgadd - Pkginfo • Pkgrm - Pkgask - Pkgchk • Graphischer Softwaremanager • Swmtool (admintool -> Software)

  35. Werner Sinz (RUS): • Demo: Installation mit admintool • zsdjh:~<17:19-74> sudo admintool & • Browse: software • Edit: add • Software-Location: Hard-Disk • Directory: z.B. /sunswsrv/cdrom_copies/Solaris_7/netscape_4_5/Netscape_Communicator_4.5/sparc/Product/ • … • Manuell: • > sudo pkgadd -d /sunswsrv/cdrom_copies/Solaris_7/netscape_4_5/Netscape_Communicator_4.5/sparc/Product/ SW-Packages von: • Solaris-CDROMs • sunswsrv.rus.uni-stuttgart.de:/cdrom_copies/… http://sunswsrv.rus.uni-stuttgart.de/WS-Betreuung_HomePage/SUN/ • Third Party …

  36. Beispiel: “8Pac Compiler” • Installation: /sunswsrv/cdrom_copies/8-PAC/ University_Edition/devpro_v8n1_sparc/installer • Lizenz-Installation: • Am Ende frägt "License Installation Tool", nach Datei mit Lizenzkeys oder deren manueller Eingabe • Lizenzfile (für domainname "uni-stuttgart.de")unter sunswsrv:/general_data/Lizenz/Technisches/sunpro.lic,sp • Spätere Lizenz-Installation: /etc/opt/licenses/lit

  37. 7. Patchinstallation

  38. Werner Sinz (RUS): • Zeigen SunSolvCD • Zeigen “sunswsrv…” (ueber ssh auf zsdjh) • Zeigen : mount /sunswsrv…. • Zeigen “sunsolv.sun.de” Patches von: • SunSolve-CDROMs (Wartungsvertrag) • http://sunsolve.sun.de …patches • http://metalab.unc.edu/pub/sun-info/sun-patches/ • sunswsrv.rus.uni-stuttgart.de:/patches/… http://sunswsrv.rus.uni-stuttgart.de/WS-Betreuung_HomePage/SUN/

  39. Werner Sinz (RUS): Demo: zsdjh:/etc<18:05-79> ls /sunswsrv/patches/ Patches über sunswsrv - I • Über NFS mounten: sunswsrv.rus.uni-stuttgart.de:/patches • Dateien / Unterverzeichnisse: • Recommended Patches • Patch Reports • PatchSummary • Unbundled_Recommended_list • Files (d) • Pcfiles (d)

  40. Patches über sunswsrv - II • Auswählen der Patches (z.B security Patches) • READMEs der einzelnen Patches lesen • Patchinstall (halbautomatischen Installieren von Patches) • Einzelne Patches oder • Patchlist oder • “manuelle” Patchinstallation

  41. “Manuelle” Patchinstallation • Patcheinstallation bis Solaris 2.6 • Patches mit gzip komprimiert => gunzip • installpatch (bei jedem Patch mitgeliefert) • backoutpatch (bei jedem Patch mitgeliefert) • Patcheinstallation ab Solaris 7 • Patches mit zip komprimiert => unzip • patchadd • patchrm

  42. patchadd / patchrm • Einen Patch installieren: • patchadd [-d] [-u] [-B backout_dir] patch • Mehrere Patches installieren: • patchadd [-d] [-u] [-B backout_dir] -M patch_dir patch_id... | patch_dir patch_list • Auflisten: • patchadd –p (alt: showrev –p) • Entfernen: • patchrm [-f] [-B backout_dir] patch_id

  43. 8. Solaris-Dateisysteme

  44. Dateisystem-Überblick • Lokale Dateisysteme • ufs (default disk-based file system for Solaris) • hsfs (CDs) • tmpfs (uses swap space) • cachefs (NFS or HSFS can be cached) • procfs (process file system in memory) • Netzwerkdateisysteme • NFS (Network File System) • DFS (Distributed File System)

  45. /bin /dev /devices /etc /export /home /kernel /lost+found /mnt /net /opt /proc /sbin /tmp /usr /var / - Dateibaum - I

  46. / - Dateibaum - II • /bin - Binaries Link auf /usr/bin (UNIX-Betriebssystemkommandos) • /export - Exportierte Verzeichnisse • /home - Benutzer-Heimverzeichnisse Oft auch unter /export/home! • /kernel - Kernel und Kernelmodule • /lost+found - fsck-Hilfsverzeichnis • /mnt - Leeres Verz. Für Mounts

  47. / - Dateibaum - III • /net - Netzverzeichnisse • /opt - Optionale Software • /proc - Prozeßinformationen (ps) • /sbin - Startup-Binaries Kommandos für die Initialisierungsphase z.B. rc*-Scripts • /tmp - Kernel und Kernelmodule

  48. Werner Sinz (RUS): • Demo: • ls /dev • ls /dev/dsk … /dev – logische Gerätenamen Verweis auf die physikalischen Geräte in /devices • /dsk - Block-Devices • /rdsk - Raw-/ Character-Devices • /rmt - Tape-Devices • /term - Terminal-Devices • /cua - Modems • /pts - Pseudo- (Software-)Devices • /fbs - Frame-Buffer

  49. Werner Sinz (RUS): • - s. Handschuch, S.194, • Solaris Device Config. Guide: • “Wide-mode EISA adapters can support targets greater than 7 if the proper entries are added to the system configuration files: /kernel/drv/sd.conf (fordisk) and /kernel/drv/st.conf (for tape).” Logische Platten-Devicenamen cwtxdyszBsp: /dev/dsk/c0t0d0s0 Slice- / Partitionsnummer (0…7) Drive-Nummer (LUN, 0-3) Target-Nummer (SCSI-Adresse, 0-6) Controller-Nummer

  50. Logische Tape-Devicenamen X[Y][b][n]Bsp: /dev/rmt/0hn No-rewind SunOS-4.x-Kompatibilität Denisity (l,m,h,u,c) Laufwerksnummer (0 … 127)

More Related