freebsd administrating

716

Upload: traian-ciobanu

Post on 26-Mar-2015

8.352 views

Category:

Documents


12 download

TRANSCRIPT

1. : FreeBSD................................................................. 31 1. FreeBSD................................................................................. 32 2. FreeBSD ................................................................................... 41 3. ...................................................................... 71

2. FreeBSD .............................................................. 81 4. FreeBSD..............................................................82 5. Gnome.................................................................................94 6. Gnome.......................................................................... 101 7. ........................................................................ 113 8. ................................................... 140

3. FreeBSD................................................... 164 9. FreeBSD .................................................................... 165 10. , .................................................. 187 11. ..................................... 206 12. ................................................ 221 13. ................................................................................................. 238 14. , ............................................ 271 15. .......................................................................................................284 16. .................................................................................................... 304 17. ....................................................................... 327 18. FreeBSD.............................................................................337 19. ..............................................354 20. FreeBSD........................................ 368 21. Perl...........................................................................................................390

4. FreeBSD .......................................................... 411 22. ................................................................412 23. .......................................................436 24. .........................................451 25. E-mal .463

6 26. Web-....................................................489 27. FTP- ....................................................516 28. Internet.................................................527 29. ......................................................................................542 30. ...................................................................580 31. (NFS) ...................................................599 32. Microsoft Windows ................................................................ 610 . DHCP............................................................................... 626 5. X-Window..........................................................................................637 34. X-Window .................................................................................... 638 6. ......................................................................................671 . ...................................................................... 672 . ............................ 677 . ..................................................................................................... 698 . ...................................................... 704 .................................................................................... 711

...................................................................................................................... 25 ............................................................................................. 25 ................................................................................................................... 26 ................................................................................................................ 26 ...................................................................................................................27 ............................................................................................... 29 CD-ROM................................................................................................... 30

1. : FreeBSD.................................................... 31 1. FreeBSD.............................................................................. 32 FreeBSD................................................................................................. 33 FreeBSD? ..................................................................... 33 FreeBSD ........................................................................ 34 FreeBSD UNIX............................................................................... 35 BSD ........................................................................................... 35 BSD Intel x86.................................................................................... 36 FreeBSD .................................................................................................... 36 UNIX ..........................................................................................................36 FreeBSD.................................................................................................38 Windows 2000 FreeBSD ......................................................................................... 38 Linux FreeBSD ........................................................................................................ 39 FreeBSD..........................................................................................................40 2. FreeBSD ............................................................................... 41 ................................................................................................42 ........................................................................................42 DOS Windows................................................ 43 FreeBSD- UNIX-... 44 ................................................................................................................... 44 Sysinstall ..................................................................................45 Sysinstall .................................................................................................46 .........................................................46 ............................................................................................46 ....................................................................................48 Disk Label Editor .......................................................................................................49 ..................................................51 .........................................................................53 root..................................................................................................................53 swap................................................................................................................54 ...................................................................................55 SoftUpdates ..............................................................................................55 ...................................................................................................56 ..56

8 .............................................................................................. 57 ................................................................................................... 57 ............................................................................................................. 59 ............................................................................................... 60 Linux ..................................................................................................... 60 ................................................................................................ 60 - ................................................................................................. 61 ............................................................................. 66 ............................................................ 66 .................................................................................................. 67 root ....................................................................................................... 69 Sysinstall .............................................. 69 FreeBSD ....................................................................................................... 70 FreeBSD.............................................................................................. 70

3. ..................................................................71 .................................................................................................. 72 FreeBSD FIPS......................................................... 73 Scandisk .................................................. 73 FIPS ................................................... 73 FIPS .................................................................................................................. 74 ............................. 75 FreeBSD DOS, Windows 95/98/Me ............................ 76 FreeBSD Linux.............................................................. 76 Boot- FreeBSD ................................................................................................76 FreeBSD LILO............................................................................................ 77 ........................................................................... 77 FreeBSD o FTP ...................................................................................... 78 NFS .....................................................................................................80

2. FreeBSD ................................................. 81 4. FreeBSD........................................................ 82 FreeBSD .............................................................................................83 BIOS ................................................................................................................................83 POST........................................................................................................................... 83 .........................................................................................................83 boot O .................................................................................................................83 boot l .................................................................................................................84 boot 2 .................................................................................................................84 boot 3.................................................................................................................84 .................................................................................................................................84 init.....................................................................................................................86 ..............................................................86 ..........................................................................86 getty Login ........................................................................................87 FreeBSD .............................................................................................................87 X-Window ...........................................................................................88

9 Gnome.................................................................................................... 88 X-Window ............................................................................................. 90 FreeBSD ...............................................................................................................90 FreeBSD ...............................................................................................................91 shutdown ..........................................................................................................91 halt reboot ............................................................93

5. Gnome............................................................................. 94Gnome ....................................................................................................................................95 .........................................................................................................................96 Gnome .......................................................................................................................96 .................................................................................................................. 97 .................................................................................................................. 97 ..................................................................................................98 Toggle .............................................................................................................................. 99 In Group...............................................................................................................99 Depth ...................................................................................................................99 ........................................................................................99

6. Gnome ...................................................................... 101 ....................................................... 102 .......................... 102 Gnome ................................................................................................ 103 Gnome ................................................................ 103 Start................................................................................................. 104 Gnome ............................................................................ 105 ......................................................................................... 105 Gnome File Manager ................................................................ 106 File Display ................................................................................................... 106 Caching .......................................................................................................... 107 Desktop .......................................................................................................... 107 Gnome Control Center ....................................................................................... 108 ................................................................................. 108 ............................................................................................................ 109 .......................................................................................... 109 Sawfish .......................................................... 112

7. .................................................................... 113 ............................................................................................................... 114 gedit.......................................................................................... 114 vi ................................................................................................................... 118 ..................................................................................................123 GIMP ........................................................................................................123 GQview .......................................................................................................................... 126 StarOffice ............................................................................................................................127 StarOffice..............................................................................................127 Web- StarOffice ....................................................................... 128 StarOffice128

10

StarOffice Explorer ................................................................................................. 129 StarOffice ................................................................... 130 ............................................................................................................... 130 FreeBSD ............................................................................................................. 130 .................................................................................. 131 ................................................................................................................... 131 XMMS ............................................... 133 - mpg123 ............................................. 133 X-Window ....................................................................... 134 ................................................................................................... 134 - Netscape ........................................................... 134 - Lynx.................................................................................................... 135 FTP .......................................................................................................................... 135 ...........................................................................137 8. ............................................. 140 ........................................................ 141 ...........................................................141 Bourne (sh) .................................................................141 (csh) .......................................................................142 Korn (ksh pdksh) ............................................... 142 Bourne Again Shell (bash) ..........................................143 Tcsh (tcsh) ................................................................143 ?.............................................................................143 ......................................................................................... 143 .......................................................................................................144 ...............................................................144 ........................................................................................................145 ........................................................................... 145 ... 146 FreeBSD ....................................................................146 .......................................................................................................147 .................................................................................147 ....................................................................... 149 ............................................................................149 ..........................................................................149 ...........................................150 ................................................................................ 151 ................................................................................................ 151 touch ........................................................................................................ 152 .................................................................................................... 152 ........................................................................................... 154 - ................................................................. 154 ........................................................................ 155 .......................................................... 156 . 157

11

, .................................................................... 157 : more less ..............................................157 ....................................................................................................... 158 ...................................................................................... 159 tr ...................................................................................... 159 ............................................................. 160 fmt ................................................................... 161 - ............................................................. 161 ...................... 163

3. FreeBSD .................................... 164 9. FreeBSD................................................................ 165 FreeBSD........................................................................................ 166 .......................................................... 169 df ................................................................................................................... 169 du ................................................................................................................... 170 FreeBSD ................................. 171 mount ............................................................................................................ 171 umount........................................................................................................... 172 ............................................................................................... 173 Windows/MS-DOS.......................................... 174 Linux ................................................................. 175 CD-ROM - ............................................................................................................ 176 - .............................................................. 176 - ........................................................... 177 ......................................................................................... 177 /etc/fstab ............................................................................................ 177 fsck ................................................................................................................ 179 ........................................ 181 fsck ........................................... 181 ................................................................................. 183 , .............................................................. 184

10. , .......................................... 187 ................................................................................. 188 ? ...................................................................................................... 190 ............................................................................................................ 191 chown ........................... 192 chgrp ........................................................................................................ 193 ............................................................................. 193 ................................... 194 chmod ...................................................................................................... 195

12

.................................................................................... 197 ACL ......................................................... 197 ACL.......................... 197 ACL .......................................... 198 ..................................................... 198 ACL........................................................ 199 ACL.................................................................. 201 ACL ....................................................................................... 201 ACL............................................................................. 201 ......................................... 201 /etc/passwd /etc/master.passwd ............................................................ 203 /etc/group ...................................................................................................... 205 ............................................................................................ 205 11. ............................... 206 FreeBSD ................................................... 207 ? .............................................................. 210 ..................................................................... 210 /etc/defaults/rc.conf ..................................................................................... 212 /etc/re.conf .................................................................................................... 213 /usr/local/etc /usr/local/X11R6/etc ................................................... 214 ................... 215 inetd inetd.conf ........................................................... 216 (syslogd) syslog.conf......................................... 218 /etc/re.local ...................................................................................... 219 12. ....................................... 221 ?........................................................................ 222 ................................................................... 223 ............................................................... 224 /etc/shells ..................................................................................................... 225 .................................. 226 .................................................... 226 ....................................... 227 , .... 228 ..................................................................... 229 tcsh/csh: .cshrc, .login .logout................................................................ 230 bash: .profile, .shrc .bashjogout............................................................ 231 ......................................................... 233 tcsh ........................................................................................................ 233 bash ....................................................................................................... 235 ............................... 236 .................................................................................................. 236 ............................................................. 237 13. .................................................................................................... 238 ..................................................... 240

13

printf ........................................................................................................................ 241 .................................................................................................................. 242 ........................................................................ 243 ................................................................................................. 243 ............................................................................... 244 ........................................................... 245 ............................................................................................... 246 ..................................................................... 246 ........................................................................................................................... 248 while ............................................................................................................... 249 until ............................................................................................................... 250 AND/OR while until ...................................... 250 for................................................................................................................... 251 shift .......................................................................................................................... 252 true false............................................................................................253 ....................................................................................................... 253 .................................................................................................... 254 if ...........................................................................................................254 case..........................................................................................................258 AND/OR ......................................................................... 259 ............................................................................................................260 ...................................................................................261 ........................................................................262 .......................................................................................................................263 ..............................................................................................263 .......................................................264 r n.....................................................265 r n .....................................................266 ............................ ............................................................266 ..................................................................................................................267 ...............................................................................................270 getopts ............................................................................................270 14. , ..........................................271 . top .......................................................272 top.......................................................................................................273 . ps..........................................................................275 ps .................................................................................................276 .......................................................................277 kill ............................................................................................................277 kill................................................................................................278 ........................................................................278 ............................................................................................. 279 rn ....................................................................................................................279 crontab ........................................................................................280 crontab..........................................................281

14

at.................................................282 rn at ................................................................283

15. .......................................................................................................... 284 FreeBSD ................................................................................................................ 285 ..................................................................286 .........................................287 .............................................................................................................289 sysinstall................................................................................289 pkg_add ..............................................................................291 ..............................................................................................................293 ..........................................................................................................293 ..............................................................................................................293 FreeBSD ...................................................................................................294 FreeBSD ...........................................................................................296 ..........................................................................................................297 ..............................................................................298 ..............................................................................................................298 ? ........................................................................299 .............................................................................300 , ........................................................................................................ 301 , ................................. 301 Web- Fresh Ports........................................................................................................ 302

16. ................................................................................................. 304 Ipd ........................................................................................................................... 305 ........................................................................................................... 305 , .................................... 306 ................................................ 306 .................................................................................................. 307 ............................................................................................................................. 307 ..................................................................................................... 307 PostScript He-PostScript- ...................... 310 Ipf....................................................................................................... 311 ................................................................................................ 311 /etc/printcap ................................................................................... 312 ...................................................................... 313 Ipd................................................................................................................... 314 .......................................................................................... 314 X-Window ........................................................................................................ 315 StarOffice............................................................................................................ 316 .............................................................................. 317 ......................................................................................... 317 .................................................................................................... 319 Ipc ................................................................ 319

15

................................................................................................. 319 ........................................................................... 319 Ipc ................................ 323 Ipc .................................................................................... 324 .............................................................................................. 324 .......................................................................................................... 324 , ............................... 324 , ................................. 324 Web- ................................................................................................................ 324 .................................................................................. 325 ""................................................................................ 325 , ................................................................................................................. 326

17. ................................................................ 327 ....................................................................................................................... 328 ? ............................................................. 329 dmesg ............................ 330 .................................................................................. 331 GENERIC ..................................................................... 332 .............................................................. 333 LINT .............................................................................................................. 333 .................................................................. 334 ................................................................................... 335 /dev .......................................................... 335 ........................................................................................ 336

18. FreeBSD....................................................................... 337 FreeBSD ..................................................................... 338 STABLE CURRENT.................................. 338 ......................................................................................... 339 make world?................................................................................................. 340 .................................... 341 , ....................................................... 343 STABLE, CURRENT RELEASE................................................................. 343 UPDATING .................................................................................345 /etc/group /etc/passwd .............................................................................................. 345 /etc/make.conf .....................................346 ........................................................................347 /usr/obj .....................................................................................347 log- .......................................................................................347 make buildworld.......................................................................................................348 .....................................................................................................349 make installworld ............................................. .. 350

16

mergemaster ........................................................................................351 ......................................................................353

19. .......................................... 354 IDE/ATA ..............................................................................................355 PIO ..................................................................................................................355 DMA .............................................................................................................. 356 Ultra DMA ....................................................................................................... 356 SCSI .......................................................................................................................357 ..............................................................................................359 LBA 528 .................................................................................... 360 Extended INT13 8.4 ................................................................ 360 .............................................................................................. 361 ........................................................................ 361 BIOS (Slices) ................................................................................................ 361 BSD ................................................................................................................ 361 (fdisk) sysinstall................................................... 363 ............................................................................................... 364 FreeBSD ........................................................................... 364 ........................................................................................... 365 .................................................. 366 ...................................................... 367

20. FreeBSD.................................368 FreeBSD .......................................................................................................... 369 Windows NT/2000 ................................................................................... 370 "" " " ............................................................................. 378 ........................................................................ 380 ........................................................................................................... 381 Soft Updates ........................................................... 381 ..... .................................................................................... 382 sysctl .................................................................... 383 ........................................................................... 383 : .................................................................... 384 ....................................................................................... 384 .......................................................................................................... 384 ............................................................................................................ 386 ..................................................................................................... 387

21. Perl......................... 390 Perl?................................................................................................................... 391 Perl FreeBSD.................................................................................................................. 391 Perl ................................................................................................ 392 Perl ...................................................................................................393 Perl ............................................................................. 393 ......................................................................................... 394 , ........................................................ 395

17

....................................................... .......................................397 ............................................................................. 399 Perl ................................................................................400 Perl .............................................................................400 ....................................................................................................400 ....................................................................................................404 ..................................................................................................................406 Perl.............................................................................................................407 , Perl .........................................................................409 Web-...............................................................................................................409 .......................................................................................................................409 CPAN .......................................................................................................................410

4. FreeBSD ................................................ 411 22. ............................................................412 ............................................................................................................413 ...........................................................................................................414 ....................................................................................................417 ......................................................................................................................417 .................................................................................................................. 419 ..........................................................................................................420 ......................................................................................................................422 ....................................................................................................422 ......................................................................................................423 TCP: Transmission Control Protocol........................................................................423 UDP: User Datagram Protocol..................................................................................424 ICMP: Internet Control Message Protocol ...............................................................425 TCP/IP ...........................................................................................................................425 IP- .......................................................................................................................426 ARP -.................................................................................................428 r .............................................................................................................429 ............................................................................................430 ............................................................................................................431 (Gateways and Network Address Translation) ...........................................................................................433 ..............................................................................................434 DHCP ........................................................................ :...................................................435 23. ................................................. 436 ............................................................................437 sysinstall ..........................................438 ...................................................................441 ifconfig .......................................................................................... 441 route ........................................................................443 (hostname) ..............................................................................................444 /etc/re.conf.............................................................. 445 /etc/netstart .............................................................................................. 445

18

IP-.............................................................................................447 IP- /etc/hosts........................................................448 ping .................................................................................................................448 DNS /etc/resolv.conf ....................................................................449 .............................................................................450

24. ................................. 451 -.......................................................................................452 , ................................................................ 452 kernel user ..................................................................................453 kernel .....................................................................................453 /etc/resolv.conf ........................................................................................................453 /etc/ppp/options ........................................................................................... 453 chat .................................................................................... 454 pppd................................................................................................ 455 PAP- -.............................................................................. 455 pap-secrets and chap-secrets .................................................................................... 456 ........................................ 456 ...................................................................... 457 ................................................................................................. 457 /etc/ppp/ppp.conf ....................................................................................... 458 ................................................................................ 460 user ........................................................... 460 ...................................... 460 .............................. 461 .......................................................................................................... 461 ................................................................................................... 462

25. E-mail................................................................ 463 SMTP ...........................................................................................464 () (MUA) ............ ............................................................................................465 ()...........................................466 (MUA) .........................467 Sendmail..........................................................................468 Sendmail.......................................................................468 ......................................................................................468 DNS-.......................................................................472 Sendmail ............................................................................472 Mail Relay......................................................................................................................474 POP3 ............................................................................................................476 - qpopper ..............................................................................477 qpopper...........................................................477 (Standalone Mode) ...............................................478 (Server Mode)...............................................................479 SSL ............................................................................479 IMAP- IMAP-UW.........................................................................481

19

......................483 Fetchmail - IMAP- ................................................................................................. 483 Sendmail ......................................... 486 ............................................................................. 487 Postfix ...................................................................................................................... 487 Qmail........................................................................................................................ 487 Exim ......................................................................................................................... 487 Smail ........................................................................................................................ 488 26. Web- ..................................................... 489 HTTP ........................................................................... 490 ............................................................................. 492 Apache ............................................................... 494 Apache ..................................................... 495 Apache ........................................................................... 496 httpd.conf....................................................................................... 496 .htaccess ......................................... 497 HTTP .................................................................................499 ......................................................................... 500 ................................................................................... 501 .................................................................................502 ................................................................... 504 .................................................................................................. 505 Apache .............................................................................................. 507 ................................................................................................ 507 ..................................................................... 507 ..................................................................................................507 ...............................................................................................509 CGI...................................................................................................................511 CGI Apache ....................................................................................... 511 CGI- .....................................................................................513 27. FTP- ....................................................516 FTP ................................................................................................517 FTP ................................................................................519 FTP-................................................520 FTP- ...............................................................................................520 FTP- ..........................................................................................522 /etc/ftpusers...................................................................................................523 /etc/shells .....................................................................................................523 /var/run/nologin ............................................................................................523 FTP.....................................................................524 ..................................................................................................525 FTP-............................................................525 WU-FTPD ................................................................................................................526 ProFTPD ...................................................................................................................526

20

28. Internet................................................ 527 ? ..............................................................................................528 ?...........................................................................................................530 NAT? ............................................................................................................530 NAT FreeBSD ............................................................530 . .......................................................................531 NAT.................................................................................................................532 ................................. 532 Internet ..........................................................................532 natd .........................................................533 ....................................................... 533 .............................. 534 Windows 95/98 ........................................................ 534 Mac OS Mac OS X................................................ 535 FreeBSD.................................................................... 536 Linux ......................................................................... 537 Internet ................................................ 538 ............................................................. 538 ...................................................................................... 540 (DMZ) ............................................................................................................. 541

29. ...................................................................................542 ................................................................................................................ 543 ................................................................................................ 545 Crack.................... 545 .................................................................................................. 547 ............................................................................ 548 S/Key ........................................................ 549 Kerberos ........................................................................................................ 551 , ........................ 552 tcpdump ......................................... : ................................................................. 552 (OpenSSH) .......................................................... 554 ( IMAP) ................................................... 555 FTP- ........................................................................................................ 556 Apache.................................................................................................... 557 Apache-SSL .................................................................................................. 558 Apache mod_ssl........................................................................... 558 Web- ............................................................... 559 CGI............................................................................. 559 CGI CGIwrap ................................................................................................................... 560 (securelevel) .............................................. 561 ........................................................................................... 562

21

....................................................................563 IPFW .......................................................................565 ....................................................................566 PortSentry ......................................................................................567 /etc/hosts.allow ....................................................................569 Tripwire .........................................................................570 , ......................................................................573 (DoS) ..............................................................................................574 ..........................575 ...................................................................................576 ....................................................................................................577 ................................................................577 man security .................................................577 ....................................................................................................578 FreeBSD......................................................................578 Web- ...........................................................................................................578 ....................................................................................................................... 579 30. .......................................................................580 BIND...........................................................................................581 ......................................................................581 .........................................................................................................................582 BIND....................................................................583 ................................................................................583 BIND ""...................................................................584 BIND (named.conf) ..................................................584 .........................................................586 ................................................587 .....................................................................................................588 DNS.....................................................................589 ....................................................................................................590 ..............................................................................................................591 SOA .............................................................................................................593 NS............................. ..................................................................................594 ......................... , ............... 595 CNAME ......................................... 595 MX ............................................. 595 PTR .............................................................................................................596 DNS .............................................................596 localhost...............................................................................597 ....................................................597 31. (NFS) .....................................................599 NFS .................................................................................................................600 NFS .................................................................................602 NFS (nfsd)....................................................................................................603 NFS (mountd) .....................................................................603

22

/etc/exports...................................................... 604 NFS ..................................................................... 605 NFS............................................................................... 606 / NFS (nfsiod)........................................................................ 606 ....................................................... 606 .............................................................................................. 607 (amd) ..............................................................608 32. Microsoft Windows......................................................................... 610 Samba ......................................................................................... 611 SMB/CIFS............................................................ 611 ................................................................................................................ 612 , ...................................................................... 613 Samba ....................................................... 614 smbd nmbd ............................................................................................ 615 smb.conf SWAT.......................................................................... 615 .................................................... 617 ......................................................................... 619 ............................................................................................. 619 Samba....................................................................... 622 Samba ................................................................................. 622 Samba ......................................................................... 623 Samba ....................................................................... 624 smbfs ............................................................................................. 624 33. DHCP ................................................................................ 626 DHCP..................................................................................... 627 IP- .................................................................................................... 627 DHCP ............................................................... 627 . DHCP .................................... 629 DHCP ..................................................................................... 629 DHCP sysinstall ......................................... 629 DHCP ................................. 630 dhclient...................................................................................................... 631 /sbin/dhclient-script ............................................................................. 631 /etc/dhclient.conf .......................................................................................... 632 DHCP................................................................................................... 633 dhcpd......................................................................................... 634 dhcpconf .............................................................................................. 634

5. X-Window....................... ................................................637 34. X-Window..............................................................................................638 3.3.6 4.x.................................................................................. 639 SuperProbe........................................................................................... 639

23 X-Window xf86config ...... 640 ................................................................................................... 641 ................................................................................................. 642 ............................................................................................. 643 .......................................................................................... 645 XF86Config ........................................................................................ 651 XF86Config ............................................................................... 651 "Modules".................................................................................................... 652 "Files".......................................................................................................... 652 "ServerFlags"............................................................................................... 653 "InputDevice" .............................................................................................. 655 "Monitor"..................................................................................................... 658 "Device"....................................................................................................... 658 "Screen" ....................................................................................................... 659 "Display" .............................................................................................. 660 "ServerLayOut" .......................................................................................... 660 X-Window ................................................................................. 661 .xinitrc ....................................................................... 662 ........................................................................................... 662 ................................................................... 663 ............................................. 664 ................................................................................................... 665 XF86Config .................................................................................. 665 .......................................................... 666 X-Window ......................................................... 667 xhost ................................................................ 667 ............................................................................. 669 ................................................. 669 xdm ................................................................................................................................ 669

6. .....................................................................671 . ...................................................................................................................672 . ................................677 .................................................................................................678 ..................................................................................678 SCSI- ................................................................................678 CD-ROM.......................................................................................................679 ........................................................................................................ 680 USB......................................................................................................683 ..............................................................................................683 .............................................................................................683 , X-Window ...............................................684

24

. ...............................................................................................................698 ............................................................................. 699 ............................... 699 Probing Devices ( ) ............................................................................................................... 699 CD-, , CD-ROM ................................................................... 699 .................................................. 699 Micron ................................................................. 700 3Com PCI Micron .................................... 700 SCSI- HP Netserver ........................... 700 ATI Mach64 ..............................................700 , FreeBSD, .................. 700 , ............................... 701 FreeBSD Missing Operating System ( ) .................................. 701 FreeBSD "F?" ......................................................701 FreeBSD Read Error ( ) ................................................................................701 FreeBSD , Windows ....................702 FreeBSD , ........................................................................................702 FreeBSD Device Not Configured ( ) CD- ...........................702 Signal 11 .........................................703 top, ps ...........................................................................703 root ................................................................................703

. ........................................................ 704, FreeBSD ..........................................................705 Web-.....................................................................................................................705 ........................................................................................................ 705 ............................ '. .............................................................................. 706 USENET, FreeBSD .................................. 708 IRC .................................................................................................................. 708 , BSD ................................................................ 708 Web-.................................................................................................................... 709 USENET ........................................................................... 709 Internet.................................................................................................. 709 Web-.................................................................................................................... 709 USENET ........................................................................... 710

........................................................................................711

(Michael Urban), , UNIX, FreeBSD, Linux Solaris. , Lion Research Center. , , , Web. Perl Java, , , . (Bryan Tiemann) -- FreeBSD Caltech. - , . , , , . FreeBSD, Macintosh, .

(Tim Hicks) HomeSide Leading, Inc. UNIX. HP-UX 10.10 11.00, Solaris 8 AIX 4.1 . Sybase Oracle.

, , , , . , , Lion Research Center . . , , . , .

. Sams Publishing, , , , , . . FreeBSD. . - FreeBSD . , FreeBSD , , , . Lion Research Center (www.lionresearch.org) , . , , , - . , , , - . , , , , . TLK-L lionking.org . , , .

, , - , ? - , Microsoft , IBM? ? , Microsoft ? , 2001 IBM Linux? . , 20 , . , Internet . , Internet- . Internet- UNIX . Linux. , . Microsoft Linux . , . , Linux UNIX; , , UNIX. , , UNIX, , , . GPL, GNU General Public License, , , , . , . GPL, .. , . , . . GPL : , , . , , GPL. , . , .. , . . , , , . FreeBSD (Berkeley Software Design) , . BSD- , , -

28

, , . BSD , , GPL. Apple ( NeXT) BSD NeXTSTEP, Mac OS X. Microsoft FreeBSD Linux, # FreeBSD. BSD , BSD-. , , Linux FreeBSD . , . FreeBSD , Linux. 15% , , . FreeBSD Linux . FreeBSD . Linux UNIX. - : Linux "" , a FreeBSD . , Linux, . . FreeBSD , , . UNIX, , , UNIX "". Linux ? UNIX, a , ? , Windows-, Microsoft? FreeBSD . FreeBSD 1997 , 2.2.2. , Yahoo! Linux, a Hotmail ( Microsoft) FreeBSD Solaris, . ( 2000 Microsoft - Hotmail Windows 2000, , , FreeBSD , .) FreeBSD . ; . FreeBSD NetBSD, OpenBSD Mac OS X; Linux FreeBSD Linux, , RealPlayer StarOffice. . FreeBSD , Linux, . , , Linux.

29

, Linux , , . FreeBSD, , , Microsoft. Linux - GPL . FreeBSD . , BSD, : OpenBSD , , a NetBSD ( Intel x86, PowerPC, Sega Dreamcast). FreeBSD ; . , Internet. FreeBSD Web-, , , , . : , . , . , , . , . , FreeBSD , . , , FreeBSD, .

: 1. : FreeBSD. FreeBSD. 2. FreeBSD. Gnome , . 3. FreeBSD. , FreeBSD, . 4. FreeBSD . , . 5. X-Window. . 6. . FreeBSD, , .

30 , , . : , . , , .

, FreeBSD .

, .

: 2. , , , . , , . 3. - . - , . 4. . 5. , . , , .

CD-ROM 1 FreeBSD, 5.0 2 : mkpasswd.pl Perl, Linux FreeBSD (. 20); simpledemo.pl Perl, (. 21); sendcomments.cgi CGI- Perl (. 26); portsentry.sh PortSentry , PostSentry (. 29); StarOffice 5.2 Sun Linux, FreeBSD. , , .

1

: FreeBSD

FreBSD FreeBSD

1

FreeBSD

FreeBSD FreeBSD? FreeBSD UNIX UNIX FreeBSD FreeBSD

1. FreeBSD

33

FreeBSD UNIX. Intel x86 Alpha, Spare PowerPC. FreeBSD, .

FreeBSD, FreeBSD, , . , , , FreeBSD , . FreeBSD , . , , . FreeBSD : . Netcraft (www.netcraft.com), , 50 47 FreeBSD. Web- 1 1133 ! , FreeBSD. FreeBSD : Sony; Yahoo!; The Apache Project freesoftware.com FTP- . . , , .. . FreeBSD : , , , Web-.

FreeBSD? FreeBSD , . FreeBSD . FreeBSD 486 , .

"" Warner Brothers FreeBSD.

FreeBSD, , :

34

1. : FreeBSD

. Samba ( . 32) , , Windows. FreeBSD (Primary Domain Controller) Windows. Web-. , FreeBSD Web-. Internet-, FreeBSD . . FreeBSD 486- . , DNS- NAT. , DNS- , , Internet . . SQL, , . , FreeBSD Oracle. . FreeBSD , . .

FreeBSD , FreeBSD, . : Web-. , Web- HTML, . Web- , CGI-, , . Web- , Web, . FreeBSD . . FreeBSD Web- . . , , FreeBSD, . , , . . FreeBSD .

1. FreeBSD

35

FreeBSD UNIX, UNIX, ( 30 !) .

FreeBSD UNIX UNIX Bell Laboratories AT&T. (Ken Thompson) (Dennis Ritchie) UNIX. UNIX . 60- AT&T Bell Laboratories Multics. , . , , . DEC PDP-7 . 1969 Bell Labs , Computing Science Research Center . , UNIX. UNIX : DEC PDP-7, - DEC PDP-11. 1973 UNIX , . UNIX . , , , . UNIX , . , UNIX .

BSDAT&T ( , ). AT&T UNIX . UNIX 80% , . , UNIX, Computer Systems Research Group. , 1975 Bell Labs . - (Bill Joy). UNIX. Berkeley Software Distribution, BSD. , , vi ( shell).

36

1. : FreeBSD

70- : , Advanced Research Project Agency UNIX . , , . , , UNIX . Sun Microsystem. Sun , BSD SunOS.

BSD Intel x86 BSD . 1991 BSD Intel x86. 386/BSD. , BSD 86.

FreeBSD 1993 , UNIX . . NetBSD. . , NetBSD. FreeBSD. , . , Intel x86. FreeBSD UNIX- BSD. FreeBSD UNIX . , FreeBSD UNIX, : http://www.bell-labs.com/history/unix/ UNIX Bell Labs . http://daemonz.org/bugs/history.ehtml Berkeley Software Distribution. http://www.freebsd.org/handbook/history.html FreeBSD.

UNIX UNIX , 30 ? . , , , . UNIX , . UNIX KISS (Keep It Simple, Stupid). UNIX , . , UNIX :

1. FreeBSD 37

, , . , UNIX. : , (pipe) (piping). "" (Doug Mcllory) Bell Labs. UNIX ( 8).

. , , . , , ( e-mail), .. (~). :Doe, Doe, Bar, John~505 Jane~121 Foo~501 Some Any Some [email protected] [email protected] Street~Anytown~NY [email protected]

50 500 . , Anytown, , . , , . :awk 'BEGIN {FS="~"} $3 address.txt | sort | == "Anytown" 1p {print "%s\t%s\n",$1,$6}'

adress.txt. , , Anytown. ( ), (\t), (\n). . , . - 1, , . :Bar, Doe, Foo 505-123-4567 John 505-555-1212

, , . ! , :

38

1. : FreeBSD

awk 'BEGIN {FS="~"} $3 = "Anytown" {printf "%s\n%s\n$s, $s $s\n\n",$l,$2,$3,$4,$5}' address.txt | 1p

:Doe, John 505 Some Street Anytown, NY 55555 Bar, Foo501 Some Street Anytown, NY 55555

UNIX ( FreeBSD) , "" . UNIX .

FreeBSD FreeBSD Windows 2000 Linux.

Windows 2000 FreeBSDMicrosoft , , . Windows 2000 , . , Windows 2000 , , . , Windows 2000 . , "" (: ) "" , . FreeBSD Windows 2000? Windows 2000 . ; . FreeBSD , . . Windows 2000 , . Windows 2000 . FreeBSD . , , . . FreeBSD, , . Windows 2000, FreeBSD . , . FreeBSD -

1. FreeBSD

39

, . FreeBSD . FreeBSD , . FreeBSD , , , Windows, Macintosh . Windows 2000 , , Windows. , Windows- Windows. , . . -, . , , , , .

Linux FreeBSD Linux . . Linux UNIX. FreeBSD, , . FreeBSD Jnux . , . Linux , "FreeBSD, , Linux. , FreeBSD , Linux. FreeBSD Linux: FreeBSD , Linux 30. FreeBSD . Linux . . , Slackware Linux BSD. Debian Linux Sys V, a Red Hat Linux Sys V, , Sys V. , Linux . FreeBSD , ; Linux , . , Linux, , Linux. , , , , Linux, . Linux. , , Linux , . FreeBSD , , .

40

1. : FreeBSD

Linux. FreeBSD . , Linux. , , . FreeBSD , Linux . FreeBSD, , , , Linux. : , , .

FreeBSD FreeBSD . . UNIX, . . Web-, , . Windows 2000 . -: Microsoft "".

2

FreeBSD

o Sysinstall Sysinstall FreeBSD FreeBSD Sysinstall

42

1. : FreeBSD

FreeBSD, . : , , . , CD- , 20 . , . , . , , , , . , (, 3). , , .

, , FreeBSD. He , , FreeBSD.

, , , . , : , . ; X-Window . , , IRQ . (serial, ps/2 bus) . , . , , , IRQ. : IP- ; ; ; IP- DNS-; ; (.. ). - , Microsoft Windows, Control Panel.

CD- FreeBSD, , . CD-

2. FreeBSD

43

FreeBSD - (, ), (boot disks). floppies CD-. CD- , FTP- ftp.freebsd.org. /pub/FreeBSD/ releases/5.0-RELEASE/floppies. kern.flp msfroot.flp. DOS Windows, fdimage.exe, /pub/ FreeBSD/tools.

, ftp.freebsd.org. , ftp (, ftp1.freebsd.org ftp2.freebsd.org). .

1,44 .

, . , .

, , . , .

DOS Windows Windows, DOS. , Windows, DOS, . CD- DOS , CD-: D:\TOOLS\FDIMAGE.EXE D:\FLOPPIES\BOOT.FLP D:\FLOPPIES\MFSROOT.FLP , D: CD- . DOS, . CD CD- CD- - floppy-. DOS . CD- ( D:), .

44

1. : FreeBSD:\> cd d:\tools D:\TOOLS> fdimage \floppies\boot.flp a:

, :D:\TOOLS> fdimage \floppies\msfroot.flp :

CD- , fdimage.exe, boot.flp msfroot.flp DOS , temp , ::\>cd temp :\> fdimage boot.flp a:

::\> fdimage msfroot.flp a:

FreeBSD- UNIX- FreeBSD- UNIX-, fdimage.exe ( boot.flp msfroot.flp - ). UNIX- dd . FreeBSD :dd if=boot.flp of=/dev/rfdO

dd :dd if=msfroot.flp of=/dev/rfdO

, , .

: FreeBSD , FreeBSD (. 3). , CD. , , , FTP . , . CD-. CD-, , : boot.ftp. . , " ". , . . , :

2. FreeBSDFreeBSD/1386 bootstrap loader, Revision 0.8 ([email protected], Mon Nov 20 11:41:23

45

Hit [Enter] to boot immediately, or any other key for command prompt. Booting [kernel] in 9 seconds . . . _

Enter. , mfsroot Enter. , UserConfig, : Kernel Configuration MenuSkip kernel configuration and continue with installation. Start kernel configuration in full screen Visual mode. Start kernel configuration in CLI mode. Here you have the chance to go into kernel configuration mode, making any changes which may be necessary to properly adjust the kernel to match your hardware configuration. If you are installing FreeBSD for the first time, select Visual Mode (press Down-Arrow then ENTER). I If you need to do more specialized kernel configuration and are an experienced FreeBSD user, select CLI mode. If you are certain that you do not need to configure your kernel then simply press ENTER or Q now.

Skip kernel configuration . , , , , . UserConfig, .

Sysinstall , FreeBSD Sysinstall. , 2.1.

2.1

Sysinstall.

46

1. : FreeBSD

Sysinstall Sysinstall, , . , 2.1.

2.1 /

. . , . , Select Exit Install.

, , . , /. , , .

, . . Sysinstall Enter Usage. Standard , DOS. Enter .

: , FreeBSD. , , FreeBSD. , . , , . FreeBSD , 3.

, , 2.2.

2. FreeBSD

47

2.2 .

2.2 , , . 2.2

adO

- . IDE-, . Windows DOS, . - . , , slave- , primary- . daO SCSI-. SCSI-, Windows DOS, . SCSI-.

a d1

daO

d a1 fd

ad2 ad3, da2 da3 .. , ; , FreeBSD , . , , FreeBSD. , . , . , , , . Enter . FreeBSD , , , Boot-. , . FreeBSD Boot- , . , Boot- . , . , . , FreeBSD, . FreeBSD Boot- . ,

48

1. : FreeBSD

Boot- , FreeBSD.

- :Disk name: adO FDISK Partition Editor DISK Geometry: 4336 cyls/146 heads/63 sectors = 39882528 sectors (19473MB)