sistema formata "ufs" - t.e. eto "rodnoj", motorol'nyj cdrom, to montirovat' ego nuzhno po tem zhe pravilam, chto i obychnyj zhestkij disk, tol'ko "read only" mount -F ufs -r /dev/dsk/m197_c0d6s0 /cdrom Esli zhe eto obychnyj "game'ovyj" disk dlya MSDOS'a, a tochnee, CDROM standartnogo formata iso9660, to montirovat' ego nado tak: mount -F cdfs -o ro /dev/dsk/m197_c0d6s7 /cdrom (ispol'zovanie klyuchej -r i -o ro - ravnoznachno) &dDOtmontirovanie fajlovyh sistem&d@. umount /home1 &dD * Izmenenie parametrov fs * &d@ Sun: tunefs Linux: tune2fs HP-UX: fsadm &dD * Bad-bloki * &d@. Simptomy dostatochno krasnorechivy: zametnye zaderzhki pri dostupe k disku (iz-za retrying'a), i na konsol' syplyutsya strashnye soobshcheniya "Bad media", "Read failure"... "pri dostupe k bloku takomu-to". Zapishite nomera bad-blokov - ih mozhno "podlechit'". &dDFirmennye operacionki: lechitsya, no s trudom-s&d@ Sovremennye SCSI adaptery sami zamenyayut bad-bloki. Esli zasekli bad-block, propishite po nemu (ili fajlu s nim) nuli, adapter zaodno i propishet, i podmenit, i navsegda spryachet ego, i on bol'she ne pokazhetsya. &dDMotorola: Bad-bloki&d@ Rekomenduyu oznakomit'sya s dokumentaciej - razdel "Bad blocks" v Tome "Disks and Tapes Managment" sm. takzhe man po ddefs, mvme328, scsi1x7, dinit, ... Nadeyus' pri opisanii geometrii diska komandoj ddefs vy ne poskupilis' ukazat' chislo "Bad spots" bol'she nulya. Zameshchenie bad-blokov vypolnyaetsya vse toj zhe komandoj dinit dinit -n dskdeffilename /dev/rdsk/m187_c0d107 -n nomera bad-blokov vvodyatsya s klaviatury dinit -t bad-list dskdeffilename /dev/rdsk/m187_c0d107 -t bad-list fajl so spiskom bad-blokov Kak protestirovat' disk na bad-bloki? U dinit est' klyuch -v 1 - verify with pattern &dDLinux: Bad-bloki&d@ Linux'ovskij fsck s klyuchom "-c" umeet sam nahodit' i lechit' ot bad-blokov (oni sobirayutsya v otdel'nyj "bad" inode) # -y yes na vse voprosy, -f force checking, -c bad-blocks e2fsck -c -y -f /dev/hda3 &dD * Diagnostika oborudovaniya * &d@ &dDMOTOROLA: Utilita testirovaniya oborudovaniya GOLD&d@ Dlya testirovaniya i diagnostiki oborudovaniya stancii Motorola 922 mozhno vospol'zovat'sya utilitoj gold. Ona imeet sistemu menyu, ochen' pohozhuyu na sistemu menyu utility sysadm. &dDSUN: Utilita testirovaniya oborudovaniya sundiag&d@ Sundiag - mnogofunkcional'naya utilita testirovaniya oborudovaniya na Sun &dDUnix dlya PC&d@ Da chego tam vypendrivat'sya. Gruzites' v MSDOS i tam testirujte zhelezo vsem, chem pozhelaete. . &dDVydelenie razdelov pod swap&d@ Pod swap oblast' rekomenduetsya vydelyat' ne bolee odnogo razdela (predpochtitel'nee samogo pervogo) na kazhdom zhestkom diske. Pod swap rekomenduetsya vydelyat' 1*RAM - 2*RAM mesta, a esli na mashine aktivno ispol'zuetsya X-Windows, to 3*RAM. V sluchae srochnoj neobhodimosti pod swap mozhno vydelit' i obychnyj fajl. Sozdajte fajl bol'shogo razmera, a zatem podklyuchite ego pod swapping. Primer: vydelyaem 20 Mb-ovyj fajl dd if=/dev/zero of=/var/swapfile bs=1k count=20480 CHtob swap podklyuchalsya avtomaticheski pri nachal'noj zagruzke, nado vpisat' stroku v /etc/fstab - chto-nibud' tipa: --------------------------------------------------------------- # device mountpoint type flags /dev/hdb2 none swap sw --------------------------------------------------------------- &dDMOTOROLA: swap&d@ Posle vydeleniya razdela pod swap ego nado aktivizirovat': swap -a /dev/rdsk/m328_c2d0s0 0 0 # podklyuchaem razdel swap -a /var/swapfile 0 40960 # podklyuchaem fajl # Vnimanie - zdes' dlina ukazyvaetsya v 512-bajtnyh blokah &dDLinux: swap&d@ # razmechaem particiyu, # ustanavlivaem ej partition ID == 82 "Linux-swap" fdisk /dev/hda # Swap-fajl dlya Linux _OBYAZAN_ lezhat' v kataloge /dev/ dd if=/dev/zero of=/dev/swapfile bs=1k count=40000 # Posle vydeleniya razdela ili fajla pod swap ego nado propisat': mkswap /dev/hda2 40000 ; sync # razmer v kilobajtah swapon /dev/hda2 # podklyuchaem swap-razdel free # smotrim swapoff /dev/swapfile # otklyuchaem swap-fajl Dlya postoyannogo vklyucheniya dobavit' strochku v /etc/fstab : --------------------------------------------------------------- /dev/hdb2 none swap sw --------------------------------------------------------------- &dDHP-UX 10.20: swap&d@ Dushka HP-UX pozvolyaet vse zaprosto sdelat' menyushkami SAM. Specifika: swap v fajlovoj sisteme nazyvaetsya ekzoticheskim slovom "File system swap", organizuetsya v vide kataloga i hvataet ne vse srazu, kak imeet mesto s swap-fajlom, a "po trebovaniyu", chem ekonomit mesto na diske. V HP-UX otklyuchit' na letu swap-oblast' nel'zya - otklyuchenie swap forsiruet perezagruzku komp'yutera Primary-swap ukazyvaetsya v konfiguracii yadra, ostal'nye v fajle /etc/fstab swapon # podklyuchaem swapinfo # smotrim &dDSUN (Solaris i SunOS)&d@ swap -l # listing swap -s # listing mkfile 40m swap-file # sozdat' svapfajl v 40 Mb swap -a swap-file # aktivizirovat' ego. Dlya postoyannogo vklyucheniya dobavit' strochku v /etc/vfstab: /swap/file - - swap - no - . &dDInstallyaciya operacionnoj sistemy&d@ Dlya installyacii operacionnoj sistemy na Unix-komp'yuter ispol'zuyutsya zagruzochnye diskety, zagruzochnye magnitnye lenty, a takzhe CD-ROM'y. S distributivnogo nositelya zagruzhaetsya minimal'naya versiya operacionnoj sistemy Unix, i pod upravleniem etogo Unix-a zapuskaetsya programma installyacii, kotoraya izvlekaet i ustanavlivaet s nositelya pakety. &dDMotorola 922. Zagruzka s magnitnoj lenty&d@ Vstavit' lentu s distributivom Unix SVR4/88. Vklyuchit' pitanie. Posle togo, kak na konsol'nom terminale poyavitsya soobshchenie "Idle MPU: none" nazhat' na klavishu "PROBEL" Poyavitsya menyu iz neskol'kih punktov. Vybiraem "3" (System debugger) , ENTER V otvet na priglashenie 197-Diag> vvodim "bo 0 40" ENTER (0: zagruzit' s 0-go SCSI kontrollera, 40 - magnitnaya lenta, 4-j scsi-nomer) i zhdem 5 minut. 197-Diag> bo 0 40 Boot-prom organizuet v operativnoj pamyati RAM-disk, schityvaet na nego s magnitnoj lenty nachal'nye 8 Mb - obraz fajlovoj sistemy, zagruzhaet yadro operacionnoj sistemy, montiruet RAM-disk v kachestve kornevoj fajlovoj sistemy i zapuskaet s nego programmu installyacii, upravlyaemuyu menyu. Dal'she nado otvetit' na nekotoroe kolichestvo voprosov, posle chego programma pristupit k ustanovke paketov Unix'a, kotorye razmeshcheny na lente vsled za obrazom zagruzochnogo RAM-diska. Sobstvenno izvlechenie fajlov s lenty zanimaet 20-40 minut, v zavisimosti ot togo, skol'ko i kakie pakety vy reshili ustanavlivat'. Pervym voprosom sistema sprosit, kakoj u vas terminal. Otvet'te, chto u nego 24 stroki i on imeet pozicionirovanie kursora v stile vt100 ili unknown Programma installyacii imeet tri osnovnyh rezhima: 1. Full install 2. upgrade 3. Maintance mode Vtorym svoim voprosom programma installyacii predlozhit vybrat' odin iz nih. INSTALL - predusmatrivaet polnuyu ustanovku operacionnoj sistemy. Vse fajlovye sistemy na diske budut zanovo pererazmecheny - i, sledovatel'no, VSE FAJLY, kotorye do etogo sushchestvovali na diske, BUDUT STERTY. UPGRADE - obnovlenie "starinnoj" (obrazca 1988 goda i drevnee) sistemy do sovremennoj versii. Starye dannye pri etom ne unichtozhayutsya.(Za isklyucheniem teh, estestvenno, kotorye vklyucheny v novoustanavlivaemye pakety). Nas etot rezhim ne kasaetsya, poskol'ku u nas i tak novaya sistema ustanovlena s samogo nachala. MAINTANCE MODE - odnopol'zovatel'skij shell dlya superpol'zovatelya. Podgotovlennyj administrator smozhet, zagruzivshis' s lenty, vruchnuyu zanyat'sya remontom i ustraneniem neispravnostej v operacionnoj sisteme, kotorye emu ne udalos' by otremontirovat', zagruzis' on s diska. (I voobshche, ne vsegda zhe udaetsya zagruzit'sya s diska). Po vyhode iz maintance shell'a (klavisha Ctrl-D) nazhmite Ctrl-C, chtob garantirovat' perezapusk installyacionnoj procedury. Esli vy installites' na disk neizvestnoj porody, vam pridetsya pered zapuskom 1. Install ujti v Maintance modu i po standartnoj sheme sdelat' opisanie etogo diska. &dDBesta-88. Zagruzka s magnitnoj lenty.&d@ Vstavit' master-lentu Unix'a. Vklyuchit' pitanie. Na konsol'nom terminale poyavitsya soobshchenie: boot: Vvodim "t:unix" ENTER (Zagruzit' unix s magnitnoj lenty) boot: t:unix RAM-disk u Bestix'a zanimaet 1000 Kb, vsled za nim raspolozhen arhiv formata cpio s distributivom operacionnoj sistemy. Osta- etsya otvetit' na neskol'ko voprosov i zatem zhdat' minut 20, poka vse soderzhimoe lenty budet izvlecheno na disk. &dDSun SPARCstation. Zagruzka s CD-ROM.&d@ Vstavit' CD-ROM. Vklyuchit' pitanie. Podozhdat', poka stanciya "razogreetsya". Nazhat' STOP+A. (STOP - levaya verhnyaya klavisha na levoj dopolnitel'noj klaviature). Poyavitsya boot-rom prompt Ok: vvodim "boot cdrom". Esli SPARC staroj modeli - SS1, SS1+, SS2, pridetsya vvodit' "boot sd(0,6,2)" Ok boot sd(0,6,2) Esli priglashenie imeet drugoj vid: "> " (??), to vmesto "boot" nado nabrat' "b" > b sd(0,6,2) Posle zagruzki Unix zapustite komandu "suninstall", kotoraya i provedet installyaciyu. # suninstall &dDLinux Slackware. Zagruzka s disket&d@ V Linux'e dlya installyacii nuzhno imet' dve zagruzochnye diskety: BOOT (s nee zagruzhayutsya, na nej nahoditsya yadro), i ROOT (na nej nahoditsya minimal'naya fajlovaya sistema s programmoj installyacii). Obrazy etih disket v szhatom vide hranyatsya v fajlah boot*/*.gz i root*/*.gz sootvetstvenno. Vam nuzhno vybrat' po odnomu fajlu iz kazhdogo mnozhestva (naprimer boot12/net.gz i root144/color144.gz) i izgotovit' iz nih diskety. Programma GZIP.EXE -D ILI GUNZIP.EXE "razozhmet" eti fajly, a RAWRITE.EXE "zal'et" ih na diskety. Sami pakety s distributivom Linux mogut lezhat' na DOS-particii installiruemoj mashiny, na NFS-servere, na disketah, na CD-ROM, na magnitnoj lente. Zagruzites' s boot-diskety, v otvet na prompt "Lilo boot:" vvedite sootvetstvuyushchij parametr i Enter, podozhdite nemnogo. VNIMANIE: Esli vasha mashina s Ethernet'noj kartoj ne2000 "zavisaet" pri popytke zagruzit' yadro, povtorite zagruzku s dopolnitel'nymi parametrami, primerno takimi: Lilo boot: ether=10,0x320,eth0 Vstav'te ROOT disketu, nazhmite Enter. Kogda poyavitsya "Console login:" zalogin'tes' kak root i zapustite: # fdisk /dev/hda # setup &dDLinux RedHat. Zagruzka s diskety&d@ V Linux versii RedHat odna zagruzochnaya disketa. Gruzimsya s nee - a dal'she vse delaem po menyushkam. Distributiv mozhet lezhat' na lokal'nom diske, NFS, FTP, SMB-servere. &dDHP-UX 10.20. Zagruzka s CD-ROM&d@ Perehvatyvaem nachal'nuyu zagruzku klavishej ESC i iz PDC-promta daem komandu "nashchupat' cdrom" BOOT-ADMIN> search scsi .... scsi.2.0 ... CDROM .... Iz vydachi vylavlivaem "scsi ID CD" i gruzim ego BOOT-ADMIN> boot scsi.2.0 Dal'she dejstvovat' po obstanovke, otvechaya na voznikayushchie v menyushkah voprosy. &dDHP-UX 10.20. Installyaciya po seti&d@ &dDGotovim server&d@ 1. Ustanovit' s Install diska paket "Network cold install utils" 1a. (Esli nado installit' C-200 i starshe) Ustanovit' s Install diska paket-patch ACE/PHCO-10751 "Enabling network install for ... C-200" 2. V fajl /etc/instl_boottab vpisat' neskol'ko _nezanyatyh_ adresov 3. Podmontirovat' Install CD i zaregistrirovat' ego kak Depot mount /dev/dsk/c0t2d0 /cdrom /usr/sbin/swreg -l depot /cdrom 4. Ne zabyt' po okonchanii rabot razregistrirovat' Depot /usr/sbin/swreg -u -l depot /cdrom &dDNa stancii&d@ Perehvatit' PDC-boot prompt (ESC ili Break v pervye 10 sek) PDC> search lan install Nekotorye stancii mogut nichego ne obnaruzhit', no vse ravno - togda vtemnuyu daetsya komanda PDC> boot lan.10.188.101.14.3.52 install gde 10.188.101.14 - IP adres servera, a chto takoe 3.52 - ne znaet nikto . &dDPakety: ustanovka dopolnitel'nogo softa&d@ &dD * Kak ustanavlivat' pakety v Solaris 2.5 * &d@ &dDAdministrirovanie programmnogo obespecheniya&d@ |tot vopros ochen' vazhen dlya podderzhki i obnovleniya programmnogo obespecheniya. Dlya etoj celi v OS Solaris predusmotren special'nyj mehanizm, podderzhivaemyj s pomoshch'yu utilit "pkgadd" i "pkgrm", sootvetstvenno dobavlyayushchih i udalyayushchih pakety iz sistemy. CHtoby eti utility mogli operirovat' s paketami, oni dolzhny byt' predstavleny v sootvetstvuyushchem vide, ili formate. K sozhaleniyu, daleko ne vse programmnye produkty dostupny neposredstvenno v formate, prigodnom dlya "pkgadd". Podavlyayushchee bol'shinstvo produktov dlya Unix, dostupnyh cherez Internet, nahodyatsya v vide ishodnyh tekstov, kotorye nado otkompilirovat' i skopirovat' v nuzhnye mesta. |to imeet mesto, t.k. OS Unix ustanovlena na mashinah s razlichnymi tipami processorov i razlichnoj arhitekturoj. Original is here ˇ http://www.reksoft.ru/htmlkoi/abprofunix.html &dDRuchnaya ustanovka&d@ Glava podgotovlena Sergeem Bogomolovym Zdes' opisana tol'ko ustanovka paketa dlya sebya (standalone system), esli vam nuzhno ustanovit' paket v rezhime server/dataless/diskless - chitajte drugie knizhki (delat' eto nado tol'ko s bol'shoj toski). 1. Stan'te superpol'zovatelem 2. vvedite: /usr/sbin/pkgadd -d imya_direktorii_gde_lezhit_paket imya_paketa naprimer: /usr/sbin/pkgadd -d /cdrom/solaris_2_5/s0/Solaris_2.5 SUNWpkgA mozhno ustanovit' neskol'ko paketov srazu (ukazhite ih imena cherez probely). Imya paketa mozhno uznat' iz instrukcii ili s pomoshch'yu komandy: /usr/sbin/pkginfo -d imya_direktorii_gde_lezhit_paket Vnimanie: Solaris ne ochen' horosho otslezhivaet vzaimozavisimost' mezhdu paketami, tak chto vy sami dolzhny pozabotit'sya o poryadke ustanovki. Mnogie pakety lyubyat zadavat' vsyakie voprosy vo vremya ustanovki (kuda vse eto pomestit', ves' li paket ustanovit' i t.d.), tak chto bud'te gotovy. Naprimer, pri ustanovke toma AnswerBook sprashivaetsya, chto kopirovat' na zhestkij disk: opisanie ili ves' tom. Esli vy kopiruete tol'ko opisanie, to ishodnyj CD-ROM dolzhen byt' ustanovlen kazhdyj raz, kogda vy zapuskaete AnswerBook, inache nenajdennyj tom budet pomechen kak "nezhivoj" i ego pridetsya vosstanavlivat'. Kstati, toma razbrosany po 7 diskam!!! ----------------------------------------------------------------- &dDProverka ustanovki paketa.&d@ /usr/sbin/pkgchk <imya_paketa> ----------------------------------------------------------------- &dDPoluchenie informacii o pakete:&d@ /usr/bin/pkginfo -l <imya_paketa> naprimer: pkginfo -l SUNWcar PKGINST: SUNWcar NAME: Core Architecture, (Root) CATEGORY: system ARCH: sparc.sun4m VERSION: 11.5.1,REV=94.07.15.22.10 BASEDIR: / VENDOR: Sun Microsystems, Inc. DESC: Core Architecture, (Root) PSTAMP: fourstar940718191413 INSTDATE: Aug 16 1995 03:39 HOTLINE: Please contact your local service provider STATUS: completely installed FILES: 51 installed pathnames 16 shared pathnames 7 directories 29 executables 3794 blocks used (approx) --------------------------------------------------------------- &dDUdalenie paketa:&d@ /usr/sbin/pkgrm <imya_paketa> --------------------------------------------------------------- &dDRabota s paketami v graficheskom interfejse&d@ (swmtool dlya 2.4 ili admintool dlya 2.5) ne nado ustanavlivat' AnswerBook s ih pomoshch'yu. SWMTOOL zapusk: 1. stan'te superpol'zovatelem 2. perejdite v graficheskij rezhim, esli vy eshche ne pereshli v nego 3. vvedite: /usr/sbin/swmtool & Na ekrane voznikaet novoe okno, programma dolgo-dolgo sobiraet informaciyu ob uzhe installirovannyh paketah, zatem perehodit v rezhim ustanovki (rezhim INSTALL/REMOVE pereklyuchaetsya sootvetstvuyushchimi knopochkami) i, skoree vsego, soobshchaet vam, chto "ustrojstvo ne gotovo, pomenyajte ustanovki (property)" Delo v tom, chto swmtool po umolchaniyu schitaet, chto ustanavlivaemyj paket lezhit na CD-ROM i menedzher tomov vyklyuchen. Esli eto dejstvitel'no tak, to vstav'te CD-ROM pered zapuskom swmtool. Inache nazhmite knopku Props... (ustanovki), voznikaet blank, na stranice (kategorii) Source Media kotorogo vam nado zadat' ustrojstvo ili direktoriyu, gde lezhit paket. Naprimer, menyaem Media Type na Mounted Directory, Directory Name ustanavlivaem v /cdrom/cdrom0 (ustanovka s CD-ROM pri vklyuchennom menedzhere tomov) i nazhimaem knopku Apply. Esli v ukazannoj vami direktorii est' pakety, to ih opisaniya budut perechisleny v glavnom okne swmtool. Dlya kazhdogo paketa ukazyvaetsya: ikonka (odin yashchik - prostoj paket - na takuyu ikonku mozhno zhat' dva raza, i poyavlyaetsya podrobnoe opisanie, 3 yashchika - sostavnoj paket - na takuyu ikonku mozhno zhat' dva raza, i ona raskryvaetsya v spisok vnutrennih paketov - uroven' vlozhennosti ne ogranichen), opisanie paketa i ego predpolagaemyj razmer. Vybiraete neobhodimye vam pakety i nazhimaete knopku Begin Installation (nachat' ustanovku). Dalee ves' dialog proishodit v a/c rezhime kak pri ustanovke pkgadd. Kstati, blank ustanovok imeet bol'shoe kolichestvo knopochek, menyushek i pr.: est' s chem poigrat'sya... Dlya togo, chtoby udalit' paket, nazhimaete knopku Remove, vybiraete paket (pakety), kotoryj vy hotite udalit', i nazhimaete knopku Begin Removal. &dDIzgotovlenie sobstvennogo paketa&d@ CHtoby legche administrirovat' etot razroznennyj nabor fajlov, poluchayushchijsya posle kompilyacii, ih mozhno privesti k formatu utility "pkgadd" samostoyatel'no. Legche vsego etot vopros rassmotret' na konkretnom primere. Pust' u nas est' paket, sostoyashchij iz 3h programm: "MyProg.bin", "Myprog.lib" i "MyProg.man", kotorye dolzhny hranit'sya v katalogah "/usr/local/bin", "/usr/local/lib" i "/usr/local/man" sootvetstvenno. CHtoby sdelat' iz nih paket, nado prodelat' sleduyushchie prostye shagi: a) Sozdadim direktoriyu, gde budut hranit'sya ishodnye dannye dlya utility "pkgmk", kotoraya i delaet sobstvenno paket. Pust' v nashem primere eto budet direktoriya "~/tmp/MyPackage". b) Sozdadim pod nim sistemu direktorij, gde dolzhny raspolagat'sya fajly paketa, i zatem skopiruem eti fajly na svoi mesta. T.o. v rezul'tate u nas dolzhny poluchit'sya fajly: ~/tmp/MyPackage/bin/MyProg.bin, ~/tmp/MyPackage/lib/MyProg.lib i ~/tmp/MyPackage/man/MyProg.man v) Zatem nado sozdat' fajly "pkginfo" i "prototype". Oni dolzhny vyglyadet' primerno tak (bolee podrobnuyu informaciyu ob etih fajlah vy mozhete poluchit', nabrav komandy man -s4 pkginfo man -s4 prototype Fajl "prototype": !PROJDIR=/usr/local 1 i pkginfo=pkginfo 1 d none bin 0755 root other 1 f none bin/MyProg.bin 0644 root other 1 d none lib 0755 poul insects 1 f none lib/MyProg.lib 0644 root other 1 d none man 0755 poul insects 1 f none man/MyProg.man 0644 root other Fajl "pkginfo": PKG=MyProg NAME=MyPackage ARCH=sparc VERSION=Version 1.0 CATEGORY=application VENDOR=Pavel K. Klodin EMAIL=webmaster@reksoft.ru PSTAMP=Pstamp BASEDIR=/usr/local CLASSES=none g) Posle togo, kak fajly sdelany, vypolnim sleduyushchie komandy: cd ~/tmp/MyPackage pkgmk -o -d /tmp -r . Posle etogo v direktorii "/tmp" budet sozdan paket "MyPackage" v vide struktury fajlov i direktorij. S nim uzhe mozhno operirovat' utilitoj "pkgadd". d) Teper', nakonec, vypolnim komandy (predvaritel'no stav superpol'zovatelem s pomoshch'yu komandy "su -"): cd /tmp pkgadd -d . PRIMECHANIE: Sleduet pomnit', chto pakety mogut byt' predstavleny v dvuh ravnopravnyh formah: v vide struktury direktorij (kak uzhe bylo rassmotreno vyshe); v vide tak nazyvaemyh "potokovyh paketov" (stream packages). Oni predstavlyayut soboj prostoj fajl, kak esli by byli zapisany na strimmernoj kassete ili kakom-libo drugom posledovatel'nom ustrojstve (otsyuda, vozmozhno, i nazvanie). Obrashchat'sya s nimi sleduet tak zhe, kak i s "obychnymi" paketami v vide struktury direktorij i fajlov. |ti 2 formy vzaimno preobrazuyutsya komandoj "pkgtrans". Sovetom podelilsya Pavel Klodin ˇ mailto:drone@reksoft.ru &dDSummary of pkg commands:&d@ pkginfo {pkg} - test for presents of package. pkgadd -d /cdrom/Solaris_2.3 <pkg ...> - add missing packages pkgrm {pkg ...} - remove packages. pkgchk -q {pkg} - test for existance of package pkgchk {options} [pkg] - check installed packages for integrity. Let's say your Solaris2 workstation is called "sol" and the 4.1.x server is called "bertha" and you want the printer name to be "printer" (imaginative, eh?). sol# lpsystem -t bsd bertha # says bertha is a bsd system sol# lpadmin -p printer -s bertha # creates "printer" on "sol" # to be printed on "bertha" sol# accept printer # allow queuing sol# enable printer # allow printing sol# lpstat -t # check the status sol# lpadmin -d printer # default To get transparent mode, try this: lpadmin -I any -p printer &dD * Pakety v Linux RedHat * &d@ Postavit' paket rpm -i filesystem-1.2-1.i386.rpm Udalit' paket rpm --erase filesystem-1.2-1 Spisok vseh paketov rpm -qa Spisok fajlov, vhodyashchih v neustanovlennyj paket: rpm2cpio < packetname-1.2-1.i386.rpm | cpio -it rpm2cpio < packetname-1.2-1.i386.rpm | cpio -it rpm2cpio < packetn name-1.2-1.i386.rpm | cpio -it rpm2cpio < packetname-1.2-1.i386.rpm | cpio -it Spisok fajlov, vhodyashchih v ustanovlennyj paket: rpm -l nfs-server-2.2beta16-5 Apdejty k RedHat lezhat zdes'. Obyazatel'no stavit' security updates ftp://ftp.funet.fi/pub/Linux/mirrors/redhat/redhat/redhat-4.2/updates/i386/ ˇ ftp://ftp.funet.fi/pub/Linux/mirrors/redhat/redhat/redhat-4.2/updates/i386/ Ustanovka apdejta rpm -Uvh samba-1.9.18p7-0.i386.rpm &dD * Pakety v HP-UX 10.20 * &d@ Pakety v HP-UX stavyatsya cherez podmenyushku SAM. Spisok vseh paketov swlist -l product . &dDNeskol'ko setevyh komand Unix&d@ &dD1. ping&d@. Prozvonit' udalenuyu mashinu. Proveryaet, otklikaetsya li ukazannaya mashina po seti: ping host.name Vklyuchit' nepreryvnuyu "prozvonku" (s intervalom v 1 sek.): ping -s host.name Prervat' "prozvonku" - Strl-S . &dD2. finger&d@. Kto rabotaet v sisteme. Format ispol'zovaniya: finger [-l] pol'zovatel'@setevoe.imya.komp'yutera Kto rabotaet na mashine po imeni ipsun.ras.ru : finger @ipsun.ras.ru Kak pozhivaet pol'zovatel' Moshkov na etoj mashine: finger -l moshkow@ipsun.ras.ru &dD3. talk&d@. Vyzvat' pol'zovatelya na razgovor talk moshkow ili talk moshkow@fedfond - vyzvat' ukazannogo pol'zovatelya na ukazannoj mashine na razgovor. U etogo pol'zovatelya na ekrane poyavitsya priglashenie pogovorit': Message from Talk_Daemon@ipsun at 23:29 ... talk: connection requested by ivanov@server.fedfond.msk.su talk: respond with: talk ivanov@server.fedfond.msk.su I esli on naberet otvetnuyu komandu talk ivanov@server.fedfond.msk.su To vy smozhete pogovorit' drug s drugom. Okonchanie razgovora - Ctrl-C &dD4. mailx&d@. Poslat' komu nibud' elektronnuyu pochtu. /* v Linux nado ispol'zovat' ne mailx, a prosto mail */ mailx username@host.name Subject: Tema pis'ma Tekst soobshcheniya . . . Okonchanie teksta soobshcheniya CHtoby okonchit' vvod teksta pis'ma, v pustoj stroke nazhmite Ctrl-D. Ili postav'te tochku "." v nachale stroki i nazhmite ENTER. Esli pis'mo uzhe gotovo i nahoditsya v fajle let.txt, to otp- ravit' ego mozhno tak: mailx -s "Proverka pochty" semen@server.fedfond.spb.su < let.txt &dD5. mailx&d@. Prochitat' prishedshuyu na moj adres pochtu. mailx, zapushchennyj bez argumentov, perehodit v komandnyj rezhim chteniya postupivshej pochty. V etom rezhime mozhno pol'zovat'sya takimi komandami: ? - vydat' help po vsem dostupnym komandam h 12 - zagolovki pisem nachinaya s 12-go nomera 6 - chitat' 6-oe pis'mo d - unichtozhit' tekushchee pis'mo s fajl - sohranit' pis'mo v fajle "fajl" r - otvetit' na pis'mo dlya nastroek programmy mailx ispol'zuetsya fajl .mailrc, kotoryj dolzhen lezhat' v domashnem kataloge pol'zovatelya. V nem zhelatel'no imet' strochki takogo primerno soderzhaniya: ########### vstav'te eti stroki v svoj fajl .mailrc !!!! set crt=22 set record='/home/moshkow/Mail.sended' ############################################################## # chtoby dlinnye pis'ma "listalis'" postranichno komandoj more ; # sohranyat' kopii vseh otpravlennyh pisem # v fajle /home/moshkow/Mail.sended ; alias max moshkow@ipsun.ac.msk.su alias kafedra petrov smirnov@nic.com lapin@sovim.mit.edu # pochtovye aliasy - mozhno zadat' sinonimy dlya dlinnyh pochtovyh # adresov ili gruppy adresov, i ispol'zovat' eti sinonimy # vmesto adresa pri otpravke pochty Esli vy hotite zavesti sebe blagozvuchnoe imya dlya adresa svoej elektronnoj pochty, vstav'te v fajl /etc/aliases primerno takie strochki: Maksim.Moshkow: moshkow moshkov: moshkow i vypolnite komandu newaliases I teper' mne mozhno otpravlyat' pis'ma po takim adresam: moshkow@moshkow.ru moshkov@moshkow.ru Maksim.Moshkow@moshkow.ru Esli vy hotite pereadresovyvat' vse prishedshie vam pis'ma na drugoj adres, sozdajte fajl $HOME/.forward i vpishite v nego novyj@email.adres ili, esli nuzhno otsylat' pis'ma, no ostavlyat' sebe kopiyu, to \yourlogin, newadres@email.adres Esli ispol'zuetsya Linux, to mozhno pol'zovat'sya sistemoj procmail CHtoby pis'ma prislannye vam po spisku rassylki skladyvalis' v otdel'nyj folder, pomestite v svoj $HOME/.procmailrc : ############################################################### ####### Udalyaem dublirovannie pisem (s odinakovym message-id) :0 Wh: msgid.lock | formail -D 8192 msgid.cache ####### Mail-listy sbrasyvaem v otdel'nyj folder :0 * ^(Sender|To|CC): .*(ezh@cdru.com|ezh@ezhe.com|banners@list.techno.ru) nsmail/ezh ####### Perenapravit' telo pis'ma (bez zagolovka) na programmu :0 b * Subject: .*uuencoded | uudecode ####### Esli pis'mo nebol'shogo razmera i ne kasaetsya mailing-lista ####### "zhurnal@sharat.co.il" to kopiyu peresylat' na moj domashnij email. #######$HOME/.procmailrc : :0 c * < 10000 * !^To: .*zhurnal ! moshkow@home.moshkow.ru ####### Posylaem podtverzhdenie o poluchenii pisem bol'she 30Kb :0 h c * > 30000 * !^From: CityCat * !^From: .*linux * !^FROM_DAEMON * !^Subject: BOOK614 * !^X-Loop: moshkow@moshkow.ru | ( egrep -v '^From moshkow|^Return-Path: moshkow' | formail -r -A"Precedence: junk" -A"X-Loop: moshkow@moshkow.ru" ; echo "Thanks, I have got your mail.") | $SENDMAIL -t ############################################################### &dD6. telnet&d@. Zaloginit'sya na udalennuyu mashinu. telnet host.name Komanda telnet pozvolyaet vam zaloginit'sya na udalennuyu mashinu, i rabotat' na nej, kak-budto vy sidite za terminalom, podklyu- chennym neposredstvenno k nej. U komandy telnet est' "goryachij klyuch" "Ctrl-]" , kotoryj perevo- dit telnet v komandnyj rezhim. V etom rezhime mozhno menyat' para- metry raboty telnet'a. Vyhod iz komandnogo rezhima - ENTER. Sredi poleznyh komand nazovu tak zhe "exit" i "help" &dD7. ftp&d@. File Trasfer Protocol. Peresylka fajlov. CHto delat', esli nuzhno "peretashchit' fajl" s chuzhoj mashiny na svoyu (ili naoborot), a NFS mezhdu nimi ne zapushchen? Ispol'zujte programmu ftp. |to prosten'kaya komanda, pozvolyayushchaya peresylat' fajly mezhdu mashinami po protokolu TCP/IP. ftp host.name User name (moshkow): ivanov Passwd: Udalennaya mashina sprosit u vas vashe vhodnoe imya i pa- rol' (pod kotorymi vy zaregistrirovany NA UDALENNOJ mashine). Esli vy na nej ne zaregistrirovany, poprobujte ukazat' vhodnoe imya "anonymous", a v kachestve parolya - svoj email-adres. Posle etogo ftp perehodit v komandnyj rezhim. V etom rezhime vy mozhete "peremeshchat'sya" po katalogam udalennoj mashiny, po katalo- gam svoej mashiny, prosmatrivat' ih oglavlenie, i zabirat' fajly ottuda k sebe, ili klast' ih ot sebya - tuda. ftp> help - govorit samo za sebya ftp> quit - zavershit' rabotu ftp> bin - ustanovit' rezhim peresylki binarnyh fajlov (nastoyatel'no rekomenduyu) ftp> cd katalog - peremeshchat'sya po "tamoshnim" katalogam ftp> ls - vydat' "tamoshnee" oglavlenie ftp> lcd katalog - peremeshchat'sya po "zdeshnim" katalogam ftp> !dir - vydat' "zdeshnee" oglavlenie ftp> !ls -al - vydat' "zdeshnee" oglavlenie ftp> get file-tam [ file-name-zdes ] - vzyat' fajl ottuda ftp> put file-zdes [ file-name-tam ] - polozhit' fajl tuda &dDKak poslat' pis'mo vruchnuyu&d@ &dDtelnet localhost 25&d@ Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 t30.systud.msk.su ESMTP Sendmail 8.8.5/8.8.5; Thu, 14 May 1998 18:01:21 +0400 vrfy ryba@aquarium.ru expn ryba@aquarium.ru &dDhelo whitehouse.gov&d@ 250 t30.systud.msk.su Hello localhost [127.0.0.1], pleased to meet you &dDmail from: god@heavens.com&d@ 250 god@heavens.com... Sender ok &dDrcpt to: moshkow@ipsun.ras.ru&d@ 250 moshkow@ipsun.ras.ru... Recipient ok &dDdata&d@ 354 Enter mail, end with "." on a line by itself &dDSubject: Time to pray! This the time to pray caoming along! God .&d@ 250 SAA01324 Message accepted for delivery &dDquit&d@ . &dDLokal'naya set': Ethernet, Token ring, FDDI&d@ &dDEthernet&d@ Carrier Sense Multiple Access Collision Detect (CSMA/CD) Kontrol' nesushchej s mnozhestvennym dostupom i razresheniem kollizij. Standart Ethernet/2 i IEEE 802.3 pohozhi, no imeyut razlichnyj format frejma &dDEthernet'ov sushchestvuet 3 tipa:&d@ 10baseT Neekranirovannaya vitaya para, raz®em RJ45 Twisted pair (Dlinna odnoj pary do 100m). V lyuboj cepochke dolzhno byt' ne bolee 4-h habov. 10base5 Tolstyj Ethernet. ZHeltyj 2sm kabel', 15 pinovyj AUI Thick ethernet konnektor u hosta. "Krab" - dlya podklyucheniya k osnovnomu kabelyu. Na koncah - N-terminatory.(L<= 500m) 10base2 Tonkij Ethernet s koaksial'nym 50-omnym kabelem Thin ethernet i BNC konnektorami. Oficial'naya dlina kabelya 185 m (<=300m) 30 hostov na odnom segmente +-----+ |Host o------------------. "Zvezda" +-----+ \ \ ___ +-----+ \o | Hub |Host o----------------------o | 10-base-T +-----+ o___| / +-----+ / |Host o------------------' +-----+ +-----+ +-----+ +-----+ "Obshchaya shina" |Host | |Host | |Host | +--+--+ +--+--+ +--+--+ Thin z-+---------------+---------------+-z +-----+ +-----+ +-----+ |Host | |Host | |Host | +--sh--+ +--sh--+ +--sh--+ Tolstyj ethernet n n n ^ n n n |do 50m "krab" n n v n==M===============M===============M=======n &dDToken ring&d@ Standart Token ring razrabotan dlya setej IBM, i prakticheski sovpadaet s IEEE 802.5 Apparatno - zvezda (8 sht) na vitoj shielded ili unshielded pare, podklyuchennaya k MultiStationAccessUnit (MSAU) Neskol'ko MSAU mozhno soedinyat' drug s drugom, oni pri etom organizuyut logicheskoe obshchee kol'co. Logicheski - kol'co po kotoromu idet marker-telezhka. Prinyavshij marker s soobshcheniem schityvaet esli ono emu, mozhet polozhit' svoe esli marker "pust", ishch v lyubom sluchaet peredaet marker dal'she. Projdya krug marker unichtozhaetsya stanciej, ego zapustivshej, i zapuskaetsya novyj. Dopustim rovno odin marker. Marker vezet ne bolee odnogo paketa s dannymi. Naznachaetsya stanciya-Monitor, kotoraya sledit, chtob markery ne shli vtoroj krug, esli stanciya ego porodivshaya ne smogla ego udalit'. &dDFDDI&d@ Apparatno - dvojnoe optovolokonnoe kol'co. V bazovom rezhime odno iz kol'ec ne ispol'zuetsya. V kol'ce est' nekotoroe kolichestvo Dual Attachment stancij. Esli takaya stanciya zamechaet, chto proshedshij skvoz' nee paket ne vernulsya po krugu (kol'co porvano), ona avtomaticheski aktiviziruet vtoroe kol'co. (To zhe dolzhna sdelat' DAS na drugoj storone ot obryva) ___0 DAS ___0 DAS /___o /___| // \\ // || |* --> || * || o| || o* \\___/o DAS \\___/| DAS \___/ \___/ Logicheski - kak i Token ring. Marker mozhet vezti pakety srazu ot neskol'kih stancij. Funkcii Monitor'a vypolnyayut vse uchastniki kol'ca. &dDRaspaj Unshielded twisted pair&d@. 1 oranzh Tx+ | +-1---8-+ | Rx+ 3 2 ORANZH Tx- | | | | Rx- 6 3 zelen Rx+ | |_____| | Tx+ 1 4 SINIJ | | 5 sinij | | 6 ZELEN Rx- |___________| Tx- 2 7 korich (provod na nas) 8 KORICH ----------------------------------------------------------------- Dlya soedineniya dvuh adapterov napryamuyu, bez HUB'a (point-to-point) ispol'zuetsya "perevernutyj" provod. Tx+<-->Rx+, Tx-<-->Rx-,... Mnogie sovremennye ethernet-kontrollery imeyut avtomaticheskoe opredelenie kabelya, i ih mozhno vyazat' napryamuyu standartnym "pryamym" kabelem - ne perevorachivaya. . &dDGlobal'naya set': hardvare i porty&d@ DTE DCE (station, router) ** ------ ** (modem) <==== provajderskij link &dDFizicheskie interfejsy podklyucheniya:&d@ EIA/TIA-232 EIA/TIA-449 V.24 V.35 X.21 G.703 EIA.530 HSSI &dDLogicheskie protokoly WAN podklyucheniya:&d@ Data link encapsulation dlya sinhronnyh linij: &dDDedicated WAN&d@ SDLC - Synchronous Data Link Control HDLC - High-level Data Link Control LAPB - Link Access Procedure Balanced PPP - Point-to-Point Protocol &dDSwitched WAN&d@ Frame Relay - uproshchenaya versiya HDLC frejminga X.25 ISDN . &dDMarshrutizaciya TCP/IP&d@ Set' "Office" +--------+ +--------+ Network 195.1.2.0 | | | | Netmask 255.255.255.0 +--------+ +--------+ Broadcast 195.1.2.255 | 195.1.2.3 | 195.1.2.10 ----+-------------------+--------------------------+------------- |195.1.2.1 | 195.1.2.2 +--------+ +--------+ |-|GatewayD| |GatewayO| | +--------+ +--------+ | 198.8.2.1 SLIP : 122.5.6.9 | Set' "Developers" : | +-------+ Network 198.8.2.0 : |-| | Netmask 255.255.255.0 Modem | +-------+ Broadcast 198.8.2.255 . . . | 198.8.2.2 | Modem | +-------+ . . . |-| | : | +-------+ SLIP: 122.5.6.10 | 198.8.2.3 +--------+ |GatewayF| 122.5.6.3+----+---+ --------------------------------------------------+-------- | 122.5.6.1 | 122.5.6.2 Set' "Filial" +--------+ +--------+ Network 122.5.6.0 | | | | Netmask 255.255.255.192 +--------+ +--------+ Broadcast 122.5.6.63 Staticheskie tablicy marshrutizacii Obychnyj Host IP 198.8.2.2 seti "Developers" Net: 198.8.2.0 -- 198.8.2.255 198.8.2.0 Default: 198.8.2.1 Most "GatewayD" ifconfig eth0 198.8.2.1 ifconfig eth1 195.1.2.1 route add net 198.8.2.0 198.8.2.1 0 route add net 195.1.2.0 195.1.2.1 0 route add default 195.1.2.2 1 Most "GatewayO" ifconfig eth0 195.1.2.2 ifconfig sl0 122.5.6.9 pointopoint 122.5.6.10 route add net 195.1.2.0 195.1.2.2 0 route add net 198.8.2.0 195.1.2.1 1 route add default 122.5.6.10 1 Obychnyj Host IP 195.1.2.3 seti "Office" Net: 195.1.2.0 -- 195.1.2.255 195.1.2.0 Default: 195.1.2.2 route add net 198.8.2.0 195.1.2.1 1 . &dDSet' TCP/IP&d@ Protokol TCP/IP (Transmission Control Protocol/Internet Proto- col) yavlyaetsya bazovym transportnym setevym protokolom v UNIX'e. V zagolovke TCP/IP paketa ukazyvaetsya: IP-adres otpravitelya IP-adres poluchatelya Nomer porta (Fakticheski - nomer prikladnoj programmy, kotoroj etot paket prednaznachen) TCP/IP-ishnye pakety imeyut interesnuyu osobennost': oni sposobny "dobrat'sya" do adresata, projdya skvoz' raznorodnye lokal'nye seti, ispol'zuya raznoobraznye fizicheskie nositeli. "Marshrutiza- ciyu" IP-paketa (perebrosku ego v trebuemuyu set') osushchestvlyayut "na dobrovol'nyh nachalah" komp'yutery, vhodyashchie v TCP/IP set'. &dDVsemirnaya set' Internet&d@. Vse kompyutery mira, podderzhivayushchie protokol TCP/IP i kakim-libo obrazom podklyuchennye drug k drugu, obrazuyut global'nuyu vsemirnuyu set' TCP/IP "Internet". Tempy rosta "Internet": 100000 IP-adresov v mesyac. V nastoyashchij moment (konec 1994 goda) k Internet'u podklyucheno okolo: 20,000 setej 4,000,000 komp'yuterov 35,000,000 pol'zovatelej &dD1. IP-adres&d@. Kazhdaya mashina v mire imeet svoj unikal'nyj IP-adres. IP-adres - 32-bitnoe chislo, kotoroe prinyato zapisyvat' v sme- shannom 16-richno-desyatichnom formate, v vide 4 chisel, razdelennyh tochkami. Naprimer: 193.124.148.73 128.8.2.1 Kazhdoe desyatichnoe chislo zdes' predstavlyaet na samom dele dva shestnadcaterichnyh razryada. Mozhet prinimat' znacheniya ot 0 do 255. Dopustima takzhe shestnadcaterichnaya zapis': c1.7c.94.49 ili 0xC17C9449 80.08.02.01 ili 0x80080201 V usloviyah korrektno skonfigurennoj lokal'noj seti, i pri uslo- vii podklyucheniya ee k vsemirnoj seti Internet, protokol TCP/IP pozvolyaet vashej setevoj programme rabotat' s LYUBYM komp'yuterom v mire, kak esli by on nahodilsya v vashej lokal'noj seti. Unikal'nost' IP-adresov podderzhivaetsya prosto. Oni vydayutsya centralizovanno. Kontora, kotoraya etim zanimaetsya, nazyvaetsya NIC - Network Informational Center. Evropejskoe otdelenie NIC raspolozheno v Amsterdame. Ona VYDAET IP-adresa. V adres NIC nuzhno poslat' formu-zapros ustanovlennogo obrazca, i cherez ne- kotoroe vremya vam prishlyut "pachku" IP-adresov, vydelennyh dlya vashej seti. E-mail adres, po kotoromu nuzhno poslat' zapros: hostmaster@sri-nic.net Moskovskij uzel, razdayushchij IP-adresa, a tak zhe domeny *.ru dostupen po adresu RosNIIROS xSU/RU NetworkInformationalCenter ncc@ripn.net ili ncc@ussr.eu.net www.ripn.net/nic/ripn-docs/ ˇ http://www.ripn.net/nic/ripn-docs/ &dDIP-set', podset'.&d@ IP-set' - "pachka" iz 2**n IP-adresov, IDUSHCHIH PODRYAD. Samyj mladshij - rezerviruetsya. |tot adres nazyvaetsya adresom IP-seti. Naprimer 128.8.0.0, ili 193.125.149.64 . Adres seti ispol'zuet- sya, kogda trebuetsya ukazat' vsyu set' celikom, naprimer, kogda zadaetsya marshrutizaciya do etoj seti. Maska seti - fakticheski razmer seti, zadaet chislo adresov v se- ti. Zadaetsya libo kolichestvom bitov v maske seti (naprimer 8bit - 256 adresov, 6 bit - 64 adresa), libo bitovoj maskoj vida b'111...11100...00' chislo^^ ^^ bitov kotoruyu tozhe prinyato zapisyvat' v desyatichno-pobajtnoj zapisi, naprimer: 255.255.255.192 - maska na 64 adresa 255.255.255.0 - maska na 256 adresov 255.255.0.0 - maska na 64Kb adresov Broadcast adres seti - samyj starshij adres v seti. Rezervi- ruetsya dlya peredachi soobshchenij tipa "v