Руководство freebsd - coreit.rucoreit.ru/kb/freebsd_book/freebsd_book.doc · web...

912
Руководство FreeBSD Проект Документации FreeBSD

Upload: ngomien

Post on 30-Aug-2018

314 views

Category:

Documents


6 download

TRANSCRIPT

FreeBSD

FreeBSD

FreeBSD

FreeBSD

FreeBSD

1999

Copyright1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 The FreeBSD Documentation Project

Copyright2000, 2001, 2002, 2003, 2004 FreeBSD

FreeBSD! FreeBSD 4.10-RELEASE FreeBSD 5.2.1-RELEASE. . , . , FreeBSD . Web FreeBSD (http://www.FreeBSD.org.ua) Web FreeBSD (http://www.FreeBSD.org/ru/index.html). Internet FTP FreeBSD (ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/) . () , FreeBSD Mall (http://www.freebsdmall.com/). FreeBSD (http://www.FreeBSD.org/ru/search/index.html).

(SGML DocBook) '' (SGML, HTML, PDF, PostScript, RTF ) , :

1. (SGML DocBook) copyright, .

2. ( DTD, PDF, PostScript, RTF ) copyright, / , .

: FREEBSD " " , , , . , , , , (, ; ; ), , , , ( ), , .

FreeBSD Wind River Systems, Inc. , .

3Com HomeConnect 3Com Corporation.

3ware Escalade 3ware Inc.

ARM ARM Limited.

Adaptec Adaptec, Inc.

Adobe, Acrobat, Acrobat Reader, PostScript Adobe Systems Incorporated / .

Apple, FireWire, Mac, Macintosh, Mac OS, Quicktime, TrueType Apple Computer, Inc., .

Corel WordPerfect Corel Corporation / , / .

Sound Blaster Creative Technology Ltd. / .

CVSup John D. Polstra.

Heidelberg, Helvetica, Palatino, Times Roman , Heidelberger Druckmaschinen AG .

IBM, AIX, EtherJet, Netfinity, OS/2, PowerPC, PS/2, S/390, ThinkPad International Business Machines Corporation , , .

IEEE, POSIX, 802 Institute of Electrical and Electronics Engineers, Inc. .

Intel, Celeron, EtherExpress, i386, i486, Itanium, Pentium, Xeon Intel Corporation .

Intuit Quicken / Intuit Inc., .

Linux Linus Torvalds.

LSI Logic, AcceleRAID, eXtremeRAID, MegaRAID Mylex LSI Logic Corp.

M-Systems DiskOnChip M-Systems Flash Disk Pioneers, Ltd.

Macromedia, Flash, Shockwave Macromedia, Inc. / .

Microsoft, FrontPage, IntelliMouse, MS-DOS, Outlook, Windows, Windows Media Windows NT Microsoft Corporation / .

Netscape Netscape Navigator Netscape Communications Corporation .

GateD NextHop NextHop .

Motif, OSF/1, UNIX , IT DialTone The Open Group Open Group .

Oracle Oracle Corporation.

PowerQuest PartitionMagic PowerQuest Corporation / .

RealNetworks, RealPlayer, RealAudio RealNetworks, Inc.

Red Hat, RPM, Red Hat, Inc. .

SAP, R/3, mySAP SAP AG .

Sun, Sun Microsystems, Java, Java Virtual Machine, JavaServer Pages, JDK, JSP, JVM, Netra, Solaris, StarOffice, Sun Blade, Sun Enterprise, Sun Fire, SunOS, Ultra Sun Microsystems, Inc. .

Symantec Ghost Symantec Corporation .

MATLAB MathWorks, Inc.

SpeedTouch Thomson

U.S. Robotics Sportster U.S. Robotics Corporation.

VMware VMware, Inc.

Waterloo Maple Maple Waterloo Maple Inc.

Mathematica Wolfram Research, Inc.

XFree86 XFree86 Project, Inc.

Ogg Vorbis Xiph.Org Xiph.Org.

, , . , FreeBSD , .

000

I. 000

1. 000

1.1. 000

1.2. FreeBSD!000

1.3. FreeBSD000

2. FreeBSD000

2.1. 000

2.2. 000

2.3. 000

2.4. Sysinstall000

2.5. 000

2.6. 000

2.7. 000

2.8. 000

2.9. 000

2.10. 000

2.11. 000

2.12. 000

2.13. 000

3. UNIX000

3.1. 000

3.2. 000

3.3. 000

3.4. 000

3.5. 000

3.6. 000

3.7. 000

3.8. , , 000

3.9. 000

3.10. 000

3.11. 000

3.12. 000

3.13. 000

4. : 000

4.1. 000

4.2. 000

4.3. 000

4.4. 000

4.5. 000

4.6. 000

4.7. 000

5. X Window System000

5.1. 000

5.2. X000

5.3. X11000

5.4. X11000

5.5. X11000

5.6. (Display Managers) X000

5.7. 000

II. 000

6. 000

6.1. 000

6.2. 000

6.3. 000

6.4. 000

6.5. 000

6.6. 000

7. 000

7.1. 000

7.2. 000

7.3. MP3000

7.4. 000

7.5. 000

7.6. Image Scanners *000

8. FreeBSD000

8.1. 000

8.2. ?000

8.3. 000

8.4. 000

8.5. 000

8.6. - 000

9. 000

9.1. 000

9.2. 000

9.3. 000

9.4. 000

9.5. 000

9.6. 000

9.7. 000

10. , Linux000

10.1. 000

10.2. 000

10.3. Mathematica000

10.4. Installing Maple *000

10.5. Installing MATLAB *000

10.6. Oracle000

10.7. Installing SAPR/3 *000

10.8. 000

III. 000

11. 000

11.1. 000

11.2. 000

11.3. 000

11.4. 000

11.5. 000

11.6. cron000

11.7. rc FreeBSD 5.X000

11.8. 000

11.9. 000

11.10. 000

11.11. sysctl000

11.12. 000

11.13. , 000

11.14. 000

11.15. 000

11.16. FreeBSD ACPI000

12. FreeBSD000

12.1. 000

12.2. 000

12.3. MBR , 000

12.4. 000

12.5. 000

12.6. Init: 000

12.7. 000

13. 000

13.1. 000

13.2. 000

13.3. 000

13.4. 000

13.5. 000

13.6. 000

13.7. 000

13.8. 000

13.9. 000

14. 000

14.1. 000

14.2. 000

14.3. FreeBSD000

14.4. DES, MD5, 000

14.5. 000

14.6. KerberosIV000

14.7. Kerberos5000

14.8. 000

14.9. OpenSSL000

14.10. VPN IPsec000

14.11. OpenSSH000

14.12. (ACL)000

14.13. FreeBSD000

15. (MAC)000

15.1. 000

15.2. 000

15.3. MAC000

15.4. MAC000

15.5. 000

15.6. MAC bsdextended000

15.7. MAC ifoff000

15.8. MAC portacl000

15.9. MAC, 000

15.10. MAC partition000

15.11. MAC (MLS)000

15.12. MAC Biba000

15.13. MAC LOMAC000

15.14. MAC000

15.15. : MAC 000

15.16. MAC000

16. 000

16.1. 000

16.2. 000

16.3. 000

16.4. RAID000

16.5. USB 000

16.6. (CD)000

16.7. (DVD)000

16.8. 000

16.9. 000

16.10. 000

16.11. 000

16.12. , 000

16.13. 000

16.14. 000

16.15. 000

17. Vinum000

17.1. 000

17.2. 000

17.3. 000

17.4. 000

17.5. Vinum000

17.6. 000

17.7. 000

17.8. Vinum000

17.9. Vinum 000

18. - I18N/L10N 000

18.1. 000

18.2. 000

18.3. 000

18.4. I18N 000

18.5. FreeBSD 000

19. 000

19.1. 000

19.2. FreeBSD-CURRENT FreeBSD-STABLE000

19.3. 000

19.4. world000

19.5. 000

IV. 000

20. 000

20.1. 000

20.2. 000

20.3. 000

20.4. 000

20.5. 000

20.6. 000

21. PPP SLIP000

21.1. 000

21.2. PPP 000

21.3. PPP 000

21.4. PPP000

21.5. PPP Ethernet (PPPoE)000

21.6. PPP ATM (PPPoA)000

21.7. SLIP000

22. 000

22.1. 000

22.2. 000

22.3. sendmail000

22.4. 000

22.5. 000

22.6. 000

22.7. SMTP UUCP000

22.8. 000

22.9. 000

22.10. SMTP 000

22.11. 000

22.12. fetchmail000

22.13. procmail000

23. 000

23.1. 000

23.2. - inetd000

23.3. Network File System (NFS)000

23.4. Network Information System (NIS/YP)000

23.5. (DHCP)000

23.6. Domain Name System (DNS)000

23.7. Apache HTTP 000

23.8. MicrosoftWindows (Samba)000

23.9. (FTP)000

23.10. NTP000

24. 000

24.1. 000

24.2. 000

24.3. 000

24.4. Bluetooth000

24.5. 000

24.6. 000

24.7. ISDN000

24.8. (natd)000

24.9. IP (PLIP)000

24.10. IPv6000

24.11. (ATM) FreeBSD5.X000

V. 000

A. FreeBSD000

A.1. CDROM DVD000

A.2. FTP 000

A.3. CVS000

A.4. CTM000

A.5. CVSup000

A.6. CVS000

A.7. AFS 000

A.8. rsync 000

B. 000

B.1. , FreeBSD000

B.2. 000

B.3. 000

B.4. 000

B.5. 000

B.6. 000

B.7. 000

B.8. UNIX000

B.9. 000

C. 000

C.1. 000

C.2. Usenet000

C.3. World Wide Web000

C.4. Email000

C.5. Shell 000

D. PGP000

D.1. 000

D.2. Core000

D.3. 000

FreeBSD000

Colophon000

2-1. 000

2-2. 000

2-3. 000

2-4. 000

2-5. FreeBSD ISO 000

3-1. 000

16-1. 000

17-1. Vinum000

24-1. 000

24-2. IPv6000

2-1. 000

2-2. 000

2-3. 000

2-4. 000

2-5. Sysinstall000

2-6. Device Probe000

2-7. Sysinstall Exit000

2-8. Usage Sysinstall000

2-9. 000

2-10. Sysinstall000

2-11. 000

2-12. 000

2-13. 000

2-14. Sysinstall000

2-15. 000

2-16. FDisk000

2-17. fdisk 000

2-18. Fdisk 000

2-19. Sysinstall000

2-20. 000

2-21. Sysinstall Disklabel000

2-22. Sysinstall Disklabel 000

2-23. 000

2-24. 000

2-25. 000

2-26. 000

2-27. Sysinstall Disklabel000

2-28. 000

2-29. 000

2-30. 000

2-31. Ethernet 000

2-32. ed0000

2-33. inetd.conf000

2-34. FTP 000

2-35. FTP Welcome Message000

2-36. exports000

2-37. 000

2-38. 000

2-39. 000

2-40. 000

2-41. 000

2-42. 000

2-43. 000

2-44. 000

2-45. 000

2-46. 000

2-47. 000

2-48. 000

2-49. 000

2-50. 000

2-51. (Network Configuration)000

2-52. MTA 000

2-53. Ntpdate000

2-54. 000

2-55. 000

2-56. 000

2-57. 000

2-58. 000

2-59. 000

2-60. 000

2-61. User ()000

2-62. 000

2-63. 000

2-64. 000

17-1. 000

17-2. 000

17-3. RAID-5000

17-4. Vinum000

17-5. Vinum000

17-6. 000

17-7. 000

2-1. 000

2-2. 000

3-1. , , 000

3-2. 000

4-1. 000

11-1. FreeBSD 4.X000

11-2. FreeBSD 5.X000

12-1. boot0000

12-2. boot2000

12-3. /etc/ttys000

13-1. adduser FreeBSD4.X000

13-2. FreeBSD5.X000

13-3. rmuser000

13-4. chpass 000

13-5. chpass 000

13-6. 000

13-7. 000

13-8. pw(8)000

13-9. pw(8)000

13-10. id(1) 000

14-1. SSH SMTP000

16-1. dump ssh000

16-2. dump ssh RSH000

16-3. 000

16-4. vnconfig FreeBSD4.X000

16-5. vnconfig000

16-6. mdconfig FreeBSD5.X000

16-7. , , mdconfig000

16-8. , , mdmfs000

16-9. md FreeBSD4.X000

16-10. mdconfig000

16-11. mdmfs000

20-1. /etc/ttys000

22-1. sendmail000

22-2. Mail Aliases000

22-3. 000

23-1. HangUP inetd000

23-2. amd000

24-1. 000

24-2. 000

A-1. -CURRENT (ls(1)) :000

A-2. ls(1) 3.X-STABLE:000

A-3. ls(1) ( unified diff)000

A-4. :000

, FreeBSD , , FreeBSD , UNIX. , .

, , , FreeBSD. , .

: . B.

FreeBSD. :

. 11, , ACPI , cron .

. 14, , (VPN), (ACL), .

. 15, (MAC), . , MAC FreeBSD.

. 16, , USB, , , , .

. 17, Vinum, . Vinum, , RAID-0, RAID-1 RAID-5.

. 21, PPP SLIP, .

. 22, , , SMTP , UUCP, fetchmail, procmail, .

. 23, , . Apache HTTP Server, FTPd, Samba Microsoft Windows. . 24, .

. 24, , Bluetooth FreeBSD, , Asynchronous Transfer Mode (ATM).

, , .

.

FreeBSD. , :

.

ASCII- .

, , .

: , .

. 2 ( FreeBSD) , , .

. 3 ( UNIX) , .

. 4 ( : ) .

. 5 (X Window System) , , KDE GNOME XFree86 4.X.

. 12 ( FreeBSD) .

. 16 ( ) , . , . RAID.

. 20 ( ) FreeBSD 4.X/5.X.

. 21 (PPP SLIP) .

. 24 ( ).

. 22 ( ) , sendmail.

. 10 ( , Linux) Oracle SAPR/3.

, , :

(. 11).

(. 7)

. , , FreeBSD. , , , . , , FreeBSD. . , , . , , . , , . , , , . .

. 1,

FreeBSD. FreeBSD, .

. 2,

. , , .

. 3, UNIX

FreeBSD. Linux UNIX- , , .

. 4, :

FreeBSD .

. 5, The X Window System

X Window System XFree86 FreeBSD . , KDE GNOME.

. 6,

, - FreeBSD.

. 7,

, . .

. 8, FreeBSD

, .

. 9,

FreeBSD, , .

. 10, , Linux

Linux- FreeBSD. Linux, : Oracle, SAPR/3 Mathematica.

. 11,

FreeBSD, . , FreeBSD .

. 12,

FreeBSD , .

. 13,

. .

. 14,

, FreeBSD , , Kerberos, IPsec, OpenSSH .

. 15, (MAC)

(Mandatory Access Control, MAC) FreeBSD.

. 16,

FreeBSD, , RAID, , .

. 17, Vinum

Vinum, , RAID-0, RAID-1 RAID-5.

. 18,

FreeBSD , . .

. 19,

FreeBSD-STABLE, FreeBSD-CURRENT FreeBSD-RELEASE. , .

. 20,

FreeBSD , .

. 21, PPP SLIP

PPP, SLIP PPP Ethernet FreeBSD.

. 22,

: sendmail.

. 23,

FreeBSD (NFS), (DNS), (NIS), (ntpd).

. 24,

, Internet, , , bluetooth, ATM, IPv6 .

. A, FreeBSD

, FreeBSD CDROM DVD, Internet, FreeBSD.

. B,

, . , .

. C, Internet

, FreeBSD, FreeBSD.

. D, PGP

PGP FreeBSD.

,

.

, Internet (URL), .

, , , , , .

, .

, . , `+', :

Ctrl+Alt+Del

, Ctrl, Alt Del .

, , , :

Ctrl+X, Ctrl+S

, Ctrl X , Ctrl S.

, E:\> MS-DOS. , MS-DOS MicrosoftWindows.

E:\> tools\fdimage floppies\kern.flp A:

, # , FreeBSD. root , su(1) , .

# dd if=kern.flp of=/dev/fd0

, % , . , C-shell .

% top

, . , , .

, , .. , BSDi ( Wind River Systems (http://www.windriver.com)) FreeBSD, 2000 (ISBN 1-57176-241-8). Wind River Systems . 2001 (ISBN 1-57176-303-1). 2003-2004 FreeBSD Mall, Inc (http://www.freebsdmall.com) Handbook .

I.

FreeBSD - FreeBSD. :

FreeBSD.

FreeBSD.

UNIX.

FreeBSD.

X Window, UNIX, .

, .

1.

, Jim Mock. : , .

1.1.

FreeBSD! FreeBSD, , , , .

:

FreeBSD .

FreeBSD.

FreeBSD.

FreeBSD .

, FreeBSD.

1.2. FreeBSD!

FreeBSD 4.4BSD-Lite Intel (x86 Itanium), AMD64, Alpha Sun UltraSPARC. . FreeBSD, . (, , ), FreeBSD (http://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/contributing/index.html).

1.2.1. FreeBSD?

FreeBSD . :

, .

FreeBSD . , , , , , , .

TCP/IP , SLIP, PPP, NFS, DHCP NIS. , FreeBSD , , NFS ( ) Internet WWW, FTP, ( ).

, ( ) . .

FreeBSD 32- (64 Alpha, Itanium, AMD64, UltraSPARC) .

X Window System (X11R6) (GUI) VGA .

, Linux, SCO, SVR4, BSDI NetBSD.

FreeBSD . - , ?

- Internet. FreeBSD UNIX , , ( ), .

VM/ , , , .

(SMP) .

: C, C++, Fortran Perl. .

, . , - ?

online .

- !

FreeBSD 4.4BSD-Lite Computer Systems Research Group (CSRG) , , BSD-. CSRG, FreeBSD . , PC, FreeBSD !

FreeBSD . , ; UNIX , FreeBSD! FreeBSD , , . .

, FreeBSD , , , , . , FreeBSD:

Internet : TCP/IP FreeBSD Internet :

FTP

World Wide Web ( , [SSL])

NAT (IP )

USENET BBS

...

FreeBSD, 386 PC, Xeon RAID .

: ? , , FreeBSD. CAD, .

: , , FreeBSD , . FreeBSD , , , .

: ? (DNS)? , ? FreeBSD 386 486 PC .

X Window: FreeBSD , X-. XFree86 , Xi Graphics (http://www.xig.com). X , FreeBSD , , . FreeBSD , .

: FreeBSD , GNU C/C++ .

FreeBSD , CDROM, DVD FTP. . A .

1.2.2. FreeBSD?

FreeBSD , :

Yahoo! (http://www.yahoo.com/)

Apache (http://www.apache.org/)

Blue Mountain Arts (http://www.bluemountain.com/)

Pair Networks (http://www.pair.com/)

Sony Japan (http://www.sony.co.jp/)

Netcraft (http://www.netcraft.com/)

Weathernews (http://www.wni.com/)

Supervalu (http://www.supervalu.com/)

TELEHOUSE America (http://www.telehouse.com/)

Sophos Anti-Virus (http://www.sophos.com/)

JMA Wired (http://www.jmawired.com/)

.

1.3. FreeBSD

, , , .

1.3.1. FreeBSD

Jordan Hubbard.

FreeBSD 1993 , 386BSD (patchkit) , 3- : Nate Williams, Rod Grimes .

386BSD , , patchkit . : 386BSD 0.5 386BSD Interim.

386BSD , , . patchkit , , - . , , .

, , , FreeBSD . , , , , Walnut Creek CDROM FreeBSD Internet. Walnut Creek CDROM FreeBSD CD, Internet. Walnut Creek CDROM , FreeBSD , .

, CDROM, , FreeBSD1.0, 1993 . 4.3BSD-Lite (Net/2) , 386BSD . , FreeBSD 1.1 RELEASE 1994 .

, Novell , . - Net/2 . , Net/2 , Novell, , ( ) AT&T. Novell, 4.4BSD-Lite, Net/2 . FreeBSD, 1994 Net/2. , FreeBSD1.1.5.1.

FreeBSD 4.4BSD-Lite. Lite light () , CSRG Berkeley , ( ), 4.4BSD Intel . 1994 , FreeBSD2.0 CDROM ( ). , FreeBSD2.0.5, 1995 .

FreeBSD2.1.5 1996, ISP , 2.1-STABLE. FreeBSD2.1.7.1, 1997 2.1-STABLE. , (RELENG_2_1_0) .

FreeBSD2.2 (-CURRENT) 1996 RELENG_2_2, (2.2.1) 1997. 2.2 97 , (2.2.8) 1998. 3.0 1998, 2.2

20 1999 , 4.0-CURRENT 3.X-STABLE. 3.X-STABLE : 3.1 - 15 1999, 3.2 - 15 1999, 3.3 - 16 1999, 3.4 - 20 1999, 3.5 - 24 2000, 3.5.1, Kerberos. 3.X.

13 2000 , 4.X-STABLE, -stable . : 4.0-RELEASE 2000 , 4.10-RELEASE May 2004. 4.X-stable (RELENG_4) .

5.0-RELEASE 19 2003 . , FreeBSD , UltraSPARC ia64. 5.1 2003 . , 5.X . , , . , 5.X , 4.X . 5.X , , 6.0-CURRENT.

, 5.X-CURRENT, - 5.X CDROM (, , ), (ftp://current.FreeBSD.org/pub/FreeBSD/snapshots/) .

1.3.2. FreeBSD

Jordan Hubbard.

FreeBSD , . ( ) - , . , , , , . , , .

, GNU (GPL) GNU (LGPL), , . , GPL , , BSD, .

1.3.3. FreeBSD

Satoshi Asami.

FreeBSD FreeBSD, , , , (http://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/contributors/article.html). , , , freebsd-hackers (http://lists.FreeBSD.org/mailman/listinfo/freebsd-hackers). FreeBSD , FreeBSD (http://lists.FreeBSD.org/mailman/listinfo/freebsd-announce).

FreeBSD , :

CVS

FreeBSD CVS (http://www.cvshome.org/) (Concurrent Versions System), , FreeBSD. CVS (http://www.FreeBSD.org/cgi/cvsweb.cgi) , , (), . CVS, -CURRENT -STABLE, . .

, CVS, FreeBSD ( cvs(1) commit, CVS ). - send-pr(1). - , cvs-committers.

CORE FreeBSD

CORE FreeBSD , FreeBSD . CORE , . CORE , CORE , . 2004 . 2 .

CORE , , . FreeBSD (http://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/contributors/article.html).

: CORE , . , , FreeBSD, !

, , , . FreeBSD, (http://lists.FreeBSD.org/mailman/listinfo/freebsd-hackers), . . C FreeBSD.

FreeBSD (http://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/contributors/article.html) , - FreeBSD ?

; - , FreeBSD (http://www.FreeBSD.org/ru/index.html).

, . FreeBSD, , ! , .

, FreeBSD, FreeBSD!

1.3.4. FreeBSD

FreeBSD - , 4.4BSD-Lite , Intel i386, i486, Pentium, PentiumPro, Celeron, PentiumII, PentiumIII, Pentium4 ( ), Xeon, DEC Alpha Sun UltraSPARC. CSRG, U.C. Berkley, NetBSD, OpenBSD, 386BSD Free Software Foundation.

FreeBSD 2.0 94, , , FreeBSD . VM/ , , , 5MB . NIS ( ), TCP, "--" PPP, DHCP, SCSI, ISDN, ATM, FDDI, Fast Gigabit Ethernet (1000Mbit) , Adaptec .

, FreeBSD , . 10,500 ! http (WWW) , , , . 300MB , . , (1.0) . , , , make install . , , CDROM FTP , , . - , (pkg_add) , . : . 4.

, FreeBSD, /usr/share/doc , FreeBSD. , HTML, :

FreeBSD

/usr/share/doc/ru_RU.KOI8-R/books/handbook/index.html

FreeBSD FAQ ( )

/usr/share/doc/ru_RU.KOI8-R/books/faq/index.html

( ) http://www.FreeBSD.org/ru/ (http://www.FreeBSD.org/ru/index.html).

2. FreeBSD

, Jim Mock. sysinstall, Randy Pratt.

2.1.

FreeBSD sysinstall. FreeBSD, . sysinstall FreeBSD.

, :

FreeBSD.

FreeBSD .

sysinstall.

, sysinstall , , .

:

, FreeBSD, , .

: , i386 (PC ) . , , (, Alpha). , , , . , , .

2.2.

2.2.1.

FreeBSD . FreeBSD ( , , CDROM ..) . FreeBSD , IRQ -. - , FreeBSD .

, Windows Linux, . , . 3, 5 7, - , 0x330.

FreeBSD. :

2-1.

IRQ

-

40GB, Seagate, IDE master

CDROM

IDE slave

20GB, IBM, IDE master

IDE

14

0x1f0

Intel 10/100

3Com 56K -, COM1

2.2.2.

, FreeBSD, , FreeBSD. FreeBSD , , , , .

2.2.3. FreeBSD

, FreeBSD , .

, FreeBSD , .

2.2.3.1. i386

PC . . PC . . , , . . , , .

ID , . FreeBSD ID 165.

, , , . , DOS , Windows, , C:.

FreeBSD . FreeBSD , , . , , FreeBSD . FreeBSD . , , , .

, FreeBSD, , (, fdisk DOS Windows).

, . , .

FreeBSD 100MB. , , . 250MB , 350MB . , .

, PartitionMagic, FreeBSD. tools CDROM , , FIPS PResizer. . FIPS, PResizer, PartitionMagic FAT16 FAT32, MS-DOS Windows ME. PartitionMagic , NTFS.

: . .

2-1.

4GB , Windows, C: D:, 2GB. 1GB C:, 0.5GB D:.

, , . D: C:, FreeBSD.

2-2.

, 4GB , Windows. Windows , C: 4GB. 1.5GB, 2GB FreeBSD.

FreeBSD :

1. Windows, Windows, 2GB .

2. , PartitionMagic, , Windows.

2.2.3.2. Alpha

FreeBSD Alpha. . Alpha, SCSI IDE, , .

, Digital / Compaq, SRM . SRM .

SHOW DEVICE SRM :

>>>SHOW DEVICE

dka0.0.0.4.0 DKA0 TOSHIBA CD-ROM XM-57 3476

dkc0.0.0.1009.0 DKC0 RZ1BB-BS 0658

dkc100.1.0.1009.0 DKC100 SEAGATE ST34501W 0015

dva0.0.0.0.1 DVA0

ewa0.0.0.3.0 EWA0 00-00-F8-75-6D-01

pkc0.7.0.1009.0 PKC0 SCSI Bus ID 7 5.27

pqa0.0.0.4.0 PQA0 PCI EIDE

pqb0.0.1.4.0 PQB0 PCI EIDE

Digital Personal Workstation 433au . CDROM DKA0, DKC0 DKC100 .

DKx SCSI . , DKA100 SCSI SCSI ID 1 SCSI (A), DKC300 SCSI SCSI ID 3 SCSI (C). PKx SCSI . SHOW DEVICE, SCSI CDROM SCSI.

IDE DQx, PQx IDE .

2.2.4.

FreeBSD (, FTP NFS ), . , FreeBSD .

2.2.4.1. Ethernet, /DSL

Ethernet, Ethernet DSL , :

1.IP

2.IP

3.

4.IP DNS

5.

, . , , DHCP. , .

2.2.4.2.

, FreeBSD , .

:

1.

2.COM ,

3.

2.2.5. FreeBSD

FreeBSD , FreeBSD , , . . , FreeBSD (http://www.FreeBSD.org/releases/5.2.1-R/errata.html), FreeBSD. , , , .

, , (http://www.FreeBSD.org/ru/releases/index.html) FreeBSD (http://www.FreeBSD.org/ru/index.html).

2.2.6. FreeBSD

FreeBSD FreeBSD , :

CDROM DVD

DOS

SCSI QIC

FTP ( HTTP , )

NFS

FreeBSD CD DVD, , , (. 2.2.7).

FreeBSD, . 2.13, , FreeBSD . , . 2.2.7.

2.2.7.

FreeBSD FreeBSD . , , . - CDROM.

: FreeBSD CDROM DVD ( ), CDROM DVD ( BIOS Boot Order - ), . FreeBSD CDROM DVD FreeBSD - .

:

1.

floppies/, floppies, ftp://ftp.FreeBSD.org/pub/FreeBSD/releases//-RELEASE/floppies/. , , . , FreeBSD5.2.1-RELEASE i386 ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/i386/5.2.1-RELEASE/floppies/.

.flp. floppies/ , FreeBSD , , . , kern.flp mfsroot.flp. . drivers.flp. README.TXT .

: FTP . (ASCII) , .

2.

. . . . Windows , . .

: FreeBSD , , - , . .

3.

.flp , . . , . , .

MS-DOS/Windows, fdimage.

CDROM, CDROM E:, :

E:\> tools\fdimage floppies\kern.flp A:

.flp, , , . , , .flp. CDROM, fdimage tools (ftp://ftp.FreeBSD.org/pub/FreeBSD/tools/) FTP FreeBSD.

UNIX (, FreeBSD), dd(1) . FreeBSD :

# dd if=kern.flp of=/dev/fd0

FreeBSD, /dev/fd0 ( A:). /dev/fd1 B:, . UNIX - , .

FreeBSD.

2.3.

: , , :

Last Chance: Are you SURE you want continue the installation?

If you're running this on a disk with data you wish to save then WE

STRONGLY ENCOURAGE YOU TO MAKE PROPER BACKUPS before proceeding!

We can take no responsibility for lost disk contents!

- . , - , - .

2.3.1.

2.3.1.1. i386

1. .

2. . BIOS, F2, F10, Del, Alt+S. , . . , Esc .

3. , . Boot Order, , Floppy, CDROM, First Hard Disk, .

, , Floppy. CDROM, . , / .

, . .

4. , . 2.2.7, ; , kern.flp. .

CDROM, - .

, , :

1. . .

2. BIOS, , . , .

3.BIOS .

5. FreeBSD . CDROM, - ( ):

Verifying DMI Pool Data ........

Boot from ATAPI CD-ROM :

1. FD 2.88MB System Type-(00)

Uncompressing ... done

BTX loader 1.00 BTX version is 1.01

Console: internal video/keyboard

BIOS drive A: is disk0

BIOS drive B: is disk1

BIOS drive C: is disk2

BIOS drive D: is disk3

BIOS 639kB/261120kB available memory

FreeBSD/i386 bootstrap loader, Revision 0.8

/kernel text=0x277391 data=0x3268c+0x332a8 |

|

Hit [Enter] to boot immediately, or any other key for command prompt.

Booting [kernel] in 9 seconds... _

, - ( ):

Verifying DMI Pool Data ........

BTX loader 1.00 BTX version is 1.01

Console: internal video/keyboard

BIOS drive A: is disk0

BIOS drive C: is disk1

BIOS 639kB/261120kB available memory

FreeBSD/i386 bootstrap loader, Revision 0.8

/kernel text=0x277391 data=0x3268c+0x332a8 |

Please insert MFS root floppy and press enter:

, kern.flp, mfsroot.flp Enter.

6. CDROM, :

Hit [Enter] to boot immediately, or any other key for command prompt.

Booting [kernel] in 9 seconds... _

Enter. .

2.3.1.2. Alpha

1. .

2. .

3. , . 2.2.7, ; , kern.flp. ( ):

>>>BOOT DVA0 -FLAGS '' -FILE ''

CDROM, - ( CDROM ):

>>>BOOT DKA0 -FLAGS '' -FILE ''

4. FreeBSD . , :

Please insert MFS root floppy and press enter:

, kern.flp, mfsroot.flp Enter.

5. CDROM, :

Hit [Enter] to boot immediately, or any other key for command prompt.

Booting [kernel] in 9 seconds... _

Enter. .

2.3.2. (kernel)

: FreeBSD 5.0 , userconfig device.hints(5). device.hints(5) . 12.5

kernel . , , , , , .. , FreeBSD . , sa SCSI, sio - ( COM ).

, . , .

. , . , . PC.

ISA PCI. ISA , , Interrupt Request Line (IRQ) -, . , DOS .

, IRQ .

PCI , , BIOS , IRQ - .

ISA, FreeBSD IRQ . (. 2.2.1).

, IRQ , , . , ISA IRQ . FreeBSD , , .

FreeBSD. , ( ).

FreeBSD , , , . , . , , , , FreeBSD.

, FreeBSD , . , . ( ) , , .

, .

. 2-1 . Start kernel configuration in full-screen visual mode, .

2-1.

INCLUDEPICTURE "install/userconfig.png"

(. 2-2) :

1. , active, , Storage, Network. , , IRQ . , - , CONF. .

2., . , . .

3. , IRQ .

4. , .

2-2.

INCLUDEPICTURE "install/userconfig2.png"

, ; , .

.

1. X. . .

. 2-3 X.

2-3.

INCLUDEPICTURE "install/hdwrconf.png"

2. , . , Del. Inactive Drivers.

, Tab Inactive Drivers, , Enter, .

: sc0. , , .

: atkbd0 USB . , atkbd0.

3. , . . allowed conflict , IRQ/ , IRQ/ .

IRQ - , Enter. . IRQ , . Q .

, , -1. FreeBSD , -1 .

. DIP . DOS , , . , , . , FreeBSD .

4. , . 2-4.

2-4.

INCLUDEPICTURE "install/probstart.png"

, , .

. Q . :

Save these parameters before exiting? ([Y]es/[N]o/[C]ancel)

Y ( ) . sysinstall (. 2-5).

2-5. Sysinstall

INCLUDEPICTURE "install/main1.png"

2.3.3.

, , .

Scroll Lock. . PageUp PageDown . Scroll Lock .

, , . . 2-6, , .

2-6. Device Probe

avail memory = 253050880 (247120K bytes)

Preloaded elf kernel "kernel" at 0xc0817000.

Preloaded mfs_root "/mfsroot" at 0xc0817084.

md0: Preloaded image 4423680 bytes at 0xc03ddcd4

md1: Malloc disk

Using $PIR table, 4 entries at 0xc00fde60

npx0: on motherboard

npx0: INT 16 interface

pcib0: on motherboard

pci0: on pcib0

pcib1: at device 1.0 on pci0

pci1: on pcib1

pci1: at 0.0 irq 11

isab0: at device 7.0 on pci0

isa0: on isab0

atapci0: port 0xe000-0xe00f at device 7.1 on pci0

ata0: at 0x1f0 irq 14 on atapci0

ata1: at 0x170 irq 15 on atapci0

uhci0 port 0xe400-0xe41f irq 10 at device 7.2 on pci

0

usb0: on uhci0

usb0: USB revision 1.0

uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr1

uhub0: 2 ports with 2 removable, self powered

pci0: (vendor=0x1106, dev=0x3040) at 7.3

dc0: port 0xe800-0xe8ff mem 0xdb000000-0xeb0003ff ir

q 11 at device 8.0 on pci0

dc0: Ethernet address: 00:04:5a:74:6b:b5

miibus0: on dc0

ukphy0: on miibus0

ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto

ed0: port 0xec00-0xec1f irq 9 at device 10.

0 on pci0

ed0 address 52:54:05:de:73:1b, type NE2000 (16 bit)

isa0: too many dependant configs (8)

isa0: unexpected small tag 14

orm0: at iomem 0xc0000-0xc7fff on isa0

fdc0: at port 0x3f0-0x3f5,0x3f7 irq 6 drq2 on isa0

fdc0: FIFO enabled, 8 bytes threshold

fd0: on fdc0 drive 0

atkbdc0: at port 0x60-0x64 on isa0

atkbd0: flags 0x1 irq 1 on atkbdc0

kbd0 at atkbd0

psm0: irq 12 on atkbdc0

psm0: model Generic PS/2 mouse, device ID 0

vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0

sc0: at flags 0x1 on isa0

sc0: VGA

sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0

sio0: type 16550A

sio1 at port 0x2f8-0x2ff irq 3 on isa0

sio1: type 16550A

ppc0: at port 0x378-0x37f irq 7 on isa0

ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode

ppc0: FIFO with 16/16/15 bytes threshold

ppbus0: IEEE1284 device found /NIBBLE

Probing for PnP devices on ppbus0:

plip0: on ppbus0

lpt0: on ppbus0

lpt0: Interrupt-driven port

ppi0: on ppbus0

ad0: 8063MB [16383/16/63] at ata0-master using UDMA33

ad2: 8063MB [16383/16/63] at ata1-master using UDMA33

acd0: CDROM at ata0-slave using PIO4

Mounting root from ufs:/dev/ad0s1a

swapon: adding /dev/ad0s1b as swap device

Automatic boot in progress...

/dev/ad0s1a: FILESYSTEM CLEAN; SKIPPING CHECKS

/dev/ad0s1a: clean, 48752 free (552 frags, 6025 blocks, 0.9% fragmentation)

/dev/ad0s1f: FILESYSTEM CLEAN; SKIPPING CHECKS

/dev/ad0s1f: clean, 128997 free (21 frags, 16122 blocks, 0.0% fragmentation)

/dev/ad0s1g: FILESYSTEM CLEAN; SKIPPING CHECKS

/dev/ad0s1g: clean, 3036299 free (43175 frags, 374073 blocks, 1.3% fragmentation)

/dev/ad0s1e: filesystem CLEAN; SKIPPING CHECKS

/dev/ad0s1e: clean, 128193 free (17 frags, 16022 blocks, 0.0% fragmentation)

Doing initial network setup: hostname.

ed0: flags=8843 mtu 1500

inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255

inet6 fe80::5054::5ff::fede:731b%ed0 prefixlen 64 tentative scopeid 0x1

ether 52:54:05:de:73:1b

lo0: flags=8049 mtu 16384

inet6 fe80::1%lo0 prefixlen 64 scopeid 0x8

inet6 ::1 prefixlen 128

inet 127.0.0.1 netmask 0xff000000

Additional routing options: IP gateway=YES TCP keepalive=YES

routing daemons:.

additional daemons: syslogd.

Doing additional network setup:.

Starting final network daemons: creating ssh RSA host key

Generating public/private rsa1 key pair.

Your identification has been saved in /etc/ssh/ssh_host_key.

Your public key has been saved in /etc/ssh/ssh_host_key.pub.

The key fingerprint is:

cd:76:89:16:69:0e:d0:6e:f8:66:d0:07:26:3c:7e:2d [email protected]

creating ssh DSA host key

Generating public/private dsa key pair.

Your identification has been saved in /etc/ssh/ssh_host_dsa_key.

Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub.

The key fingerprint is:

f9:a1:a9:47:c4:ad:f9:8d:52:b8:b8:ff:8c:ad:2d:e6 [email protected].

setting ELF ldconfig path: /usr/lib /usr/lib/compat /usr/X11R6/lib

/usr/local/lib

a.out ldconfig path: /usr/lib/aout /usr/lib/compat/aout /usr/X11R6/lib/aout

starting standard daemons: inetd cron sshd usbd sendmail.

Initial rc.i386 initialization:.

rc.i386 configuring syscons: blank_time screensaver moused.

Additional ABI support: linux.

Local package initialization:.

Additional TCP options:.

FreeBSD/i386 (k6-2.example.com) (ttyv0)

login: rpratt

Password:

RSA DSA . . .

X , startx.

2.9.18.2. FreeBSD Alpha

, FreeBSD SRM :

>>>BOOT DKC0

. FreeBSD , :

>>> SET BOOT_OSFLAGS A

>>> SET BOOT_FILE ''

>>> SET BOOTDEF_DEV DKC0

>>> SET AUTO_ACTION BOOT

( ) , FreeBSD i386.

2.9.19. FreeBSD (FreeBSD Shutdown)

. . , su root. wheel. root shutdown -h now.

The operating system has halted.

Please press any key to reboot.

, shutdown Please press any key to reboot. , .

Ctrl+Alt+Del , .

2.10.

FreeBSD PC, ISA, VLB, EISA, PCI x86 Intel, AMD, Cyrix, NexGen, Compaq Alpha. IDE ESDI , SCSI , PCMCIA, USB, . FreeBSD MCA IBM.

FreeBSD FreeBSD . HARDWARE.TXT CDROM, FTP sysinstall. , FreeBSD . (http://www.FreeBSD.org/ru/releases/index.html) FreeBSD.

2.11.

, . , FreeBSD MS-DOS.

2.11.1. -

PC, 100%, , , , .

FreeBSD, , .

, , , , . . , IRQ, - DMA . , , FreeBSD .

, , , . () .

: , , . BIOS , .

BIOS , . , BIOS.

: , , (sc0). , -, . .

:

, .

, .

IRQ, DRQ, , .

Q . , , , . , .

2.11.2. MS-DOS

FreeBSD PC Microsoft. FreeBSD , FIPS. tools CD-ROM FreeBSD.

FIPS MS-DOS , , . MS-DOS Windows Disk Defragmenter ( Explorer, ), Norton Disk Tools. FIPS. , . FreeBSD . Distributions .

PartitionMagic PowerQuest (http://www.powerquest.com (http://www.powerquest.com/)). , FIPS, , / . , FreeBSD , FIPS.

2.11.3. MS-DOS Windows

, FreeBSD , Double Space. , FreeBSD . Compression Agent, > > .

FreeBSD MS-DOS. mount_msdos(8) ( FreeBSD 5.X, mount_msdosfs(8)) . :

# mount_msdos /dev/ad0s1 /mnt

MS-DOS . , dmesg mount. .

: MS-DOS FreeBSD. , , FreeBSD. , MS-DOS /dev/ad0s1, FreeBSD /dev/ad0s2, MS-DOS /dev/ad0s3. .

NTFS , mount_ntfs(8).

2.11.4. Alpha

FreeBSD Alpha.

1. ARC Alpha BIOS?

. FreeBSD, Compaq Tru64 VMS, SRM.

2. , ! ?

, .

3. Compaq Tru64 VMS?

.

2.12.

Valentino Vaschetto.

FreeBSD.

2.12.1. FreeBSD

, , FreeBSD , VGA . , ? . , . , , . 2.2.7.

, :

1.

, FreeBSD . , FreeBSD . , kern.flp FreeBSD mount(8).

# mount /dev/fd0 /mnt

, , /mnt:

# cd /mnt

. boot.config, /boot/loader -h. , .

# echo "/boot/loader -h" > boot.config

, , umount(8):

# cd /

# umount /mnt

.

2. -

- . . , - , .

3.

. kern.flp , .

4.

cu(1):

# cu -l /dev/cuaa0

! cu. mfsroot.flp, . FreeBSD !

2.13.

: , FreeBSD FreeBSD CDROM DVD .

, / FreeBSD. , , , sysinstall , FTP, MS-DOS.

:

, , FreeBSD. FTP, FreeBSD, FTP .

FreeBSD, FreeBSD CD/DVD , MS-DOS/Windows . FreeBSD DOS FreeBSD .

, , CD/DVD , Laplink- , .

, FreeBSD.

2.13.1. CDROM

FreeBSD CDROM (ISO images). () CD CD-, FreeBSD. CD- , FreeBSD.

1. ISO

ISO ftp://ftp.FreeBSD.org/pub/FreeBSD/ISO-IMAGES-/ . (Alpha i386) .

:

2-5. FreeBSD ISO

-mini.iso

FreeBSD.

-disc1.iso

FreeBSD, , .

-disc2.iso

live filesystem, Repair sysinstall. CVS FreeBSD. , .

mini ISO, . , , mini ISO.

mini ISO . FreeBSD, / ( . 4) .

, .

, , .

2. CD

CD . FreeBSD, . 16.6 ( , . 16.6.3 . 16.6.4).

, CD-, . ISO, .

2.13.2. FTP FreeBSD

FreeBSD , FTP. FTP, FreeBSD.

1. , FreeBSD, FTP, CDROM /cdrom.

# mount /cdrom

2. anonymous FTP /etc/passwd. , /etc/passwd vipw(8) :

ftp:*:99:99::0:0:FTP:/cdrom:/nonexistent

3. FTP /etc/inetd.conf.

, , FTP ftp:// Other FTP .

: , . FTP ( ) , . , .

2.13.3.

( ) , , , .

, 1.44MB 1.2MB , , bin (binary distribution). DOS, MS-DOS FORMAT. Windows, Explorer ( A: Format).

. , . , , , .

FreeBSD, , DOS . disklabel newfs UFS, ( 3.5" 1.44MB ):

# fdformat -f 1440 fd0.1440

# disklabel -w -r fd0.1440 floppy3

# newfs -t 2 -u 18 -l 1 -i 65536 /dev/fd0

: fd0.1200 floppy5 5.25" 1.2MB .

.

. , 1.44MB . , , , . , a:\bin\bin.aa, a:\bin\bin.ab, .

Media, Floppy .

2.13.4. MS-DOS

MS-DOS, freebsd . , c:\freebsd. CDROM FTP , DOS xcopy CD. , FreeBSD:

C:\> md c:\freebsd

C:\> xcopy e:\bin c:\freebsd\bin\ /s

C:\> xcopy e:\manpages c:\freebsd\manpages\ /s

, C: , E: CDROM.

CDROM, ftp.FreeBSD.org (ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/i386/5.2.1-RELEASE/). , base 5.2.1/base/ (ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/i386/5.2.1-RELEASE/base/).

: 4.X FreeBSD base bin. , .

, MS-DOS ( ), c:\freebsd BIN.

2.13.5.

, FTP CDROM. , tar. , , tar:

# cd /freebsd/distdir

# tar cvf /dev/rwt0 dist1 ... dist2

, ( ), . - , .

: . .

2.13.6.

. (SLIP PPP), (PLIP (laplink )), Ethernet ( Ethernet ( PCMCIA)).

SLIP , , . , SLIP ; PPP, SLIP .

, PPP . , .

PAP CHAP ( , Windows ), dial ppp. , AT , , PPP . user-ppp FAQ (http://www.FreeBSD.org/doc/ru_RU.KOI8-R/books/faq/ppp.html) . , set log local ....

FreeBSD (2.0-R ), laplink . , ( 50/), .

, Ethernet ! FreeBSD PC Ethernet ; ( ) FreeBSD. PCMCIA Ethernet , , ! , FreeBSD PCMCIA .

IP , , . PPP IP, , IP . . , IP , , , ( PPP, IP ), . FTP HTTP , . , ISP , .

2.13.6.1. NFS

NFS . FreeBSD, NFS , NFS.

( Sun), NFS Secure Options , .

Ethernet , NFS Slow Options.

NFS , , , FreeBSD5.2.1 : ziggy:/usr/archive/stuff/FreeBSD, ziggy /usr/archive/stuff/FreeBSD, /usr /usr/archive/stuff.

FreeBSD /etc/exports, -alldirs. NFS . permission denied, , .

3. UNIX

Chris Shumway. : , , .

3.1.

c FreeBSD. UNIX- . , , . , .

, :

FreeBSD.

UNIX.

FreeBSD.

FreeBSD.

.

, .

( ) .

.

.

FreeBSD.

.

3.2.

FreeBSD . . , UNIX . , FreeBSD.

3.2.1.

FreeBSD , . :

Additional ABI support:.

Local package initialization:.

Additional TCP options:.

Fri Sep 20 13:01:06 EEST 2002

FreeBSD/i386 (pc3.example.org) (ttyv0)

login:

, . . :

FreeBSD/i386 (pc3.example.org) (ttyv0)

. FreeBSD, Intel x86 1. ( UNIX ) pc3.example.org, ttyv0.

, :

login:

, FreeBSD. , .

3.2.2. FreeBSD

FreeBSD , . , , .

. FreeBSD ( UNIX ), - . ( ) , (). , - , FreeBSD .

FreeBSD 2, :

login:

, john. john Enter. :

login: john

Password:

john Enter. ! . .

, FreeBSD .

(MOTD, message of the day) ( #, $, %). , FreeBSD.

3.2.3.

UNIX , FreeBSD , . .

FreeBSD . , . FreeBSD , .

3. Alt-F1, Alt-F2, Alt-F8 FreeBSD.

, FreeBSD . , FreeBSD. , , . , .

3.2.4. /etc/ttys

FreeBSD . , . /etc/ttys.

FreeBSD. (, #), . , FreeBSD, . , ttyv:

# name getty type status comments

#

ttyv0 "/usr/libexec/getty Pc" cons25 on secure

# Virtual terminals

ttyv1 "/usr/libexec/getty Pc" cons25 on secure

ttyv2 "/usr/libexec/getty Pc" cons25 on secure

ttyv3 "/usr/libexec/getty Pc" cons25 on secure

ttyv4 "/usr/libexec/getty Pc" cons25 on secure

ttyv5 "/usr/libexec/getty Pc" cons25 on secure

ttyv6 "/usr/libexec/getty Pc" cons25 on secure

ttyv7 "/usr/libexec/getty Pc" cons25 on secure

ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm off secure

, , ttys(5).

3.2.5.

. 12.6.2. , FreeBSD . . /etc/ttys. , console:

# name getty type status comments

#

# If console is marked "insecure", then init will ask for the root password

# when going to single-user mode.

console none unknown off secure

: console, secure insecure. , FreeBSD root.

insecure. root, . , , FreeBSD .

3.3.

FreeBSD BSD UNIX UNIX. , , , FreeBSD . , , . , , .

. : , . , // // . :

0

---

1

,

--x

2

,

-w-

3

,

-wx

4

,

r--

5

,

r-x

6

,

rw-

7

rwx

-l ls(1) , , . , ls -l :

% ls -l

total 530

-rw-r--r-- 1 root wheel 512 Sep 5 12:31 myfile

-rw-r--r-- 1 root wheel 512 Sep 5 12:31 otherfile

-rw-r--r-- 1 root wheel 7680 Sep 5 12:31 email.txt

...

ls -l:

-rw-r--r--

( ) , , , . -, . ( rw-) . , (r--). (r--) . - (.. , , ). , , . , 644, .

. FreeBSD , , . /dev.

. , . , . , , ( cd, change directory). , , (, ).

, . , - , , .

, , , setuid- sticky- . chmod(1).

3.3.1.

Tom Rhodes.

, , . () () (), :

()

u

(User)

()

g

(Group)

()

o

(Other)

()

a

(All, world)

()

+

()

-

()

=

()

r

(Read)

()

w

(Write)

()

x

(Execute)

()

t

Sticky

()

s

SUID SGID

chmod(1) , . , FILE:

% chmod go= FILE

, . , FILE, :

% chmod go-w,a+x FILE

3.4.

FreeBSD . , , , /. , . .

, . /usr, /var, /mnt /cdrom. /etc/fstab, . , /etc/fstab rc(8), noauto. fstab(5) /etc/fstab .

hier(7). .

/

.

/bin/

, , .

/boot/

, .

/boot/defaults/

, (. loader.conf(5)).

/dev/

(. intro(4)).

/etc/

.

/etc/defaults/

(. rc(8)).

/etc/mail/

(, sendmail(8)).

/etc/namedb/

named (. named(8)).

/etc/periodic/

, , (. cron(8) periodic(8)).

/etc/ppp/

ppp (. ppp(8)).

/mnt/

, .

/proc/

, (. see procfs(5), mount_procfs(8)).

/root/

root.

/sbin/

, , .

/stand/

, (, ).

/tmp/

( mfs(8); ).

/usr/

.

/usr/bin/

.

/usr/include/

C.

/usr/lib/

.

/usr/libdata/

.

/usr/libexec/

( ).

/usr/local/

, , .. . /usr/local hier(7) /usr. man, /usr/local, /usr/local/share, , share/doc/port.

/usr/obj/

- , /usr/src.

/usr/ports/

FreeBSD ().

/usr/sbin/

( ).

/usr/share/

- .

/usr/src/

BSD / .

/usr/X11R6/

, X11R6 (X Window System; ).

/var/

, , .

/var/log/

.

/var/mail/

.

/var/spool/

, , .

/var/tmp/

, .

/var/yp/

(maps) NIS.

3.5.

, FreeBSD , . , readme.txt README.TXT . FreeBSD (.txt) , .

. , . , . .

, /, . foo, bar, readme.txt, , foo/bar/readme.txt.

. , . .

, . : , MS-DOS \ , MacOS :.

FreeBSD , . c:/foo/bar/readme.txt FreeBSD.

, . /. . FreeBSD, .

, : A, B, C. , , A1, A2 ( B1, B2 C1, C2).

A . ls , , A1 A2. :

INCLUDEPICTURE "install/example-dir1.png"

. , B A1. B A1, B :

INCLUDEPICTURE "install/example-dir2.png"

, B1 B2 /A1/B1 /A1/B2. , /A1, . , B A.

B A2, :

INCLUDEPICTURE "install/example-dir3.png"

/A2/B1 /A2/B2 .

. , C B1 B :

INCLUDEPICTURE "install/example-dir4.png"

C A, A1 :

INCLUDEPICTURE "install/example-dir5.png"

MS-DOS, , , join.

, . FreeBSD, , , .

. .

. , , . , , /home, nosuid; suid/ guid , , .

FreeBSD , . , , , . .

FreeBSD . , . , - .

. FreeBSD , . , .

: FreeBSD4.4 , growfs(8), , .

. , , - UNIX FreeBSD. a h. , , , .

FreeBSD (swap space). FreeBSD . , , . FreeBSD , , , ( - ), .

.

a

,

b

,

c

, , (slice). , (, ), c. .

d

d , . , d, sysinstall d.

--- , FreeBSD (slice). FreeBSD, , , - UNIX FreeBSD. 1 4.

, s, 1. da0s1 SCSI . , . 5, ad0s5 IDE . , .

, (dangerously dedicated) , a h. , da0a a da, . ad1s3e IDE .

, . , , , . , 0. , , . 3-1.

, FreeBSD , , . , s, , . . 3-1.

. 3-2 , .

FreeBSD , , FreeBSD, ( ) .

3-1.

ad

ATAPI (IDE)

da

SCSI direct access

acd

ATAPI (IDE) CDROM

cd

SCSI CDROM

fd

Floppy disk

3-1. , ,

ad0s1a

(a) (s1) IDE (ad0).

da1s2e

(e) (s2) SCSI (da1).

3-2.

IDE FreeBSD. , 4GB, 2GB (MS-DOS ). MS-DOS , C:, FreeBSD. FreeBSD .

. a , e /var, f /usr.

INCLUDEPICTURE "install/disk-layout.png"

3.6.

, /. , /dev, /usr , , , , (/usr/local), ..

. , /var, log/, spool/, . /var , /.

, (, CDROM), (, (Network File System, NFS)). .

3.6.1. fstab

, /etc/fstab, (, , noauto).

/etc/fstab ( ):

/-

( ), . 16.2.

(), .

, mount(8). FreeBSD ufs.

, rw - ro , . noauto, . mount(8).

dump(8) , . .

, ( , ). , . ( ) 1. 2 . passno, fsck(8) (, , ).

3.6.2. mount

mount(8) , , .

( ):

# mount -

, mount(8) ( ):

-a

, /etc/fstab. noauto, -t .

-d

mount. -v , mount(8).

-f

(!), - .

-r

. , rdonly -o.

-t fstype

, , -a, .

, ufs.

-u

.

-v

.

-w

-.

-o , :

nodev

( ). .

noexec

( ).

nosuid

suid- sgid- ( ).

3.6.3. umount

umount(8) - , , -a -A.

, -f , -v . , , .

-a -A ( -t). , -A .

3.7.

FreeBSD . , . , , . , , . , .

, process ID, PID, , , . , , . . , , . . , init(8). init , PID 1. init FreeBSD.

, ps(1) top(1). ps PID, , .. top , .

, ps . :

% ps

PID TT STAT TIME COMMAND

298 p0 Ss 0:01.10 tcsh

7078 p0 S 2:40.88 xemacs mdoc.xsl (xemacs-21.1.14)

37393 p0 I 0:03.11 xemacs freebsd.dsl (xemacs-21.1.14)

48630 p0 S 2:50.89 /usr/local/lib/netscape-linux/navigator-linux-4.77.bi

48730 p0 IW 0:00.00 (dns helper) (navigator-linux-)

72210 p0 R+ 0:00.00 ps

390 p1 Is 0:01.14 tcsh

7059 p2 Is+ 1:36.18 /usr/local/bin/mutt -y

6688 p3 IWs 0:00.00 tcsh

10735 p4 IWs 0:00.00 tcsh

20256 p5 IWs 0:00.00 tcsh

262 v0 IWs 0:00.00 -tcsh (tcsh)

270 v0 IW+ 0:00.00 /bin/sh /usr/X11R6/bin/startx -- -bpp 16

280 v0 IW+ 0:00.00 xinit /home/nik/.xinitrc -- -bpp 16

284 v0 IW 0:00.00 /bin/sh /home/nik/.xinitrc

285 v0 S 0:38.45 /usr/X11R6/bin/sawfish

, ps(1) . PID . PID 1 99999 , . TT (tty), ( ). STAT . TIME , , , , . , COMMAND , .

ps(1) , . auxww. a , , . u , , . x - ww ps(1) , , , .

top(1) . :

% top

last pid: 72257; load averages: 0.13, 0.09, 0.03 up 0+13:38:33 22:39:10

47 processes: 1 running, 46 sleeping

CPU states: 12.6% user, 0.0% nice, 7.8% system, 0.0% interrupt, 79.7% idle

Mem: 36M Active, 5256K Inact, 13M Wired, 6312K Cache, 15M Buf, 408K Free

Swap: 256M Total, 38M Used, 217M Free, 15% Inuse

PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND

72257 nik 28 0 1960K 1044K RUN 0:00 14.86% 1.42% top

7078 nik 2 0 15280K 10960K select 2:54 0.88% 0.88% xemacs-21.1.14

281 nik 2 0 18636K 7112K select 5:36 0.73% 0.73% XF86_SVGA

296 nik 2 0 3240K 1644K select 0:12 0.05% 0.05% xterm

48630 nik 2 0 29816K 9148K select 3:18 0.00% 0.00% navigator-linu

175 root 2 0 924K 252K select 1:41 0.00% 0.00% syslogd

7059 nik 2 0 7260K 4644K poll 1:38 0.00% 0.00% mutt

...

. ( ) PID , ( ), . ( 47), , .

, ps(1) . , PID, , . top(1) . , , , , . , Netscape 30MB , 9MB.

top(1) ; s.

3.8. , ,

, , .. , , . , . , - , . , .

. ; , , , . - . , BSD .

, , , d. BIND Berkeley Internet Name Daemon ( named), Apache httpd, lpd . , ; , Sendmail sendmail, maild, .

. , .. ( ), . , , . , . - kill(1) kill(2), . root, .

FreeBSD . , , FreeBSD (SIGSEGV). alarm(3), , Alarm (SIGALRM) ..

, SIGTERM SIGKILL. SIGTERM ; , , , , , , . SIGTERM, , .

SIGKILL . . SIGKILL, FreeBSD 4.

, , SIGHUP, SIGUSR1, SIGUSR2. , - .

, . httpd, , . , SIGHUP . httpd SIGHUP. , ; .

kill(1), .

inetd(8). inetd /etc/inetd.conf, inetd , SIGHUP.

1. PID , . ps(1) grep(1). grep(1) . , inetd(8) root, ps(1) ax.

% ps -ax | grep inetd

198 ?? IWs 0:00.00 inetd -wW

, PID inetd(8) 198. grep inetd. - , ps(1) .

2. kill(1) . inetd(8) root, su(1) root.

% su

Password:

# /bin/kill -s HUP 198

UNIX, kill(1) , . , , kill: PID: Operation not permitted. PID , , , , PID, kill: PID: No such process.

/bin/kill?: kill ; , /bin/kill . , -. , /bin/kill ... .

, TERM KILL .

: . , init(8), PID 1, . /bin/kill -s KILL 1 . kill(1) , Enter.

3.9.

FreeBSD, ( , shell). . , , , , . FreeBSD , , sh, Bourne Shell, tcsh, C-shell. FreeBSD, zsh bash.

? . C, , , tcsh. Linux, UNIX, bash. , , , , .

. , (TAB), . , , foobar foo.bar. , foo.bar. , rm fo[Tab].[Tab].

: rm foo[BEEP].bar.

[BEEP] , , , . , foobar foo.bar fo, TAB foo. (.) TAB, .

. =, . , , . :

USER

.

PATH

, , .

DISPLAY

X11, .

SHELL

.

TERM

() . , .

TERMCAP

escape- .

OSTYPE

() . , FreeBSD.

MACHTYPE

().

EDITOR

.

PAGER

.

MANPATH

, , .

. , C-, tcsh csh, setenv. Bourne, sh bash, export. , EDITOR /usr/local/bin/emacs csh tcsh, :

% setenv EDITOR /usr/local/bin/emacs

Bourne:

% export EDITOR="/usr/local/bin/emacs"

, , , $ . , echo $TERM $TERM.

, , . *, . , , echo * , ls, echo, , *.

, , . , (\). , echo $TERM , echo \$TERM $TERM, $TERM.

3.9.1.

, , chsh. EDITOR , , vi. Shell: .

-s chsh. , bash, :

% chsh -s /usr/local/bin/bash

chsh .

: , , /etc/shells. , , . , .

, bash /usr/local/bin, :

# echo "/usr/local/bin/bash" >> /etc/shells

chsh.

3.10.

FreeBSD . , - . FreeBSD , .

, -, ee, easy editor, .. . - , ee filename, filename . , /etc/rc.conf, ee /etc/rc.conf. . (^) Ctrl, , ^e Ctrl+e. , Esc, Enter. - , , .

FreeBSD vi, emacs vim (editors/emacs editors/vim). , ! , .

3.11.

, , , , . FreeBSD . /var/run/dmesg.boot.

, acd0 IDE CDROM, kbd0 .

UNIX , /dev.

3.11.1.

, , .

3.11.1.1. MAKEDEV

DEVFS ( FreeBSD 5.0), MAKEDEV(8), :

# cd /dev

# sh MAKEDEV ad1

IDE .

3.11.1.2. DEVFS (DEVice File System)

Device filesystem, DEVFS, . , DEVFS .

devfs(5) .

FreeBSD5.0 DEVFS .

3.12.

FreeBSD elf(5), UNIX:

a.out(5)

UNIX. , ( a.out(5) ). : .text, .data .bss .

COFF

SVR3. , .text, .data .bss.

elf(5)

COFF, 32- 64- . : ELF ABI . , SYSV ( ABI: SVR4, Solaris, SCO).

FreeBSD , ELF ABI . brandelf(1) .

FreeBSD a.out(5), BSD, 3.X. ELF ( ) FreeBSD , FreeBSD ELF . ? Linux ELF, a.out, - , , . ELF , , . FreeBSD SunOS Sun, .

, ?

, , . , . a.out (PDP-11). , UNIX , a.out , UNIX Motorola 68k, VAXen, etc.

- , CPU . ( RISC), a.out , , a.out. COFF, ECOFF , ELF.

, , ( ) , . VM . a.out, . , . . a.out . , a.out . ELF , . ELF a.out ELF.

, , FreeBSD ( ) . FreeBSD . GNU, , , . FreeBSD, , FreeBSD as ld . GNU (binutils) , ELF, , C++, .. , ELF FreeBSD.

ELF a.out . ELF , , . ELF a.out, . , , , , .. , . a.out GENERIC, a.out .

3.13.

3.13.1. (man)

, FreeBSD (man). ( ), , . man:

% man command

command , . , ls, :

% man ls

:

1. .

2. .

3. .

4. .

5. .

6. .

7. .

8. .

9. .

( ), , , . , cdmod chmod(). , man , :

% man 1 chmod

chmod. , , , chmod(1) chmod, chmod(2) .

, , , . , , -k man:

% man -k mail

, mail . apropos.

, /usr/bin, , ? :

% cd /usr/bin

% man -f *

% cd /usr/bin

% whatis *

.

3.13.2. GNU Info

FreeBSD , Free Software Foundation (FSF). , info , info, , emacs, info .

info(1), :

% info

h. ?.

1. i386. , FreeBSD Intel 386, i386. , .

2. , FreeBSD. , , .

3. FreeBSD syscons(4), atkbd(4), vidcontrol(1) kbdcontrol(1). , .

4. , . , , - ( , ), . , . , .

4. :

: .

4.1.

FreeBSD . - . FreeBSD : FreeBSD . .

:

.

.

.

, .

.

4.2.

UNIX- , , :

1. , .

2. ( tar-, compress(1), gzip(1) bzip2(1)).

3. (, INSTALL, README doc/) .

4. , . Makefile, configure .

5. .

. , FreeBSD, , .

, FreeBSD . FreeBSD , : . 10,500 .

FreeBSD , . , . FreeBSD, , pkg_add(1) pkg_delete(1), pkg_info(1) . .

FreeBSD , .

, , (, , , , ). , , , , . , , , , .

, , pkg_add , .

, . , , . , FreeBSD . pkg_add , , , .

, , , FreeBSD . , , .

tar- , tar-, .

. , Mozilla, KDE GNOME, , , .

FreeBSD.

, . , ( ) , Pentium IV Athlon.

, , . , Apache . , .

. , Ghostscript ghostscript ghostscript-nox11, , X11 . , , .

. .

. () .

, , .

, , (, ) .

, , FreeBSD (http://lists.FreeBSD.org/mailman/listinfo/freebsd-ports) , FreeBSD (http://lists.FreeBSD.org/mailman/listinfo/freebsd-ports-bugs).

: http://vuxml.freebsd.org/, .

security/portaudit, , - . portaudit -F -a .

, FreeBSD.

4.3.

, - , , .

FreeBSD . , , :

FreeBSD FreeBSD, , http://www.FreeBSD.org/ports/ (../../../../ports/index.html). , ( ), , .

Dan Langille FreshPorts http://www.FreshPorts.org/. , , , .

, FreshMeat (http://www.freshmeat.net/) , FreeBSD, , .

, , , whereis(1). whereis file, file - , . , , :

# whereis lsof

lsof: /usr/ports/sysutils/lsof

, lsof ( ) /usr/ports/sysutils/lsof.

. , /usr/ports. , make search name=program-name, program-name , . , lsof:

# cd /usr/ports

# make search name=lsof

Port: lsof-4.56.4

Path: /usr/ports/sysutils/lsof

Info: Lists information about open files (similar to fstat(1))

Maint: [email protected]

Index: sysutils

B-deps:

R-deps:

Path:, , . , .

make search key=string, string , . , , , , , , .

. LSOF , lsof.

4.4.

Chern Lee.

4.4.1.

FreeBSD pkg_add(1).

4-1.

# ftp -a ftp2.FreeBSD.org

Connected to ftp2.FreeBSD.org.

220 ftp2.FreeBSD.org FTP server (Version 6.00LS) ready.

331 Guest login ok, send your email address as password.

230-

230- This machine is in Vienna, VA, USA, hosted by Verio.

230- Questions? E-mail [email protected].

230-

230-

230 Guest login ok, access restrictions apply.

Remote system type is UNIX.

Using binary mode to transfer files.

ftp> cd /pub/FreeBSD/ports/packages/sysutils/

250 CWD command successful.

ftp> get lsof-4.56.4.tgz

local: lsof-4.56.4.tgz remote: lsof-4.56.4.tgz

200 PORT command successful.

150 Opening BINARY mode data connection for 'lsof-4.56.4.tgz' (92375 bytes).

100% |**************************************************| 92375 00:00 ETA

226 Transfer complete.

92375 bytes received in 5.60 seconds (16.11 KB/s)

ftp> exit

# pkg_add lsof-4.56.4.tgz

(, CD-ROM FreeBSD), , , -r pkg_add(1). , , FTP.

# pkg_add -r lsof

. FreeBSD, PACKAGESITE. pkg_add(1) fetch(3), , FTP_PASSIVE_MODE, FTP_PROXY FTP_PASSWORD. FTP/HTTP , . fetch(3) . , lsof-4.56.4 lsof. . pkg_add(1) .

.tgz .tbz. ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/packages FreeBSD CD-ROM. CD FreeBSD 4 ( PowerPak ) /packages. , /usr/ports. , All.

; /.

4.4.2.

pkg_info(1) .

# pkg_info

cvsup-16.1 A general network file distribution system optimized for CV

docbook-1.2 Meta-port for the different versions of the DocBook DTD

...

pkg_version(1) . , .

# pkg_version

cvsup =

docbook =

...

, .

=

, .

p class="" , , ./p

p class="">

, . ( , .)

?

. ( , , .)

*

.

4.4.3.

pkg_delete(1).

# pkg_delete xchat-1.7.1

4.4.4.

/var/db/pkg. .

4.5.

.

4.5.1.

, , Makefile, , , /usr/ports.

FreeBSD sysinstall , . , :

Sysinstall

sysinstall .

1. root, /stand/sysinstall , :

# /stand/sysinstall

2. Configure, Enter

3. Distributions, Enter

4. ports,

5. Exit, Enter

6. , , CDROM, FTP .

7. Exit Enter.

8. X sysinstall.

CVSup. CVSup , /usr/share/examples/cvsup/ports-supfile. CVSup (. A.5) CVSup .

CVSup

CVSup. , CVSup, .

1. net/cvsup. CVSup (. A.5.2) .

2. root, /usr/share/examples/cvsup/ports-supfile , , /root .

3. ports-supfile.

4. CHANGE_THIS.FreeBSD.org CVSup. CVSup (. A.5.7) .

5. cvsup

# cvsup -g -L 2 /root/ports-supfile

6. ( ) .

4.5.2.

, , . , FreeBSD, . :

Makefile. Makefile , , .

distinfo. , , , md5(1) , .

files. , FreeBSD. - , , , , - . 10 26 .... diff- , diff(1).

, .

pkg-descr. , .

pkg-plist. , . .

, , pkg-message. . , FreeBSD (http://www.FreeBSD.org/doc/ru_RU.KOI8-R/books/porters-handbook/index.html).

, , . CD-ROM . , . tar-, gzip, - . , , (distfile). FreeBSD .

: root.

: http://vuxml.freebsd.org/, , .

portaudit . (security/portaudit). portaudit -F . . portaudit(1) periodic(8).

4.5.2.1. CD-ROM

CD-ROM FreeBSD . , . CD-ROM, , FreeBSD PowerPak, , , FreeBSD Mall (http://www.freebsdmall.com/). , CD-ROM FreeBSD.

CD-ROM FreeBSD . /cdrom. ( , .) , , :

# cd /usr/ports/sysutils/lsof

lsof, . , (build) . make . , , :

# make

>> lsof_4.57D.freebsd.tar.gz doesn't seem to exist in /usr/ports/distfiles/.

>> Attempting to fetch from file:/cdrom/ports/distfiles/.

===> Extracting for lsof-4.57

...

[ ]

...

>> Checksum OK for lsof_4.57D.freebsd.tar.gz.

===> Patching for lsof-4.57

===> Applying FreeBSD patches for lsof-4.57

===> Configuring for lsof-4.57

...

[ ]

...

===> Building for lsof-4.57

...

[ ]

...

#

, , , . . , make, install:

# make install

===> Installing for lsof-4.57

...

[ ]

...

===> Generating temporary packing list

===> Compressing manual pages for lsof-4.57

===> Registering installation for lsof-4.57

===> SECURITY NOTE:

This port has installed the following binaries which execute with

increased privileges.

#

, , . lsof , , . .

: , make install make make install .

: , , PATH. , rehash . , (, tcsh), , (, shells/zsh).

: , , CD-ROM. - , - . , CD-ROM, , ( ).

4.5.2.2.

, , . , CD-ROM /usr/ports/distfiles .

, CD-ROM. , , CD-ROM.

:

# make install

>> lsof_4.57D.freebsd.tar.gz doesn't seem to exist in /usr/ports/distfiles/.

>> Attempting to fetch from ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/.

Receiving lsof_4.57D.freebsd.tar.gz (439860 bytes): 100%

439860 bytes transferred in 18.0 seconds (23.90 kBps)

===> Extracting for lsof-4.57

...

[ ]

...

>> Checksum OK for lsof_4.57D.freebsd.tar.gz.

===> Patching for lsof-4.57

===> Applying FreeBSD patches for lsof-4.57

===> Configuring for lsof-4.57

...

[ ]

...

===> Building for lsof-4.57

...

[ ]

...

===> Installing for lsof-4.57

...

[ ]

...

===> Generating temporary packing list

===> Compressing manual pages for lsof-4.57

===> Registering installation for lsof-4.57

===> SECURITY NOTE:

This port has installed the following binaries which execute with

increased privileges.

#

, , , .

fetch(1), , FTP_PASSIVE_MODE, FTP_PROXY FTP_PASSWORD. FTP/HTTP , . fetch(3) .

, , make fetch. (/usr/ports), . , : /usr/ports/net. , , . fetch fetch-recursive, .

: , make , make fetch. , . .

tar- , MASTER_SITES ( , ). MASTER_SITES :

# cd /usr/ports/directory

# make MASTER_SITE_OVERRIDE= \

ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch

MASTER_SITES ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/.

: ( ) , , , , . , , www/mozilla, security/gpgme mail/sylpheed-claws. .

4.5.2.3.

( ) . , , PORTSDIR PREFIX. :

# make PORTSDIR=/usr/home/example/ports install

/usr/home/example/ports, /usr/local.

# make PREFIX=/usr/home/example/local install

/usr/ports, /usr/home/example/local.

, ,

# make PORTSDIR=../ports PREFIX=../local install

( , ).

. , .

4.5.2.4. imake

, imake ( X Window System) PREFIX, /usr/X11R6. Perl- PREFIX Perl. PREFIX .

4.5.3.

, , , , , , , , , . ( lsof, ). , , /usr/ports/sysutils/lsof. xchat. make deinstall:

# cd /usr/ports/sysutils/lsof

# make deinstall

===> Deinstalling for lsof-4.57

. lsof . , , make reinstall /usr/ports/sysutils/lsof.

make deinstall make reinstall , make clean. , pkg_delete(1), .

4.5.4.

. make clean. work, . tar- distfiles, , .

, refuse . CVSup . , refuse, . A.5.3.1.

4.5.5.

: , , , /usr/ports/UPDATING. , .

. , , , , , , . , () ! , ? , , . , sysutils/portupgrade ! , , make install clean.

pkgdb -F. /var/db/pkg. portupgrade -a, INDEX. , portupgrade , , , , . portupgrade , .

, , portupgrade pkgname, -r, portupgrade , , -R , . , , -P, -F. portupgrade(1).

: pkgdb -F , portupgrade . portupgrade , .

, , ports/sysutils , .

4.6.

- , , , , ( ), .

, , , . , , ?, :

pkg_info(1) , . , FooPackage 1.0.0,

# pkg_info -L foopackage-1.0.0 | less

, . man/, , etc/, , doc/, .

, ,

# pkg_info | grep -i foopackage

, foopackage foopackage , .

, , man(1). , .

-, , . , -,

# pkg_info foopackage-1.0.0

WWW:, , URL Web- .

, (, Internet), , /usr/local/etc/rc.d. , . .

4.7.

, , , , :

1. ! (http://www.FreeBSD.org/doc/ru_RU.KOI8-R/books/porters-handbook/index.html) , !

2. ! , . make maintainer Makefile, . ( $FreeBSD: Makefile) , . , send-pr(1) .

3. FTP-. ftp.FreeBSD.org (ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/packages/), ! , , , , , , . pkg_add(1) .

5. X Window System

X.Org's X11 Ken Tom, Marc Fonvieille. : .

5.1.

FreeBSD X11 , . X11 X Window System, Xorg XFree86. FreeBSD FreeBSD4.10-RELEASE FreeBSD5.2.1-RELEASE X11 XFree86, The XFree86 Project, Inc. FreeBSD5.3-RELEASE, X11 Xorg, X.Org Foundation.

X11 FreeBSD, Xorg.

, X11, Xorg (http://www.x.org/) XFree86 (http://www.XFree86.org/).

:

X11.

X Window System .

.

TrueType X11.

(XDM).

:

, (. 4).

: X11 Xorg XFree86. , . , , Xorg XFree86.

5.2. X

X - , , , MicrosoftWindows MacOS.

X , X.

5.2.1. X?

X UNIX, . X . W ( Window). X .

X X, X Window System, X11 . X Windows X11 ; X(7).

5.2.2. / X

X , , -.

X X- , . , . X- (, XTerm Netscape) . , , , , OK.

, X . X- , X () , , , . X- .

, X , . , X- , , X- , .

, X- , X- , .

, , . X- MicrosoftWindows MacOS Apple, , .

FreeBSD5.3-RELEASE, X-, FreeBSD, Xorg, , FreeBSD. X- FreeBSD.

5.2.3.

X UNIX, , . , X , . , , .

X , , , , ( Alt+Tab, MicrosoftWindows), , , .

X , Window Manager ( ). X: AfterStep, Blackbox, ctwm, Enlightenment, fvwm, Sawfish, twm, WindowMaker . ; ; , ; Start ; , , . , , x11-wm .

, KDE GNOME , .

; ; ; (Sawfish) , Lisp.

: , , . , , .

click-to-focus. MicrosoftWindows, .

X . , . . , .

:

focus-follows-mouse ( )

, . , . , .

sloppy-focus ( )

focus-follows-mouse ( ), , . , .

. . , .

, . .

5.2.4.

X, , , , .

(widget) , - ; , (radio buttons) (check boxes) , , . MicrosoftWindows (controls).

MicrosoftWindows MacOS Apple . , . X, , - .

X- . , Athena MIT, Motif ( MicrosoftWindows, ), OpenLook .

X , Qt, KDE, GTK+, GNOME. UNIX, .

5.3. X11

FreeBSD Xorg XFree86. FreeBSD5.3-RELEASE, Xorg FreeBSD X11 . Xorg X11 X11R6.7, X.Org Foundation. X11R6.7 XFree864.4RC2 X11R6.6. X.Org Foundation X11R6.7 2004 .

Xorg , :

# cd /usr/ports/x11/xorg

# make install clean

: Xorg 4GB .

XFree86 :

# cd /usr/ports/x11/XFree86-4

# make install clean

, X11 . , pkg_add(1), X11. pkg_add(1) , . pkg_add(1) .

, Xorg, :

# pkg_add -r xorg

XFree864.X :

# pkg-add -r XFree86

: X11, , , . X11.

, X11 .

5.3.1. XFree86 Xorg

, /usr/ports/UPDATING . XFree86 Xorg .

CVSup . X11 sysutils/portupgrade.

/etc/make.conf X_WINDOW_SYSTEM=xorg. , , X11 . XFREE86_VERSION , X_WINDOW_SYSTEM.

:

# pkg_delete -f /var/db/pkg/imake-4* /var/db/pkg/XFree86-*

# cd /usr/ports/x11/xorg

# make install clean

# pkgdb -F

pkgdb(1) portupgrade, .

: Xorg 4GB .

5.4. X11

Christopher Shumway.

5.4.1. ,

X11 :

,

X11 . , . , .

, X11 . , , .

, . , .

5.4.2. X11

X11 . . , :

# Xorg -configure

XFree86 :

# XFree86 -configure

/root X11 xorg.conf.new (, su(1) $HOME). XFree86, XF86Config.new. X11 , .

, Xorg . :

# Xorg -config xorg.conf.new

XFree86 :

# XFree86 -xf86config XF86Config.new

- X, . Ctrl+Alt+Backspace.

: , . . 2.9.10 FreeBSD.

xorg.conf.new ( XF86Config.new, XFree86). , , emacs(1) ee(1). . . XF86Config.new "Monitor":

Section "Monitor"

Identifier "Monitor0"

VendorName "Monitor Vendor"

ModelName "Monitor Model"

HorizSync 30-107

VertRefresh 48-120

EndSection

HorizSync VertRefresh . , , HorizSync VertRefresh. .

X DPMS (Energy Star) . xset(1) , . DPMS , , :

Option "DPMS"

xorg.conf.new ( XF86Config.new) , , . "Screen":

Section "Screen"

Identifier "Screen0"

Device "Card0"

Monitor "Monitor0"

DefaultDepth 24

SubSection "Display"

Viewport 0 0

Depth 24

Modes "1024x768"

EndSubSection

EndSection

DefaultDepth , . -depth Xorg(1) ( XFree86(1)). Modes , . , VESA, . . 1024 768 .

, , .

: X11, , X11. Xorg /var/log/Xorg.0.log ( XFree86 XFree86.0.log). Xorg.0.log Xorg.8.log .

, , Xorg(1) ( XFree86(1)). /etc/X11/xorg.conf /usr/X11R6/etc/X11/xorg.conf ( XFree86 /etc/X11/XF86Config /usr/X11R6/etc/X11/XF86Config).

# cp xorg.conf.new /etc/X11/xorg.conf

XFree86:

# cp XF86Config.new /etc/X11/XF86Config

X11 . XFree864.X startx(1) x11/wrapper. Xorg wrapper, . X11 xdm(1).

: , xorgcfg(1) (xf86cfg(1) XFree86), X11. . xf86cfg -textmode. xorgcfg(1) xf86cfg(1).

, xorgconfig(1) (xf86config(1) XFree86), , , , .

5.4.3.

5.4.3.1. Intel i810

Intel i810 agpgart, AGP, X11 . agp(4) GENERIC 4.8-RELEASE 5.0-RELEASE. :

device agp

. agp.ko loader(8). /boot/loader.conf:

agp_load="YES"

, FreeBSD4.X , . AGP MAKEDEV(8) /dev:

# cd /dev

# sh MAKEDEV agpgart

: FreeBSD5.X devfs(5) , MAKEDEV(8) .

, . , , agp(4) , kldload(8) . , , /boot/loader.conf.

XFree864.1.0 ( ), fbPictureInit, Driver "i810" X11:

Option "NoDDC"

5.5. X11

Murray Stokely.

5.5.1. Type1

, X11, . , Netscape . Type1 (PostScript), X11. , URW (x11-fonts/urwfonts) type1 (Times Roman, He