Академический Документы
Профессиональный Документы
Культура Документы
Колесниченко Д.Н. Linux-сервер своими руками (2002) PDF
Колесниченко Д.Н. Linux-сервер своими руками (2002) PDF
Linux-
-
2002
;
/.
, ,
(, MRTG
),
. , Unix-
Linux RSP 2000
.
, ,
.
1. LINUX
1.1.
1.2. Linux
1.3. Linux?
1.4. Linux-
1.5.
1.6.
1.6.1.
1.6.2.
1.6.3.
1.7. ? ( )
1.7.1. : /
1.7.2.
1.7.3. TCP/IP
1.7.4. DNS
1.7.5. TCP/IP
1.7.6.
1.7.7. IP TCP
1.8.
1.9. Linux
1.10.
;
8
8
8
7/
12
15
18
18
20
21
22
22
25
32
35
3S
40
41
42
43
46
2.
2.1. Red Hat Linux
,
2.2. Linux Mandrake
2.3. Linux Intel 810
2.4.
2.4.1. Windows 9x Linux
2.4.2. Windows 9x, Windows NT/2000 Linux
2.4.3. /oadlin
2.5.
2.6.
2.6./. :
2.6.2.
2.6.3. gnorpm, kpackage, apt
2.6.4. ,
2.7.
48
48
59
64
65
65
66
67
69
69
70
71
74
78
78
3.
3.1.
3.1.1.
3.2.
3.3.
3.4.
3.5.
3.6.
3.6.1.
3.6.2.
3.6.3. linuxconf
3.7.
80
80
81
8/
81
83
84
86
89
97
97
92
4. Linux
4.7. .
4.2.
4.2.7.
4.2.2.
4.3.
4.4. Linux
94
94
96
96
,
98
99
707
4.5.
4.6.
4.7.
4.8.
4.9.
4.10.
4.11.
4.12.
4.13.
4.14.
4.15.
4.16.
4.17.
4.18.
4.19.
4.20.
.
fdisk
Disk Drake
. /etc/fstab
()
LILO
4.15.1. SCSI
4.15.2. FDC
4.15.3.
cpio
RAID
Linux
5.
5.1. fork() ()
5.1.1.
5.2. /
5.3.
5.4.
5.5. . init
5.6.
5.7. ()
5.8.
5.8.1. Syslogd
5.8.2. ,
5.5.3.
5.8.4.
5.5.5. klogd
5.8.6.
102
102
107
109
109
113
115
119
124
725
125
126
126
126
128
129
131
132
135
137
137
139
740
744
746
749
753
753
754
755
755
757
758
758
'.
6. Linux
6.1.
6.2. X Windows
6.3.
159
759
759
760
7.
7.1.
.
7.2.
7.3.
'.
7.3.7.
7.3.2. - -
7.4. DSL-
7.4.1. DSL Linux Mandrake
7.4.2. DSL
7.5.
7.6.
161
767
764
765
768
777
772
773
774
/77
787
8.
8.1. inetd xinetd
8.7.7. inetd
8.1.2. tcpd
8.7.3. IPv6
8.7.4. xinetd
8.7.5. xinetd
8.7.6. xinetd
8./.7. /etc/xinetd
8.2. : ssh.n telnet
8.3.
8.4. DHCP (Dynamic Host Configuration Protocol)
8.5. . MRTG
8.6. (NFS)
S.6./. NFS
8.6.2. NFS
184
784
784
786
787
787
/89
79/
792
/95
202
203
208
2/7
277
2/8
8.7.
8.8.
8.9.
ht:/Dig
- Socks5
8.8.;.
8.8.2. SocksS
8.8.3. SocksS (licq)
8.9.?. LIDS?
8.9.2. LIDS
8.9.3.
8.9.4.
8.9.5. LIDS
219
220
220
223
223
225
225
226
228
23/
234
236
236
238
247
243
244
246
247
10. DNS
10.1. DNS
70.2. DNS
70.3. DNS
70.4. DNS
70.5. nslookup
251
252
257
259
259
260
11. FTP
7 7 . 7 . FTP wu-ftpd
11.1.1. ftpaccess
77.7.2.
77.7.3. ftpusers
77.7.4. ftpgroups
77.7.5. ftpconversions
77.7.6. xferlog
77.2. ProFTP
77.2.7. /etc/proftpd.conf
77.2.2.
77.2.3. .ftpaccess
77.3. FTP-
77.4.
77.5. FTP
263
264
265
269
269
270
270
270
277
272
274
275
275
276
277
ftphosts
12. Apache
72.7. Apache
72.2.
72.2.7. httpd.conf
72.2.2. Apache netconf
72.3.
72.4. HTTP-
72.4.7.
72.4.2. IP-
72.5. SSL Apache
72.5. /. SSL
12.5.2. SSL Apache
72.5.3.
72.6. httpd.conf
72.7.
279
279
287
2S7
290
297
297
292
293
294
294
295
296
297
377
13.
73.7. sendmail
73.2. sendmail
73.3.
73.4.
73.5.
375
376
322
325
327
330
14.
74.7. IPChains
74.2. IPChains
333
333
334
14.3.
14.3.1. SYN
14.3.2.
74.3.3.
14.3.4. /-
14.3.5.
14.4.
14.5. IPTables
337
337
337
33S
338
339
339
345
15. - SQUID
15.1. SQUID?
15.2. SQUID
75.3. SQUID
75.4. SQUID
75.5. squid,conf
75.5.1.
15.5.2.
75.5.3.
75.5.4.
75.5.5.
75.5.6. ACL
75.5.7.
15.5.8.
75.6. .
75.7.
75.8.
75.9.
347
347
347
348
349
350
350
350
357
357
357
352
353
353
354
354
355
356
16. MySQL
76.1.
16.2.
76.3. Apache + PHP + MySQL
76.3.7. : RPM
76.3.2. :
35S
358
367
362
362
365
17. .
77.7.
17.1.1.
77.7.2.
77.7.3. IpChains
77.7.4. DNS
17.1.5. Squid
77.2. Dial-In
77.2.7.
77.2.2. mgetty
77.2.3.
77.2.4. IP Forwarding
77.2.5.
77.2.6. -
77.2.7. Windows-
77.2.8.
77.3.
77.3.7. callback?
77.3.2. . 1
77.3.3. . 2
77.3.4. . 1
77.3.5. . 2
367
367
367
368
368
369
377
372
372
373
375
376
376
377
377
378
378
378
379
387
383
385
18.
78.7.
78.7.7.
78.7.2. RAMDISK
78.7.3.
78.7.4.
78.2.
8.2.7. Processor type and features
78.2.2. Loadable module support
78.2.3. General setup
78.2.4. PnP support
386
386
387
387
388
388
389
390
393
393
395
395
396
397
397
397
397
397
397
19. . RPM-
19.1.
19.2.
/9.3.
19.4.
19.5. RPM-
/9.6. vi
/9.7. bash
19.7.1.
19.7.2. /
/9.7.3.
/9.7.4.
/9.7.5.
19.7.6.
/9.7.7.
/9.7.8.
/9.7.9.
399
399
407
412
419
428
432
434
435
436
436
438
44/
44/
447
447
449
20. . X Window
20.1.
20.2. XF86Config
20.3. X Window
20.4. Windows
20.5.
20.6. GNOME
20.7. X-
450
45/
455
459
46/
462
469
474
21. Linux
21.1.
2/.2.
2/.3. nVidia
2/.4. Windows- wine
2/.5. wine
2/.6.
2/.7.
2/. 7. /.
21.7.2.
2/.7.3.
4SO
480
482
483
487
4S8
492
494
494
496
50/
22.
22.1.
22.1.1. DrWeb Linux
22.1.2. AVP Linux
22.2.
23.
23./. SATAN
23.2.
23.3.
502
502
503
505
5/0
;
5)5
5/5
5/9
52/
24.
523
525
Linux
7.7.
, UNIX Linux-,
-. ,
. , ' , 100% . ,
Linux Linux-. : ,
. ,
, . 17
, . ,
,
, , , -
Linux.
,
.
Linux-, .
, DNS,
HTTP, FTP, IpChains, SQUID. ,
, .
1.2. Linux
Linux , ,
Unix. 60- Multics,
General Electrics, AT&T Bell
Laboratories .
. Multics
, ,
.
8
Linux
1969 Unix,
,
Multics. ,
Multics, -.
.
Unix ,
.
.
Unix .
, .
Unix , , IBM Novell.
1972
. Unix
.
Unix. , . 1975
Unix -- Berkeley Software Distribution (BSD).
,
AT&T.
, , Unix. , 1980 Microsoft Xenix. ,
Unix, , .
1982 AT&T Unix System 3.
Unix.
Unix System V. , .
BSD Unix 1983
Unix BSD 4.2. ,
, , TCP/IP,
. -
Unix BSD 4.2.
Unix . 80-
Unix System V BSD Unix.
AT&T Labs Unix System V
Unix System Labs. 1991 System V 4,
System V 3, BSD 4.2, Xenix.
Linux
, IBM Hewlett-Packard,
(Open Software Foundation, OSF). Unix.
OSF Unix.
1993 AT&T Unix
Novell. Unix Novell,
System V 4.
UnixWare.
. 90- : Motiff OpenLook.
, Common Desktop
Environment (CDE).
Unix . .
. , SunOS
Sun, AIX IBM, a AUX
Macintosh.
Linux Minix,
. Minix UNIX-, , Unix. Minix,
Linux. Linux USENET comp.os.minix.
5- 1991 Linux 0.02.
bash (Bourne Again Shell) gcc (GNU compiler).
.
, .
. Linux . Linux UNIX,
, TCP/IP, , ,
.
Linux Intel. Co Linux , , Sun Microsystems.
, , Linux.
, Linux, ,
, ,
Linux?. Linux.
10
Linux
,
Linux , -, Linux.
1.3. Linux?
.
Windows NT Server Microsoft. Novell Netware
. UNIX -. ,
. UNIX ( TCP/IP)
, Intel.
Linux.
Linux, .
-,
, .
, Microsoft.
- Windows? , , .
,
.
? Windows?
, ,
?
-, Linux . , Linux, . -
Linux,
. ,
Linux
SMP . , Linux
UNIX- ,
, .
,
.
, , -. , ASP Linux, , , .
. Linux11
Linux
Microsoft.
Microsoft. ,
Windows NT(2000) Server,
SMB- Linux. ,
9 .
-, Linux .
Windows NT(2000) Server,
, .
.
, .
, , .
, ,
, .
-, Linux . , - Intel 80486DX 32 . ,
. ,
Red Hat Linux 5.2. ,
,
. ,
, Intel 80486.
Linux, , GPL.
GPL , , GPL,
.
1.4. Linux-
Linux .
Linux . , Linux. , , Microsoft
Linux,
$400 Windows 98 $60.
Linux
, Linux-. Microsoft Windows NT
Server ( Windows 2000 Server), ,
. Windows NT(2000)
12
Linux
Server , , Microsoft .
, Linux -, . 80- ,
DOS: , , ,
Norton Commander. 90-
( 1993 ) : Microsoft
Windows Windows 3.1. Windows
3.1? -, , -,
, , , .
( ) Windows 3.1
.
Windows Windows for Workgroups.
1995 Windows 95, Microsoft . , .
Windows 3.1 32- . Microsoft Windows NT 4 Server.
( ) TCP/IP, , ,
, .
2000
Microsoft Windows 2000 Server.
Windows 2000 Windows NT 4 Server,
Active Directory, TCP/IP, (
).
, , , 2000 Microsoft , Unix
80- . .
( 1979 ), Unix :
1. 32-.
2. .
3. , .
, 1993
, Unix 1979 . , TCP/IP
, . ,
TCP/IP
, .
: Unix , .
13
Linux
, Windows , . Active Directory Network Information Service. ,
, , , ...
, Unix DOS . X Window
Linux-, . KDE Gnome,
Linux . -- .
, Novell
, . Linux
Unix, .
, Linux
. , , Linux Windows NT (2000) Server, , .
.
Unix- . ,
, .
, , ,
Microsoft, , ,
,
? Microsoft .
Linux-? , -. , Linux (Unix)? , , Windows NT (2000)? . 60-
Arpanet, . NT- -, 1996 ? -
70- . Unix-.
-
? ,
BMW Hond'bi? :
Linux (Unix) .
- ,
,
.
,
. :
14
Linux
. , , ,
Red Hat Linux.
, , , Linux (SuSE
Linux), Dresdner Bank
CollabNet , Linux. , ,
Linux,
. ,
, ? .
Linux- .
, . , ,
. , , , PVM (Parallel Virtual Machine).
, .
, , Linux-: Web-, -, , , -, NT
Samba. .
1.5.
,
, .
, , ,
. ,
,
. .
Linux Linux Mandrake Linux Red
Hat.
Linux.
Linux.
, Linux.
.
SCSI RAID.
, , ,
Linux-.
15
Linux
Linux.
, ,
?
. , .
, TCP/IP, . ADSL, .
. inetd xinetd.
, , a xinetd
Linux-. ssh, DHCP,
NFS, , , ht:/Dig
. : SocksS, LIDS.
MRTG, .
Samba,
Windows-.
Linux- Windows, ,
Windows- Linux-.
DNS. -
. , DNS, ,
. DNS, ,
DNS-.
FTP . wu-ftpd ProFTPD, a
FTP-.
Web- Apache, , . : , , ,
SSL, .
POP SMTP,
SMTP-. : SMTP
, a POP . ,
.
16
Linux
, The
Bat!, Netscape Messenger, Outlook Express.
, .
, , .
- SQUID, , .
Web
?
.
,
MySQL. , MySQL.
Apache+PHP+MySQL.
.
,
. .
, ( ),
. ,
. 17, . -
, ,
. . .
Linux .
.
.
Linux.
, , ,
.
, X Window, GNOME.
.
, ,
Microsoft. ,
Linux, .
-
17
Linux
( , , , ..), (Louncher'a). ,
. Windows- Linux
Windows-. , , Quake 2 3, Counter
Strike, Unreal Tournament, Diablo 2 .
. Linux : DrWeb AVP.
.
,
, ,
: SATAN,
, .
, .
Linux ( ) ,
X Window ( ).
Linux, .
. (URL-),
, Linux.
- .
1.6.
:
1. .
2. .
3. .
.
1.6.1.
(. 1.1) ,
(Intranet). He . Intranet , ,
.
. , ,
. , ,
18
Linux
. . , ,
.
,
, ,
, . , , , .
, ,
.
. 1.1 (hub)
.
- - .
( -
) (switch).
, , . 1.1.
, .
IP-
. IP- IP-
, , .
,
. , ,
.
.
, ,
. , , , .
.
, , .
. 7.6 .
.
.
.
LUCENT CAJUN P115G. 24 10/100 ,
19
Linux
1 100FX.
230 .
48
10/100 Mbit LUCENT-CAJUN P334T.
8 , , . 334 -- $900.
100FX
$150...250 .
1.6.2.
, ,
(. . 1.2).
. ,
. ,
Web, FTP, SMTP/POP-.
(hub)
.
, , Intel.
.
,
. 1.2. ()
.
. 1.1? ,
. (: )
.
,
. ZyXEL U336S.
- , .
300...480 /. ZyXEL,
- , (
) . , . ZyXEL.
300...480 /
. DSL-,
1 /. , Radio Ethernet.
20
Linux
1.6.3.
,
,
, .
. ,
.
(. . 1.3).
.
. , .
,
, . (
) ,
- .
, , , , Radio Ethernet.
,
. ,
.
,
.
:
,
(
. 1.3.
)? ,
( ), . , , , .
. 1.3 (dial-up)
.
,
ZyXEL. Robotics , ZyXEL
. - ,
. 21
Linux
,
. , ,
. - - ,
. , -
, . .
.
, . ,
, , , .
,
. , .
: , .
^ , , .
1.7. ?
( )
,
, .
,
- .
, ( !), TCP/IP.
(). ,
, , .
, , . . .
1.7.1. : /
. : (peer-to-peer) / (client/
server), .,
. , (,
) , , . .
22
Linux
, (
(), ).
( ), . ,
(Linux, FreeBSD, Windows NT, Windows 98) (Windows 95, Windows for Workgroups).
. .
Windows 9x, ,
(. . 1.4).
,
, , . WG1,
WG2 (. . 1.5).
, ( ),
, .
Windows 9x ( - -
), , , WG1.
,
, - .
, , , ,
. .
/
. . ,
: .
VPHI^SHP!
1DENIS .1.
,
. ,
,
':'
'
}>'.-1<-:>(.(.
WG1
. 1.4.
Windows 9x
WQ2
. 1.5.
23
Linux
. , , ,
. /
( ).
/
(login
) (password).
: , - ,
(, ,
).
(user authentication).
, ,
, .
, .
, . /
.
, /
. (workstations).
, , .
( ):
, , (-), , Web- ..
. 1.1 , , ,
.
1.1
17
(dialup)
dhcp
8, 13
9
Squid
15
route(d)
sendmail
( postfix/qmail) imap
8, 14
(/),
13
8, 14
()
Microsoft
24
Linux, IPChains
Linux
. 1.1
(
)
12
modSSL
()
IP-
bind
10
6,9
Web-
apache
12
IPChains (IPTables
Linux)
IP-
IPChains
14
//
16
14
, , , .
, , , , Web. , ,
,
,
. (
, ) , , ,
486DX/
66 32 . , -,
,
.
Linux ,
, ,
Linux- ,
. , , .
.
, , . ,
,
64 ( 128 ), ,
,
. .
1.7,2.
, , TCP/IP,
. --
,
25
Linux
( )
. , .
. , . 1.6.
() .
. 1.6 , ,
(, 1 2), , ,
(, 1 1), .
:
, . , .
, , ,
.
TCP/IP.
TCP/IP (Transmission Control Protocol/Internet Protocol /-)
. .
RIP (Routing Information Protocol).
RIP
. OSPF (Open Shortest
Path First), , RIP.
ICMP (Internet Control Message Protocol)
. , ( ,
).
FTP (File Transfer Protocol) .
. ,
, , .
( FTP-)
1-1
1
; 1-2
A3
2-2
2
2-
. 1.6.
26
Linux
. FTP-. FTP- . FTP- ftp.
HTTP (Hyper Text Transfer Protocol) , HTML. HTTP Web. HTTP- .
POP (Post Office Protocol) -- .
.
SMTP (Simple Mail Transfer
Protocol) .
, ,
. POP-,
, , , . , , .
.
, . ,
.
The Bat!, Outlook, Outlook Express, Netscape Messenger, KMail.
SMTP- . ,
,
. SMTP . 13.2 .
SMTP . POP-, .
, .
SMTP (,
POP- ,
POP), .
. '
POP , , .
. .
SLIP (Serial Line Internet Protocol)
. . .
(Point-to-Point Protocol) ,
, SLIP. .
RFC 1547 RFC 1661.
27
Linux
TCP/IP,
.
, . , ,
, . ()
, .
80-
(ISO International Organization for Standardization)
(OSI -- Open System Interconnection).
:
- - OSI
OSI.
(. . 1.7) OSI
:
1. .
2. .
3. .
4. .
5. .
6. .
7. .
.
,
,
. 1.7. OSI
. .
- : .
, .
.
6 , .
28
Linux
. 1.7 ,
OSI ,
.
. , ( 1) -
2.
.
. . 1.7. , ( ), , ,
. , , , , .
( 1) , . , 1 .
.
-. , ..
.
-, .
,
,
.
. .
(Physical Layer)
, , .
, , : , .
:
, , .
.
100Base-TX ( Ethernet).
(Data link Layer)
. , .
(-), -.
-,
-.
29
Linux
, .
(frames).
. :
, .
,
. ,
. , .
.
.
,
. (. . 1.8) :
.
.
.
. 1.8.
, ,
. ( ) ,
, .
( -). - , LAP-B.
(Network Layer)
,
. ,
.
. - -
.
,
.
.
- .
30
Linux
(, 10Base-T 1024 ), .
, .
,
.
.
. - , , . (
, hop ). .
.
. , ,
.
(routing protocols) RIP OSPF.
, ,
Address Resolution Protocol (ARP).
.
: IP ( TCP/IP),
IPX ( Novell).
(Transport Layer)
. ,
, . ( ) .
:
1. .
2. .
3. .
4. .
5. .
OSI, ,
.
: TCP UDP ( TCP/IP),
SPX ( Novell).
31
Linux
(Session Layer)
, ,
. (),
( ) .
- - .
:
1. . .
2. .
3. .
.
,
, .
(Presentation Layer)
,
. ,
.
.
: SSL (Secure Socket Layer).
.
(Application Layer)
,
. .
: HTTP, FTP, TFTP, SMTP, POP, SMB, NFS.
OS/
OSI ,
. , ,
, , ,
. -, , . .
7.7.3. TCP/IP
,
TCP/IP-. , .
, . IP- IP- , .
32
Linux
IP- (TCP/IP-) , IP-. IP- 32- ,
, , :
1. 111.111.213.232
2. 127.0.0.1
3. 192.168.9.2
, , TCP/IP
, . IP-
IP-
(NIC, Network Information Center).
,
(LAN, Local Area Networks) (Wide Area Networks)
. (Arpanet),
, . (
) ,
IP- NIC.
IP-, .
, LAN WAN,
.
IP. ,
( ). , , .
, .
.
Ethernet, Token Ring, FDDI, ATM.
,
.
.
IP Sub-networking-HOWTO,
-.
,
. , ()
. IP-, ,
192.168.1.0...192.168.1.255.
. (192.168.1.0) ,
(broadcast) .
, (), ,
.
,
. ,
2 . 851
33
Linux
. ,
(), , ,
. (
), .
( ) , ,
.
,
IPv4-Forwarding. Linux, FreeBSD,
UNIX-, Windows NT/2000.
Windows 98, ,
.
UNIX-, Linux.
, () .
, , ARP-.
. ,
, .
- :
255.255.255.0
256 (0...255);
255.255.255.192
64 (192...255);
255.255.0.0
65536 (256*256).
IP- : , , , D .
. : 255.0.0.0.
16777216 .
1.0.0.0...126.0.0.0, ()
125.*.*.*
. 255.255.0.0.
65536 . 128.0.0.0...191.255.0.0.
136.12.*.*
. 256 (
254 , 0 255 ). 255.255.255.0. : 192.0.1.0...223.255.255.0. : 195.136.12.*
. . , 128.11.1.0
:
10000000 00001011 00000001 00000000
192.168.1.0:
11000000 10101000 00000001 00000000
10,
, , .
34
Linux
1110,
D, (multicast).
D,
, .
. . 1.2
, , , D .
10
110
1110
11110
1.2
1.0.0.0. ..126.0.0.0
128.0.0.0.. .191.255.0.0
192.0.1.0.. .223.255.255.0
224.0.0.0.. .239.255. 255.255
240.0.0.0.. .247.255.255.255
16777216(224)
65536 (216)
256 (28)
Multicast
,
. IP- (0.0.0.0),
, , .
255.255.255.255 .
, ,
. . , .
(255). , 192.168.2.255. ,
192.168.2.0.
IP- 127.0.0.1 . .
, , . .
loopback. IP- IP-,
127. 127.0.0.0
, : 127.0.0.1, 127.0.0.5, 127.77.0.6.
,
, IP,
. :
10.0.0.0 ( , 255.0.0.0).
172.16.0.0...172.31.0.0 (16 , 255.255.0.0).
192.168.0.0...192.168.255.0 (256 , 255.255.255.0).
,
IP-.
1.7.4. DNS
- ,
, Web-, IP-. ,
,
35
Linux
. , http://www.romb.net
http://62.244.59.193.
, . ,
romb, a www net
. , , , .
IP-
DNS (Domain Name System).
DNS, . , IP- , . ,
, , .
, Web- :
http://www.department.firma.isp.ru. , , .
() IP- DNS, . DNS ( user-dns), IP- .
DNS , DNS-
, ,
(. . 1.9).
ru
^--'"'
^~^~^
(
com
^^^
ru-dns). ru-dns
II
,
\_ googie
/*"\ isp
romb
isp ( ). II
\
isp ,
(IV
) firma,
department
,
department,
. 1.9.
IP- www.department.firma.isp.ru. , . , - ,
, , DNS user-dns, IP-.
DNS . , , , n- .
ru, isp , firma ,
department (. . 1.9).
InterNIC. () (. . 1.3).
36
9"
Q
Linux
ISO 3166
I4J
by
Iv
md
tr
iq
il
pl
es
fr
id
Q'
at
hu
1.3
It
kz
ir
tm
it
Qb
de
vn
va
CO
mx
,
us. ISO 3166. ftp:/ftp.ripe.net/
iso3166-countrycodes.
:
com
(, yahoo.com).
edu
(, mit.edu).
gov
(, nasa.gov).
org
(, linux.org).
net
(, ukr.net).
ISC (Internet Software Consortium)
2002 150
(. . 1.10). ISC.
II
. 1.10,
37
Linux
1.7.5. TCP/IP
: ,
TCP/IP,
, .
TCP/IP .
TCP/IP.
TCP/IP 60- 70- DARPA
(U.S. Department of Defense Advanced Research
Projects Agency). . 1.4.
TCP/IP
1.4
1970
1972
1973
1974
1981
IP (RFC 791)
1982
TCP IP TCP/IP
1983
1984
DNS
, -
RFC. RFC (Request for Comments) --
. .
RFC (Internet Society,
ISOC). ISOC
RFC. RFC :
(Required)
(Recommended)
(Elective)
(Limited use)
(Not recommended)
TCP/IP.
RFC .
.
.
.
RFC -.
TCP/IP , : , ,
(. . 1.11).
1
( , Application Layer)
() (Transport Layer)
. 1.11. TCP/IP
38
Linux
.
TCP UDP
TCP/IP.
, .
.
(frame) ,
Ethernet.
/~"
"V
(frame),
(packet), (datagram),
. 1.12.
(segment). TCP/IP
.
(. . 1.12).
() . - :
IP (Internet Protocol).... .
ARP (Address Resolution Protocol) ... -
( ) .
ICMP (Internet Control Message Protocol) ... .
IGMP (Internet Group Management Protocol)... , , .
RIP (Route Internet Protocol) OSPF (Open Shortest Path First) ...
.
.
( OSPF).
, .
39
Linux
()
TCP/IP.
: DNS, Telnet,
WWW, Gopher, WAIS, SNMP, FTP, TFTP, SMTP, POP, IMAP.
TCP/IP OSI (. . 1.5).
TCP/IP OSI
OSI
7,6
5,4
'
2, 1
1.5
TCP/IP
1
2
TCP/IP . IP
TCP,
.
1.7.6.
, ,
, .
(. 1.5) ,
.
, .
, IP-
IP- , . IP-
, , .
,
. ,
IP- , , ,
.
40
Linux
.
, .
, TCP/IP, . , 80 WWW- (
Apache), a 53 .
demon ( daemon)
, - . , : , .
- -
DOS. , . ,
. , , .
, .
1.7.7. IP TCP
IP
TCP. IP , . ,
. 1.6, IP-
.
IP-
1.6
Source IP-address
(IP- )
Destination IP-address
(IP- )
Protocol ()
Checksum ( )
TTL (Time to Live,
)
Version
Header Length ( )
Type of Service
( )
Total Length ( )
Identification ()
Fragmentation Flags
( )
Fragmentation Offset
( )
Options and Padding
( )
TCP UDP
, .
. TTL
IP 4 6. IP
. 8 (4 )
20 (4 )
IP-.
, , . (8 )
IP- (16 )
. ( ),
(16 )
3 2
IP-. , 0x0 (13 )
41
Linux
TCP, IP, . TCP . 1.7.
TCP-
1.7
Source port ( )
TCP -
Destination Port ( )
TCP -
Sequence Number ( )
Acknowledgement Number ( )
Data Length ( )
TCP-
Reserved ()
Flags ()
Window ()
Checksum ( )
TCP
Urgent Pointer ( )
( Flags)
1.8.
()! . , .
, ,
. .
, pupkin 123! (
,
).
RAID-, , , . RAID
. ,
, ,
, SCSI-.
- (133)
SCSI, - , SCSI.
, ,
.
. . 7.
. 8 . ,
-- ,
42
Linux
-- xinetd inetd.
, .
.
, , , DHCP.
: - , ,
.
, .
, . .
1.9. Linux
Linux, -
-, , www.linuxcenter.ru. :
1. Red Hat Linux.
2. Linux Mandrake.
3. ALT Junior Linux.
4. ASP Linux.
5. Black Cat Linux.
6. Slackware.
7. Astaro Security Linux.
8. SuSE Linux.
S
Red Hat Linux Linux
Mandrake, .
Mandrake Red Hat, ,
. - ,
, SuSE Slackware,
, . , , ,
Red Hat, ,
- 100%-
Red Hat. , , ALT
Junior , .
, Red Hat Linux. ,
.
( ) Linux. He , ,
Red Hat.
43
Linux
, .
Red Hat - . ,
,
, . ,
Linux, , Red Hat. , , .
:
, .
, , ?
7.2(7.3)
8...
, . ,
,
. ext2 ext3.
.
Gnome 1.4 Nautilus,
, .
.
: .
, .
. , .
, USB Firewire.
: firewall , .
Linux Mandrake. Linux Mandrake
Intel Pentium, AMD Athlon
PowerPC. Linux
. Mandrake
,
,
, .
, , Red Hat.
,
( win-). .
44
Linux
1.
2.
3.
4.
5.
6.
, Linux Mandrake
, . , ,
.
:
, , , , -.
9.0 :
.
64 (!) .
.
( 1 ) .
1 ,
, .
, ReiserFS, XFS JFS.
: Firewire, USB, USB2, 1830 DRM,
133, .
(Control Center).
2.4.19.
:1. KDE 3.0.3 Office.
2. GNOME 2.0.1 Evolution 1.0.8 , WindowMaker 0.8, IceWM 1.2,
Enlightenment 0.16.5, BlackBox 0.62
3. StarOffice 6.0 KOffice 1.2.
MS Office.
4. Mozilla 1.1, Konqueror 3.02 Galeon 1.2.5.
5. GIMP 1.2.3.
6. GCC 3.2, Glibc 2.2.5.
7. Apache 1.3.26.
8. PHP 4.2.3.
9. MySQL 3.23.52 PostgreSQL 7.2.2
10. Sendmail Postfix.
ALT Junior Linux
.
, .
,
.
ALT Junior 1.0 2.4.5,
, - Matrox
G-, ATI Rage & ATI Radeon, Intel 810/815, 3DFX Voodoo 3/4/5.
nVidia.
ASPLimix 7.2 ,
, . 45
Linux
. , , :
1. ( ) ,
.
2. RAID.
3. RAID.
ASPLinux 7.2, ,
i386: 180386DX Pentium IV.
- nVidia ( Riva TNT2),
www.nvidia.com
.
, ,
pptpd, VPN
Windows, portslave,
pppd
RADIUS (callback).
:
- (Documentation CD).
Astaro Security Linux.
. ,
-- ,
:
,
https . SCSI (, SCSI- ) ISA, .
1.10.
,
, .
.
.
. ( )
. , - ,
.
46
Linux
(^ ,
. ,
Ethernet ( ), , , . .
(router) .
.
.
(routing) --
.
(bridge) .
, .
Ethernet, , .
.
,
- .
,
.
, .
(soket) (file handle).
. , ,
: IP- , (TCP UDP) ,
.
, .
(Gateway) . , , , ,
LAN WAN. ,
, , , , ,
.
47
48
, Linux
Microsoft, . Pentium
133 32 Linux
Internet-, -.
Windows 2000 Server, , , Celeron 300 256 . Red Hat 6
. 2.1, . 2.2
.
Red Hat 6
2.1
486DX
8
150
X Window ( Linux)
8...16 200...300
. , , X Window
, , , X Window . 20 .
2.2
Pentium 133
32
600
, , -. - Web- (
). , -,
. 15,
. , , .
- - , -, . ,
, , ,
( ) .
. ,
- , ,
- 33 /.
, ,
, , .
49
- , - .
. ,
, -
,
. 300 ,
, -, 10 . - . 15.
Linux-
. Linux , Linux.
: , ().
.
. .
* ,
.
.
Linux . 4.
, , .
. , Linux
ext2 (ext3), VFAT, ISO9660, UFS, XFS .
(swapping )
,
. ? . , :
,
( ). , -
, , . .
, 8 ,
16 .
6...7 ,
.
, . , (
), .
Linux Windows, . ,
50
,
.
Linux:
fdisk Linux.
fdisk . 4.7 .
.
, , Partition Magic.
: . :
Red Hat (Disk Druid)
. Linux,
- , . ,
, Windows-, Linux,
fips. dosutils Red Hat.
Windows,
, .
MS DOS Windows (win368 . swp).
Windows (format a: /s),
fips ( !),
fips.
, , ,
.
FAT FAT32,
Disk Druid Linux-.
Linux
Linux:
-.
(boot floppy).
.
.
.
BIOS CD-ROM,
. ,
, :
* dosutils images ( :).
rawrite MS DOS (
MS DOS, rawrite
1.
2.
3.
4.
51
- Windows. Windows
rawritewin):
: \dosutils\rawrite
Enter d i s k image source f i l e name:
:
:\images\xxxx.img
boot. img
bootnet. img
:
;
.
:
Enter destination drive:
:
Red Hat
. ,
CD-ROM .
FTP NFS.
, Red Hat
() (. . 2.1).
, - ,
, .
: CD-ROM
. Please enter.th?
the. nans' or
the director
-' Red; "Lit*.
Red Hat. FTP
,
,
Red H a t (
/pub/Red Hat).
. . 2.1. Red Hat FTP
.
: .
:. (Server) (Workstation)
,
(. . 2.2).
Server
Workstation.
(
52
. 2.2.
(Workstation)
Linux,
64 , 16
/boot - -
,
.
600 ..
(Seryer)
, 64 , 256
, 512 /usr, 512
/home 256 /var.
1.6 .
Linux, . ,
Linux.
.
( ) . , ,
, ,
.
: ,
,
/ . ,
, , .
, ( ),
. ,
Linux root, .
. ,
: (/dev/hdal
/dev/hda2). ,
(, X Window ).
root, ,
. :
linux root=/dev/hdal
53
( )
(/dev/hdal) , /dev/hda2.
:
/ -
_/bin
_/dev
_/etc
_/home
_/mnt
_/var
_/root
/sbin
/tmp
.
. 4 (. 4.5), Linux.
, Red Hat
Disk Druid, . fdisk Disk Druid. . Disk Druid
( ).
Red Hit Linn ( 11 Red Hat Sofbiare
Windows-
- 64
Linux swap
hda6
3020
Linux native
.: IK
Linux. ,
hdbl
1222
Linux native
2048 , Linux 600 . ,
Ma
t 78M28/S)
600 I 621/ 64/!
1222M
64
.
536 ( Linux Native),
Fl-
F2-AJtllrS
2*. v i.W
. 2.. Disk Druid
64 ( Linux
54
Swap). /,
.
Windows- (, /mnt/disk_c)
Edit. ,
(. . 2.3).
2.3
,
8.. .16
64
32
32
64... 128
128
,
.
. 2.3.
.
,
(
Linux Swap), , .
, Windows-.
Add ()
, (. . 2.3).
Windows. ,
, ,
.
, . /mnt. , Windows- win
/mnt, Is /Hint/win.
/home /var
, - -
. /home
. (
) . ,
, , - :
,
.
(. . 2.4).
, . : .
55
Linux,
,
. , .
.
. 2.4.
.
, .
.
(
), . .
ISA NE2000, a PCI - NEY2KPCI (NE2000 PCI).
IRQ,
DMA, /. PCI !
.
, .
, . ? , , ,
, , .
, ,
Windows-. .
. ,
.
.
(. . 2.5). /dev/lpO Linux LPT1 DOS, /dev/lpl LPT2
56
.. ,
What device is your printer connected to
.
{note that /dev/lpO is equiv- alent to LPTl:)?
SMB. ' . : ' Printer Bevies:
,
(tuto-detected ports:
IP-/deu/lpO: Detected
(
/dev/lpl: Not Detected
/dev/lp2: Not Detected
Windows
,
1
), ,
,
:
:
I
,
. 2.5.
,
( , ).
(Fix stair-stepping of text).
,
:
:
^^^p55!!5_
li
, LF, Linux
, ( CR).
-,
, LF CR.
.
root. root () . root Linux Adminisrtator
Windows NT (2000/XP). , , .
6 .
.
- 123456, qwerty, password
.
.
(. . 2.6).
MD5 (Use Shadow Password Enable MD5 Password
). authconfig.
,
.
, ..
Windows,
(MBR)
Linux .
. 2.6.
LILO
' '
.
COS 16-bit >=32
Linux native
(label).
LILO
, . LILO
:
2.7. LILO
:
: :
LILO boot:
, (David
Wexelblat) MIT X Window
i80386-Pentium IV .
XFree86, ,
, 86 (
Linux, FreeBSD ). XFree86 XFree86 Project,
Inc. X Window . 20 .
, .
. .
, Custom . , .
.
, , , .
, ,
Standard VGA 640x480 .
, Linux Red Hat 6 AGP.
, Red Hat
7.x (8.x) XFree86
. , AGP
, PCI.
! .
Linux Mandrake
,
,
2.4
Pentium
Pentium 166
32
64
650
2048
VESA 2.0
VESA 2.0
59
.
, ' - -
, Red Hat.
Linux Mandrake
(. . 2.8) Red Hat. .
( Mandrake 9)
.
, . ,
: ,
. ,
.
, ,
(. . 2.5).
,
?
Mandrake 9
:
.
2.5
+
. Mandrake 7.2
Linux
.
(. . 2.6).
2.6
(Workstation)
(Server)
(Development)
60
--
SCSI. SCSI-, Yes
.
.
SCSI (Small Computer System Interface)
. ,
. SCSI , (),
, , , , SCSI.
,
Miscellaneous.
, ,
(. . 2.9).
:
, ( ),
, supermount
(
. 2.9. Miscellaneous
CDROM, Floppy), .
/tmp , numlock.
Linux Linux Mandrake DiskDrake. DiskDrake Partition
Magic (. . 2.10) , Red Hat
Disk Druid, .
Linux- Windows-
( ) Resize. , , 2 (2048 ) .
2 Mandrake
,
.
Create.
Linux native
(. . 2.7).
Linux h t n drake"
61
256 (
) ,
, ,
.
(Linux swap).
(Done)
.
, Linux Mandrake ( )
-. ( . 2.10. DiskDrake
)
, , Extension CD, Applications CD, 2nd Applications CD,
(. . 2.11). ,
(. 2.12). ,
, , .
( ), (Individual package selection).
,
2.7
64
,
1 28
64 128
128
64
256
32
32
. 2.11. -
. 2.12.
62
.
,
(. . 2.13).
( .),
.
,
() ().
, .
,
, , .
( , )
, .
.
. . . IP-,
, , DNS- . . , ...
Red Hat Linux.
( root) .
,
. root'oM
.
.
. LILO,
LILO Red Hat Linux.
.
. ,
High Frequency SVGA 1024x768 at 70 Hz. ,
Extended SVGA 800x600 at 60 Hz. ! . .
.
Linux.
, Linux ,
,
.
, !
63
Modes " 6 4 0 x 4 8 0 " " 8 0 0 x 6 0 0 " " 1 0 2 4 x 7 6 8 " "1152x864"
"1280x1024" " 1 6 0 0 x 1 2 0 0 "
Viewport 0
EndSubsection
Subsection "Display"
Depth 24
Modes " 6 4 0 x 4 8 0 " "800x600" " 1 0 2 4 x 7 6 8 " "1152x864" "1280x1024"
Viewport
EndSubsection
EndSection
X.
Ctrl+Alt+Backspace. X ,
startx .
.
X Window : X,
X ( ), X.
2.4.
, , .. . , Linux Windows
. Linux
FAT/FAT32 Lin4Win, , ..
Linux .
Partition Magic v5 (
6, 7). Linux Mandrake 7.0 , Partition Magic
. fdisk
Linux, Linux.
:
1. Windows 9x Linux.
2. Windows NT, Windows 9x Linux.
2.4.1. Windows 9x Linux
,
Windows 9x, Linux. ,
Windows 9x MBR
(Master Boot Record) , Linux ,
. :
LINUX! Windows, Linux .
3 . 851
65
, Windows Linux :
1. Linux. , .
root
. ( reboot).
2. : loadlin
.
3. loadlin: Linux,
Windows, . Linux
.
(Windows
9 + Linux) LILO (Linux Loader). - , . Linux , LILO MBR.
Linux ( ,
Linux) MBR, LILO,
fdisk /mbr. fdisk
Windows.
2.4.2. Windows 9x, Windows NT/2000 Linux
NT Loader.
Windows 2000 NTFS, a Windows 9x FAT/FAT32.
! , Windows 95,
, Windows 2000. Windows 98 Windows
2000 .
Linux Windows 2000.
, Linux 1024 !
1024 - - Linux
, 1024,
. Linux ,
, Linux
1024 Linux .
:
Linux. LILO MBR Linux
. Windows
2000 Recover Command
mode. Administrator. fixboot fixmbr Windows 2000 .
'
.
fixboot fixmbr Windows 2000
(MBR). fixmbr
fdisk /mbr Windows .
66
Linux
root. / e t c / l i l o . c o n f , , j o e / e t c / l i l o . c o n f .
, , /dev/hda. , Linux, ,
/dev/hdbl.
,
.
Windows 2000 . Linux
/linux.Idr:
dd if=/dev/hdcl bs=512 count=l of=/bootsect.Inx
:
mcopy /bootsect.Inx a:
Linux reboot Windows 2000. linux.ldr :
read-only. boot.ini
:\linux.ldr="Linux"
, Linux
NT Loader.
loadlin Hflporoot=KopHeBan_OC
loadlin @__
loadlin
2.8
, .
, ,
( ). -
Linux.
lilo ( lilo)
root= _
, root=/dev/hda3
, .
vga=normal
@__
, loadlin ( !)
, ,
:
c:\loadlin\loadlin.exe c:\loadlin\kernel\vmlinuz root=/dev/hda3
vga=normal
:\loadlin\loadlin.exe @param.1st
Param.1st:
c:\loadlin\kernel\vmlinuz root=/dev/hda3 ro vga=normal
.
Linux DOS.
config.sys (. 2.2).
2.2. config.sys
[MENU]
MENUITEM=DOS, Load DOS
MENUITEM=LINUX, Load Linux
MENUDEFAULT=DOS,5
[LINUX]
install=c:\loadlin\loadlin.exe c:\loadlin\kernel\vmlinuz root=/
dev/hda3 ro vga=normal
[DOS]
; , DOS,
; .. ,
; config.sys
68
2.5.
, , .
linuxconf. . 2.9 . 2.10
- Linux Mandrake Linux Red Hat.
- Linux Mandrake
2,9
(1)
Drakxconf
Drakboot
LILO
Drakgw
Draknet
Drakfloppy
Diskdrake
Adduserdrake
Keyboarddrake
Mousedrake
Printerdrake
Netconf
Modemconf
XFdrake
Xdrakres
Xconfigurator
X Window
Draksec
Drakxservices
2.10
control-panel
Modemtool
Printertool
Netconf
Xconfigurator
X Window
Authconfig
Setup
-, , linuxconf
setup drakexconf.
2.6.
Linux , .
:
69
- .
.
Windows : setup.exe, ( ),
.
, Microsoft:
, .
Linux : , RPM, , . .
2.6.1. :
,
, .
,
RPM (apt-get).
, . ,
, : , tar.gz
tar.bzl. , :
tar, gzip.
: , . , prg-2.00.tar.gz
. :
gunzip prg-2.00.tar.gz
tar xvf prg-2.00.tar
prg-2.00.tar,
.
tar , (
). v ,
. f . tar , f, ,
.
gz, a bz bz2,
():
bunzip prg-2.00.tar.bz
bunzip2 p r g - 2 . 0 0 . t a r . b z 2
, , tar (
).
tgz.
:
tar
70
xzf
prg-2.00.tgz
z
gzunzip. ,
tar gzip.
.
() , . <_->:
cd prg-2.00
README
:
. /configure
make
make install
. ,
. ,
, .
,
. ./configure. ./configure
Makefile,
( , ) make.
(make) .
, .
make install --
. /usr/bin, Makefile.
, .
2.6.2. RPM
Red Hat
Mandrake rpm. RPM (Red Hat Package
Manager) Red Hat. ,
Red Hat,
, .
,
,
.
,
/ .
71
InstallShield,
Windows, RPM (
.) , .
( ), ,
:
, , ,
, ,
, , .
RPM Linux (Red Hat,
Mandrake, ASP, Black Cat.) , .
, , , . . ,
. Linux
.
, sof tware-1. 0-1.1386. rpm :
software
1.
1
1386
,
,
Intel 386.
. , ,
, .
, , , .
. , . , ,
.
, , . . , Intel 386.
Intel, 80386DX (
). 80486, ,
80586 (Pentium), , . CISC ( 86)
:
1386
Intel 80368DX;
i586
Intel Pentium (MMX), AMD K5 ();
1686
Intel PPro, Celeron, , PHI, PIV.
:
rpm -1 <>.rpm
RPM , ,
.
72
(
), ,
, RPM . ,
-
.
, . ,
, ,
: .
: h v.
, .
#. , :
rpm -ihv software-1.0-1.1386.rpm
,
FTP:
rpm -i f t p : / / s o m e h o s t . d o m a i n / p u b / p a c k a g e . r p m
:
rpm - <>
,
,
.
,
, . .
- , .
nodeps. . ,
postfix, sendmail. .
(Mail Transfer Agent) - -
(postfix sendmail). -
postfix . sendmail postfix ,
. :
rpm -e nodeps p o s t f i x
,
, ,
sendmail ( ).
: -i.
-U.
, , , ,
, .
73
, h.
:
rpm -Uhv <>
,
rpm -Uhv s o f t w a r e - 1 . 1 - 4 . 1 3 8 6 . r p m
#.
:
rpm -qa | less
, :
rpm -qa I grep _
:
rpm -qi
, :
rpm -ql
2.6.3. gnorpm, kpackage, apt
RPM
, , , .
,
. ( X Window)
-- , kpackage KDE, gnorpm
. gnorpm, . RPM
, . - gnorpm (. . 2.14).
gnorpm:
1. .
2. .
3. .
4. .
5. RPM.
- ^Communications
! Databases
E h 3 Development
- 3 Editors
"^Emulators
3 File tools
3 Graphical desWop
^Graphics
. 2,14. gnorpm
74
- .
CD-ROM CD,
(. . 2.15).
(^Communications
{^Databases
(^Development
03File tools
gjGames
Arcade
Boards
. 2.15.
,
,
, .
(. . 2.16).
chromium
'
:
;
:
';--':.'
"
"'-".".'
::.:
.
chrorriiurrh0.9,64mdk;: V 1 :. , : .
1959129
:
::
rebuild, man drake soft com
;
3
LinuifrMandrake
"; '
' :
....
03 06,25:35 GMT 2000
MandrakeSotl
Team;.;:..::i:S:
. Un-j^Mantffske
1
http:^4'sv^rgi3fc!&f3{)our-,et3rf>f'36ftvvars;'cl'i! :^-i^ff^
URL.
: You are captain of the cargo ship Chromium .8.., responsible for deliver ng
|| supplies to our troops on the front line. Your s hip has a small fleet of
i 1 robotic fighters which you control from the rel rtive safety of the Chromium
l| vessel.
...
DJcJsjPath
'
"
,__i
,..,..,
-.
,::
......,
.'
iS;
/
i
.;.....::
^H ! - ' 1 1 ""':': 1 i:
I
".
_]
~ - .1 1
-:/.1
";
:':f:
,\
. . ; ' ; _
_
_
_
J
,
:
.
:
,
,
.
-...,
'?:
,.f/
^; ....^....^.^-.....t t . . ;.
. 2.16.
chromium
1913
00:00:11
1:
: 00:00:00
. 2.17.
1959129
:00:QO:11 :
, .
:
-
75
. ,
(. . 2.17).
.
gnorpm
- .
(. . 2.18).
. 2.18.
.
(. . 2.19).
RPM . 19.
KDE
, , kpackage
X'.
(. . 2.20).
gnorpm.
. 2.19.
(
rpm).
APT. APT
. APT
Debian Linux. Red Hat (, apt-get Alt Linux,
Red Hat Linux) .
apt-get. apt-get :
apt-get [] [] [ . . . ]
. 2.11.
. :'.'.''
| cttromtufri-Q>9,6-;l fndK ~;
apt
2.11
update
,
/etc/apt/sources.list. -
FTP-. :
/mnt/cdrom/RedHat/RPMS/
ftp://ftp.redhat.com/pub/
upgrade
. , /etc/apt/sources.list. ,
, , . update
76
. 2.11
distupgrade
upgrade. ,
.
install
( ) .
: . , ,
/rnnt/cdrorn/RedHat/RPMS/package-1.33.i386.rpm.
apt-get install package. ,
/mnt/cdrom/RedHat/RPMS /etc/apt/sources. list
remove
check
clean
. , .
apt-get clean.
/var/cache/apt/archives /var/cache/apt/archives/partial
B"@t|RPM
El- ^Amusements
! - 81 Games
38 Maelstrom
i~ fortune- mod
I -'91 gnome-games
!-3Sgnuchess
3.0.1-17
1.0-16
8080K 1.4.0.1-4
1370K 4.0.pl80-8
198K 2.0-15
107 4.2.3-2
2816K 4.3.2-2
2611
23B5K
B-@|Graphlcs
|-4Sxloadlmage
r^xscreensaver
241 4.1-21
6600K 3.33-4
27K 1.40-14
27K 2.0.3-1
| - S| Archiving
| I !- 38 cdrecord
i.is
886
68
91
I
1.10-4
2.4.2-23
1.00-17
^'!
. 2.20. kpackage
. 2.10 .
.
apt-get install rpm -i,
: apt-get
. rpm
.
77
apt-get .
?, *.
, ,
POSIX. ,
*, ,
, , .
remove.
apt-get -f -d.
apt-get ,
-- ,
. : force-yes.
apt-get - . ,
, ,
.
2.6.4. ,
RPM , . src
. :
rprn rebuild software-2 . 00-1 . src. rpm
, software-2.00-l.src.rpm
. , , .
, ,
Linux.
2.7.
.
, Reset. , , . Linux, .
( ) ,
. - , ,
Reset, ,
. ( UNIX
Linux)
sync, .
shutdown.
78
: , .
, ,
shutdown .
,
. , 19:00 :
shutdown -h 19:00 The end of a working day
: The end of a working day.
:
shutdown -h now
-h ,
, a now , .
-h -.
:, +N, N
, , .
now , +0 .
halt reboot
. halt
, shutdown -h now, a
reboot shutdown -r now.
,
(sync) . , :
The system is halted
Ctrl+Alt+Del shutdown -r
now. , ,
/ e t c / i n i t t a b .
79
3.1.
Linux . , ,
(
). Windows,
,
, , ,
.
Linux : () , ( ,
...).
:
localhost login:
Password:
.
Login incorrect .
, . , .
Linux .
, .
.
Alt + F2
. X Window,
Ctrl + Alt + F2 (. . 3.1).
X Window
All + Fn
Ctrl + Alt + Fn
Alt + F7
Ctrl + Alt + Backspace
80
X Windows
X Window
X Window
3.1
,
, exit. logout.
3.1.1.
login Linux-.
login [] []. ,
. login ,
. 3.2. (root)
su.
login
3.2
. UNIX
Linux
, getty. getty ,
-h
login .
-f
3.2.
passwd.
. .
root, , ,
. ,
123 . ,
, , .
. , .
- , ( root) passwd
.
3.3.
Linux - :
root, ,
. ,
Linux
, .
root , .
,
, , .
, ,
81
su, .
.
adduser <_ , root.
passwd < _>.
. , (, ,
). passwd. (man passwd).
, .
.
- , ,
,
- .
, .
:
(username) -- ,
. , , , -
( ). ,
.
(User ID) (UID). UID,
. 0...65534
. 0 root.
, . , (1000...1100) , (2000...2100) .
. , , -
.
(Group ID) (GID).
,
(native group) . . 0 root.
(password) .
(full name)
() , , Ivan Ivanov.
82
: .. .
(home dir)
//<_> (, /home/den). .
(login shell,) ,
. - (
) .
: ash, bash, csh, fcsh, ksh.
/ e t c / p a s s w d :
username:password:UID:GID:full_name:home_dir:login_shell
/etc/passwd:
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
den:x:500:500:den:/home/den:/bin/bash
evg:x:501:501::/home/evg:/bin/bash
,
/etc/passwd *, /etc/shadow,
. . /etc/passwd
.
/etc/shadow .
MD5.
.
DES 3DES,
. , (Shadow Passwords) MD5.
.
/home ,
.
/root. cd ~.
.
Linux , ,
~ ().
3.4.
.
, , ,
. , user ivanov petrov, sidorov sgroup. ivanov report users
83
. report sidorov Permission denied.
,
. .
. 4. /etc/group.
:
_::GID:_
. /etc/group 3.1.
3.1. /etc/group
root:*:0:
local:*:100:den,operator,ivan
guest:*:200:
dialup:*:250:victor,evg
root root.
100 .
den, operator, ivan. quest guest. dialup
victor evg.
, , bin,
mail sys. - .
. groupadd. , ,
/etc/group, , .
3.5.
userdel.
linuxconf. linuxconf ,
: , .
.
usermod.
: ( )
linuxconf. ,
, linuxconf ( userconf Linux Mandrake).
, User
Accounts ( userconf, ). User
Account Configurator Normal (. . 3.1)
User Accounts (. . 3.2), Add.
84
:: Mormal:
I
You can edit, add;
'
Spe
den
ftp
games
gopher
htdig
Ip
Denis
FTP Usei
games
gopher
Ip
501
14
12
13
101
4
den
ftp
users
gopher
htdig
Ip
. 3.2.
. 3.3.
j Dl
LOS
Fiilt name
gro-
Com
Use
85
3.6.
, UNIX. , . , , .
: .
UNIX,
Windows Microsoft Windows
2000, , .
quota (. ) . , ,
.
(inodes) (blocks).
, .
inodes blocks
, . , , , .
:
1. , .
2. (softlimit).
3. (hardlimit).
4. , .
,
, .
, .
( 7 )
.
. Linux 1024 .
, , .
quota support Filesystem , .
/ u s r / s r c / l i n u x make menuconfig, a
:
make dep; make bzlmage; make modules; make modules_install
, . (. . 3.4) (
/ e t c / l i l o . c o n f , -- . . 18).
. 18.
. 3.4 , .
86
. 4.11 LILO
CrootSdhsilabs uin_c3 lilo
. 18.
Wded linux
ed my_linux
ffd linux-nonfb_64M
fldded failsafe
ed windows
ed floppy
CrootSdhsilabs win_c]e |
Turning on
user and group
quotas for local
filesystems,
, .
.
, IfrS
-,
. .4. LILO
. /home ( ), /usr ( ) , , /var.
/etc/ f stab :
/dev/hdal
/
ext2
defaults
>
/dev/hda4
/dev/hda5
none
/home
/usr
/proc
ext2
ext2
proc
defaults,usrquota
d e f a u l t s , usrquota,grpquota
defaults
usrquota
, a grpquota . usrquota (grpquota)
=, ,
,
. quota.user quota.group
.
, , usrquota=
/quotas/user.quota. .
, . quotacheck.
, ,
.
, , :
# quotacheck -avug
. -
, fsck.
, , quotaon -avug .
87
root
[root@dhsilabs /root]** quotacheck -avug
Scanning /dev/hda5 1/1 done
Checked 6730 directories and 109842 files
,
Using quotafile /quota.user
Updating in-core user quotas
.
Jsing quotafile /quota.group
Updating in-core group quotas
quota,
Scanning /dev/hda8 C/mnt/ext2] done
Checked 7 directories and 11 files
Using quotafile /mnt/ext2/quota.user
Jpdating in-core user quotas
,
[rootSdhsilabs /root]* I
, repquota . 3.5. quotacheck-avug
.
quotacheck -avug ,
. 2 ,
.
, ,
(), repquota -ua (. . 3.6).
107320
0
0
synthetic
808
0
0
1000
0
6240
0
1001
User
root
72
used
439980
den
4
trootSdhsilabs /root]**
used
113629
File limits
soft hard
4
3
9
2
1
2
1
4
4
21
53
32
570
1720
137
370
11
Block limits
soft
hard
used
0
0
0
0
File limits
soft hard
16
1
88
0
0
0
0
grace
grace
3.6.1.
() edquota.
edquota - (. . 3.7),
-g. ,
$EDITOR, .
, hard soft.
Quotas for
/dev/hda5:
inodes
/deu/hdaS:
inodes
user den:
blocks in use: 107320, limits (soft = 0, hard = 0)
in use: 1720, limits (soft = |, hard = 0)
blocks in use: 4, limits (soft = 0, hard = 0)
in use: 1, limits (soft = 0, hard = 0)
Vtmp/EdP.aaGSNQc" 5U 237C
# edquota -u den
:
quotacheck -u <filesystem>
quotaon -u <filesystem>
:
quotacheck -u /mnt/ext2
quotaon -u / m n t / e x t 2
q u o t a . u s e r
quota.group. () , .
, , . soft , , hard . ,
.
edquota -t:
# edquota -t
89
Time units may be: days, hours, minutes, or seconds
Grace period before enforcing soft limits for users:
/dev/hda4: block grace period: 50 minutes, file grace period: 50 minutes
, .
/ d e v / h d a 4 : blocks in use: 1024, limits ( s o f t = 1,
hard = 0) ,
. , Linux
1024 . 1 .
inodes in use: 94, limits ( s o f t = 0, hard = 0)
inode (, ,
(pipes)) .
,
. . :
# edquota -u </_()__>
, :
# edqouta -p <>
,
.
/. ,
user, ,
den. :
# edquota -p den user
quota :
quota [-guqv]
quota [-qv] -u <_>
quota [-qv] -g <_>
-v ,
, ,
, .
-q ,
.
-g ,
.
- ,
.
quota .
, user :
Disk quotas for user user (uid 1 0 0 2 } :
Filesystem blocks quota limit grace f i l e s quota limit grace
/dev/hdb3
1024*
1
0
none
94
90
user, , den.
,
:
Disk quotas for user root (uid 0 ) : none
.
, .
3.6.2.
-
, ?
edquota soft hard
0. .
3.6.3. linuxconf
linuxconf. linuxconf Filesystems -> Set quotas default
(. . 3.8).
WevfhdaS
-User default;;
Disk .space soil M::
giace period
.- .8. linuxconf
, . (grace period),
. . User accounts -
User accounts , (. . 3.9).
91
. 3.9.
Default, , .
No limit .
.
(NFS)
quota , .
rquotad, . usrquota grpquota
NFS-. quota - rpc.rquotad.
3.7.
(. 3.2).
/sbin : chmod 711 /sbin/nu.
3.2.
# !/bin/bash
# nu (New User) .
I
92
GROUP=100
#
SHELL=/bin/bash
#
HOME=/home
# ()
EXPIRE=30
#
DAYS=0
# 5
WARN=5
WHOAMI= /usr/bin/whoami
if [ $WHOAMI!="root" ]; then
echo "Access violation."
exit 1
fi
echo -n "Enter new name: "
read USERNAME
echo -n "Enter full name: "
read FULLNAME
adduser -c "5FULLNAME" -d $HOME/$USERNAME -e $EXPIRE
-g $GROUP -S $SHELL $USERNAME
passwd -n $DAYS -w $WARN $USERNAME
passwd $USERNAME
93
Linux
4.1. .
1.
2.
3.
4.
5.
6.
94
, DOS
DOS . Linux .
, Linux, . ,
, , . -- . , --
, .
Linux , ,
. .
Unix-
. Linux ext2 (ext3)
ufs.
Unix :
(boot block).
(superblock).
() (inode).
(data block).
(directory block).
(indirection block).
Unix.
.
.
, .
, .
Linux
()
, . (
inode) .
.
,
. 4.1.
. . ,
, .
ext2 (. . 4.1):
1. .
2. .
3. .
4. .
5. .
6. .
, ,
. ,
: .
() .
. , . .
, .
, Linux
:
1. .
2. .
3. .
4. .
.
/dev. , /dev/ttySO (1). , ,
() .
,
( (/dev), ). ,
, , .
95
Linux
, . ,
.
254 . , : / \ ? > < | " *
,
. Linux , file.txt, FILE.TXT File.txt , . Linux . , DOS
8+3: 8 3 .
( Windows) .
ext2:
4 .
2 .
255 .
1024 .
1 4096 .
4.2.
4.2.1.
,
, .
, ,
.
cat. :
$ cat f i l e . t x t
, , f i l e . t x t .
more less:
$ less f i l e . t x t
:
$ cat > f i l e . t x t
/,
. 5. () f i l e . txt. ,
, f i l e . txt.
Ctrl+D. , ,
96
Linux
. , ,
, .
Linux ,
:
$ []
:
$ f i l e . t x t f i l e 2 . t x t
$ f i l e . t x t / h o m e / u s e r / t e x t /
f i l e . t x t
f i l e 2 . t x t . . f i l e . t x t / h o m e / u s e r / t e x t / .
, ( . )
, ( ~ ) . ( . ' . ) . ( / ). . 4.1.
4.1
-d
.
,
-I
-1
( )
-
-S
( )
-11
-V
(verbose).
-X
, , ,
mv . :
$ mv f i l e . t x t f i l e 2 . t x t
f i l e . t x t f i l e 2 . t x t .
:
$ mv ~ / * . t x t /tmp
/tmp.
mv: -
, .
4 . 851
97
Linux
rm. : $ rm
ffle2.txt.
. .
, ( )
.
, rm ,
-f. -f ,
, , .
, .
, .
- , .
- , rmdir, .
-i .
locate .
, , ,
:
$ locate passwd
,
(), which,
().
$ which awk
,
, .
Linux:
Tab.
.
Tab . ,
. , PageUp PageDown.
4.2.2.
Is.
DOS dir,
Is . is ,
, man Is.
98
Linux
pwd .
.
DOS, mkdir,
rmdir. , .
.
/
cd .
Midnight Commander
Midnight Commander . , . Midnight Commander
Norton Commander,
(. . 4.2).
4.3.
, ,
. ,
.
Linux .
, . Linux
: () .
99
Linux
Linux . .
Is -i.
:
. , text. :
Is -i text
25617 text
text In:
In text words
, words text
, text:
Is -i words
25617 words
, .
.
In
.
words, text.
words, text, ,
. .
In -1. ,
, .
: "." - , ".." - .
, ,
. . , ,
. , , .
Is -s, :
Is -s text words
group
group
3 Dec
12 Dec
5 12:11
5 12:50
Irwxrwxrwx 1.
,
text, words->text.
100
Linux
rwxrwxrwx.
. : , ,
,
, . ,
, ,
, .
,
.
$cwd ,
. :
echo $cwd
"
4.4. Linux
, Linux .
/dev.
.
/dev. +,
.
, . , N
, , ttyN /dev/ttyl .. /dev/ttyN,
. (
) . 4.2.
hdxN sdxN . , (E)IDE (ATA) IDE: Primary Master, Primary Slave, Secondary Master, Secondary Slave.
TtyN
mouse
audio
modem
ttySN
IpN
cuaN
hdxN
4.2
. /dev/modem /dev/ttySO
. /dev/ttySO COM4 DOS
sdxN
fdO
stN
nrtfN
mdN
ethN
. , ttySN
IDE
SCSI
, :, : /dev/fd1
SCSI
FDC
RAID
null
101
Linux
: , , ,
Primary Master, a /dev/hdd Secondary Slave.
DOS :
d. , /dev/hda
N
.
/dev/hdal.
4.5.
Linux , .
.
Linux. ,
, . . 4.3.
4.3
/
/bin
/home
/usr
/sbin
/var
/etc
/dev
/tmp
/mnt
,
, , , ,
. , , /mnt
4.6. .
,
,
(), . Linux
.
Linux extlfs,
extSfs Linux .
.
, Linux , . 4.4.
. 4.4 . Linux
, . . . 18.
, .
102
Linux
Minix Filesystem (minix)
Xia Filesystem (xia)
UMSDOS Filesystem (umsdos)
MSDOS Filesystem (msdos)
(*) VFAT Filesystem (vfat)
NT Filesystem (ntfs)
HPFS Filesystem (hpfs)
(*) ISO 9660
(*) /proc
Extended Filesystem (ext)
(*) Second Extended Filesystem (ext2)
Third Extended Filesystem (ext3)
Network Filesystem (nfs)
4.4
Linux MSDOS
msdos
Windows
Windows NT
High Performance FS. OS/2
, CDROM
Linux
!
msdos.
8+3 ( ).
vfat.
(), msdos.
,
, , , . 2.4.8 :
Ext3, ReiserFS, XFS.
, , / p r o c / f i l e s y s t e m s .
cat /proc/filesystems.
Ext3 (Third Extended Filesystem)
ext2, Ext3, Ext2. . ext2
ext3, .
ext2.
RaiserFS . .
XFS , Silicon Graphics (SGI) Irix.
:
,
. ,
32 .
JFS IBM AIX OS, OS/2, Linux.
703
Linux
40% .
32 . , .
.
,
. .
.
JFS , ,
,
, . XFS
. .
,
.
ReiserFS ,
. ext3
ReiserFS.
.
, ,
.
,
.
. , ,
. .
.
. , . ,
, .
ext2. A
:
mke2fs - <>
- ,
.
. nikelfs . 4.5.
, man mkeZfs.
, ,
fdisk. Linux
. .
dd. mount. .
, ext2 ext3. , / 704
Linux
mke2fs
4.5
- _
-f _
-1 _
- _
.
. 5%
-V
105
Linux
. , ,
, . 18. ,
,
. 18, .
.
ext3 , , . . / u s r / s r c / l i n u x
make menuconfig. Filesystem ext3.
, ext3.
.
ext3 2.4.7 . Linux
Red Hat 7.2 2.4.7.
:
make
make
make
make
make
dep
bzlmage
modules
modules_install
install
, , ,
, . 18.
,
, .
. , ,
. .
. .
MBR. , ( , Microsoft!) ,
, .
, Linux ( ) .
tune2fs -i 0 - 0 -j
/dev/hdal
ext2, /dev/hdal, ' ext3.
, , . ,
ext3.
/etc/fstab, :
/dev/hdal / ext2 defaults,usrquota,grpquota 1 1
106
Linux
. ,
(/) /dev/hdal
extl. extl ext3
. .
extZ-: tune2fs
/etc/fstab.
4.7. fdisk
fdisk Linux
Linux. ,
. fdisk.
fdisk. fdisk :
fdisk <>
, , 683 .
, - , .
, fdisk, /dev/hda. ,
DOS.
I fdisk /dev/hda
Comamnd (m for h e l p ) :
m. :
Command action
a toggle a bootable flag
d delete a partition
1 list known partition types
m print this menu
n add a new partition
p print the partition table
q quit without saving changes
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
p, n, q w.
:
Command (m for help): p
Disk /dev/hda: 16 heads, 38 sectors, 683 cylinders
Units = cylinders of 608 * 512 bytes
107
Linux
Device
Boot Begin Start End Blocks Id
System
/dev/hdal
*
1
1
203
61693
6
DOS 16-bit >=32M
, DOS- 60
(1 = 1024 ). 203-. 683 , ..
Linux 480 . ( ):
Command (m for h e l p ) :
n
Command action
e extended
p p r i m a r y partition (1-4)
( ).
:
1. 4 .
2. ,
, .
2 Linux (Linux Native) (Linux Swap):
Partition number ( 1 - 4 ) :
2
First cylinder ( 2 0 4 - 6 8 3 ) : 2 0 4
Last cylinder or +size or +sizeM or +sizeK ( 2 0 4 - 6 8 3 ) : +80M
-- 2. 204.
.
, .
+, ( + + ).
.
Command (m for h e l p ) : n
Command action
e extended
p primary p a r t i t i o n (1-4)
P
Partition number ( 1 - 4 ) :
3
F i r s t cylinder ( 4 7 4 - 6 8 3 ) : 4 7 4
Last cylinder or +size or + s i z e M or + s i z e K
(474-683):
+10M
108
Linux
508...683
.
w , :
Command (m for h e l p ) : w
, ,
. , q.
, , 1024. Linux ,
1024.
1023. , 1024, Linux .
4.9. . /etc/fstab
, ,
. () (CDROM, Floppy, Zip)
():
1. ( ),
. ,
(), .
2. , ,
.
109
Linux
3. (), .
.
4. (), .
mount, umount. ( )
:
mount -t fs_type device mount_point
fs_type mount ,
. 4.6.
4.6
ext2 ext3
Linux
Vfat
jso9660
Windows
CD-ROM
Nlfs
NT Filesystem
4.7
, /etc/fstab, ,
noauto
/etc/mtab. , /etc
-
-W
/ ( )
-t
110
Linux
, , mount -a -t vfat
VFAT. , , / e t c / f i l e s y s t e m s
/proc/f ilesystems.
,
, / e t c / f stab.
:
device mount_point f s_type options __ _
:
device , ;
mount_point ;
fs_type ;
options (. . 4.8);
__ (1), dump ().
(0), ;
_ , .
fsck, .
, .
,
, , .
. (1),
, .
(2), , . (0) ,
.
( Floppy, CD-ROM, ..).
/etc/fstab
exec
4.8
() ,
()
noauto
mount -,
auto
rw
/.
user
nouser
defaults
/ .
,
111
Linux
. , .
vfat: ,
extl .
.
noauto, - mount. mount -
, ,
. , , , - ,
.
. user
.
noauto .
/ e t c / f s t a b 4.1.
4.1. /etc/fstab
/dev/hdal
/dev/hda2
/dev/hda3
/dev/hda4
/dev/fdO
/dev/hdd
none
/
/den
/home
swap
/mt/floppy
/mt/cdrom
/proc
ext2
ext2
ext2
swap
vfat
iso9660
proc
defaults
defaults
defaults
defaults
noauto,
noauto,
defaults
1
0
0
1
2
2
,
/ , /dev/hdal
ext2 defaults, . ,
, ,
, .
,
/dev/hda2 /dev/hda3 ext2
/den /home
.
,
, .
(swap). , ,
,
.
772
Linux
(Floppy)
CD-ROM. / e t c / f s t a b
/,
(). /
.
, , , vfat ,
. ,,
??? ??????????. ( )
iocharset codepage. vfat :
codepage=866, iocharset=koi8-r
4.10. ()
Linux : , ( ) . 128...256 ,
, .
. , Linux ,
: .
fdisk ( 82) mkswap, . mkswap :
mkswap -
, 32
( - ):
mkswap - /dev/hda3 32768
,
, ,
.
/ s w a p / s w - f i l e ( 32 ) dd:
dd i f = / d e v / z e r o o f = / s w a p / s w - f i l e bs=lk count=32768
.
/dev/zero /swap/sw-file.
, (ANSII- 48),
NULL (ANSII- 0).
1 K6(bs=1k), 32768. ,
32 , NULL. , fdisk .
:
mkswap /swap/sw-file 32768
113
Linux
,
, :
mke2fs -m 0 / s w a p / s w - f i l e
:
mount -t ext2 / m n t / d i s k l / s w / s w - f i l e
-m ,
( 5%).
() , .
swapon - (
/etc/fstab), swapon <>
. swapon - . /etc/re.d/rc.sysinit , SysV RedHat, Mandrake, Debian ( RedHat Mandrake
,
) / e t c / r c / r c . s BSD- Linux- (Slackware).
swapon /dev/hda3,
swapon /swap/sw-ffle.
,
swapon -,
/ e t c / f s t a b . ,
/ s w a p / s w - f i l e , swapon /swap/sw-file swapon -.
.
, () , ,
free (. . 4.3). free
^^[{^^^^
Illllllj^
':
.
I
t^i'.-^'" ;:i:w:w!fFW^P^Pwpw?Pw^^^ ~^
. 4.3,
114
Linux
, . total
(Mem Swap ),
used , a free .
()
(Swap Total)
32 .
4.11. LILO
Linux LOader (LILO) , Linux
.
, , bootlin, bootact, bootstar,
LILO. LILO Linux loadlin, GRUB ( Linux Mandrake) NTLoader.
NTLoader loadlin ,
. LILO. LILO
:
1. .
2. liloconf.
3. / e t c / l i l o . c o n f .
liloconf / e t c / l i l o . c o n f ,
. LILO MBR (Master Boot Record). LILO
, Linux. , Linux:
1. , , NTLoader.
2. LBA.
LILO :
LILO
LILO b o o t :
,
. Linux linux. Tab. LILO
. .
:
LILO
, Shift,
:
LILO boot:
Tab. help,
LILO.
LILO / e t c / l i l o . c o n f ,
LILO. Linux
115
Linux
, mem=1024M
1024 . e e B l i l o . c o n f -
Linux. LILO
(Windows, FreeBSD,..) ( Linux). 4.2
/ e t c / l i l o . c o n f .
4,2. /etc/lilo.conf
#0 : Linux Mandrake
tLILO v e r s i o n : 21.5
#
# (MBR /dev/hda)
boot=/dev/hda
I . ,
# /boot/map
map=/boot/map
# .
# /boot/boot.b
install=/boot/boot.b
# compact .
#
# VGA: normal -- 80x25, ext -- 80x50
vga=normal
# . ,
#
default=linux
#
keytable=/boot/ru4.kit
# LBA32.
#
# (LBA)
132
# - .
# , prompt ,
# timeout
prompt
# 5 ( delay)
timeout=50
# ,
me ssage=/boot/message
#
menu-scheme=wb:bw:wb:bw
# ( )
# password=54321
776
Linux
# ,
# ( )
# restricted
# . 16
image=/boot/vmlinuz
#
label=linux
# ( )
root=/dev/hda5
#
append=" mem=64M"
#
vga=788
read-only
#
#
# vga, password, restricted ,
# .
# ..
image=/boot/vmlinuz
# image Linux-
label=linux-nonfb
root=/dev/hda5
append=" mem=64M"
read-only
image=/boot/vmlinuz
label=failsafe
root=/dev/hda5
append=" mem=64M f a i l s a f e "
read-only
other=/dev/hdal
t other -
label=windows # Linux- root
table=/dev/hda # ,
other=/dev/fdO
label=floppy
unsafe
# boot-
# .
# table unsafe .
!
, ( ),
.
LILO
:
<1=
.
(11=_ ... .
/ e t c / d i s k t a b
.
ignore-table
.
I
117
Linux
nowarn
81=
.
. . break Shift .
-V
4.9
LILO
- _
,
/etc/lilo.conf
- _
( enroot - )
-
-1
LILO
-R
Linux
Linux
:
1. chroot, , .
2. LILO DOS fdisk /mbr.
-q LILO .
LILO, :
linux
*
windows
, -q.
LILO GRUB. Linux Mandrake
,
118
Linux
Linux LILO. GRUB
: ext2, ext3, ReiserFS, vfat . GRUB
, .
:
Xboot
. Xboot
.
( ).
4 (4 ).
Symon
. ,
. ( LILO), a
OS/2.
BootStar... . DOS
Windows. , Partition Magic. , ,
.
vpart
, LVM OS/2 (LVM
OS/2 4.5).
xosl (Extended Operating System Loader ) .... ,
(Geurt Vos), GPL. xosl http://home.wanadoo.nl/geurt/
download.html.
gag (GRAPHICAL BOOT MANAGER) .... , GPL.
http://www.rastersoft.com/programas/gag/downeng.html.
4.12.
Linux .
, . .
: , .
, ,
. , .
,
.
. ,
, .
, 119
Linux
, .
,
root.
:
mkdir dirl
script:
#!/bin/sh
echo "Hello"
:
chmod 500 d i r l / s c r i p t
:
dirl Is -I dirl
:
chmod 600 d i r l
Is -1 dirl
:
Permission denied
- (
):
cat d i r l / s c r i p t
:
Permission denied
: , .
, . , ,
, ,
.
, .
, , .
.
.
,
Is 1:
Is -1 f i l e . t x t
-rw-r 1 den group -300 Feb 10 1 2 : 0 0 f i l e . t x t
-rw-r
f i l e . txt.
den, group.
. - , a d .
rw- . - - , w - - , - -
. : , , . - ,
-. .
720
Linux
, . ()
,
().
chmod.
: .
, .
chmod
:
chmod <|>
chmod . 4.10.
( )
4.10
sticky-
Linux
, , , , 760:
7
;
6
;
.
,
, . .
4.11
000
1
2
001
010
011
100
101
110
111
:
, , . ,
. , 1 . , ,
, 777 (111 111 111)
, .
644, , .
, .
SETUID (4), SETGID (2), sticky- (1).
mkdir? 0777 , umask. , umask,
022. , 0777 - 0022 = 0755.
, Is 1:
mkdir new
Is -1
drwxr-xr-x 2 den den 4 0 9 6 14 1 4 : 3 0 new/
rwx (111) , r-x (101) . , = 755.
umask .
umask 000
, . , mkdir () ,
.
122
Linux
SUID SGID
Linux
SUID (Set User ID root) SGID (Set Group ID
root). , (pppd, smbmount,
SVGA-) root.
, , -, SUID
- /usr/sbin/pppd. :
chmod u+s / u s r / s b i n / p p p d
pppd root,
. . pppd
, ,
-. ( , )
root.
smbmount
SUID.
, : ,
,
. ,
, SUID ( SGID) .
: superfonnat,
. ,
, -- ,
root. SUID, . . , root,
. ,
, , (
). : supermount root
. root!
root ,
. ,
root. , .
, , SUID SGID.
,
( pppd) SUID SGID, , .
SUID .
123
Linux
SUID SGID:
1. , ,
, , .
SUID
, , , su.
2. - ,
sudo ( su). , , .
3. , root,
. ,
.
FTP- Linux. , ,
- .
4. ,
SUID- . , ,
nosuid / e t c / f stab.
4.13.
Linux :
1. .
2. .
Linux fsck. .
fsck ,
, .
fsck
Linux , etc/fstab.
fsck , . 4.12.
fsck
4. /2
, /etc/fstab.
-
( ext2)
-.
-
, . ,
-. ,
-R
-. .
-1 _ <_> .
, ,
, ,
-S
( )
-
124
Linux
defrag, (Paul H. Hargrove,
hargrove@sccm.Stanford.edu).
ext2, minix, xia.
4.14.
. SCSI, -
. IDE .
. : .
: ,
.
AUTODETECT
. Linux
IDE. ,
Windows,
, , , ,
Linux .
Linux fdisk Linux
, Windows.
t FAT32.
, FAT32 , 80
640 .
4.15.
Linux, UNIX,
.
. ,
. , :
1. , .
2. .
SCSI.
125
Linux
.
: , SCSI,
, FDC. . SCSI. SCSI.
SCSI.
, FDC, . ,
,
SCSI.
.
4.15.1. SCSI
Linux SCSI.
SCSI.
LUN (Logical Unit Number), SCSI,
.
, SCSI Tape Support.
SCSI SCSI Low-Level drivers. , Probe all LUNs on each device.
/dev/stO.
4.15.2. FDC
QIC-02 tape support Ftape (QIC-80/Trawan) support. ,
, , . Character devices.
/dev/nrtf 0.
4.15.3.
int.
mt-st, .
Red Hat Mandrake Linux. mt
/ d e v / n f t a p e , /dev/
nrftO. SCSI,
/ d e v / s t O .
.
.
.
:
mt-st -f / d e v / n f t a p e retension
DOS, . , , 126
Linux
. Conner Backup Basics, Norton
Backup, QlCstream. :
mt-st -f / d e v / n f t a p e erase
. ,
,
:
tar c f z /dev/nftape /home/den
tar, ,
, ( Archive).
z tar .
cf.
:
tar x z f /dev/nftape
,
xf.
:
tar df /dev/nftape
, tar,
mt-st
. tar mt-st. , tar ,
:
mt-st -f / d e v / n f t a p e f s f 2
bsf fsf.
mt-st ,
. 4.13.
mt-st
4.13
eof
asf n
fsf
bsf n
fsr n
bsr
seek n
eom
n
.
rewind
offline
retension
erase
127
Linux
4.16.
1.
2.
3.
4.
, , ,
, .
, :
()?
?
?
?
()?
,
/home.
. -
, ...
,
/etc. ,
.
, , ,
Linux. , ,
.
, , ,
.
?
. ?
1. .
2. , , .
3.
.
4. ,
, ,
.
, FDC,
4 /, 1 4 .
.
, FDC 1
:
2 , 6 .
SCSI
.
128
Linux
?
, ,
.
( ) ,
: ,
? ,
, .
?
. (
,
). : 1, 2,
., ., ., . , . 4.14.
4.14
1
.
.
.
4.17. cpio
,
cpio.
cpio .
. , cpio .
cpio ,
. . 4.15, . 4.16.
4.15
cpio
-
:
cpio -[] _ [_]
, .
-i
:
cpio -^] [] _
, , cpio
.
,
. , .
-
: cpio -[]
5 *. 851
129
Linux
4.16
'
-0
,
. - -
5120 . 512
-0
ASCII
-d
-i. ,
, , .
,
-F
:
bin
;
-I
.
-i -
-I
-L
, ,
. - -
GID ( )
-S
. -i
-S
. -i
-t
. , ,
-
-V
-V
cpio.
- cpio. cpio
, .
,
-. tar. :
cpio - - tar - a r c . tar
, ,
:
/opt/ctrl/ctrl.
/opt/ctrl/ctrl.html
130
Linux
arc. tar.
. ,
arc.tar.
, .
/. , :
Is | cpio - - tar - current_dir. tar
:
cpio -i -H tar < current_dir.tar
cpio
.
4.18.
hdparni.
Quantum Fireball ATA66 3,75 / 14 /, IBM
100 ( ) 30,1 /!
hdparni .
, root:
t hdparm -t /dev/hda
Timing buffered disk reads: 64 MB in 17.08 seconds = 3.75 MB/sec
, : ,
. , , :
# hdparm /dev/hda
/dev/hda:
multcount = 0 ( o f f )
I/O support = 0 ( d e f a u l t 16-bit)
unmaskirq = 0 ( o f f )
using_dma = 0 ( o f f )
keepsettings = 0 ( o f f )
nowerr = 0 ( o f f )
readonly = 0 ( o f f )
readahead = 8 (on) '
, .
.
# hdparm - dlm2c3ul /dev/hda
, . -,
DMA, ,
( ). ,
ul , xmms
.
131
Linux
hdparm .
14 /. ,
.
66 UDMA33 UDMA66 .
66 , 68.
IDE :
# hdparm -k I / d e v / h d a
IDE ,
.
.
hdparm / e t c / r c . d / r c . l o c a l .
,
, . , , / e t c / s y s c o n f i g
/harddisks, .
, :
. ,
apmd. . IDE,
, HDPARM_AT_SUSPEND
HDPARM_AT_RESUME /etc/sysconf ig/apmd.
, / e t c / s y s c o n f i g , , Red Hat Red Hat Linux, Mandrake
Linux, SuSE Linux, ASP Linux, Back Cat Linux, ABI Linux .
hdparm
, , , .
-. ,
52? CDROM
. :
# hdparm - 2 /dev/hdd
, 300 /.
4.19. RAID
,
. Linux ext2 ext3
, .
, RAID. RAID (Redundant Array of
Independent Disk Redundant Array of Expensive Disk) . -
132
Linux
. RAID, (. . 4.17).
0,1 5.
, , 5+1.
RAID
RAID
0
1
2
3
4
4.17
. , .
, .
,
. .
, RAID 2,
,
,
.
. min_size*(n-1),
min_size , a n .
RAID -
RAID.
,
RAID,
.
Linux RAID.
, .
, , SCSI IDE, , .
RAID.
, RAID.
RAID (Software RAID).
.
RAID .
RAID,
:
md driver 0 . 9 0 . 0 MAX_MD_DEVS=256, MAX_REAL=12
r a i d S : m e a s u r i n g checksumming speed
raidS: MMX detected, t r y i n g high-speed MMX c h e c k s u m routines
plljnmx :
9 8 0 . 6 9 4 MB/sec
p5_mmx :
9 9 9 . 7 4 4 MB/sec
Sregs :
7 5 3 . 2 3 7 MB/sec
32regs :
4 4 4 . 2 4 6 MB/sec
733
Linux
u s i n g f a s t e s t f u n c t i o n : p5_mmx ( 9 9 9 . 7 4 4 MB/sec)
md.c: sizeof(mdp_super_t) = 4096
Partition check:
hda: hdal hda2 < hda5 hda6 hda7 hda8 >
autodetecting RAID arrays
autorun . . .
. . . autorun DONE.
, RAID
:
dmesg I less
dmesg
.
RAID Block device
(make menuconfig). RAID n support,
RAID. raidtools,
raidhotadd, raidhotremove, mkraid .
RAID 1
Linux raid autodetect. ,
, , . , ,
, .
/ e t c / r a i d t a b (. 4.3).
4.3. /etc/raidtab ( 1)
# RAID
raiddev /dev/mdO
#
raid-level 1
chunk-size 8
persistent-superblock 1
#
nr-raid-disk 2
# , ,
#
nr-spare-disk
# RAID
device /dev/hdbl
raid-disk 0
# RAID
device /dev/hdcl
raid-disk 1
/ d e v / m d O ,
:
mkraid /dev/mdO
134
Linux
, (man mkraid).
, , /proc/mdstat
:
Personalities: [raidl]
read_ahead 1024 sectors
m d O : active raidl h d c l [ l ] h d b l [ 0 ]
, RAID 5. , 4.4.
4.4. /etc/raidtab ( 5)
raiddev /dev/mdO
raid-level 5
nr-raid-disk 3
nr-spare-disk 0
persistent-superblock 1
parity-algorithm left-symmetric
chunk-size 64
device /dev/hdbl
raid-disk 0
device /dev/hdcl
raid-disk 1
device /dev/hddl
raid-disk 2
, ,
.
raidhotremove.
, .
.
.
,
, raidhotadd.
raidhotremove raidhotadd
(/dev/mdO) , .
4.20. Linux
, Linux,
. ,
- , .
kfloppy, KDE
. fdformat superformat. (fdformat)
135
Linux
Linux- (extZfs).
:
f d f o r m a t [-n] device
- .
device - / d e v / f d O
( : ) / d e v / f d l
(:).
superformat.
Linux-, DOS.
mformat mtools
msdos. superformat . 4.18.
superformat :
superformat
superformat
-2
-
-d
--dd
-D
-f
-
-hd
-1
--no2m
-s n
-tn
-V
-V
4.18
2mf
mbadblocks
. /dev/fdO
(Double Density)
DOS mformat (: :)
( 2)
(High Density)
2
2
.
, 512-
. 40 80
. 1 , 2, 3, 6 9
.
, (. . 4.19).
.
.
5.25"
5.25"
5.25"
3.5"
3.5"
3.5"
360
1.2
1.2
720
1.44
1.44
4.19
360
360
1.2
720
720
1.44
:
s u p e r f o r m a t -d / d e v / f d O
-t
81
41
81
10
10
81
18
81
81
10
10
81
21
-s
,
409.088
816.640
1.476.096(1.45 )
816.640
816.640
1.723.904 (1.7)
21
, 20.
136
5.1. forkf) ()
Linux ( UNIX) ,
. , ,
(shell), , / b i n / b a s h .
Linux .
Linux (
) .
, ..
. - ( ) . .
.
, (, ).
SMP (Symmetric Multiprocessor Architectures)
Linux (threads).
. , --
, ,
.
.
( ) .
.
- (, ) , .
,
, . ,
137
, .
. , () .
,
,
PATH.
.
(shell) , , ,
(entry point). - entry point main.
.
, .. -
main. fork() , () . ,
.
: fork(). fork()
,
. , fork() .
. fork()
0 PID (Process ID
) . PID .
, ,
exec. exec , , , . fork()
( main).
:
if ( f o r k ( ) = = 0 ) w a i t < 0 ) ;
else execl("ls", "Is", 0 ) ; /* */
,
fork():
1. .
2. PID.
3. , fork()
, -.
4. (
).
5. PID
0 -.
138
5.1.1.
fork(). - wait.
, ().
, , , . nice.
- . , . , , , .
:
1. (, - exit
(. )).
2. .
3. , , .
signal:
f u n c = signal (snum, f u n c t i o n ) ;
: snum
;
function
, .
,
. function .
, snum
exit. , , .
kill
. kill ,
() :
kill(pid, snum);
: pid
;
snum
, (. . 5.1).
Pid . pid , snum
, ( ). , . setpgrp. pid -1,
, , .
. 5. (, ) singnal.h.
139
5.1
01
SIGHUP
(hangup)
02
SIGINT
(interrupt)
03
SIGQUIT
(quit)
04
SIGILL
(illegal instruction). He
05
SIGTRAP
(trace trap). He
06
SIGIOT
SIGABRT
. /
07
SIGBUS
08
SIGFPE
(floating-point exception)
09
SIGKILL
(kill). He
10
11
SIGUSR1
SIGSEGV
12
SIGUSR2
13
SIGPIPE
, .
14
SIGALRM
15
SIGTERM
16
SIGSTKFLT
17
SIGCHLD
( SIGCLD)
(segmentation violation)
18
SIGCONT
STOP. He
19
SIGSTOP
20
SIGTSTP
21
SIGTTIN
(tty)
22
SIGTTOU
(tty)
23
SIGURG
24
SIGXCPU
25
26
SIGXFSZ
SIGVTALRM
27
SIGPROF
28
SIGWINCH
29
SIGIO
30
SIGPWR
31
SIGSYS
:
exit ( s t a t u s )
status , - -.
exit ,
, , main (
) return 0 exit(O).
5.2. /
/, Linux .
()
740
.
, . , , (stdin stdout).
/
. . / UNIX : stdin ( 0),
stdout ( 1) stderr ( 2).
> ()
. :
$ cat > n e w f i l e . t x t
cat
n e w f i l e . t x t , .
, .
Ctrl + D cat.
< ()
. , cat < f i l e . t x t
f i l e . t x t , .
(append) . ,
>, cat newfile.txt
, .
-
, 2> _ 2 _.
, ,
. 2>&1
Bourne
( 1 2 ).
>&
_ ( C-Shell).
C-Shell >! _. ,
.
|
. , ps -ax | grep httpd.
|&. .
5.3.
ps
ps
. ,
(man ps).
(. . 5.2).
141
ps
-
-
-t _
- _
- _
-X
5.2
,
( )
,
,
,
,
, ps - :
PID TTY
1007 t t y l
1036 tty2
1424 ttyl
1447 pts/0
2 3 0 9 tty2
TIME CMD
0 0 : 0 0 : 0 0 bash
0 0 : 0 0 : 0 0 bash
0 0 : 0 0 : 0 2 me
0 0 : 0 0 : 0 2 mpg!23
0 0 : 0 0 : 0 0 ps
:
# ps -ax | grep httpd
S 0:01 httpd -DHAVE_PHP4 -DHAVE_PROXY -DHAVE_ACCESS -DHAVE_A
698 7
1261 7 S 0:00 httpd -DHAVE_PHP4 -DHAVE_PROXY -DHAVE_ACCESS -DHAVE_A
1262 7 S 0:00 httpd -DHAVE_PHP4 -DHAVE_PROXY -DHAVE_ACCESS -DHAVE_A
1263 9 S 0:00 httpd -DHAVE_PHP4 -DHAVE_PROXY -DHAVE_ACCESS -DHAVE_A
1264 9 S 0:00 httpd -DHAVE_PHP4 -DHAVE_PROXY -DHAVE_ACCESS -DHAVE_A
1268 7 S 0:00 httpd -DHAVE_PHP4 -DHAVE_PROXY -DHAVE_ACCESS -DHAVE_A
S 0:00 httpd -DHAVE_PHP4 -DHAVE_PROXY -DHAVE_ACCESS -DHAVE_A
1269 >
7
S 0:00 httpd -DHAVE_PHP4 -DHAVE_PROXY -DHAVE_ACCESS -DHAVE_A
1270
1271 9 S 0:00 httpd -DHAVE_PHP4 -DHAVE_PROXY -DHAVE_ACCESS -DHAVE_A
1272 7 S 0:00 httpd -DHAVE_PHP4 -DHAVE_PROXY -DHAVE_ACCESS -DHAVE_A
1273 7 S 0:00 httpd -DHAVE_PHP4 -DHAVE_PROXY -DHAVE_ACCESS -DHAVE_A
1280 9 S 0:00 httpd -DHAVE_PHP4 -DHAVEJPROXY -DHAVE ACCESS -DHAVE A
/ ps grep, , httpd.
(ps -ax | grep httpd) -- - ps
/ - -.
top
.
, (.
man top). .
142
# top
; :
4904
4904 R
1204 root
2
(12
(912 S
07( xf*
0
21(2
91(2
1009 IP
0
49(2
49(2 S
9 root
2
0
0 SI
1100 root
1
09(4
09(4 S
11(7 root
0
11(0
10(0 S
90( root
0
9(12
9(12 S
1121 root
0
(C40
((40 S
114( root
2
(704
(704 S
1002 root
0
420
420 S
709 root
0
233(
233( S
j 1009 root
0
(700
(700 S
9,9(S
11: ,
art*d
12.93* /*bia/T*loaitorB
10.01* ttto/Xll/X
7.37 onpvd
(.33* iait
9.34* kdeiait: kicker :
2 . 20* kdeiait : koa*ole
2 . 13* top
!.( k*aapbot
l.St* xf
l.(0* *
1.37* kvpdate
1.34* kdeiait: kdexkto
0 . B(* ^u*r/bia/no
0.03* kdx
0 . T(* kdeiait : kxkb :
.1 0.73* kdeiait: kria
. 3 0.72* parallel : /der^lp
.7 0 . (3* httpd
.1 1. (!-:!
': '..;.:'
l;fl(
pload4~r:
. 5.1. gtop
143
nohup
:
nohup []
nohup
. SIGHUP SIGQUIT.
kill
:
kill [- ] PID
PID
,
ps.
kill .
(PID)
. ,
. SIGTERM.
yobs, fg, bg
jobs , , fg (
foreground), a bg .
<> &
5.4.
Linux (UNIX) . , .
. / e t c / i n i t . d
. .
crontab.
- .
( /var/spool/cron/),
crontab . /etc/passwd.
, .
, crontab.
,
crontab ,
MAILTO crontab.
crontab
crontab
. , , . ,
:
crontab -u user f i l e . c r o n
144
-,
, .
. ,
,
/var/spool/cron. allow, . crontab
, . 5.3.
.
crond /etc/cron.allow
/var/spool/cron. allow /etc/cron. deny /var/spool/cron. deny.
/etc/cron.allow ,
/etc/cron. deny .
crontab
5.3
-1
, SEDITOR,
:
_
.
(0...59), (0...23), (1...31),
- - (1...12), (0...6,
). , . ,
, /etc
, , :
7 * * 1-6 tar c f z /backup /etc
/etc/crontab (. 5.1).
5.1. /etc/crontab
#
SHELL=/bin/bash
#
PATH=/sbin:/bin:/usr/sbin:/usr/bin
#
# root
MAILTO=root
#
=/
# run-parts
Ql * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
745
run-part ,
.
aid
atd. .
at batch.
:
at
, . Ctrl+D.
. , 13:00 :
at 1pm
, atq.
, .
. atrm.
5.5. . init
Linux , .
init (
),
root. :
# init n
, /etc/inittab,
(inittab). :
init q
, /etc/inittab
init q.
s init:
init s
. 5.4.
0
1
146
5.4
() . root
. . X Window
/ e t c / i n i t t a b ,
.
init . 0...6, , .
/etc/inittab :
id:_::
Id ()
( ).
_
,
.
, .
, .
_
- . , 1235 ,
1, 2, 3 5. ,
(ondemand), , .
,
. 5.5
, /etc/inittab
5.5
, init
wait
respawn
once
boot
. _
bootwait
, boot, init
off
ondemand
, ,
(, , )
initdefault
. ,
init
sysinit
, ,
boot bootwait
powerwait
, . ,
,
. init
powerfail
powerokwait
ctrlaltdel
, powerwait, init
, init ,
Ctrl+Alt+Del
/ e t c / i n i t t a b
(. 5.2).
147
5.2. /etc/inittab
id 5:initdefault:
si :sysinit:/etc/re.d/rc.sysinit
10 0:wait:/etc/re.d/rc 0
11' 1:wait:/etc/re.d/rc 1
12 2:wait:/etc/re.d/rc 2
13 3:wait:/etc/re.d/rc 3
14 4rwait:/etc/re.d/rc 4
15 5:wait:/etc/re.d/rc 5
16 6:wait:/etc/re.d/rc 6
ttyl
tty2
tty3
tty4
tty5
tty6
. . . -,
. -,
, :
. : 3, 5.
, 5
, , X Window
.
,
(sysinit).
/ e t c / r e . d / r c . sysinit.
148
.
, 5
/ e t c / r e . d / r c 5. init
/ e t c / r e . d / r c .
/sbin/update .
Ctrl+Alt+Del
ctrlaltdel. shutdown (now) (-) .
() (-t3).
powerfail powerokwait. powerfail shutdown (-h). -f ,
fsck.
(+2). Power Failure; System Shutting Down.
, shutdown
(-). Power Restored; Shutdown Cancelled.
respawn X Window.
: 5:
init 5
5 , , , . X Window, Ctrl+Alt+Backspace
X Window.
X Window .
5.6.
Red Hat- , BSD- (Slackware),
SysV, .
.
, .
. Unix (. . 1) BSD- Sys ^-. ( ) BSD,
, . Unix System V, AT&T. BSD
SysV .
, / e t c / r e . d / i n i t . d . ,
- . , ftpd
FTP.
149
/ e t c / r e . d
. rcN.d, N
.
5 .
X
Window. / e t c / r d . d / r c 5 .d
, /etc/rc.d/init.d.
-
/ e t c / r c . d / i n i t . d start.
, stop.
- , /etc/rc.d/init.d.
, , rcN.d
.
, , drakconf Linux Mandrake (. . 5.2) setup Red Hat Linux.
,
(. 5.3).
! .
^ '
,;,
"
. /;
__ ._,., -...
. . . -
--.;/
'-
. . . - . -
internet
Connection
Sharing
"
'
'
Bool-
VjjjU
Uve update
. 5.2. DrakConf
5.3.
#!/bin/bash
t
#
. /etc/init.d/functions
#
750
.
. X
. . Network
and internet
confguration
Q)
#'
-0
DrakFont
Profile
Manager
|
|
|
(
1
Linuxeonf
Linux-Mandrake
Menu editor
RpmDrake
User end
ft
DraKBoot
manager
'
MouseDrake
case "$1" in
start)
#
echo "Starting my_daemon..."
daemon my_daemon
touch /var/lock/subsys/my_daemon
stop)
#
killproc my_daemon
rm -f /var/lock/subsys/my_daemon
rm -f /var/run/my_daemon.pid
ri
status)
#
t/
restart|reload)_
# ,
#
echo "Usage: my_daemon { s t a r t | s t o p | s t a t u s | r e s t a r t | r e l o a d } "
exit 1
esac
exit 0
,
: . , , POST (Power On Self Test).
, MBR (Master Boot Record)
. (Boot Sequence). SETUP.
, :
FLOPPY, HDD-0, CDROM
( ,
/dev/fdO). ,
(HDD-0, /dev/hda).
, ,
.
, ,
. ,
CDROM.
151
, . ,
( ). LILO
Linux.
, , . , init. ,
5.
, sysinit
/etc/inittab. , boot bootwait (. . 5.5).
sysinit
/etc/re.d/re.sysinit:
si::sysinit:/etc/rc.d/rc.sysinit
(sysinit)
:
1. (hostname).
2. .
3. .
4. .
5. fsck. , ,
,
1.
fsck /, . exit
. fsck ,
/.
6. .
7. .
8. .
9. .
10. ( !) . .
/ e t c / r e . d / r c . s y s i n i t / e t c / r e . d / r c . . - - 5,
:
/etc/re.d/rc 5
,
/etc/initab :
15:5rwait:/etc/re.d/rc 5
752
5.
:
, , , , !
/ e t c / r e . d / r c 5 . d / .
/ e t c / r e . d / r c . local. ,
.
X Window (xdm).
5.7. ()
Unix- (),
. Linux / v a r / l o g .
:
secure
auth.log
boot.log
dmesg
messages
syslog
/var/log ()
, , /var/log/kernel ,
/var/log/httpd HTTP-. ,
/var/log .
. 5.6.
(. 5.8), .
auth.log
user.log
secure
messages
5.6
,
, FTP ,
5.8.
syslogd, .
, sysklogd ( , ,
Red Hat- ), -
.
, syslogd . ,
syslogd. , :
syslogd: Already running.
, , :
ps -ax I grep syslogd
, sysklogd
: syslogd klogd. syslogd
, a klogd .
5.8.1. Syslogd
syslogd (system logging-deamon) , .
syslogd / v a r / l o g / s y s l o g .
: , , , .
:
Jan
Jan
Jan
Jan
Jan
Jan
Jan
154
syslogd
5.7
, syslogd
-d
. fork(2)
-f
-h
, .
,
-n
, syslogd init
Unix /dev/log
. syslogd 1.3
-V
syslogd
5.8.2.
syslogd : SYGTERM, SIGINT,
SIGQUIT, SIGHUP, SIGUSR1, SIGCHLD.
. 5.8.
5.8
SIGTERM
SIGINT, SIGQUIT
, (debugging),
,
SIGUSR1
SIGHUP
5.8.3.
/ e t c / s y s l o g . c o n f .
-/
(. 5.4).
5.4.
# . /var/log/auth.log
auth,authpriv.* /var/log/auth.log
# "-" ,
# .
*.*;auth,authpriv.none -/var/log/syslog
#
user.* -/var/log/user.log
# ( mail ()). info .
# (private) ()
*.info;mail.none;authpriv.none -/var/log/messages
# .
#
/55
# , , FTP ,
# .
authpriv.* /var/log/secure
#
# ,
mail . = d e b u g ; m a i l . = i n f o ; m a i l . = n o t i c e - / v a r / l o g / m a i l / i n f o
#
mail.=warn -/var/log/mail/warnings
#
mail.err -/var/log/mail/errors
# cron. , ,
#
cron.=debug;cron.=info;cron.=notice -/var/log/cron/info
cron.=warn -/var/log/cron/warnings
cron.err -/var/log/cron/errors
#
kern.=debug;kern.=info;kern.=notice -/var/log/kernel/inf
kern.=warn -/var/log/kernel/warnings
kern.err -/var/log/kernel/errors
#
Ipr.=debug;lpr.=info;Ipr.=notice -/var/log/lpr/info
lpr.=warn -/var/log/lpr/warnings
Ipr.err -/var/log/lpr/errors
#
news.=debug;news.=inf;news.=notice
news.=warn -/var/log/news/warnings
news.err -/var/log/news/errors
-/var/log/news/info
#
daemon.=debug;daemon.=info;daemon.=notice
daemon.=warn -/var/log/daemons/warnings
daemon.err -/var/log/daemons/errors
-/var/log/daemons/inf
f
*.emerg *
# ( err )
#
uucp,news.crit -/var/log/spooler
#
local?.* -/var/log/boot.log
156
, :
, , .
: debug, info, notice, warn, err.
. warn -- ,
err . .
.
, *,
. ,
/var/log/daemons, :
daemon.* / v a r / l o g / d a e m o n s .
emerg ( ) . ,
(FIFO), | -.
5.8.4.
, . - - syslogd,
, .
UDP. , TCP, .
, ,
/etc/services:
syslocj 514/udp
.
, ,
@hostname, hostname , . ,
hostname
:
*.err @hostname
:
* . * @hostname
/etc/hosts, syslogd
DNS .
. , ,
, -1 _. , .
(:). ,
-s .
- -,
(. . 5.7).
157
5.8.5. klogd
klogd
Linux (klogd kernel-logging deamon).
, . 5.9.
klogd
5.9
-d
-f
syslogd
-i
-1
-n
. ,
init
-0
,
. /
-s
klogd
-k
-V
dmesg.
:
dmesg | less
. - ring- .
- , .
klogd ,
. (kernel panic),
.
: SIGHUP, SIGKILL, SIGINT, SIGTERM,
SIGTSTP, SIGUSR1; SIGUSR2, SIGCONT. SIGTSTP SIGCONT
.
SIGUSR1 SIGUSR2 -i -I .
,
. GIGUSR1
( ) : # kill -USR1 PID.
5.8.6.
debug Linux . (
) prinfk(). ,
, klogd
. , (, ).
, ,
console_loglevel. ,
DEBUG (7). k e r n e l . h .
158
Linux
6.1.
: keyboarddrake Linux Mandrake
setup Linux Red Hat. / e t c / i n p u t r c (. 6.1),
:
6.1. inputruc
# SBits supports.
set m e t a - f l a g on
set convert-meta o f f
set input-meta on
set output-meta on
6.2. X Windows
, , . , ( Desktop Environment),
Gnome, ,
,
.
X Window .
root, XFree86 / e t c / x l l / X F 8 6 C o n f i g
FontPath " u n i x / : - l "
FontPath " / u s r / X I 1 R 6 / l i b / f o n t s / C y r i l l i c / "
, XFree86-cyrillic-fonts
.
rpm -qi XFree86-cyrillic-fonts. , .
759
Linux
-.
Ctrl+Alt+Backspace. -
, , startx.
,
-Wt font. font ,
.
xfontsel. KOI8-U
http://dkws.narod.ru.
Linux Mandrake TrueType- Windows, Linux. DrakConf. TTF- , .
6.3.
:
1. DrakConf. , (. . 6.1). Red Hat Linux DrakConf
printtool.
2. (, , Netware, SMB).
. (
) .
,
, .
- , Postscript-
ghostscript 018-.
- Canon BJ-300, Foomatic * Iq850 [en]
ftp://ftp.kapella.gpi.ru/pub
- Canon BJ-330. Foomalic + bj200 (en)
/cyriffic/psfonts.
- Canon BJ-5, Foomalic * bflOe (en)
- Canon BJC-1000. Foomalic * bj200 (en)
:
- Canon BJC-1000. Foomalic + (en)
- Canon BJC-1000, Foomatic + stp-4.0 (GIMP-PrW) (
1. gs-typel_koi8_fonts.tar 614783 bytes
- Canon BJC-2000, Foomatic + bjcBOO (en)
- Canon BJC-2000, Foomatic * stp-4.0 (GIMP-Print) (
2. gs-typeljcoi8_afm.tar 29062 bytes
- Canon BJC-210. Foomalic * b|200 (en)
- Canon BJC-210. Foomatic * bjcBOO (en)
- Canon BJC-2100, Foomatic * bjc600 (en)
Fontmap (Ik). - Canon BJC-2100, Foomalic * bjc610a0.upp (en)
- Canon BJC-2100, Foomatic + stp-4.0 (GIMP-Piint) (
- Canon BJC-21OSP, Foomalic * bj200 (en)
- Canon BJC-240. Foomatic t bj200 (en)
- Canon BJC-240, Foomalic + bjcGOO (en)
u
. 6.1.
160
*fonts.tar /us r
/share/fonts/default/ghostscript,
Fontmap
/usr/share/ghostscript/5.10.
7.1. .
, ,
. DrakConf (. . 7.1).
, ,
.
(. . 7.2) ISA
(Detect ISA devices).
( netconf
). Network configurator
Basic host information ,
Adaptor 1 (. . 7.3) (Enabled).
,."-"^^:~"
'"
X. >
Internet
" Ntwprt<
Connexion
and Interne!
. Sharing
configuration
" : DrakFont
'"' DrafcBoot
. . -.-.
':
- . ..
Profile..
'
Dnuxtatif
BODt-cepBrtcoa
Uveupdate
.,....:
mm
'
ML-
User and
group
. 7.1. DrakConf
6 . 851
161
Options
Tools
(IP-, , 10
Port, Irq). NetDevice
ethO
( Ethernet), Kernel
Module ,
(, ne2k-pci NE2000
PCI).
1 Harddrake List
\ * CPU
g^^j^"1^1"^^1^
3588 1 30660 Kb
El & Floppy Drives
BogoHIPS: 8 6 5 . 0 8
Known Bugs: (none)
; f-j . . . . . . .
.^
jf
...:;::_..:
!
PCI (, ne2kpci), Port IRQ !
NE2000 NE2000-PCI.
:.:...:;..:::;::..::....:.:.::.:::.:.:..:.::..:....::::.::..::..:::.: T:.:_
. 7.2. HardDrake
(. 7.4)
DNS. DNS, IP- .
.
, ,
DNS , IP- /etc/hosts.
* *
,, once
8<x*i;:
/etc/hosts fetan
:
IP_Addr _
.j192.1Eai 1
...
: IP_Addr
IP-;
1 255 255.255.0
|
1
hostname
.
jr2kt
j
- :'
.
C~ " .... .
1
(gateway)
(Routing and gateways).
. 7.3.
.,:.,.:.:..:.:.,.,.;.:. .-:.':.
j*1
:.:|ethO
;l
162
. .
: ^f-
' '
.
Name service
Cfeni tasks
access
(Host name search path): hosts, dns.
.. | Host name and IP. network devices
,
Name si
'(DMS]
, DNS.
Routing and gateways
Multiple IPs for one host.
DNS Host name search path
/ e t c / h o s t s . c o n f
/ e t c / r e s o l v . c o n f .
Network information System jNiS)
DrakConf ( IPX interface setup
X,
Linux),
.
:
insmod rt!8139.o ( Realtek 8139)
insmod ne2k-pci.o ( NE2000 PCI)
. 7.4.
/etc/conf .modules.
ifconfig ,
a route .
ifconfig ethO 192.168.1.1 up .
:
/sbin/ifconfig ethO ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}
:
/ s b i n / r o u t e add -net ${NETWORK} netmask ${NETMASK} ethO
:
/ s b i n / r o u t e add d e f a u l t gw $ { G A T E W A Y } netmask 0 . 0 . 0 . 0 metric 1
xinetd ( inetd) .
:
ping 1 2 7 . 0 . 0 . 1
127.0.0.1 , .. ,
,
.
.
, network.
:
This package allows you to configure a
TCPtfP network from scratch using ethemet
and modern (or o's
tion) : ::
[root@dhsilabs / e t c ] # route
Kernel IP r o u t i n g table
163
Destination Gateway
192.168.1.1 0 . 0 . 0 . 0
127.0.0.1
0.0.0.0
Genmask Flags
255.255.255.0
255.0.0.0
Metric
U
U
Ref
0
0
Use
0
0
Iface
12
ethO
1
lo
IP-
ethO (ping 192.168.1.1, ping dhsilabs ping localhost). , , - .
:
1. .
2. .
3. ...
7.2.
,
. , , ,
Red Hat Linux 6 , /dev
/modem /dev/ttySn, .
, /dev/ttySO 1 DOS.
, , , .
/dev/modem .
minicom. . .
minicom -s (. . 7.5). ,
.
-Cconfiguratioru-
. 7.5. minicom
164
-. ATZ,
1 , ,
, ,
.
modemtool RedHat, Linux
Mandrake DrakConf.
, Linux
Windows (win-). ,
USB, Linux .
USB USB-.
(, Lucent) Linux-.
Lucent Linux .
-, . ,
.
7.3.
, Linux . Linux
, Windows, Linux
, , .
Linux , Windows.
kppp,
.
, .
, .
kppp (. . 7.6) ,
, .
, kppp :
1. .
2. Romb
: ;
.
;
|^
3. -.
:
. ,
|Sf .
:
1. ,
kppp, . 7.6. kppp
165
. ,
56700, 9600 .
2. (. . 7.7).
( ATDT).
ATDP (. 7.8).
3. ''::
/usr/sbin
/pppd, . ::
kppp
: su - kppp.
,
kppp.
;;:
.: ;!
. 7.7.
{
" ':. . \ .
-:{/100):
j| i
ATZ
: (/100):
'::
i:
:V
: : -' : .: : .:
":i;::
ATDP
:
| |
:::: .:',:: : : ~
I I
CONNECT
I I
BUSY
; ''::- - : : . : |
1 I
NO CARRIER
1 |
1 :; : !: ; NO DIALTONE
:.: :
::
::
! 1
++ + ATH
OK
1 I
| . : ; , .:
ATA
: .. : :
;:
::: |:: :
: .-:; ::,: . :-: , : : ; ; ::; "...
I i
CONNECT
1 I
:.: :::
| :i
OK
| . (/SD):
1 :-:
J""
I|MILI
^MiL3
1
::"";'
"
. 7.8.
166
:
:
RING
+++
'. :^5-:
".".".^. .V.A..""^"V.".V."VV
V.V.'.V'.V'.".'.'."
. OK
"'"."" ''"
11
I
"'"-"
;:.:
]
T.|.K.;.;.;
(Point to Point Protocol),
SLIP (Serial Line Internet Protocol), SLIP
.
- (Point-to-Point Protocol).
.
,
. :
IPCP (IP Control Protocol) , IP-
.
HDLC (High level Data Link Control) , .
LCP (Link Control Protocol) -- ,
, .
NCP (Network Control Protocol) ,
, .
Linux - pppd, /etc/ppp/options. .
, ,
.
, .
, :
1. . , .
.
2. PAP (Password Authentication Protocol) .
( ).
,
.
, . - , , .
3. CHAP (Challenge Handsnake Authentication Protocol)
/.
. :
* ;
MD5 .
, ;
, .
167
7.3.1.
,
.
. , - -
Windows, ? . ,
,
. ,
,
(. . 7.1).
7.1
POP ()
IP-
IP- DNS
083
dialup
name
Password
0.0.0.0
194.183.166.3
194.183.166.3
frk.kr.ua ( host.kr.ua)
proxy.frk.kr.ua:8080
, .
-,
, .
.
. ,
. . 17
.
-, : PassWord.
, .
, IP- ( ),
0.0.0.0 . IP- DNS,
DNS.
. IP- IP DNS, .
-. ,
-, - .
, . ,
RPM, pppd .
:
# mount /mnt/cdrom
# rpm -ih /mnt/cdrom/Mandrake/RPMS/ppp*
168
, .
. : dmesg | grep .
.
ftp://ftp.linuxcare.com.au/pub/ppp/ .
:
t ./configure
I make
# make i n s t a l l
,
.
, , :
# hostname n a m e . f r k . k r . u a
/etc/hosts . conf (
):
order hosts,
multi on
bind
, -- / e t c / h o s t s ,
DNS ( ).
IP-.
/etc/hosts:
127.0.0.1
0.0.0.0
l o c a l h o s t . l o c a l d o m a i n localhost
n a m e . f r k . k r . u a name
, DNS
. /etc/resolv.conf
domain f r k . k r . u a
nameserver 194.183.166.3
(
nameserver). .
,
:
1. .
2. .
3. -.
- ,
:
pppd
/usr/sbin/ppp-on
/usr/sbin/ppp-off
/etc/ppp/ppp-on-dialer
/etc/ppp/options
169
-on -,
ppp-off -- . -
( 7.1).
7.1. -
#!/bin/sh
PHONE=083
ACCOUNT=mylogin
PASSWORD=mypassword
LOCAL_IP=0.0. .
# ,
#
# 0.0.0.0
REMOTE_IP=0.0.0.0
NETMASK=255.255.255.0
export PHONE ACCOUNT PASSWORD
DIALER=/etc/ppp/pp-on-dialer #
exec / u s r / s b i n / p p p d debug lock modem c r t s c t s / d e v / t t y S 2 3 8 4 0 0 \
asyncmap 2 0 A O O O O escape FF kdebug 0 $LOCAL_IP:$REMOTE_IP \
n o i p d e f a u l t n e t m a s k $NETMASK d e f a u l t r o u t e connect $DIALER
,
COM3, /dev/ttys2,
- - 38400 /. : ppp-on-dialer
(. 7.2).
7.2. ppp-on-dialer
#!/bin/sh
exec chat -v \
TIMEOUT 3 \
ABORT ' \ n B U S Y \ r ' \
ABORT A N S W E R \ r ' \
ABORT ' \ n R I N G I N G \ r \ n \ r \ n R I N G I N G \ r ' \
w
\rAT \
-+++\-' \
TIMEOUT 30 \
OK ATDP$PHONE \
CONNECT w \
name:name:
$ACCOUNT \
password:
$PASSWORD
:
, OK ATDSPHONE. !
/etc/ppp/options (. 7.3).
770
7.3. /etc/ppp/options
# ,
# domain
#
lock
domain frk.kr.ua
# pppd
#
-detach
#
modem
#
crtscts
#
defaultroute
asyncmap
# 552
mtu 552
# 552
mru 552
:
-
:
ping 1 9 4 . 1 8 4 . 1 6 6 . 3
ppp-off.
7.3.2. PAP- -
-
. , ,
, ,
, -, ,
.
(LCP), .
CHAP,
/etc/ppp/options:
_
I
+
-chap
# CHAP
#+chap
#-
171
/ e t c / p p p / p a p - s e c r e t s / e t c / p p p / c h a p - s e c r e t s .
/etc/ppp/pap-secrets :
# Secrets f o r a u t h e n t i c a t i o n u s i n g PAP
# client
server secret
acceptable local
user
*
Password
IP addresses
,
IP-.
CHAP , ,
. /etc/ppp/chap-secrets
server. .
.
- DrakConf
Linux Mandrake (. . 7.9).
?^
^11^
Disable Internet Connection
Configure local network
Disable networking
. 7.9.
DrakConf
7.4. DSL-
.
(DSL -- Digital Subscriber Line).
(ADSL). (SDSL),
(RADSL), (Very high-speed DSL, VDSL).
ADSL-
. .
ADSL-
: ,
, . .
,
. - 1.5 6 /, - -- 16 /
1 /. .
, 772
, .
.
.
7.4.1. DSL Linux Mandrake
, Linux Mandrake. ,
(. 7.4.2) , .
, , dhcpcd, pppoe-linuxconf,
rp-pppoe. ,
root. ,
/mnt/cdrom/Mandrake/RPMS:
cd /mnt/cdrom/Mandrake/RPMS
rpm
rpm
rpm
rpm
-i
-i
-i
-i
:
ppp-2.4.0-3mdk.1586.rpm
dhcpcd-1.3.19pll-lmdk.1586.rpm
pppoe-linuxconf-1.2_1.21.1-lmdk.1586.rpm
rp-pppoe-1.7-3mdk.1586.rpm
.
.
DrakConf Network and
Internet configuration (. . 7.10).
Configure an ISpN connection
Configure a DSL { ADSL) connection
Configure DSL
Configure a cable connection
Configure local network
(or ADSL) connection .
Disable networking
, , , . 7.10.
.
.
(use ). , , ,
don't use . - .
(. . 7.11) DSL.
the Interne connection ? Co
>epfta(!p.r!
dns 1
Accountiogjn:(usetnanie] V
OK
. 7.11.
173
.
Point to Point Protocol Over Ethernet , -
Ethernet. , ADSL-, .
adsl,
.
7.4.2. DSL
, dhcpcd, rp-pppoe , , linuxconf. Red Hat- ,
, Linux Mandrake.
(, Slackware) .
, ADSL-,
. Point to Point Protocol Over Ethernet
, - Ethernet.
2.2.9 pppd 2.3.10 . pppd ,
:
pppd: unknown option pty.
QuickStart .
, .
QuickStart
, , ./go
go , .
.
root, root, .
, root,
su, .
, ,
:
1.
tar x z v f
rp-pppoe-nnn.tar.gz
2.
./configure
3.
make
4.
make install
174
.
, , Ethernet-,
.
:
ifconfig ethO
, N = 0.
(
):
ethO Link encap:Ethernet HWAddr X X : X X : X X : X X : X X : X X
::::: . ,
.
netconf.
!
IP-.
( ).
/etc/ppp/pap-secrets,
- , /etc/ppp/chapsecrets CHAP. ,
:
_
!-
, : 'pupkin' * '123456' * ,
pupkin 123456. , /etc/ppp/options !
, , ,
.
lock.
/etc/ppp/pppoe.conf. :
ETH=ethl ethl , ADSL-.
USER=bxxxxnxnx@sympatico.ca ID-.
. . ,
. ,
/ e t c / r e s o l v . c o n f , :
nameserver first_DNS
nameserver second_DNS
first_DNS IP- DNS ,
second_DNS .
domain <_^>
search <_>.
175
Firewall. :
1. , ,
.
2. / e t c / r e . d / i n i t . d / f i r e w a l l .
3. chkconfig firewall on
4. firewall: sh /etc/rc.d/init.d/firewall start
Red Hat- .
, , Red Hat-
ADSL-
( / e t c / r e . d / i n i t .d/adsl).
, , chkconfig add adsl. ,
Slackware, / e t c / r e . d / r c . local
/usr/sbin/adsl-start.
. .
ADSL- ,
.
MTU (Maximum Transmit Unit) , . MTU .
, .
MTU . , , , .
, ,
. MTU=1460.
Firewall,
MTU 1452. MTU=1452
- 1412. - ,
.
,
Linux , :
ifconfig ethO ratu 1452
176
.
Windows, ,
. :
:
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\NetTrans\xxxx]
ID
: MaxMTU
: REG_SZ
Windows
: http://support .microsoft, com/support/kb/articles/q!20/6/42. asp
Message too
long, , MTU,
1452 1412.
ADSL-
:
adsl-start
adsl;
adsl-stop
adsl.
ADSL- , .
Perl.
7.5.
, dial-up,
(leased) . , ?
() :
. . , (
).
,
()
. (dedicated)
(leased) .
, .
. 7.3. , . .
: dmesg | grep .
, . /dev/ttySO,
/dev/ttySl. /etc/ppp/options . /dev/ttySO /dev/ttySl
/ e t c / p p p / o p t i o n s . t t S O / e t c / p p p
177
/ o p t i o n . t t y S l . / e t c / p p p / o p t i o n s . t t y S O ,
7.4.
7.4,
/etc/ppp/options.ttySO
#
/dev/ttySO
#
57600
noauth
mru 1500
# :
192.168.99.1:192.168.99.2
#
netmask 2 5 5 . 2 5 5 . 2 5 5 . 0
bsdcomp
chap-interval 15
debug
crtscts
mtu 552
mru 552
-detach
.
: 192.168.99.1:192.168.99.2. ( , )
192.168.99.0 (netmask 255.255.255.0). (. man route).
, / e t c / o p t i o n s . t t y S O defaultroute.
, .
.
, (. . 7.2).
7.2
noauth
He , .
auth
crtscts
(., RTS/CTS),
xonxoff
(., XON/XOFF),
mru n
mtu n
178
. 7.2
chap-interval
pppd __
debug
( -d). , pppd
.
syslog. /etc/syslog.conf. pppd extra-, ,
112 daemon
-detach
( pppd ,
)
connect
disconnect
asyncmap
local
7.3
, pppd
async- - 32-bit hex;
- , escape-,
pppd . 0x00000001 - '\01', 0x80000000 - '\x1f
modem
lock
, pppd
passive
silent
-all
pppd LCP- ,
LCP- ( passive pppd)
LCP IPCP (
)
-am
asyncmap
-ip
IP- ( options,
)
-mru
-pc
+pap
-pap
-
+chap
domain _
name _
( )
user
,
. name
login
idle n
n ,
speed
( )
179
, inittab. / e t c / i n i t t a b :
7:2345:respawn:/usr/sbin/pppd file /etc/ppp/options. > /var/log/pppSO.log
8:2345:respawn:/usr/sbin/pppd file /etc/ppp/options.1 > /var/log/pppSl.log
7 8 , 1...6 ttyl-tty6. 2345 - - . inittab
, 7.5:
.
8 Linux init (PID= 1),
/etc/inittab
/etc/re.d/rc.sysinit. ,
( ), ( ). inittab. (. 7.5)
.
init N, N .
, , 5.5.
7.5. inittab
id:3:initdefault:
# System initialization.
si::sysinit:/etc/re.d/re.sysinit
10:0:wait:/etc/re.d/rc 0
11:1:wait:/etc/re.d/rc 1
12:2:wait:/etc/re.d/rc 2
13:3:wait:/etc/re.d/rc 3
14:4:wait:/etc/re.d/rc 4
15:5:wait:/etc/re.d/rc 5
16:6:wait:/etc/re.d/rc 6
t Things to run in every runlevel.
ud::once:/sbin/update
# Trap CTRL-ALT-DELETE
c a : : c t r l a l t d e l : / s b i n / s h u t d o w n -t3 -r now
p f : :powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"
pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"
7.6.
, . , .
, , ,
. ,
( , ) .
. ,
,
!!!
-, , . ,
, , , . :
( )
, . Reset
( ) -
- . , (SETUP) , , . , -
Reset .
, .
(, Chaintech CT 6ATA2).
, . ,
Reset, . ( )
.
,
,
. , ,
.
.
, ,
, . ,
,
, ( ) , , . ,
,
. :
().
. :
1. (backup).
2. -.
3. .
181
, ,
. ,
, , .
- .
, - .
300 (VA),
1200...2000 (VA). - Back-UPS PRO
1400 VA (670 W) .
.
, , ,
.
, ,
: Pentium 166/200 ( PPRO
200) 128MB /4-6 HDD. ,
, . ,
,
-.
, , , , .
, , , .
.
.
, .
1999-2000
Intel 440BX. . -, (FSB)
133 ,
Intel Pentium III. -, , Intel 440BX, 1 .
. 64-
PCI 66 ( /100). .
Intel i820
1840. FSB 133 , /66,
1 2 . : RDRAM. , Rambus DRAM, , .
SDRAM .
ServerWorks ServerSet III
(IV). ,
182
/, Intel 840. ServerSet
III 16GB , FSB 133 .
Registered RAM.
Pentium III .
64- PCI. ServerSet III IOAPIC (I/O Advanced Programmable Interrupt Controller).
ServerSet IV Intel Pentium
IV, DDR SDRAM (200 ), 64 .
ServerSet III
SuperMicro (www.supermicro.com), (www.tyan.com),
. ,
, , .
. ,
,
Intel. ,
Intel,
.
: , . .
, . ,
, .
SCSI, 10000 rpm (rotates per minute). /
100(133) 7200 rpm .
,
. ,
RAID.
RAID, Linux RAID . 4.
,
.
IBM, WD, Quantum.
Quantum.
-- , ,
( ),
. .
. ,
Realtek,
. , .
.
,
ZyXEL. ZyXEL
, .
183
8.1. /etc/services
-2
.pop-2
pop-3
p.op-3
109/tcp
109/udp
110/tcp
110/udp
postoffice
# POP v e r s i o n 2
# POP v e r s i o n 3
postoffice .
(
8.1 TCP UDP) /
(. 8.2).
8.2. ftp (RedHat)
ftp-data
ftp
20/tcp
21/tcp
,
/etc/services.
,
.
: stream ()
TCP, dgram () UDP raw IP.
.
.
wait nowait. wait, inetd
,
. .
, ,
. nowait :
.
stream nowait,
dgram wait.
185
., ,
( ).
(
), .
.
(. 8.3) /etc/inetd.conf.
8.3. /etc/inetd.conf
f t p stream
:
top
nowait
root/usr/sbin/tcpd
in.ftpd
ftp
stream
tcp
;
stream ( );
( tcp,
FTP
);
nowait
;
root
FTP root;
/usr/sbin/tcpd.. , ;
in.ftpd
, , tcpd (
).
, ftp (ProFTP):
f t p stream
tcp
nowait
root/usr/sbin/in.proftpd
in.proftpd
ProFTP. in.proftpd
proftpd. ,
, proftpd inetd, standalone.
8.1.2. tcpd
inetd
-. ,
. , inetd
, -.
tcpd ( TCP-Wrappers). ,
tcpd,
.
tcpd .
.
186
h o s t s . a l l o w , , a hosts.deny .
:..
, ALL. ALL:ALL
(. 8.4).
8.4. /etc/hosts.allow
http:ALL
ftp:ALL
ALL:server.dhsilabs.com
16- , . ,
, .
IPv6 RFC 1883, IPv4 RFC 791.
8.1.4. xinetd
xinetd inetd. ,
, , inetd tcpd. xinetd,
inetd, IPv6.
IPv6, xinetd - . xinetd Red Hat 7-
.
, .
xinetd RPM-, xinetd http://www.svnack.net/xinetd
.
, , ./configure,
(
root). configure , . 8.1.
187
configure
--with-libwrap
--with-loadavg
--wilh-inet6
8.1
tcp wrappers.
libwrap. xinetd /etc/hosts. allow /etc/hosts. deny
,
xinetd maxjoad. ,
IPv6
!
IPv6 IPvA- IPvG-
( ) IPv6.
, IPv6.
IPv6,
http://www.kernel.org. , IPv6 IPv4
. .
. 8.1.
188
8.1.5. xinetd
xinetd. conf :
service < service_name>
<> <_> <> <> . . .
<> <_> <> <> . ..
<> <_> <> <> . . .
Service_name -- (login, shell, telnet, ftp, .).
: =, +=, -=.
= ().
:
=
;
+=
;
.
, .
inetd. . 8.2.
xinetd
Id
Flags
8.2
, .
:
RPC
RPC (Remote Procedure Call).
UNLISTED /etc/rpc rpc- /etc/services
.
INTERNAL xinetd ( echo, time, daytime, chargen,
discard).
RPC- xinetd, inetd inetd xinetd .
/etc/inetd.conf RPC-, ,
/etc/xinetd.conf
:
NODELAY
tcp- TCP_NODELAY.
TCP-!
DISABLE
.
KEEPALIVE SO_KEEPALIVE. TCP-!
REUSE
SO_REUSEADDR .
INTERCEPT , ,
.
NORETRY .
IDONLY
- .
identification-
disabled
2 , yes . yes,
socket_type
. :
stream
stream, ,
TCP
dgram
dgram, ,
UDP
raw
raw , IP
seqpacket seqpacket ,
189
. 8.2
protocol
wait
user
server
server_args
log_on_failure
log_on_
success
rpc_number
rpc_version
env
passe nv
port
redirect
interface
bind
. /etc/services,
tcp- .
host:port
, . : 1=1-
interface
,
banner
banner_succe
,
ss
banner_fail
,
. .
cps
, .
,
maxjoad
instances
nice
. ,
. float
, (
). , UNLIMITED
.
RPC (Remote Procedure Call) . . RPC
.
190
.
:
1. socket_type
2. user
3. server
4. wait
protocol RFC-,
, /etc/services. rpc_version
RPC-. rpc_nuinber RFC, /etc/rpc. port
He-RPC-, /etc/services. :
1. only_from
2. no_access
3. log_on_success
4. log_on_failure
5. passenv
6. env ( -=)
.
default,
. . :
1. logjype
2. log_on_success
3. log_on_failure
4. only_from
5. no_access
6. passenv
7. instances
8. disabled
9. enabled
8.1.6. xinetd
, - .
, 8.1.7
/etc/xinetd.conf. . , . 8.3.
. 8.3 ,
. xinetd. inetd, xinetd
(. . 8.4).
191
8.3
xinetd
,
/etc/xinetd.conf
-f
-pidfile !_
-stayalive
ID-
, ( )
-loop
-d
(debug mode)
IP-,
SO REUSEADDR
-reuse
-limit
8.4
SIGUSR1
SIGQUIT
xinetd
SIGTERM
xinetd
8.1.7. /etc/xinetd
, , (. 8.5). (). ,
: , . ,
, , .
8.5.
/etc/xinetd:
#
defaults
# ,
.
instances
= 25
#
log_type
= FILE /var/log/servicelog
log_on_success
= HOST PID
log_on_failure
= HOST RECORD
only_from
= 111.11.111.0 111.111.112.0
only_from
= localhost 1 9 2 . 1 6 8 . 1 . 0 / 3 2
disabled
= tftp
service login
flags
socket_type
protocol
wait
user
server
log_type
192
= REUSE
= stream
= tcp
= no
= root
= /usr/etc/in.rlogind
SYSLOG Iocal4 info
# telnet
# ( 127.. 0.0.1)
service telnet
flags
socket_type
wait
user
server
bind
log on failure
= REUSE
= stream
= no
= root
= /usr/etc/in.telnetd
= 127.0.0.1
+= USERID
# telnet
service telnet
flags
disabled
socket_type
wait
user
server
bind
redirect
log_on_failure
= REUSE
= yes
= stream
= no
= root
= /usr/etc/in.telnetd
= 192.231.139.175
= 128.138.202.20 23
+= USERID
}
service ftp
socket_type
= stream
wait
=
user
= root
server
= /usr/etc/in.ftpd
= -1
server_args
instances
= 4
log_on_success
+= DURATION USERID
log on failure
+= USERID
t
access_times
= 2:00-8:59 12:00-23:59
f
nice
= 10
service name
socket_type
wait
user
server
#
#
#
#
=
=
=
=
dgram
yes
root
/usr/etc/in.tnamed
7 . 851
93
service tftp
socket_type
wait
user
server
server_args
=
=
=
=
=
dgram
yes
root
/usr/etc/in.tftpd
-s /tftpboot
# SMTP- Qmail.
# xientd
service smtp
socket_type
protocol
wait
user
id
server
server_args
log_on_success
log_on_failure
#
#
#
#
#
#
= stream
= tcp
= no
= qmaild
= smtp
= /var/qmail/bin/tcp-env
= /var/qmail/bin/qmail-smtpd
-= DURATION USERID PID HOST EXIT
-= USERID HOST ATTEMPT RECORD .
finger,
. , ,
root host.com,
: finger root@host.com
finger.
service finger
{
socket_type
disabled
wait
user
server
}
service echo
stream
yes
no
nobody
/usr/etc/in.fingerd
type
id
socket_type
protocol
user
wait
INTERNAL
echo-stream
stream
tcp
root
no
service echo
type
id
socket_type
protocol
194
=
=
=
=
INTERNAL
echo-dgram
dgram
udp
user
wait
}
service rstatd
<
type
disabled
flags
rpc_version
socket_type
protocol
server
wait
user
}
= root
= yes
=
=
=
=
=
=
=
=
=
RFC
no
INTERCEPT
2-4
dgram
udp
/usr/etc/rpc.rstatd
yes
root
>
, ,
.
111.111.111.0, 111.111.112.0 192.168.1.0. , 192.168.1.0/32. sendmail
qmail. qmail standalone,
25- ,
smtp xinetd. : finger, telnet.
195
Telnet - ()
ssh
,
(session hijacking)
(DNS spotting).
Secure Shell :
BlowFish 64- . .
DES (Data Encryption Standard) .
, '. DES .
IDEA (International Data Encryption Algorithm)
. 128- , BlowFish DES.
RSA (Rivest-Shamir-Adelman algorithm) --.
.
, . , IDEA RSA.
, BlowFish,
, DES.
ssh ,
,
. ssh http://
www.cs.hut.fi/ssh/. ssh UNIX ,
Windows- ( Windows) .
ssh , .
telnet , telnet-, . ,
, .
ssh , ,
DES 3DES.
796
sshd, Linux/UNIX, ssh, Linux,
Windows. ssh,
/ u s r / s r c / .
, :
cd /usr/src/
tar xzf ssh-2.4..tar.gz
cd ssh-2.4.0
./configure
make
make install
ssh , sshd
, . .
sshd 22 (. 8.6). , ssh
xinetd/inetd httpd- standalone.
8.6. /etc/services
ssh
ssh
22/tcp
22/udp
sshd .
.
ssh.
Linux/UNIX ( Windows- ssh) :
$ ssh hostname.domain
ssh . , , .
, , . Ctrl+D.
,
-1 ssh:
ssh -I user h o s t n a m e . r u
ssh,
(. . 8.3).
Windows- , .
, blowfish.
, 3DES.
ssh telnet.
, . ssh
. 8.5.
797
j" - - (Jen@lQca8*ost** -
. 8..
ssh
-
-
- blowfish|3des
-
-f
-i _
-1 ^
-
-q
-X
-X
-1
-2
-4
-6
8.5
SSH. blowfish, 3des
, .
SSH. blowfish, twofish, arcfour, cast,
des 3des
ssh .
1 1 . , ssh -f host xterm
( RSA/DSA)
, ssh
( 22)
. .
1 1
1 1
SSH
SSH
IP- IPv4
IP- IPv6
sshd -- - ssh. sshd
, SSH.
sshd SSH SSH 1, SSH 2.
SSH 1
2 : DSA, . ,
. - (Diffie-Hellman key agreement).
: 128- AES,
Blowfish, 3DES, CAST128, Arcfour, 192- AES 256- AES.
sshd . 8.6.
sshd
-d
-
-f _
-h _
8.6
( 768).
, SSH 1
(DEBUG).
.
, sshd
,
.
/etc/ssh/sshd_config
, , ,
. 600 .
, .
0
( ).
/etc/ssh/ssh_host_key. , sshd root. ,
sshd , . , ()
, ()
99
. 8.6
-i
-k
, .
3600 (1 ). ,
SSH 1
, sshd .
22
-q
-t
. .
,
.
-D
-4
IP- IPv4
-6
IP- IPv6
/ e t c / s s h / s s h d _ c o n f ig , 8.7
8.7 /etc/ssh/sshd_config
#
#
f
#
Port 22
iProtocol 2,1
#ListenAddress 0.0.0.0
#ListenAddress ::
HostKey /etc/ssh/ssh_host_key
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
ServerKeyBits 768
LoginGraceTime 600
KeyRegenerationlnterval 3600
PermitRootLogin yes
#
# Don't read ~/.rhosts and -/.shosts files
IgnoreRhosts yes
# Uncomment if you don't trust ~/.ssh/known_hosts for
RhostsRSAAuthentication
#IgnoreUserKnownHosts yes
StrictModes yes
XllForwarding yes
XllDisplayOffset 10
200
PrintMotd yes
#PrintLastLog no
KeepAlive yes
# Logging
SyslogFacility AUTHPRIV
LogLevel INFO
tobsoletes QuietMode and FascistLogging
RhostsAuthentication no
#
# For this to work you will also need host keys in /etc/ssh/
ssh_known_hosts
RhostsRSAAuthentication no
I similar for protocol version 2
HostbasedAuthentication no
i
RSAAuthentication yes
# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
PermitEmptyPasswords no
# Uncomment to disable s/key passwords
#ChallengeResponseAuthentication no
# Uncomment to enable keyboard-interactive authentication
# Warning: enabling this may bypass the setting of 'PasswordAuthentication'
#PAMAuthenticationViaKbdInt yes
# To change Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#AFSTokenPassing no
#KerberosTicketCleanup no
# Kerberos TGT Passing does only work with the AFS kaserver
fKerberosTgtPassing yes
#CheckMail yes
#UseLogin no
iMaxStartups 10:30:60
#Banner /etc/issue.net
tReverseMappingCheck yes
Subsystem sftp/usr/libexec/openssh/sftp-server
,
.
201
Port ,
( -.):
Port 22
Protocol. SSH:
Protocol 2,1
, SSH 2,
SSH 1.
, , Protocol 1.
ListenAddress ,
.
. :
/etc/ssh/ssh_host_key
/etc/ssh/ssh_host_rsa_key
/etc/ssh/ssh_host_dsa_key
ServerKeyBits SSH . 768-
(768 ).
LoginGraceTime -g:
, . 600 . , .
KeyRegenerationlnterval -k.
, .
3600 (1 ).
PermitRootLogin , root
ssh. :
PermitRootLogin yes
, PasswordAuthentication PermitEmptyPasswords. ( yes) , ( yes) .
:
PasswordAuthentication yes
PermitEmptyPasswords no
,
man sshd.
8.3.
route IpChains. , . 14.
202
.
IPChains . , . , ,
, ,
.
, ethO ethl:
i f c o n f i g ethO 192.168.1.1 up
i f c o n f i g ethO 1 9 2 . 1 6 8 . 2 . 1 up
192.168.1.0
192.168.2.0. , ,
192.168.1.*,
:
route add net 1 9 2 . 1 6 8 . 1 . 0 192.168.1.1 netmask 2 5 5 . 2 5 5 . 2 5 5 . 0
192.168.2.* ethl:
route add net 1 9 2 . 1 6 8 . 2 . 0 192.168.2.1 netmask 2 5 5 . 2 5 5 . 2 5 5 . 0 0
. - . .. 192.168.1.1 192.168.2.1
, 0.
IP-,
, 192.168.1.11, , :
route add default 192.168.1.11 1
, . = 1. ,
.
, ,
. , 192.169.1.0 192.168.2.0.
IpChains:
ipchains -P forward DENY
ipchains -A f o r w a r d -s 1 9 2 . 1 6 8 . 1 . 0 / 2 4 -d 1 9 2 . 1 6 8 . 2 . 0 / 2 4 -j ACCEPT
ipchains -A forward -s 1 9 2 . 1 6 8 . 2 . 0 / 2 4 -d 1 9 2 . 1 6 8 . 1 . 0 / 2 4 -j
ACCEPT
, , . 14.
203
,
, .
DHCP.
, , , , .
, dhcp IP echo "I" > /proc/sys/net/ipv4/ip_dynaddr. DHCP Linux
(dhcpd) (dhcpcd).
IP- ,
. , ,
.
dhcpd / e t c / d h c p . c o n f .
DHCP- IP- / e t c / d h c p . c o n f . dhcpd
dhcpd.leases,
/var/dhcpd.
,
(. 8.8). ,
/etc/dhcp.conf ,
dhcpd . /etc/rc.d/init.d/dhcpd stop ,
/etc/rc.d/init.d/dhcpd start .
8,8. /etc/dhcpd.conf
I , ,
# .
subnet 1 9 2 . 1 6 8 . 1 . 0 netmask 2 5 5 . 2 5 5 . 2 5 5 . 0 {
#
option routers 192.168.1.1;
# 2 5 5 . 2 5 5 . 2 5 5 . 0
option subnet-mask 2 5 5 . 2 5 5 . 2 5 5 . 0 ;
# NIS,
option nis-domain "domain.ua";
option domain-name "domain.ua";
f DNS-,
option domain-name-servers 1 9 2 . 1 6 8 . 1 . 1 ;
#
# 192.168.1.50-192.168.1.250
range 192.168.1.10 1 9 2 . 1 6 8 . 1 . 2 5 4 ;
# , 21600 (6 )
#
default-lease-time 21600;
# 28800 (8 )
max-lease-time 28800;
204
. -. ,
- - IP-. host:
host myhost {
hardware ethernet x x : x x : x x : x x : x x : x x ;
fixed-address 1 9 2 . 1 6 8 . 1 . 9 ;
}
subnet, IP-. ,
::::: IP- 192.168.1.9.
:
subnet 1 9 2 . 1 6 8 . 1 . 0 netmask 2 5 5 . 2 5 5 . 2 5 5 . 0 {
#
host myhost {
hardware ethernet 00 : 40 :C7 : 34 : 90 : IE;
fixed-address 192.168.1.9;
, 00:40:7:34:90:1
IP- 192.168.1.9. , IP-
myhost 192.168.1.9 192.168.1.0 subnet 192.168.1.0, - !
*
*
-
TCPNetView.
http://www.enet.ru/~gorlach/netview/. , : Windows. , , ,
-. Linux, -.
Trafshow, -. Trafshow, TCPNetView (. . 8.4).
TCPNetView Untitled .1
I
'[
. 8.4.
TCPNetView
205
, , WINS,
Samba.
subnet :
option n e t b i o s - n a m e - s e r v e r s 1 9 2 . 1 6 8 . 1 . 1 ;
option netbios-dd-server 1 9 2 . 1 6 8 . 1 . 1 ;
option netbios-node-type 8;
.
WINS (Windows Internet Name Service) () NetBIOS IP-. WINS
NetBIOS, Microsoft .
Samba SMB (Server Message Block),
NetBIOS. Samba
, Linux,
Microsoft.
. , :
#
option broadcast-address 1 9 2 . 1 6 8 . 2 . 2 5 5 ;
# IP-Forwarding
option i p - f o r w a r d i n g on;
t :
server-identifier server.domain. ua;
'' " j : !: ;
NetBIOS
DNS | | WINS
!
.
JP, g
.
Enabietf .
Contlgmotie if
Pfimaryname * domain
Manual
[* Dhcp
| ^ Botrtp
tP- :
IP caress
NetmasMopD .
r~
,.J
''
Net device
Kernel module
port (opt)
Irq (opO
. 8.5. Windows-
206
.;
Accept
Cancel
Help
. 8.6. Linux-
(6 )
(8 )
207
host dhcp52 {
hardware ethernet 00:40:C7:34:90:2A;
fixed-address 192.168.1.52;
8.5. . MRTG
. ,
,
, .
ifconfig. , :
cat
/proc/net/dev
, CrootSdhsilabs /root]* cat /proc/net/deu
Inter-l
Receive
I Transmit
. 8.7. face Ipackets errs drop fifo framelpackets errs drop fifo colls carrier
lo: 428021
0
0
0
0 428021
0
0
0
0
0
| \
\ .
.
.
/ u s r / b i n :
. / s t a t / u s r / b i n
chmod 755 / b i n / s t a t
:
/ b i n / s t a t ethO
ethO
.
, .
ethO IP- .
208
, , ,
.
"Hello, world!".
.
IpChains. ,
, . 14,
. , --
. ,
, , , ipchains . 14.
,
. ,
IP: accounting . .
IpChains. , IpChains:
ipchains -A output -d A A A . . . -j ACCEPT
,
. :
ipchains -L -v
Chain input (policy ACCEPT: 4195746 packets, 1765818402 b y t e s ) :
Chain f o r w a r d ( p o l i c y ACCEPT: 1 4 2 9 9 9 packets, 2 9 9 4 1 5 1 6 b y t e s ) :
Chain output (policy ACCEPT: 4 1 8 2 5 9 7 packets, 1309541595 b y t e s ) :
pkts bytes target prot opt
tosa tosx ifname source destination
4
308 ACCEPT all
OxFF 0x00 any
anywhere AAA.AAA.AAA.AAA
, . ,
mark, outsize ports, .
, ... 308 4
.
ICMP. ,
- (ifname=any), ,
(source=anywhere) (prot=all).
, .
input.
,
, , , ,
.
, Cisco. , Cisco tacacs+.
.
dialin-. ftp.vsu.ru/pub/hardware/cisco
/tacacs/tac+ia-0.96pre9.3.tar.gz
209
useripacct. .
trafshow, -. (
). , ,
(. . 8.8).
, trafshow, IP-
, -. -.
,
,
here is the tcp or udp packets contained data? It is exactly uhat I uant! Noui!
.
,
, , ,
(winet) TCP pkts: 0
UUP pkts: 0
KEatas; 0
Page 1 of 1
. 8.8. trafshow
.
SNMP.
MRTG (http://www.switch.ch/misc/leinen/snmp/perl/). MRTG :
,
HTML .
MRTG (The Multi Router Traffic Grapher)
, , .
MRTG PNG, .
:
http://www.stat.ee.ethz.ch/mrtg/
mrtg ,
SNMP. ,
SNMP.
8.9.
MRTG
. 8.9.
210
SNMP
Router
, Internet
SNMP-. MRTG ,
MRTG. MRTG MRTG, .
HTTP. , MRTG Web-.
:
1. gd (http://www.boutell.com/gd/);
2. libpng (http://www.libpng.org/pub/png/);
3. zlib (http://www.info-zip.org/pub/infozip/zlib/).
MRTG :
http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/pub
RedHat 7 ,
MRTG, , .
, rpm. mrtg :
rprn' -ih mrtg*
,
, .
MRTG :
1. cfgmaker
.
2. indexmaker ... index. html
, , . .
3. mrtg
mrtg.
cfgmaker, .
:
c f g m a k e r global ' W o r k D i r : / v a r / w w w / h t m l / m r t g '
global ' O p t i o n s [ _ ] : b i t s , g r o w r i g h t ' \
output / v a r / w w w / h t m l / m r t g / m r t g . c f g
\
community^router
, . , ,
: .
, . , .
WorkDir . html- . / v a r / w w w / h t m l / ,
, Web, URL
: http://host/mrtg/
211
WorkDir HtmlDir ImageDir.
html- .
, WorkDir
HtmlDir ImageDir ,
WorkDir, mrtg , HtmlDir ImageDir .
Options . bits , ,
8. , growright,
. .
output cfgmaker
, .
.
WorkDir Options mrtg,
global output cfgmaker.
MaxBytes . , MaxBytes, .
Title ,
, PageTop ,
.
1 2
SNMP-. ( IP-)
272
SNMP- SNMP.
161:
communitygrouter:161
,
:
1. .
2. .
3. .
4. .
, :
Target[]: Vusr/bin/program'
Refresh Interval.
, MRTG. 300 .
perminute perhour
. noinfo
. :
O p t i o n s [ _ ] : bits, perminute, noinfo
, , , MRTG
, http://
localhost/mrtg/. . ,
SNMP-, Linux-, . ,
- , - .
MRTG snmpd.
:
,
. snmpd
,
mrtg, ,
SNMP.
,
. : ,
, :
1
2
3
4
1 ().
2 ().
213
3 , .
4 .
? ! ,
.
:
.
: , a MRTG .
, .
Linux . ,
, /proc/net/dev. :
cat /proc/net/dev
(. 8.7).
, , ,
, .
/proc/net/dev , .
. , . uptime.
l:51pm up 2:10, 4 users, load average: 0 . 0 2 , 0 . 0 4 , 0 . 0 0
uptime, , ,
,
. ,
2 10 . 2 10 ,
.
,
uptime uptime .
, ,
. , ,
.
count (. 8.10)
/ u s r / b i n ( !).
8.10. count
I!/bin/bash
/bin/grep "$1" /proc/net/dev | /bin/awk -F ":" '{ print $2 }' |
/bin/awk M print $1 "\n" $9 }'
:
count
, count ethO.
214
, :
2738410
1235960
2:57,
ethO
:
,
($1). awk
, .
uptime.
uptime .
, : ethO
(), .
(. . 8.10).
MRTG .
mrtg
,
. 8.10. (2)
8.11.
8.11.
/var/WHW/html/mrtg/mrtg.cfg
WorkDir: /var/www/html/mrtg/ipc
Options[_]: bits,growright
Target[ethO]: Vusr/bin/count ethO'
T i t l e [ e t h O ] : Local Ethernet
MaxBytes[ethO]: 99999999
PageToptethO]: Status of /dev/ethO
T a r g e t [ p p p O ] : V u s r / b i n / c o u n t
T i t l e [ p p p O ] : Leased line
MaxBytes[pppO]: 99999999
PageTop[pppO]: Status of /dev/pppO
8.11 , ,
. , ,
count, (ethO ).
/var/www/html/mrtg/ipc.
/ v a r / w w w / h t m l / m r t g / ,
mrtg.
MaxBytes, Title PageTop .
mrtg .
mrtg :
mrtg / v a r / w w w / h t m l / m r t g / m r t g . c f g
215
/ v a r / w w w / h t m l / m r t g / i p c . - .
mrtg ,
.
, ,
mrtg crond.
/etc/crontab ( ):
5 , 1 0 , 1 5 , 2 0 , 2 5 , 3 0 , 3 5 , 4 0 , 4 5 , 5 0 , 5 5 , 5 9 * * * * root / u s r / b i n / m r t g /
var/www/html/mrtg/mrtg.cfg
0 - 5 9 / 5 * * * * root / u s r / b i n / m r t g / v a r / w w w / h t m l / m r t g / m r t g . c f g
crond:
/ e t c / i n i t . d / c r o n d restart
mrtg ( crond).
RunAsDaemon yes.
mrtg.
, mrtg.
http://localhost/mrtg/ipc/eth0.html.
.
: ..
j
mrtg,
] htlp:localhosl.localdomaWmrtg/ipcft1 .hlml
mrtg.
::
S . k
fc -
10.0 k
8
10 12
14
16 ^
18 ^
20 22 0
8 10 12 14
Max h 39.3 kWs (0.0%) Average b 5752.0 b/s (0.0%) Current !:i 15.1 kbft (0.0%)
Max Oui:39.3kWs(0.0%) Average Ou!:5976.0b/s(0.0%) Current OutilS.l kWs(0.0%)
' I
I
24.0 k
18.0 k
12.0 k
6.0 k
0.0 k
.<
216
. 8.11.
pppO
8.6. (NFS)
. ,
, , , .
. - Microsoft. , NFS,
NFS-. ,
,
NFS-.
,
NFS, NFS.
NFS ,
netfs nfslock, nfsd mountd.
/ e t c / i n i t . d / r c . d .
, NFS. , n f s - u t i l s - 0 .2 . l-2mdk. 1586. rpm , n f s u t i l s - 0 . 2 . l - 2 m d k . i 5 8 6 . r p m .
8.6.1. NFS
, NFS,
n f s - u t i l s - 0 .2. l-2mdk. 1586.rpm.
NFS
/etc/exports. ,
(.
8.12). /home,
/pub .
8.12.
/etc/exports
/pub ( r o , i n s e c u r e , a l l _ s q u a s h )
/home/den d e n h o m e . d o m a i n . c o m ( r w )
/mnt/cdrom (ro)
/mnt/cdrom compll.domain.com(noaccess)
. /pub
.
/home/den
denhome.domain.com. /mnt/cdrom , compll.doniain.com.
, . 8.7.
277
8.7
, /etc/exports
, ,
( < 1024).
secure
insecure
secure
rw
"
noaccess
link_absolute
link relative
squash_uidssquash_gids
all_squash
no_all_squash
all_squash.
root_squash
root (uid=0)
. , root
( root) .
no_root_squash
root_squash root
( root)
anonuid=UID
anonguid=GID
8.6.2. NFS
, NFS.
- . ,
NFS- NFS,
nfs-utils-0.2.1-2mdk.i586.rpm.
, NFS-. ,
. mount:
mount -t nfs -o timeo=30 nfsserver.domain.com:/home/den
/home/den/remote/
, t nfs.
timeo , 3 . nfsserver.domain.com
/home/den.
/home/den/remote/.
, . 8.8.
DNS NFS, , DNS NFS.
NFS.
10, DNS.
, , : ,
.
218
mount
8.8
, NFS
,
, NFS
, .
bg
fQ
soft
, , NFS ( ),
/.
, - . ,
hard
, ,
NFS, ,
. ,
tcp
TCP, UDP
rsize=1024
, .
1024
wsize=1024
noexec
rsize,
,
/etc/fstab. ,
:
nfsserver.domain.com:/home/den
/home/den/remote/ nfs bg,hard,rw 1 0
8.7. ht:/Dig
Dig
Web- . Dig ,
, , Rambler, Yandex Google, .
.
Dig . (boolean method)
(fuzzy searching method).
: ,
.
HTML-
. HTML , . .
( ).
htdig.conf Dig
/etc/htdig. database_dir
279
ht:/Dig. ,
, .
start_url URL- . Dig
, .
.
Iimit_urls_to ,
. URL-, start_url.
excludejirls , .
/cgi-bin/, .
bad_extensions .
HTML (max_head_length),
(max_doc_size) (search_algoritm),
allow_virtual_hosts .
Dig : htdig, htmerge, htfuzzy,
htnotify htsearch. htsearch, htdig,
htmerge, htfuzzy . htdig ,
Web- .
htmerge , htdig,
. htfuzzy
, .
Web-, htsearch . htsearch
: , (config), (method) (sort).
GET POST.
rundig.
8.8. - SocksS
8.8.1.
SocksS -. SocksS socks5
. ,
. runsocks,
socksS .
- SocksS
, Socks- ( ICQ) . $20
: ICQ ,
- firewall.
:
IP-, SocksS- .
. 14,
. ,
- SQUID.
5190.
ICQ-:
acl SSL_ports port 5190
, SQUID, - SocksS
. -, ICQ
?
, - (SocksS SQUID)
,
.
socksS ICQ licq,
ssh, . socksS :
http://www.socks.nec.com. socksS
. , :
man socksS.conf
man libsocksS.conf
socksS.
-
(http://www.socks.nec.com/cgi-bin/download.pl) vl.O
release 11. socks5-vl. O r l l .
socksStools - -
. :
./configure
make
make install
/etc socksS. conf,
.
. (. 8.13), , .
8.13. /etc/socks5.conf
set SOCKS5_NOREVERSEMAP
set SOCKS5JSIOSERVICENAME
set SOCKS5_NOIDENT
221
set SOCKS5_MAXCHILD 128
set SOCKS5_TIMEOUT 10
auth - u
permit u interface 192.168.0. -.ethO
,
. ,
.
.
SOCKS5_NOIDENT ident-.
. , ,
- (10 ).
auth permit. , /.
auth :
auth _ _ _
(, ).
permit:
permit _ _ _
_ [_]
.
permit, -,
:
permit u cpubt 192.168. - - [100,1000] user
user ( , ). user Connect,
Ping, Udp, Bind Traceroute (cpubt) 192.168.*.*.
( -) ( -) 100.. 1000.
interface ( 8.13) 192.168.0.* ( ) ethO. permit
deny .
/etc/socks5 .passwd . :
petrov 123456
ivanov paswd
! . :
# / u s r / l o c a l / b i n / s o c k s 5 -f -s
( ).
222
,
:
11410: SocksS starting at Mon Mar 4 19:13:55 2002 in normal mode
:
# k i l l a l l socksS
8.8.2. SocksS
socksS dante-socks, http://www.inet.no/dante/. sockd.conf (. 8.14).
8.14. /etc/sockd.conf
internal: 1 9 2 . 1 6 8 . 0 . 1 port = 1080
e x t e r n a l : 111.111.111.111
client pass {
f r o m : 1 9 2 . 1 6 8 . 0 . 0 / 1 6 to: 0 . 0 . 0 . 0 / 0
}
pass
(
from: 0.0.0.0/0 to : . 192 . 168 . 0 . 0/16
command: bindreply udpreply
log: connect error
internal (, IP-), a external IP (111.111.111.111.111).
client pass ( 192.168.0.0),
pass ,
.
(0.0.0.0).
.
8.8.3. SocksS (licq)
, , Socks-.
ICQ
Windows, licq ICQ- Linux.
ICQ
ICQ, Services
(. 8.12). Preferences Connections
Server. - - SocksS
(. . 8.13).
. 8.12. icq
223
Owner Preferences For: dhsilabs
U Contact List
() Connections
^J Miscellaneous
.
General
^5 Status Mode
etephony/Data/Games
glgg
Server
^"Events
(^ Shortcut Bar
1 Port:
Firewall
User
Fieset
:
[)<3GteetingCd "'..:
- -
-;
;
~ ;:.--;
-~;
-; i
:AutoConfieutii;: ', \ :
[5190
Proxy Settings
:
i i Host |login.icq.com
~-r-:
- - > - - , ]|Socks5
i ,
-
-- ; ;:
j|
| '
g^ Email Preferences
Q5j Picture
:
glCQphone
SMS Messages
Add
[ juiijt"
Cancel ||
Apply
| |
ji
. S. 13. icq
Firewall -:
, , (socksS), (. . 8.14).
Apply ICQ Windows .
licq . -, runsocks, - ( ), licq, socksS. , licq configure
enable-socksS:
. / c o n f i g u r e enable-socksS
|5-
:
|1^1
||1,
i:lisSif*M!:;jdhsilabs
&
. S. 14. -
224
:
make; make i n s t a l l
/etc/libsocks5. conf :
socksS - - 192 . 1 6 8 . 0 . l : p o r t
192.168.0.1 socksS-, port ,
( 1080).
8.9.
8.9.1. LIDS?
LIDS (Linux Intrusion Detection System) . ,
.
LIDS
Xie Huagang Philippe Biondi http://www.Iids.org.
LIDS, .
. 0.8.x ,
0.9.x.
,
, LIDS
LIDS.
LIDS root , , , .
root, , :
Linux. ,
, (
Microsoft) - , root.
LIDS ,
.
-, LIDS . , .
.
, ,
.
Hacker-HOWTO, CD.
-, , ,
/etc/passwd, LIDS, root.
. , , LIDS,
, Is- 1.
LIDS, /etc/passwd,
login, su passwd,
8 . 851
225
, .
-, ,
, .
LIDS ,
-. LIDS .
.
LIDS , .
8.9.2, LIDS
LIDS 2.2.13 .
LIDS http://www.lids.org/download.
, LIDS
,
, , .
, LIDS .
LIDS :
, LIDS, . LIDS firewall, .
( ),
. LIDS ,
( ) . , ,
LIDS , .
: LIDS
, ,
, ,
Linux RESET, LIDS .
, LIDS, .
, (,
rpm-). ,
. LIDS,
,
Linux. LIDS:
tar x f z L I D S - x . x . x - k . k . k . t a r . g z
LIDS ,
k. /usr/src :
patch -pi / u s r / s r c / L I D S - x . x . x / L I D S - x . x . x - k . k . k . p a t c h
226
LIDS (LJDS
/usr/src). LIDS, LIDS.
/usr/src/LlDS-x.x.x/lidsadm-x.x.x :
make
make install
make install , lidsadm. l . gz ( LIDS
0.9.8), :
gzip lidsadm.1
make install.
. menuconfig ( make
menuconfig). :
1. Prompt for development and/or incomplete code/drivers (Code maturity level
options).
2. Sysctl support (General Setup).
3. Linux Intrusion Detection System support (EXPERIMENTAL) (General Setup).
LIDS LIDS
(. 8.9).
8.9
LIDS
Maximum protected
objects to manage
Maximum ACL subjects
to manage
Maximum ACL objects
to manage
Maximum protected
proceeds
Hang up console when
raising security alert
Security alert when
excepting unprotected
programs before sealing
LIDS
. 1024.
.
,
(1024)
. 1024.
, ,
,
.
.
.
Do not execute unprotected
, , ,
programs before sealing
, .
LIDS
LIDS
Try not to flood logs
.
LIDS,
LIDS LIDS. .
Allow switching LIDS
, , Allow remote users to switch LIDS
protections
protections, LIDS
. ! ( Allow any program
to switch LIDS protections)
227
. 8.9
, .
,
,
.
, SMTP.
LIDS debug (
LIDS)
. ,
LIDS
, / u s r / s r c / l i n u x
:
make
make
make
make
make
clean
dep
install
modules
modules_install
.
:
LIDS.
, , ! LIDS, ,
, . LIDS , , , .
8.9.3.
LIDS /etc /lids. : lids.cap, l i d s . n e t ,
lids.pw, lids.conf.
(cap
capabilities ). , ,
.
(lids. net) . (lids.pw)
. LIDS RipeMD-160.
lidsadm.
. lidsadm.
228
-
. . 8.10 . , lids.cap,
:
[ + /-]:
+, . . , .
, , lidsadm.
, . ,
. l i d s . 8.15.
8.15. lids.cap
+0:CAP_CHOWN
+1:CAP_DAC_OVERRIDE
+ 2:CAP_DAC_READ_SEARCH
+3:CAP_FOWNER
+4:CAP_FSETID
+5:CAP_KILL
+6:CAP_SETGID
+7:CAP_SETUID
+8:CAP_SETPCAP
-9:CAP_LINUX_IMMUTABLE
-10:CAP_NET_BIND_SERVICE
+11:CAP_NET_BROADCAST
-12:CAP_NET_ADMIN
-13:CAP_NET_RAW
+14:CAP_IPC_LOCK
+15:AP_IPCJDWNER
-16:CAP_SYS_MODULE
-17:CAP_SYS_RAWIO
-18:CAP_SYS_CHROOT
+19:CAP_SYS_PTRACE
+20:CAP_SYS_PACCT
-21:CAP_SYS_ADMIN
+22:CAP_SYS_BOOT
+23:CAP_SYS_NICE
+24:CAP_SYS_RESOURCE
+25:CAP_SYS_TIME
+2 6:CAP_SYS_TTY_CONFIG
+27:CAP_HIDDEN
+28:CAP INIT KILL
229
8.10
CAP_CHOWN
CAP_DAC_OVERRIDE
CAP DAC READ SEARCH
CAP_FOWNER
CAP_FSETID
CAPJOLL
CAP_SETGID
CAP_SETUID
CAP SETPCAP
CAP_LINUX_IMMUTABLE
CAP NET BIND SERVICE
CAP NET BROADCAST
CAP_NET_ADMIN
CAP NET RAW
CAP_IPC_LOCK
CAP_IPC_LOCK
CAP_SYS_MODULE
CAP_SYS_RAWIO
CAP_SYS_CHROOT
CAP_SYS_PTRACE
CAP_SYS_PACCT
CAP_SYS_ADMIN
CAP_SYS_BOOT
CAP_SYS_NICE
CAP_SYS_RESOURCE
CAP SYS TIME
CAP SYS TTY CONFIG
CAP_HIDDEN
CAP_INIT_KILL
230
( , )
. , ,
, root,
. ,
0600, root ( )
, ( : )
,
,
SUID SGID ,
root
root ()
, .
root.
: httpd, sendmail, safejnysql, safejinger, postfix, ftpd
, .
root
.
, SJMMUTABLE ( chattr -i) S_APPEND (chattr -a)
, 1024
:
, , firewall
..
- (Raw Unix Socket)
root
root
() .
, , /dev/mem, /dev/hd*,
/dev/sd*. , /
.
ptracef).
: . ,
, , , .
init.
,
lidsadm -I.
, , .11,
, , , .
. , ,
lids.net (. 8.16).
8.16. lids.net
MAIL_SWITCH=1
MAIL_RELAY=127.0.0.1:25
MAIL_SOURCE=localhost
MAIL_FROM=LIDS@domain.ru
MAIL_TO=admin@adminhome.ru
MAIL_SUBJECT=The intrusion is revealed
(1) (0) . MAIL_RELAY IP- SMTP
SMTP. MAIL_SOURCE , , . MAIL_FROM ,
MAIL_TO . MAIL_SUBJECT .
, e-mail-, . .
SMS ,
, LIDS?
LIDS
LIDS. (,
), :
lidsadm -P
8.9.4.
LIDS - ,
, .
lids.conf
lidsadm.
, :
lidsadm -L
:
lidsadm -
. ,
,
LIDS mode,
(inodes)
LIDS. :
lidsadm -Z
231
:
1. .
2. .
3. ().
(, ),
LIDS
. ,
, , ..
,
.
LIDS. () :
READ
.
WRITE
.....
DENY
.
APPEND
.
IGNORE
.
:
lidsadm - - -s -j
,
.
rootkit. , rootkit
rootkit'oB http://www.softerra.ru/review/security
/16999/pagel.html.
rootkit , .
:
lidsadm - - /bin -j READ
lidsadm -A -o /sbin -j READ
lidsadm -A -o /etc -j READ
lidsadm -A -o / u s r / b i n -j READ
lidsadm -A -o / u s r / s b i n -j READ
lidsadm -A -o /lib -j READ
lidsadm -A -o /boot -j READ
, ,
:
,
.
,
. ,
. , mount 232
/etc/mtab . , WRITE :
lidsadm - - /etc -s / b i n / m o u n t -j WRITE
lidsadm -A -s -o / e t c /bin/umount -j WRITE
lidsadm
lidsadm
lidsadm
lidsadm
lidsadm
-A
-A
-A
-A
-A
-s
-s
-s
-s
-s
-o
-o
-o
-o
-o
/ l i b / m o d u l e s / 2 . 2 . 1 7 - 2 1 m d k /sbin/depmod -j WRITE
/ e t c / m t a b / s b i n / f s c k . e x t 2 -j WRITE
/etc / e t c / r e . d / r c . l o c a l -j WRITE
/etc/HOSTNAME / e t c / r e . d / r c . s y s i n i t -j WRITE
/etc/mtab / e t c / r e . d / r c . s y s i n i t -j WRITE
,
,
.
, /etc/passwd /etc/shadow,
,
. :
lidsadm -A -o /etc/shadow -j DENY
lidsadm -A -o /etc/shadow -s / b i n / l o g i n -j READ
lidsadm -A /etc/shadow -s / b i n / s u -o -j READ
lidsadm -A -o /etc/shadow -s / u s r / s b i n / i n . f t p d -j READ
LIDS , (
root) .
, , , . .
, ( root). , . ,
LIDS.
.
/ v a r / l o g , READ ,
. , ,
, ,
. logrotate
/var/log.
, . ,
- .
:
INHERIT
.
NOJNHERIT
.
:
lidsadm -A -s -t - -j
()
233
-t.
LIDS . - , Linux,
security=0. LIDS
:
LILO boot: linux security=0
8.9.5. LIDS
, LIDS, , -
CAP_SYS_MODULE.
LIDS
lidsadm. lidsadm
. lidsadm , .
e-mail
LIDS. lidsadm :
lidsadm -S +/-
, . 8.11.
LIDS
-LIDS
+LIDS
+RELOAD CONF
LIDS_GLOBAL
8.11
LIDS .
, LIDS.
( ) LIDS
, ,
LIDS. LIDS
LIDS
LIDS
LIDS
LIDS.
. LIDS,
:
lidsadm -S -LIDS
vi / e t c / l i d s / l i d s . c a p
lidsadm -S - +RELOAD_CONF
lidsadm -S - +LTDS
. LIDS .
, , lids.cap. LIDS .
234
LIDS
.
. , CAP_SYS_MODULE, ,
. ,
, .
lidsadm -S - -CAP_SYS_MODULE
insmod module.
lidsadm -S - +CAP SYS MODULE
235
|Base config
|
|
v
Not managed
' v A c c t . only
Work group
Samba Server %v
(WORKGROUP
SERVER
Accept
Cancel
Help
. 9.2.
237
SHARAI!!!
share
. 9..
9.2.
Samba
/etc/smb.conf. . INI- Windows, , w i n . i n i . / e t c / s m b . c o n f
,
.
=3. [global], 9.1.
9.1. global
[global]
workgroup = WORK
comment = Linux Server
guest account = guest
security = share
printing = bsd
printcap name = /etc/printcap
load printers = yes
client code page = 866
238
workgroup NT.
comment NT Description Windows NT
Description ( ) Windows 9x. guest
account . guest
, . , , .
security :
share
.
user
, Windows.
.
server
NT.
printing printcap name .
BSD, ,
, .
.
client code page character set
Windows.
Windows NT, Service Pack 3,
. Samba .
encrypt password yes. Samba
,
Windows. ,
Windows, , Samba.
, Windows
, . Windows NT:
[NT HKEY_LOCAL_MACHINE\System\Current ControlSet\Services\Rdr\Parameters]
9.1
Dir
cd []
(,
, ). ,
, smbclient
get [] [. ]
. ,
put [] [, ]
()
, . ,
,
rm []
rmdir []
()
md []
mkdir []
()
mput []
()
del []
help
exit quit
smbclient
241
Tape
Comment
flDMIN*
public
C*
IPC*
Canon-80
Disk
Disk
Disk
IPC
Printer
Remote fldmin
Public
DeFault share
Remote IPC
Canon BJC-80
Comment
SERVER
[rootSdhsilabs /root]
Samba 2.0.7
. . . . ...
. 9.4.
-L
(. . 9.4).
Browse list (. . 9.4) SMB-
. I smbclient
DNS. , domain.ru, nt_wsl :
$ smbclient -L -I nt w s l . d o m a i n . r u
242
243
.ibH.I.MIIaii-.nflli-JlulirulH!,-!.-
"UfC'.'!'"
afxfaSsl:
m am
;j//smb-^nux/canon
7:
i!.feia
:
. 9.5.
Windows. Windows 98 :
1.
-> -> .
2. .
3. : .
4.
(. . 9.5).
5. .
9.5. Windows- ,
Linux
, /etc/printcap.
9.7.
9.7. printcap
# /etc/printcap
#
# //nt_wsl/hp5m via smbprint
#
lp:\
#
:cm=HP 5MP Postscript hp5m on nt_wsl:\
# ,
:lp=/dev/lpO:\
# ( )
:sd=/var/spool/lpd/lp:\
#
:af=/var/spool/lpd/lp/acct: \
# .
# , ,
:#0:\
#
:if=/usr/bin/smbprint:
244
. , ;
if
.
, , .
. 9.7 /dev/lpO.
Samba smbprint.
,
SMB. , ,
9.8.
Samba.
9.8. smbprint
# ! / b i n / s h -x
# () Andrew Tridgell
# ,
# /etc/printcap
# smbclient
# , Windows.
#
# smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint
#
# unix-, "smb",
# .
# /usr/spool/smb
# , .
I (Michael Hamilton)
# ,
# /usr/var/spool/lpd/PRINTNAME/.config
f
# , , /etc/printcap
# (af=...):
#
#cdcolour:\
#
:cm=CD IBM Colorjet on 6th:\
#
:sd=/var/spool/lpd/cdcolour: \
#
:af=/var/spool/Ipd/cdcolour/acct:\
I
:if=/usr/local/etc/smbprint:\
#
:mx=0:\
#
:lp=/dev/null:
245
#
t /usr/var/spool/lpd/PRINTNAME/ . conf ig
#
server=PC_SERVER
f
service=PR_SHARENAME
#password="pas sword"
f
#,
#
server=PAULS_PC
#
service=CJET_371
#
password=""
#
# , /dev/null
f
logf ile=/tmp/smb-print . log
# logfile=/dev/null
spool_dir=/var/ spool /Ipd/lp
conf ig_f ile=$spool_dir/ . conf ig
eval x cat $conf ig_file '
echo "server $server, service $service" $logfile
echo translate
echo "print -"
cat
) | / u s r / b i n / s m b c l i e n t " \ \ \ \ $ s e r v e r \ \ $ s e r v i c e " $password -U $user
-N -P $ l o g f i l e
. , ,
Samba
.
9.7. SWAT
SWAT (Samba Web-based Administrative Tool)
Samba Web-. , , netconf linuxconf, SWAT Samba. ,
, . Samba
.
, SWAT
, , .
SWAT samba-swat. -
Linux. :
rpm -ihv samba-swat-2.2.la-4.1386.rpm
,
/etc/services :
swat 901/tcp
247
disable = no
port
= 901
socket_type = stream
wait
= no
only_from = 1 2 7 . 0 . 0 . 1
user
= root_
server = / u s r / s b i n / s w a t
log_on_failure += USERID
Samba
, only_from= 127.0.0.1
SWAT.
. :
/ e t c / i n i t . d / x i n e t d restart
:
killall -HUP xinetd
inetd :
k i l l a l l -HUP inetd
! SWAT Samba SWAT.
URL:
http://host:901
|-(>
,
(. . 9.6).
:
SWAT 127.0.0.1
: [ root
:
248
- 9-6-
HOME
CLOBALS
SHARES
I Welcome to SWAT!
i
I
fcss?j^>xi
PRINTERS
STATUS ;
VIEW
; ""-".'!'
Documentation
'
PASSWORD
": :.::
* Daemons
""
E2i.i~ Hie SMB daemon
. . - * wininnd deninrm
* Configuration Files
^r- *he m."
italiontiie -
aWu Utilities
iEXSiSil"- send coniroi i
- managing SMS passwords
badaemotis
'-." ::-' ' ";:
. 9.7. Samba
Web Administration
Tool
.
(. . 9.7).
. 9.7 , SWAT
: .
Globals
(. 9.8). ,
; GtOBALS i SHARES
PRINTERS
STATUS
VIEW
PASSWORD
i Global Variables
''
: hki&
workgroup - :
JMYGROUP
server swing
1 Security jQptuji; s
"'.[nobody
|,jrfgj.:-;::-bustBijJ]ow;;' .
i i-isjp
hosts deny
; Loqqinq Ootions
'.
. 9.8.
Samba
249
f-
':**&
ghp:127.0.0.1:901 Mut
HOME
: PRINTERS
STATUS I
VIEW
PASSWORD
r 31;;!:
Help. ,
Set Default.
Shares , Printers
. Samba
Status (. . 9.9). ,
SMB NMB.
Samba, .
Passwords ,
Samba.
250
10
DNS
,
IP- , DNS.
. DNS, Linux.
DNS , .
DNS .
. (root).
: named, ,
. 10.1.
- .
. : com,
gov, net, org .
,
http://www.yahoo.com. IP-. , www.yahoo.com IP, () IP-.
DNS. DNS , . , DNS
DNS, .
: ,
com, , , DNS yahoo.com.
DNS yahoo.com IP- www 64.58.76.222
, ( , Linux, IP-).
251
DNS
.
, www.yahoo.com, DNS
:
64.58.76.222
64.58.76.228
64.58.76.223
64.58.76.176
64.58.76.224
64.58.76.177
64.58.76.227
664.58.76.179
www.yahoo.com (
) www.yahoo.akadns.net
10.1. DNS
, DNS 10...15,
30 (
), DNS . DNS
, . , , :
ps -ax I grep named
DNS , ( kill
ndc), ,
bind. , named,
bind. BIND (Berkley Internet Nameserver Deamon)
DNS-, Linux.
network. ,
, ?
. /etc/named, conf,
(. 10.1).
10.1. named.conf
logging {
category cname (null; };
};
options {
directory "/var/named";
};
zone "." {
type hint;
file "named.ca";
};
zone "dhsilabs.com" {
type master;
252
DNS
file "dhsilabs.com";
notify no;
};
zone "0.0.127.in-addr.arpa" {
type master;
file "named.local";
};
zone "1.168.192.in-addr.arpa" {
type master;
file "192.168.1";
notify yes;
};
/var/named.
. dhsilabs.com,
named.local, 192.168.1, named.ca (. 10.1, 10.3, 10.4). () dhsilabs.com.
10.1.
logging.
options. directory
-- /var/named. directory
options (, forwarders,
forward .), (. . 10.2).
directory.
, . () dhsilabs.com. /var/named/dhsilabs.com.
. IP-.
/var/named/192.168.1.
" . " " . . 127 . in-addr. arpa" . : .
named, local ,
IP- , , , 127.0.0.1 localhost.
named.ca -- ,
DNS-. DNS.
IP- ,
. ,
IP- ( ), DNS-
. ,
DNS, IP-
named.ca. named.ca , (
, , ). .
253
DNS
dhsilabs . com
IP- (. 10.2).
10.2. dhsilabs.*
@
IN
SOA
93011120
10800
3600
3600000
86400)
den
IN
IN
IN
IN
NS
A
MX
A
IN
IN
IN
ns
IN
WWW
IN
IN
IN
mail
evg
IN
IN
localhost
ftp
HINFO
MX
MX
CNAME
CNAME
CNAME
CNAME
A
MX
IN
den.dhsilabs.com. hostmaster.dhsilabs.com. (
;
; 3
;
; 1000
; TTL 24
den.dhsilabs.com.
192.168.1.1
150 den.dhsilabs.com.
192.168.1.1
INTEL CELERON (LINUX)
100 den
150 evg.dhsilabs.com.
den.dhsilabs.com.
den.dhsilabs.com.
den.dhsilabs.com.
den.dhsilabs.com.
192.168.1.2
100 den.dhsilabs.com.
A
127.0.0.1
.
. 10.1.
DNS
10.1
(name server)
IP-,
, IP-
NS
A
PTR
MX
CNAME
, .
MX . ,
, ,
http://www.dhsilabs.com, den.dhsilabs.com
HINFO
. .
,
TXT
@
IN
SOA
den.dhsilabs.com. hostmaster.dhsilabs.com. (
, (
dhsilabs.com).
10.3. named.local
@
254
IN
SOA d h s i l a b s . c o m . root, d h s i l a b s . c o m . (
199609203
/
DNS
28800
; 8
7200
; 2
604800
; 168 (1 )
86400)
;TTL 24
NS dhsilabs.com.
PTR localhost.
192.168.1 10.4.
10.4.
@ IN SOA den.dhsilabs.com. hostmaster.dhsilabs.com. (
93011120
;
10800
; 3
3600
;
3600000
; 1000
86400 )
; TTL - 24
@ IN NS den.dhsilabs.com
1 IN PTR den.dhsilabs.com
2.1.168.192
IN PTR evg.dhsilabs.com
PTR IP- .
IP, :
1 IN PTR den.dhsilabs.com
1.168.192.
IP- !
cachinnameserver, .
, DNS, :
# nslookup I tee ns
nslookup
> set q=ns ( set type=ns)
> .
DNS,
ns. ns named.ca
awk (. 10.5).
V.
10.5. reformat
#!/bin/awk
awk x BEGIN {
/root/ { print ". IN NS " $4"." }
/internet/ { print $1"." " 999999 IN A " $5 }
END '
reformat <source ffle> <output file>, :
reformat ns named.ca
namedca /var/named .
255
DNS
, .
dig, :
dig @ e . r o o t - s e r v e r s . n e t . n s > r o o t . h i n t s . n e w
named, ca
named.ca.new. , ,
.
named, ca :
NS
G.ROOT-SERVERS.NET.
6D
IN
6D
IN
NS
J.ROOT-SERVERS.NET.
6D
IN
NS
.ROOT-SERVERS.NET.
6D
IN
NS
L.ROOT-SERVERS.NET.
6D
6D
6D
6D
6D
6D
6D
6D
6D
;; ADDITIONAL SECTION:
G.ROOT-SERVERS.NET.
J.ROOT-SERVERS.NET.
.ROOT-SERVERS.NET.
L.ROOT-SERVERS.NET.
M.ROOT-SERVERS.NET.
A.ROOT-SERVERS.NET.
H.ROOT-SERVERS.NET.
.ROOT-SERVERS.NET.
.ROOT-SERVERS.NET.
D.ROOT-SERVERS.NET.
E.ROOT-SERVERS.NET.
I.ROOT-SERVERS.NET.
F.ROOT-SERVERS.NET.
IN
IN
IN
IN
IN
IN
IN
IN
IN
5w6dl6h
5w6dl6h
5w6dl6h
5w6dl6h
5w6dl6h
5w6dl6h
5w6dl6h
5w6dl6h
5w6dl6h
5w6dl6h
5w6dl6h
5w6dl6h
5w6dl6h
NS
NS
NS
NS
NS
NS
NS
NS
NS
IN
IN
IN
IN
IN
IN
IN
IN
IN
IN
IN
IN
IN
A
A
A
A
A
A
A
A'
A
A
A
A
A
M.ROOT-SERVERS.NET.
A.ROOT-SERVERS.NET.
H.ROOT-SERVERS.NET.
.ROOT-SERVERS.NET.
.ROOT-SERVERS.NET.
D.ROOT-SERVERS.NET.
E.ROOT-SERVERS.NET.
I.ROOT-SERVERS.NET.
F.ROOT-SERVERS.NET.
192.112.36.4
198.41.0.10
193.0.14.129
198.32.64.12
202.12.27.33
198.41.0.4
128.63.2.53
128.9.0.107
192.33.4.12
128.8.10.90
192.203.230.10
192.36.148.17
192.5.5.241
DNS
(intranet), ,
! . , named, conf.
.
/ e t c / r e s o l v . conf : search , 127.0.0.1.
:
search subdomain.domain.com domain.com
nameserver 1 2 7 . 0 . 0 . 1
, DNS
nameserver. ,
.
256
DNS
, . ,
http://host, host.subdomain.domain.com, , , host.domain.com. ,
. :
/ e t c / h o s t s , conf. : order hosts,bind.
, DNS,
hosts.
10.2. DNS
,- , , , . forwarders,
named.conf ( options). : ,
-
.
14400? , ,
, 56
V.90, 14. ,
, DNS ,
,
. :
.
-
DNS-, ,
. DNS- DNS- . DNS .
(DNS- ) .
, .
, ,
named.conf ( options):
forward f i r s t ;
forwarders {
192.168.99.1;
192.168.99.2;
};
,
192.168.99.1 192.168.99.2 DNS- . forwarders IP-, DNS-, DNS- , . IP-
.
9 *. 851
257
DNS
forward :
DNS- ;
first DNS- , forwarders DNS .
forward forwarders.
, , named.conf
, 10.6:
only
// ,
// f i r e w a l l
// query-source port 53;
};
zone "." {
type hint;
f i l e "named.ca";
};
,
dhsilabs.com.
, ,
.
, DNS - . , ,
, a named
, .
1, nslookup, ,
, DNS.
.
. ,
-on, . 7, ndc
start (. ), ppp-off
DNS ndc stop.
258
DNS
-on
ppp-off, DNS .
named.ca. DNS ,
-on .
ppp-off named, ca
.
() :
Jan 5 16:10:11 den named[10147]: No root nameserver for class IN
, NFS,
,
named nfsd mountd.
10.3. DNS
- ,
DNS -- (primary master)
(secondary slave)?
DNS.
.
DNS. , , .
, - , ,
,
. , DNS, .
, , domain.com.
named, conf :
zone "domain.com" {
type slave;
f i l e "domain.com";
masters { 192.168.1.1; 1 9 2 . 1 6 8 . 1 . 2 ; };
};
IP- DNS master . ,
, slave.
10.4. DNS
DNS ndc.
start, stop, reload, restart.
start , a stop . reload
, ,
restart DNS.
259
DNS
10.5. nslookup
nslookup DNS
Linux ( UNIX), Windows NT.
.
.
.
: IP- (. 10.1),
.. hint
, master (),
slave ().
, .
,
. , nslookup:
# nslookup
Default Server: myserver.domain.com
Address: 127.0.0.1
>
, ,
set q=<type> ( set type=<type>).
. 10.2.
10.2
soa
IP-
!6-
ns
ptr
DNS
wks
hinfo
IP-
mx
txt
cname
any
. ,
www.server.com. ,
any:
>set q=any
>server.com
Server: myserver.domain.com
Address: 1 2 7 . 0 . 0 . 1
Non-authoritative answer:
server.com nameserver = compl.server.com
server.com nameserver = comp2.server.com
260
DNS
server.com nameserver = comp3.server.com
Authoritative answers can be found from:
server.com nameserver = compl.server.com
server.com nameserver = comp2.server.com
server.com nameserver = comp3.server.com
compl.server.com internet address = 323.111.200.1
comp2.server.com internet address = 323.111.200.2
comp3.server.com internet address = 323.555.200.3
.
>server compl.server.com
Default Server: compl.server.com
Address: 323.111.200.1
>server.com.
Server: compl.server.com
Address: 323.111.200.1
server.com internet address = 123.111.200.2
server.com nameserver = compl.server.com
server.com nameserver = comp2.server.com
server.com nameserver = comp3.server.com
server.com
origin = comp2.server.com
mail addr = root.server.com
serial = 19
refresh = 10800 (3 hours)
retry = 7200 (2 hours)
expire = 86400 (1 day)
minimum ttl = 3600 (1 hour)
server.com preference = 10, mail exchanger =mail.server.com
compl.server.com internet address = 323.111.200.1
comp2.server.com internet address = 323.111.200.1
comp3.server.com internet address = 323.111.200.3
mail.server.com internet address = 323.111.200.17
:
Is server.com.
[comp2.server.com]
server.com. 323.111.200.2
server.com. server = compl.server.com
server.com. server = comp2.server.com
server.com. server = comp3.server.com
mail 323.111.200.17
gold 323.111.200.22
www.ie 323.111.200.11
261
DNS
jersild 323.111.200.25
compl 323.111.200.1
323.111.200.3
parasitS 323.111.200.20
www.press 323.111.200.30
compl 323.111.200.1
www 323.111.200.2
,
HINFO? , ,
. , ,
?
.
HINFO , .
:
1. IP- .
2. : DNS firewall
, ,
Is server.com.
( ) , , , allowtransfer. 10.1.1.1
10.1.2.1. , 10.1.1.1 10.1.2.1 nslookup Is .
allow-transfer
{
10.1.1.1;
10.1.2.1;
262
FTP
11
263
FTP
'-.
-.
'
. 11.1. FTP-
, ,
. ,
, 230.
, UNIX
(binary) .
, ,
, RPM, .
stream
top
nowait
root/usr/sbin/tcpd
i n . f t p d -1 -a
11.1 , FTP- ,
tcpd, .
, inetd xinetd,
(. 11.2).
264
FTP
11.2. xinetd.conf
service f t p
.,
socket_type
wait
user
server
server_args
instances
log_on_success
log_on_fallure
access_times
nice = 10
= stream
= no
= root
= /usr/etc/in.ftpd
= -1
= 4
+= DURATION USERID
+= USERID
= 2:00-8:59 12:00-23:59
-d
-I
-L
-1
-
-
-
-i
-
11.1
syslog
FTP- syslog
syslog , FTP
( 15 ).
, FTP-
FTP ( 2 )
ftpaccess
ftpaccess.
xferlog , FTP
xferlog ,
wu-ftp : ftpaccess,
ftphosts, ftpusers, ftpgroups, ftpconversions.
.
11.1.1. ftpaccess
ftpaccess.
, /etc.
/ e t c / f t p a c c e s s 11.3.
11.3. ftpaccess
class
all real,guest,anonymous
email rootdlocalhost
loginfails 3
FTP
message /welcome.msg
message .message
compress
tar
chmod
delete
overwrite
rename
yes
yes
no
no
no
no
login
cwd=*
all
all
.guest,anonymous
guest,anonymous
guest,anonymous
guest,anonymous
11.2
autogroup _
_ [...]
alias
FTP-.
( )
anonymous-root
[_]
,
. FTP-
. ,
,
266
FTP
. 11.2
email _
. ()
. ,
,
.
raw (
), . in, out,
total ( , ,
),
. anonymous ( ), guest ( ) real ( ). ,
. _ ,
. * (. 1 1.3).
:
IP-. IP-. ,
IP-: _. IP- .
IP-aflpec/cidr. IP- CIDR.
Inameserved.
, DNS-.
/_. ,
IP- ( )
cdpath ,
(
compress)
.
_.
() .
:
IP-. IP-.
IP-: _. IP- .
IP-aflpec/cidr. IP- CIDR.
Inameserved.
, DNS-.
/_. ,
IP- ( )
. _
. bit-limit
guestgroup
[ ....]
, ,
FTP
limit _
_
, , . . .
, FTP-
,
_
loginfails
, .
5
banner
class _
_
_
cdpath
compress yes | no _
defaultserver private
deny _
_
267
FTP
. 11.2
,
.
anonymous, guest, real (. class)
. anonymous,
log transfers _ guest, real (. class). _
_
, : inbound (
), outbound (). ,
(. 1 1 .3)
_
message _
.
LOGIN () \/0= ( ).
cwd=* (. 1 1.3)
.
noretrieve [15=_]
class, _
.
readme
, message
tar
,
tar yes | no _
tar
FTP-
virtual
log commands _
, wu-ftp , . , .
. 11.3.
chmod yes | no
_
delete yes |
_
overwrite yes | no
_
rename yes | no
_
password-check rfc822|
trivial | none enforce] warn
upload yes | no
_
268
11.3
chmod
.
anonymous, guest, real (. class)
delete
.
anonymous, guest, real (. class)
.
anonymous, guest, real (. class)
.
anonymous, guest, real (. class)
.
:
;
trivial '@';
rfs822 ,
RFC822 (
).
,
, . warm ,
FTP-.
enforce,
. anonymous,
guest, real (. class)
FTP
11.1.2. ftphosts
ftphosts
. , admin admm.domain.ru .
. , : . ftphosts :
allow | deny user hosts [ h o s t . . . ]
allow , hosts, .
deny, , ,
. 11.4 ftphosts.
11.4. ftphosts
allow admin 192.168.1.1
deny user 192.168.1.2 192.168.1.3
admin
IP- 192.168.1.1. - ,
. user 192.168.1.2 192.168.1.3,
.
11.1.3. ftpusers
ftpusers ,
ftp.
.
Login Incorrect, . root, bin, news, uucp. , ,
#, . 11.5.
11.5. ftpusers
root
bin
.
daemon
a dm
IP
sync
shutdown
halt
mail
news
uucp
operator
games
nobody
269
FTP
11.1.4. ftpgroups
ftpgroups ,
FTP . ,
ftpgroups yes.
, man ftpgroups.
11.1.5. ftpconversions
ftpconversions , FTP.
ftpconversions 11.6.
. 6. ftpconversions
:.Z:
:
:/bin/compress -d -
%s:T_REG|T_ASCII:OJJNCOMPRESS:UNCOMPRESS
: : . Z : / b i n / c o m p r e s s . - c %s:T_REG:0_COMPRESS:COMPRESS
. gz: : : / b i n / g z i p -cd %s:T_REG|T_ASCII:0_UNCOMPRESSrGUNZIP
: : . g z : / b i n / g z i p -9 -c %s:T_REG:0_COMPRESS:GZIP
: : . t a r : / b i n / t a r -c -f - %s:T_REG|T_DIR:OJTAR:TAR
: : . t a r . Z : / b i n / t a r -c -Z -f
%s:T_REG|T_DIR:0_COMPRESS|0_TAR:TAR+COMPRESS
: :. t a r . g z : / b i n / t a r -c -z -f %s:T_REG|T_DIR:0_COMPRESS|0_TAR:TAR+GZIP
.
.
, , . , gzip gz.
gz,
ftpconversions gz.
, UNIX,
Linux .
11.1.6. xferlog
x f e r l o g FTP, , . i FTP
, (. . 11.1).
.
, ,
. , ,
.
11.7, xferlog.
270
FTP
11.7. xferlog
Wed Jan 9 11:49:35 2002 1 localhost.localdomain
den/vmware.html a
o r den ftp 0 *
Wed Jan 9 1 1 : 5 0 : 0 8 2 0 0 2 1 l o c a l h o s t . l o c a l d o m a i n
w.out a
o r den f t p 0 *
Wed Jan 9 11:50:15 2002 1 localhost.localdomain
w.out a
i r den ftp 0 * cWed Jan 9 11:52:08 2 0 0 2 1 l o c a l h o s t . l o c a l d o m a i n
ftphosts.html b
i r den f t p 0 *
1490 /home/
281 / h o m e / d e n /
281 /home/den/
888 / h o m e / d e n /
. ,
den localhost.localdomain.
/home/den/vmware.html , 9
2002 11:49. .
1490 .
ASCII (),
(_). vmware.html ,
(). den
() (). , ftp.
. den
f t p h o s t s . h t m l . -- (i).
-- ().
w . o u t () .
.
, /etc/passwd. g
, .
, ,
i .
, x f e r l o g FTP wu-ftpd ProFTPD.
11.2. ProFTP
, , , , wu-ftpd
ProFTPD. ,
wu-ftpd, .
proftpd. wu-ftpd,
ProFTPD . standalone.
ProFTPD , . 11.4.
271
FTP
ProFTPD
-h
-
-d _
- _
-0| 1
-I
-V
11.4
.
standalone (. )
(1-5)
/etc/proftpd.conf
(0) (1) .
( )
,
ProFTPD
11.2.1. /etc/proftpd.conf
ProFTPD . /etc/proftpd.conf, - Web- Apache ( ).
11.8
ProFTPD.
11.8. /etc/proftpd.conf
#
#
ServerName "My ProFTPD server"
ServerType standalone
DefaultServer on
#
Port 21
Umase 022
Maxlnstances 30
# ,
User nobody
Group nobody
# . Directory
<Directory /*>
# , AllowOverwrite
AllowOverwrite on
</Directory>
: , , . HTML. , , (. 11.8). .
, ,
. , <Directory /*>,
</Direcory> (. 11.8). 272
FTP
, ( ).
<Directory> - . ( 11.8) .
. 11.5
ProFTPD.
ProFTPD
11.5
AccessGrantMsg
Allow from all | host | network
[,host | network!, ]]
AllowAII
,
. %
,
Limit.
( ). allow from all
Directory, Anonymous, Limit
AllowForeignAddress on | off
,
. off.
VirtualHost, Anonymous, <Global>
AllowGroup _
. Limit
AllowUser
.
Limit
AnonRequirePassword on
off
.
, .
, directory
,
AuthGroupFile
group.
/etc/group
AuthUserFile
passwd
Bind lp-
IP-
DefaultRoot
. Limit
DenyAII
,
Limit
DenyUser
<Directory>
VirtualHost, Anonymous ,
DisplayFirstChdir
_
,
. VirtualHost,
Directory, Anonymous
DisplayLogin _
<Global>
,
,
<Limit command>
FTP-, , LOGIN,
WRITE, READ, STOR
MaxClients number |
none
.
, .
Anonymous, Global
MaxLoginAttempts
Order allow, deny | deny, allow
. 3.
VirtualHost, Global
Allow Deny Limit
PersistentPassword on | off
on /etc/passwd
/etc/group, , enroot
RequireValidShell on | off
(shells), /etc/shells
273
FTP
. 11.5
ServerAdmin email
ServerType
Timeoutldle
Umask
User
UserAlias
<VirtualHost address>
email
standalone ( ) inetd.
, inetd
,
. 60 (1 )
. , (. 4)
, ProFTP
11.2.2.
Limit.
.
. 11.9.
11.9. Limit
<Directory incoming>
<Limit WRITE>
AllOwAll
</Limit>
<Limit READ>
DenyAll
</Limit>
</Directory>
Directory incoming,
Limit . WRITE Limit
AllowAll . READ Limit .
. WRITE READ Limit
STOR LOGIN (. . 11.6).
Limit Allow, AllowAll, AllowGroup,
AllowUser, Deny, DenyAll, DenyUser (. . 11.5). ,
11.10 , den. den
, IP 111.111.111.111. 192.168.2.0
Limit,
LOGIN
WRITE
READ
STOR
274
11.6
FTP
11.10. Limit
<Limit LOGIN>
DenyAll
AllowUser den
Deny from 111.111.111.111
Deny from 192.168.2.
</Limit>
11.2.3. .ftpaccess
.ftpaccess, .
, p r o f t p d . c o n f , .ftpaccess
p r o f t p d . c o n f .
11.3. -
FTP- wu-ftpd,
anonftp. ProFTPD.
anonoftp .
, FTP-
ProFTPD. ProFTPD
Anonymous. Anonymous
, .
Anonymous , . ProFTPD
enroot,
. , , ProFTPD
/etc.
, anonymous,
. ,
AnonRequirePassword (. 11.5).
Anonymous, (. 11.11.)
11.11. Anonymous
<Anonymous / v a r / f t p >
User f t p
Group ftp
UserAlias anonymous ftp
RequireValidShell o f f
<Directory *>
<Limit WRITE>
DenyAll
</Limit>
<Limit STOR>
275
FTP
AllowAll
</Limit>
</Directory>
</Anonymous>
User Group . ftp. ftp anonymous. .
RequireValidShell . ProFTPD
/ e t c / s h e l l s .
/etc/shells, . RequireValidShell off .
<Directory *> .
, .
Anonymous MaxClients,
.
. FTP
, .
, , 33 /,
, , 5 3. ,
, .
, , ,
(10...15).
.
11.4.
wu-ftpd ProFTPD
ftpshut, ftpwho, ftpcount. , ProFTPD
.
ftpshut . ftpwho , .
ftpcount .
ftpwho.
(. 11.12).
11.12. ftpwho
# ftpwho -v
Master proftpd process 759:
1113 2m55s proftpd: ftp localhost.localdomain: anonymous/
den@den.com: IDLE
(host: localhost.localdomain [127.0.0.1])
(cwd: /)
1150 Om20s
276
FTP
(host: localhost.localdomain [ 1 2 7 . 0 . 0 . 1 ] )
(cwd: /home/den)
Service class
2 users
ftpcount
(. 11.13).
11.13. ftpcount
Master proftpd process 759:
Service class
2 users
77.5. FTP
FTP-. FTP- .
, ? , ,
, .
Linux IP-,
. IP-,
. FTP- IP-.
FTP- , , ,
FTP, ,
, .
FTP- proftpd.
FTP- Web-, . VirtualHost. ,
FTP-, proftpd.conf
VirtualHost, IP- (. 11.14).
11.14. VirtualHost
<VirtualHost 192.168.1.5>
ServerName " V i r t u a l FTP Server"
</VirtualHost>
VirtualHost , ,
Anonymous, .
(. 11.15).
11.15. VirtualHost
<VirtualHost ftp.library.com>
ServerName "Online l i b r a r y "
MaxClients 15
MaxLoginAttempts
1
DeferWelcome
on
<Limit LOGIN>
Allow
from
192.168.1
277
FTP
Denyfromall
</Limit>
<Limit WRITE>
A l l o w U s e r libadmin
DenyAll
</Limit>
<Anonymous
/var/ftp/library/books>
User
library
Group
library
AnonRequirePassword on
</Anonymous>
<Anonymous / v a r / f t p / l i b r a r y >
User
ftp
Group
ftp
UserAlias
anonymous
ftp
</Anonymous>
</VirtualHost>
11.15
ftp.library.com. VirtualHost ,
DNS. IP-
, ProFTPD. 11.15 library ftp.
library . , . 192.168.1.0. libadmin.
FTP- X Window
gFTP, . gFTP ,
(. . 11.2).
nepsA^: I
-;--; :;-;:, ; ,,..-;:. "..;:.-:. . | "-1:1;-1:- . '!::?:..':--::-: :;;;: " --.:- '':'. '.'- | - --' ::-': '''- ' -' ... : ::-:- - - : ^^1; ; ,.,..-'
7 0
30
rent,.
- jden
jj :
|"*
': :': . .':;;-J | j
? ...,,
'.'.*:. (;.-
^:^^^^
' (3ynns::,',:-;:^: .
i
:
:
1 3
;i ?
s ^
i &
; :
- -
M^^M^te ?'
losMound
openoffice
winnt
linuxdg
linuxlog
Hmjx.nvrani
quota.user
4,096
4,098
4.096
S38
12,340
8,496
16.128
root
root
root
root
den
den
root
root
root
root
root
root
root root
/j ;
JnrMl.f1
:/\;-i::.:-i |
^^^--
4.096
4,096
4,096
4,096
4.096
4,096
4,096
4,096
4,096
den
den
den
den
den
den
den
den
den
-:;s|;
den
.;
den
;J
en
:;
en
:; :
en
j
en
;; ^;:
en |
:
en
. ^;:i|;
en
: !|;
-. - - -:-...
^! ^
ft.-:;:,.:,:,;-.. .,,:..,.;;:::;:.,,.,::;:::.;
:"
,-.:; -::;:.-;.--.;.
.:. :,-.":..,., :' ':".' .-':-,'.:.,.,-. . , . : : - . . ; ' : ' - .-::;/ | :.-..V'. .'--.---.-::::,:.:;::: .-.-.::. * :
Apache
12
12.1. Apache
Apache apache
apache-docs. , . .
apache-common, . Apache
, :
rpm -ih apache*
279
Apache
standalone, . . Apache
:
/etc/re.d/init.d/httpd start
/ e t c / r e . d / i n i t . d / h t t p d stop
/ e t c / h t t p d
/ c o n f / h t t p d . c o n f . ServerName.
, ( Apache DNS), , (, www.host.domain),
, , server.firma.ru. DNS- . .
(. . 12.1):
netscape h t t p : / / l o c a l h o s t
:
netscape h t t p : / / s e r v e r . f i r m a . r u
,
, Apache
.
File
Edit
View .
ornfn animator1
j-
.-'I:;.-. . &*
..*-,
,,*-
Security
a
:
"Shop
What's R
f'.-'-f
Calendar .^Channels
'. "
add content to this directory and repla e this page, The Apache '
; As the whole Linux-Mandrake discibuflon, this Apache web server is compiled with Processor-Specific Optimizations to
; take advantage of the power of the new processor generation, giving it 5-30 W more performance than any other Linux Web
id information on Mandrake Linux, please visit the web site of Ljti
sgi
This version of Apseht includes high-performance patches from the "Accelerating Apache project" >t SihC'jf. G-jii/bj^s (Up to JOOft more performance under the
SPECweb96 benchmark!), matny optimizations, Extended Application Pro gramming Interface (EAPIj, Shared memory module, hooks for SSL module, Hotwired XSSI
module, and several patches/cosmetic improvements. It is also fully modular, and many modules art. available in pre-compiled format. Also included are special
patches to enable FrontPage 2000 support, however you need to install the optional package to enable it.
Documentation for some iiMAard Apache modules and othtr siirhll modules is included.
: |->-,:Mi.<>!; < I
;' ...
j , ..\ ' i
. 12.1. Apache
280
Apache
, , . ,
, , , .
ServerName DNS.
72.2.
Apache : h t t p d . c o n f ,
s r m . c o n f , - a c c e s s . c o n f .
/ e t c / h t t p d / c o n f .
. , .
httpd.conf .
. s r m . c o n f , .
access . conf .
1.3, ,
s r m . c o n f a c c e s s , c o n f ,
h t t p d . c o n f . Apache 1.3.14-2,
Linux Mandrake 7.2.
: apache-mime. types, v h o s t s /
v h o s t s . c o n f , v h o s t s / V i r t u a 1 Home Pages . c o n f , v h o s t s /
DynamicVHosts . conf. apache-mime . types
MIME, Apache. v h o s t s . c o n f ,
VirtualHomePages .conf, DynamicVHosts .conf Web-, .
.
MIME (Multipurpose Internet Mail Extensions)
. ,
, , , .
MIME ,
(, text/plain txt).
12.2.1. httpd.conf
, , . Apache :
1. . ,,
Web-. ServerName, ServerType, Port,
User Group, ServerAdmin, ServerRoot, PidFile, DocumentRoot, UserDir.
2. : ErrorLog, TransferLog, HostnameLookups.
3. : AllowOverride, Options, Limit.
4. : StartServers, MaxSpareServers,
MinSpareServers, CacheNegotiatedDocs.
5. : Timeout, KeepAlive,
KeepAliveTimeout.
281
Apache
. :
Directorylndex, Fancylndexing AddlconByType.
7. . HTTP-
ErrorDocument.
, , 404 ( ).
8. : Redirect, Alias ScriptAlias.
9. : AddLanguage
LanguagePriority.
10. MIME-.
MIME- DefaultType,
AddEncoding, AddType, AddHandler Action.
11. : VirtualHost, Listen, BindAddress.
ServerName ServerAdmin.
.
, httpd.conf.
ServerName , Apache. ,
,
.
DNS .
ServerType , . standalone. Web-, .
Apache ,
. StartServers, MinSpareServers, MaxSpareServers.
StartServers, MaxSpareServers, MinSpareServers. ,
. StartServers ,
.
.
, , .
. .
, -. ,
. MaxSpareServers
. ,
. ,
MinSpareServers, .
,
.
6.
282
Apache
Port , ,
. 80.
Apache ,
1024, . ,
, 1024. 8080 8000.
HostnameLookups on | off. Apache . (on),
-. (off),
IP- .
,
DNS.
User Group. User Group
, .
, .
,
UID. nobody.
. Web-
, .
,
. root!
ServerAdmin , Web- Web-. - , , .
webmaster@Your_Host.com. webmaster,
, . () webmaster
/etc/aliases.
(. ). /etc/aliases :
:
newaliases. , .
ServerRoot Apache.
/etc/httpd.
BindAddress.
, IP- . * ( ), IP-
.
ErrorLog TransferLog
Apache. /etc/httpd
/logs, / v a r / l o g / h t t p d
283
Apache
. errorlog , , CGI-.
transferlog .
HostNameLookups, IP- .
PidFile - - ,
.
().
. , Apache .
CacheNegotiatedDocs -,
SQUID, , , . /1.0, Apache Pragma:
no-cache -,
( /1.1 Pragma Cache-Control).
, -
. , - . CGI, , , Pragma
( Cache-Control) -,
.
Timeout ,
.
Timeout ,
. ,
.
KeepAIive , ,
.
KeepAliveTimeOut
.
MaxClients. ,
. MaxClients ( 150) , .
MaxRequestsPerChild. , MaxRequestsPerChild, ,
.
Listen Apache IP- ()
.
DocumentRoot , .
UserDir
, . , 284
Apache
.
, UserDir DISABLED. .
Directorylndex , , .
. index.html index.php index.htm index.shtml index.cgi Default.htm
default.htm index.php3. ,
http://localhost,
Directorylndex .
Fancylndexing. , ,
, Directorylndex.
, .
Fancylndexing, . Fancylndexing ,
.
AddlconByType . , Fancylndexing. AddlconByType :
AddlconByType ( T E X T , URL) mime-type
TEXT ,
, ,
. URL ,
mime-type , .
MIME- apache-mime.types.
MIME-, ,
(. 12.1),
Addlcon AddlconByType.
12.1. httpd.conf
AddlconByType ( V X D , / i c o n s / m o v i e . g i f ) v i d e o / *
Addlcon / i c o n s / b i n a r y . g i f .bin .exe
video
/ i c o n s / m o v i e . g i f . *.
*. / i c o n s / b i n a r y . g i f . Defaultlcon.
DefaultType.
MIME-, MIME-, DefaultType.
AddEncoding.
. ,
MIME-.
MIME- AddEncoding.
AddLanguage. .
.
285
Apache
AddLanguage .
, .
. , index. html. ru, index. html. en.
LanguagePriority. , LanguagePriority
. , LanguagePriority :
L a n g u a g e P r i o r i t y en ru
http://www.server.com//.
,
, .
, ,
. (. )
. , , ,
, . ,
,
AddLanguage.
Redirect. Redirect,
. ,
/users/den /den.
URL- http://www.host.com/users/den,
http://www.host.com/den/. :
Redirect / u s e r s / d e n /den
:
Redirect /users/den/ www.den.domain.com
, URL.
Alias Alias
, , DocumentRoot
, .
/icons.
ScriptAlias Alias, CGI-.
AddType -,
apache-mime, types.
AddHandler Action. AddHandler MIME- - . Action
- . ,
-
. , , (. 12.2).
286
Apache
12.2. AddHandler Action
AddHandler text/dhtml dhtml
Action text/dhtml /cgi-bin/dhtml-parse
ErrorDocument , URL- .
.
ProFTPD, .
Directory (. 12.3).
12.3. Directory
<Directory />
Options Indexes Includes FollowSymLinks
AllowOverride None
</Directory>
Directory
.htaccess, ,
.
Directory .
AllowOverride, Options, Limit. . AllowOverride , . 12.1.
AllowOverride
12.1
None
Apache .htaccess.
,
All
.htaccess
.
Options
Options
Limit
Limit
AuthConfig
Filelnfo
Options ,
. h t t p d . c o n f ,
. h t a c c e s s . Options . 12.2.
Limit . Limit .
, , GET POST.
Limit Directory, Location
.htacccess.
287
Apache
Options
12.2
None
All
He -
FollowSym Links
SymLinkslfOwnerMatch
ExecCGI
Indexes
Includes
IncludesNoExec
.
,
, ,
CGI-
,
index.html
.
,
,
.
CGI (Common Gateway Interface)
: Get Post.
. :
<form a c t i o n = s c r i p t . c g i method=GET>
Apache Limit
.
allow, deny
allow
all
ru
,
(. 12.5). , ,
192.168.1.0
12.5. 192.168.1.0
order deny, allow
deny from all
allow from 192.168.1.
order allow deny.
allow, deny deny, allow, order
mutual-failure. , allow.
288
Apache
require .
:
, , AuthUserFile
AuthGroupFile. valid-user, ,
AuthUserFile, . Limit, require, AuthUserFile 12.6.
12.6. require
<Directory *>
AuthUserFile /var/secure/.htpasswd
AuthName Security
AuthType Basic
<Limit GET>
order deny,allow
deny form all
allow from mydomain.ru
require valid-user
</Limit>
</Directory>
12.6
.htpasswd, htpasswd. Limit mydomain.ru.
valid-user users
grpoups.
. users 12.7.
12.7. users
<Directory / u s e r s >
AuthType Basic
AuthUserFile /var/users/.htpasswd
AuthName UsersDir
<Limit GET POST>
require users denis igor evg
</Limit>
</Directory>
Location
URL-, ,
. ,
, *.html , .html. URL- .
Location 12.8.
10 .851
289
Apache
12.8. Location
<Location URL>
</Location>
12.2.2. Apache netconf
Web- Apache , netconf ( linuxconf). netconf
Server Tasks, Apache Webserver (. . 12.2).
netconf
\\
. . Defaults
|
- - - - -
j,
Apache (. . 12.3),
I ' ' '
:' '
.. - -- - "
'
\\
,
- - . '-'- '
' " &
;" : ..
; . , '
"j:
;"-'
-' .-""- - : ' : " ' . - - ;" Files specs. .. -.'.-' " ' '''' -'
-\\
, i
" . "
"'
- - : . " " " I
, I
' ' -'
" " "": ;:" ":". : Woaate | " ' " ''" "
|i
|
: ','. --V "-' "'^-*;, ' 'V ";-:
.i
mod_ssl (. . 12.4),
|
. ." . " " - . ' : -. '
:> "'-.'....
j
i
.
Dismiss
|
'Hfclp
j :
.
1
: :
:-:: ::
. 12.2. Apache
netconf
Session
SSLMutex
Accent
. 12.3. Apache
290
Cancel:
el
. 12.4. mod_ssl
Apache
12.3.
UserDir .
. public_html.
, .
, . , http://www.chat.ru/~mypage?
, ,
. ,
, UserDir .
, ,
. , www.server.com, denis,
URL- : http://www.server.com/~denis/.
,
. /home/den,
/home/den/public_html/index.html.
12.4. HTTP-
Apache
. Web-. , Web-
, Web-.
, Web- Web- , ,
develop.mycompany.com.
Apache :
,
, .
.
,
VirtuaJHost.
Listen BindAddress.
.
VirtualHost ,
ServerType, BindAddress, Listen, NameVirtualHost, ServerRoot, TypesConfig,
PidFile, MinRequestPerChild, MaxSpareServers, MinSpareServers, HTTP- (, ServerType),
- -
.
ServerName, DocumentRoot, ServerAdmin ErrorLog.
291
Apache
Apache
h t t p d . c o n f , v h o s t s . c o n f . IP-.
12.4.1.
IP-: , .
,
. HTTP/1.1. .
VirtualHost
NameVirtualHost. IP-,
VirtualHost. VirtualHost
ServerName.
. ,
DNS ,
? VirtualHost
IP-, NameVirtualHost.
VirtualHost ,
.
12.9.
12.9. www 121- lib
ServerName d e n . d h s i l a b s . c o m
<NameVirtulaHost 192.168.1.1>
<VirtualHost 192.168.1.1>
ServerName w w w . d h s i l a b s . c o m
ServerAdmin w e b m a s t e r @ d e n . d h s i l a b s . c o m
DocumentRoot / v a r / h t t p d / w w w / h t m l
ErrorLog / v a r / h t t p s / w w w / l o g s / e r r o r . l o g
TransferLog logs/access.log
</VirtualHost>
<VirtualHost 192.168.1.1>
ServerName l i b . d h s i l a b s . c o m
ServerAdmin w e b m a s t e r S d e n . d h s i l a b s . c o m
DocumentRoot / v a r / h t t p d / l i b / h t m l
ErrorLog / v a r / h t t p s / l i b / l o g s / e r r o r . l o g
TransferLog logs/access.log
</VirtualHost>
IP-,
,
. ,
12.9: www .
IP- ,
.
292
Apache
Apache
, :
ServerAlias w w w . d h s i l a b s . c o m w w w 2 . d h s i l a b s . c o m
, IP-, ,
. ,
, default:* , :
< V i t r u a l H o s t _default_:*>
,
www.dhsilabs.com lib.dhsilabs.com DNS.
12.4.2. IP-
VirtualHost , IP-, ,
. DNS
. IP- .
,
.
12.10. IP-
<VitrualHost 192.168.1.2>
ServerName w w w . d h s i l a b s . c o m
ServerAdmin webmaster@den.dhsilabs.com
DocumentRoot /var/httpd/www/html
ErrorLog / v a r / h t t p s / w w w / l o g s / e r r o r . l o g
</VirtualHost>
<VirtualHost lib.dhsilabs.com>
ServerName l i b . d h s i l a b s . c o m
ServerAdmin webmaster@den.dhsilabs.com
DocumentRoot /var/httpd/lib/html
ErrorLog / v a r / h t t p s / l i b / l o g s / e r r o r . l o g
</VirtualHost>
(. 12.10) IP-.
IP-, , IP-.
ExecCGI, CGI- . Web-
( 12.11).
12.11. Web-
# httpd.conf
<Directory /home/httpd/mail>
order d e n y , a l l o w
deny from all
allow from localhost
293
Apache
allow from 192.168
allow from 123.123.123.123
Options ExecCGI
</Directory>
# vhosts.conf
<VirtualHost 123.123 .123.123>
ServerAdmin webmaster@den.dhsilabs.com
DocumentRoot /home/httpd/mail
ServerPath /mail
ServerName wwwmail.dhsilabs.com
ErrorLog logs/error_log
TransferLog logs/access_log
ErrorDocument 403 http://www.dhsilabs.com/messages/
error403.html
</VirtualHost>
# Error 403 ,
#
Apache
2. openssl-x.y.z :
./config.
3. ( ), :
make
.
,
.
295
Apache
,
https, / e t c / h t t p d / c o n f / h t t p d . c o n f . ,
, 12.12:
12.12. https-cepeep
<VirtualHost x.x.x.x:443>
# SSL
SSLEngine on
SSLLogLevel warn
SSLOptions +StdEnvVars
SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt
SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key
SSLLog /usr/local/apache/logs/ssl_engine_log
#
ServerName w w w . d h s i l a b s . c o m
ServerAdmin webrnaster@den . dhsilabs . com
DocumentRoot / v a r / h t t p d / w w w / h t m l .
ErrorLog / v a r / h t t p s / w w w / l o g s / e r r o r . l o g
</VirtualHost>
. httpd. Apache
.
, s s l . key
:
s e r v e r . k e y s e r v e r . k e y . o r g
openssl rsa -in s e r v e r . k e y . o r g -out s e r v e r . k e y
chmod 400 server.key
!
. https://host.domain
.
Apache SSL,
bin/apachectl start startold, a startssl start.
, .usr/local/bin, openssl:
In -s / u s r / l o c a l / s s l / b i n / o p e n s s l openssl
12.5.3.
Web- ()
. , .
(, ) https,
.
, .
:
openssl genrsa -des3 -out s e r v e r . k e y 1024
296
Apache
server, key.
:
openssl req -new -key s e r v e r . k e y -out s e r v e r . c s r
.
, . ,
, :
Y o u now have to send this C e r t i f i c a t e Signing Request (CSR)
to a C e r t i f y i n g A u t h o r i t y ( C A ) for signing
, .
,
, , :
openssl genrsa -des3 -out c a . k e y 1024
openssl req -new -x509 -days 365 -key c a . k e y -out c a . c r t
.
,
. www.thawte.com.
solutions.rbc.ru.
ThawTe .
ThawTe , , .
solutions.rbc.ru ThawTe.
, s i g n . s h
mod_ssl :
./sign.sh server.csr
:
Now you have two f i l e s : s e r v e r . k e y and s e r v e r . c r t .
These now can be used as f o l l o w i n g
, .
server.key server.crt . make
.crt-.
Apache, SSL. SSL :
openssl s_client -connect l o c a l h o s t : 4 4 3 -state -debug
72.6. httpd.conf
Apache (. 12.13). ,
.
297
Apache
12.13. httpd.conf
##
## httpd.conf HTTP Apache
tt
ServerName www.dhsilabs.com
ResourceConfig /dev/null
AccessConfig /dev/null
#
#
#
#
#
#
#
#
#
#
(Dynamic Shared Object DSO)
DSO README.DSO,
Apache.
Apache,
.
:
LoadModule foo_module libexec/mod_foo.so
"/var/www/manual/mod"
298
modules/mod_autoindex.so
modules/mod_dir.so
modules/mod_cgi.so
Apache
LoadModule asis_module
LoadModule imap_module
LoadModule action_module
tLoadModule speling_module
LoadModule userdir_module
LoadModule proxy_module
LoadModule alias module
modules/mod_asis.so
modules/mod_imap.so
modules/mod_actions.so
modules/mod_speling.so
modules/mod_userdir.so
modules/libproxy.so
modules/mod alias.so
# mod_jserv mod_rewrite,
<IfDefine HAVE_JSERV>
LoadModule jserv__module
modules/mod_jserv.so
</IfDefine>
LoadModule rewrite_module
LoadModule access_module
LoadModule auth_module
LoadModule anon_auth_module
tLoadModule dbm_auth_module
#LoadModule db_auth_raodule
LoadModule digest_module
#LoadModule cern_meta_module
LoadModule expires_module
LoadModule headers_module
LoadModule usertrack_module
tLoadModule example_module
#LoadModule unique_id_module
LoadModule setenvif module
modules/mod_rewrite.so
modules/mod_access.so
modules/mod_auth.so
modules/mod_auth_anon.so
modules/mod_auth_dbm.so
modules/mod__auth_db. so
modules/mod_digest.so
modules/mod_cern_meta.so
modules/mod_expires.so
modules/mod_headers.so
modules/mod_usertrack.so
modules/mod_example.so
modules/mod_unique_id.so
modules/mod setenvif.so
#
# ( ),
# .
ClearModuleList
fAddModule mod_mmap_static.
# AddModule mod_php.c
# AddModule mod_php3.c
#AddModule mod_php4.
#AddModule mod_perl.c
# LoadModule php_module modules/mod_php.so
# LoadModule php3_module modules/mod_php4.so
tLoadModule php4_module modules/mod_php4.so
AddModule mod_env.c
AddModule mod_log_config.
#AddModule mod_log_config_buffered.
AddModule mod_log_agent.
AddModule mod_log_referer.
#AddModule mod_mime_magic.
AddModule mod_mime.
AddModule mod_negotiation.
AddModule mod_status.
AddModule mod_info.c
AddModule mod include.
299
Apache
tAddModule mod_include_xssi.
AddModule mod_autoindex.
AddModule mod_dir.c'
AddModule mod_cgi.
AddModule mod_asis.c
AddModule mod_imap.c
AddModule mod_actions.
tAddModule mod_speling.
AddModule mod_userdir.
AddModule mod_proxy.c
AddModule mod_alias.c
t mod_jserv mod_rewrite.
<IfDefine HAVE_JSERV>
AddModule mod_jserv.c
</IfDefine>
AddModule mod_rewrite.
AddModule mod_access.
AddModule mod_auth.c
AddModule mod_auth_anon.
#AddModule raod_auth_dbm.
tAddModule mod_auth_db.
AddModule mod_digest.c
tAddModule mod_cern_meta.
AddModule mod_expires.
AddModule mod_headers.
AddModule mod_usertrack.
tAddModule mod_example.
tAddModule mod_unique_id.
AddModule mod_so.c
AddModule mod setenvif.c
t
t
t
t
#
t
t DocumentRoot
t .
DocumentRoot
/var/www/html
t UserDir
t ,
t ,
t .
UserDir public_html
300
Apache
I Directorylndex ,
I , .
Directorylndex index.html index.php index.htm index.shtml index.cgi
Default.htm default.htm index.php3
# Fancylndexing # .
Fancylndexing on
# Addlcon* ,
#
AddlconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddlconByType
AddlconByType
AddlconByType
AddlconByType
(TXT,/icons/text.gif) text/*
(IMG,/icons/image2.gif) image/*
(SND,/icons/sound2.gif) audio/*
(VID,/icons/movie.gif) video/*
Addlcon
Addlcon
Addlcon
Addlcon
Addlcon
Addlcon
Addlcon
Addlcon
Addlcon
Addlcon
Addlcon
Addlcon
Addlcon
Addlcon
Addlcon
Addlcon
Addlcon
Addlcon
Addlcon
Addlcon
/icons/back.gif ..
/icons/hand.right.gif README
/icons/folder.gif 01
/icons/blank.gif 1
I Defaultlcon .
Defaultlcon /icons/unknown.gif
# AddDescription
# : AddDescription "" filename
# ReadmeName README
# : ReadmeName name
30?
Apache
ReadmeName README
HeaderName HEADER
I Indexlgnore ,
#
# : Indexlgnore namel name2...
Indexlgnore . ??* *~ *# HEADER* README* RCS
# AccessFileName ,
#
AccessFileName .htaccess
# TypesConfig mime.types
TypesConfig /et/httpd/conf/apache-mime.types
# DefaultType MIME- , # ,
DefaultType text/plain
# AddEncoding
I " "
AddEncoding x-compress Z
AddEncoding x-gzip gz
# AddLanguage
AddLanguage
AddLanguage
AddLanguage
AddLanguage
AddLanguage
AddLanguage
en
fr
de
da
el
it
.en
.fr
.de
.da
.el
.it
f LanguagePriority
LanguagePriority en fr de
#
#
#
#
#
#
#
#
#
Redirect URL
url url,
,
,
DocumentRoot. , ,
/etc,
.
URL - ,
://., ,
302
Apache
# http://www.linux.ru. , ,
I /images,
tt DocumentRoot,
# . : Redirect _1 url
I
I
#
t
#
Alias
, ,
DocumentRoot, , ,
:
Alias _ _
t AddType MIME,
# apache-mime.types.
# : AddType type/subtype extl
# ( Apache)
i AddType :
AddType application/x-httpd-php4 .php3 .phtml .php ,php4
tt AddType application/x-httpd-php3-source .phps
tt PHP/FI (PHP2):
tt AddType application/x-httpd-php .phtml
# ScriptAlias /_php/ /usr/bin/php
# Action application/x-httpd-php /usr/bin/php
# Action application/x-httpd-php3 /usr/bin/php
I Action application/x-httpd-php4 .
# AddHandler
# MIME - .
# : AddHandler action-name extl
# CGI :
AddHandler cgi-script .cgi
# HTML
AddType text/html .shtml
AddHandler server-parsed .shtml
# ,
# Apache "--" (send-as-is)
#AddHandler send-as-is asis
303
Apache
# :
AddHandler imap-file map
# , :
*
#AddHandler type-map var
# Action -
# . ,
# - .
I : Action media/type /cgi-script/location
# : Action handler-name /cgi-script/location
#
#
#
#
MetaDir ,
Apache meta.
HTTP,
.
#MetaDir .web
# MetaSuffix ,
# meta-.
#MetaSuffix .meta
# .
# :
# 1)
# ErrorDocument 500 "The server made a boo boo.
# n.b. the (") marks it as text, it does not get output
#
# 2)
# ErrorDocument 404 /missing.html
# to redirect to local url /missing.html
# ErrorDocument 404 /cgi-bin/missing_handler .pi
# n.b. can redirect to a script or a document using server-side-includes.
#
# 3)
# ErrorDocument 402 http://some.other_server.com/subscription_info.html
f
<Location /manual>
ErrorDocument 404 "The document you requested has not been
installed on your system. Please install the apache-manual
package.
</Location>
f mod_mime_magic
# .
# MimeMagicFile /etc/httpd/conf/magic
# Netscape 2.x
# Internet Explorer 4.2
304
Apache
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 forceresponse-1.0
# /1.1 ,
I HTTP/1.1
BrowserMatch "RealPlayer 4\.0" force-response-1.
BrowserMatch "Java/l\.0" force-response-1.0
BrowserMatch "JDK/1\,0" force-response-1.0
#
# ,
# .
I access,conf.
#
#
#
#
#
#
, Apache ,
.
,
.
.
# ,
# .
<Directory />
Options Indexes Includes FollowSymLinks
AllowOverride None
</Directory>
<Directory /home>
I "Includes", "FollowSymLinks",
i "ExecCGI", "MultiViews" "Indexes"
Options Indexes Includes FollowSymLinks
AllowOverride All
#
order allow,deny
allow from all
</Directory>
# /var/www/cgi-bin /var/www/protected-cgi-bin
I ScriptAliased
305
Apache
<Directory /var/www/cgi-bin>
AllowOverride All
Options ExecCGI
</Directory>
<Directory /var/www/protected-cgi-bin>
order deny,allow
deny from all
allow from localhost
fallow from .your_domain.com
AllowOverride None
Options ExecCGI
</Directory>
#
<Location /server-status>
SetHandler server-status
order deny,allow
deny from all
allow from localhost, 127.0.0.1
#
# allow from .your_domain.com
</Location>
# .
Alias /doc /usr/share/doc
<Directory /usr/share/doo
order deny,allow
deny from all
allow from localhost, 127.0.0.1
# allow from .your_domain . com
Options Indexes FollowSymLinks
</Directory>
#
# : inetd standalone.
ServerType standalone
# inetd, "ServerAdmin"
#
#
#
#
#
#
Port - standalone-.
Apache
, 1024,
.
,
, 1024.
306
Apache
t
# 8080 8000.
Port 80
t
#
t
#
#
i
Apache .
,
-. ,
IP- .
,
DNS.
HostnameLookups off
#
I
#
#
I
#
#
#
User Group
.
,
. ,
- UID.
nobody apache.
.
User apache
Group apache
# ServerAdmin
# Web-.
# .
ServerAdmin root@localhost
# ServerRoot
# Apache.
# /etc/httpd.
ServerRoot /etc/httpd
#
#
I
#
,
IP-.
.
BindAddress *
# 80
Listen 80
#
#
#
#
ErrorLog TransferLog
Apache.
/etc/httpd/logs,
/var/log/httpd .
307
Apache
ErrorLog logs/error_log
#
#
#
#
LogLevel: .
(warn)
. ,
error
LogLevel warn
# , ,
# . .
LogFormat "%h %1 %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{UserAgent}i\"" combined
LogFormat "%h %1 %u %t \"%r\" %>s %b" common
LogFormat "%(Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
#
#
#
#
#
#
#
#
#
#
CustomLog logs/access_log common
referer
CustomLog logs/referer_log referer
()
CustomLog logs/agent_log agent
,
308
Apache
# "www"
.
# , , DNS
# .
ServerName new.host.name
# UseCanonicalName Apache 1.3.
# .
UseCanonicalName on
# -, SQUID,
# , ,
# .
CacheNegotiatedDocs
#
#
#
I
Timeout ,
. Timeout
, .
Timeout 300
I KeepAlive ,
I ,
I .
KeepAlive off
# MaxKeepAliveRequests: ,
# .
tt .
# .
MaxKeepAliveRequests 100
I KeepAliveTimeout
# .
KeepAliveTimeout 15
#
MinSpareServers 8
MaxSpareServers 20
t
StartServers 10
309
Apache
# .
# , ,
# .
MaxClients 150
# ,
# MaxRequestsPerChild, ,
# .
MaxRequestsPerChild 500
# -
# ProxyRequests On
# , :
#
#
#
#
#
#
#
CacheRoot /var/cache/httpd
CacheSize 5
CacheGcInterval 4
CacheMaxExpire 24
CacheLastModifiedFactor 0.1
CacheDefaultExpire 1
NoCache a_domain.com another_domain.edu joes.garage_sale.com
############################!######!
# SGI
#
##f ########!#######! ##############
#
#
# ,
# mod_mmap_static .
<IfModule mod_mmap_static.c>
QSC on
</IfModule>
# ,
# mod_log_config_buffered
# .
#
#
#
#
#
#
#
#
#
, :
mmapfile /var/www/html/file_to_map_in_memory
, ,
http://localhost/manual/mis/perf-mja.html.
IP-
flpVroMy .
SingleListen On
370
Apache
#tt###tt############################
# #
#################f##########t#####
#
# perl
t : ,
# .
<IfDefine PERLPROXIED>
ProxyPass
'/perl/ http://127...1:8200/
ProxyPassReverse /perl/ h t t p : / / 1 2 7 . 0 . 0 . 1 : 8 2 0 0 /
</IfDefine>
# ,
# .
Include conf/vhosts/Vhosts.conf
t
#
#
#
#
t
, :
LoadModule vhost_alias_module
modules/mod_vhost_alias. so
AddModule mod_vhost_alias.c
Include conf/vhosts/DynamicVhosts.conf
Include conf/vhosts/VirtualHomePages.conf
# PHP
Include conf/addon-modules/php.conf
12.7.
, ,
.
Unix- -8. . ,
- KOIS-. , ,
, . . , Microsoft
-866 (
ALT) DOS. DOS
,
, : KOIS-r -866,
: ,
. Microsoft Windows-1251 (ANSI)
Windows. ,
: ,
DOS,
Windows, . , Apache
.
311
Apache
Microsoft, Apple Sun,
Apple ISO8859-5. IBM
, .
,
: ...
: .
Unix KOI8, Windows
- .
, KOI8 Windows1251 . Apple . ,
.
: .
KOI8 Windows-1251,
( Windows,
, ).
Apache,
, .
Russian Apache.
Apache-RUS. ( Russian Apache) : ftp://apache.Iexa.ru/pub/apache-ras/.
Apache, Apache-Rus.
1.3.3/PL27.3, .
, :
tar x v z f a p a c h e _ l . 3 . 3 r u s P L 2 7 . 3 . t a r . g z
apache_l. 3 . 3rusPL27 . 3
configure:
# cd apache_l.3.3rusPL27.3
t ./configure
, , -prefix=path
. :
# make
# make install
,
. Russian Apache Apache, . ,
.
.
, , , .
372
Apache
. :
CharsetSourceEnc koi8-r
CharsetByExtension windows-1251 .txt
httpd. conf. ,
, .txt,
koi8-r. windows-1251.
Location
.htaccess.
CharsetDecl, CharsetAlias,
CharsetRecodeTable CharsetWideRecodeTable.
<IfModule mod_charset.c> </IfModule> .
( ), CharsetDecl ,
CharsetAlias , :
CharsetDecl windows-1251 ru
CharsetAlias windows-1251 w i n x-cp!251 cp!251 cp-1251
(ru) conf / s r m . c o n f
AddLanguage LanguagePriority.
, ,
. , ,
Windows Windows1251, .
,
. :
, :
http://www.server.ru/koi/file.html
http://www.server.ru/win/file.html
, :
http://koi.www.server.ru/file.html
http://win.www.server.ru/file.html
, :
http://www.server.ru:8000/file.html
http://www.server.ru:8001/file.html
.
(, )
VirtualHost , :
Alias /koi /www/docs
:
# cd / w w w / d o c s
# In -s . koi
, .
,
313
Apache
. ,
.
,
DNS.
httpd.conf:
# , IP-
<VirtualHost 111.111.111.1>
ServerName www.server.ru
ServerAlias *.www.server.ru
#
</VirtualHost
, CharsetAlias, , koi
win.
DNS , - DNS ,
. () Port
httpd. conf :
Listen 80
Listen 8000
Listen 8001
Listen 8002
Listen 8003
CharsetByPort koi8-r 8000
CharsetByPort windows-1251 8001
CharsetByPort ibm866 8002
CharsetByPort iso-8859-5 8003
. ,
, . , :
(. . 14),
, .
()
CharsetSelectionOrder:
CharsetSelectionOrder Dirprefix Useragent Portnumber Hostname UriHostname .
CharsetSelectionOrder Hostname UriHostname Useragent Portnumber Dirprefix
.
CharsetSelectionOrder Portnumber Useragent Hostname UriHostname Dirprefix .
,
Russian Apache.
314
13
.
SMTP POP, .
SMTP (Simple Mail Transfer Protocol) TCP/IP
(.. ). SMTP 25 (.
/etc/services).
POP (Post Office Protocol) .
110 ( ).
(Mail Transfer Agent)
sendmail, postfix qmail. ,
. Sendmail
,
Unix.
. ( 1998 ) sendmail qmail,
. , sendmail
, , - ,
sendmail. sendmail
,
. , postfix , - . qmail
,
. qmail.
, , SMTP. . sendmail imap.
PostFix,
sendmail. , postfix , .
315
73.7. sendmail
, RedHat, . sendmaiI-8.11.0
imap-4.7c2. sendmail
http://www.sendmail.org.
, sendmail, DNS. DNS . 10.
,
TWs'paekage allowsyou to configure
Sendmaii,the maiUteliretysystem : !
DNS .
DNS-
/etc
/resolv.conf, . ,
sendmail
DNS,
.
,
sendmail,
netconf (. . 13.1).
- Window, - . netconf
RedHat Linux, Mandrake,
ASPLinux , KSI
Linux. , Puc. 13.1. netconf
root. netconf, /etc/sendmail.cf .
sendmail.
Mail delivery system, Basic sendmail configuration.
Present your system as . Accept email for your_domain.com (. . 13.2).
,
.
, . -
. :
not_exists@A.com
not_exists@B.com. : ;
316
Base Info
il|mailer. dhsilabs.com
Mail gateway
jsmtp
. 13.2. sendmail
317
. , ,
, /etc/hosts. allow :
492.168.1.
, 192.168.1.0
255.255.255.0. hosts. allow hosts. deny
, man hosts.allow.
. imap , .. , . inetd xinetd, ,
, :
telnet <___> 25
:
T r y i n g 192.168.1.1 . . .
Connected to 192.168.1.1
Escape character is ]'
220 de.dhsilabs.com ESMTP Sendmail 8.11.0/8.8.7 Sun, 17 Jun
2001 10:54:22 +300
, sendmail , . :
mail f r o m : m e @ m y . h o s t . c o m
220
2 . 1 . 0 m e @ m y . h o s t . c o m . . . . Sender Ok
rcpt to: d e n @ d e n . d h s i l a b s . c o m
2 2 0 2 . 1 . 5 d e n @ d e n . d h s i l a b s . c o m . . . . Recipient Ok
data, , . Sendmail , ( ).
den@den.dhsilabs.com , .
. den.dhsilabs.com
.
.
den@den.dhsilabs.com dhsilabs.com .
.
, my.host.com ,
sendmail , Sender Ok. , sendmail
Wait for DNS.
- , kmail,
.
kmail: > SMTP, 25, , den.dhsilabs.com.
:
den
, .
den.dhsilabs.com
318
,
data. .
DNS IP-.
.
, , .
sendmail
, .
sendmail.
.
, ,
"
. 23 .
sendmail
.
sendmail / e t c
/sendmail. cf. /etc/mail. , ,
,
. , , .
- sendmail.
4. mc-. .sendmail, . . : mc- 2459 , sendmail. cf 46302
. , ,
, 46 . sendmail, ,
mc-. , mc-, 4 sendmail:
m4 my_config.mc > /etc/sendmail.cf
- sendmail.cf. .
, 4 sendmail
(sendmail.cf), / u s r / s h a r e / s e n d m a i l - c f / c f .
sendmail
/usr/lib/sendmail.
, sendmail.me.
-, , redhat.mc, Red Hat .
319
/usr/share/sendmail-cf/cf/redhat.me
13.1.
13.1. redhat.mc
divert(-1)
dnl This is the sendmail macro config file. If you make changes to this file,
dnl you need the sendmail-cf rpm installed and then have to generate a
dnl new /etc/sendmail.cf by running the following command:
dnl
dnl
m4 /etc/mail/sendmail.me > /etc/sendmail.cf
dnl
include)'../m4/cf.m4')
VERSIONID('linux setup for Red Hat Linux')dnl
OSTYPE ( 'linux')
define( 'confDEF_USER_ID',"8:12")dnl
undefine('UUCP_RELAY')dnl
undefine('BITNET_RELAY')dnl
define('confAUTO_REBUILD')dnl
define('confTO_CONNECT' , 4 m ' ) dnl
define('confTRY_NULL_MX_LIST',true)dnl
define('confDONT_PROBE_INTERFACES',true)dnl
define('PROCMAIL_MAILER_PATH', V u s r / b i n / p r o c m a i l ' ) d n l
define('ALIAS_FILE', Veto/aliases')dnl
dnl d e f i n e ( 'STATUS_FILE', V e t c / m a i l / s t a t i s t i c s ' ) d n l
define('UUCP_MAILER_MAX', ' 2 0 0 0 0 0 0 ' ) d n l
define('confUSERDB_SPEC', V e t c / m a i l / u s e r d b . d b ' ) d n l
define('confPRIVACY_FLAGS', 'authwarnings,novrfy,noexpn,restrictqrun')dnl
define('confAUTH_OPTIONS', ' A ' ) d n l
dnl TRUST_AUTH_MECH('DIGEST-MD5 CRAM-MD5 LOGIN P L A I N ' ) d n l
dnl define('confAUTH_MECHANISMS', 'DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl define confTO_QUEUEWARN', ' 4 h ' ) d n l
dnl define('confTO_QUEUERETURN', '5d')dnl
dnl define('confQUEUE_LA', '12')dnl
dnl define('confREFUSE_LA', '18')dnl
dnl FEATURE(delay_checks)dnl
FEATURE('no_default_msa', ' d n l ' ) d n l
FEATURE('smrsh', Vusr/sbin/smrsh')dnl
FEATURE('mailertable', 'hash -o /etc/mail/mailertablu.db')dnl
FEATURE('virtusertable', 'hash -o /etc/mail/virtusertable.db')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
FEATURE(local_procmail, ", 'procmail -t -Y -a $h -d $u')dnl
FEATURE('access_db','hash -o /etc/mail/access.db')dnl
FEATURE('blacklist_recipients')dnl
EXPOSED_USER('root')dnl
dnl This changes sendmail to only listen on the loopback device 127.0.0.1
dnl and not on any other network devices. Comment this out if you want
dnl to accept email over the network.
320
DAEMON_OPTIONS('Port=smtp,Addr=127.0.0.1, Name=MTA')
dnl NOTE: binding both IPv4 and IPv6 daemon to the same port requires
dnl
a kernel patch
dnl DAEMON_OPTIONS(xport=smtp,Addr=::1, Name=MTA-v6, Family=inet6')
dnl We strongly recommend to comment this one out if you want to protect
dnl yourself from spam. However, the laptop and users on computers that do
dnl not have 24x7 DNS do need this.
FEATURE(^accept_unresolvable_domains')dnl
dnl FEATURE('relay_based_on_MX')dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
Cwlocalhost.localdomain
FEATURE
sendmail. , mailertable
.
sendmail, -.
, ,
.
masquerade_envelope mc-. redhat.mc
hide_hosts .me hide_hosts .me :
MASQUERADE_AS(my-domain.ru)dnl
FEATURE(masquerade_envelope)dnl
:
m4 / u s r / s h a r e / s e n d m a i l - c f / c f / h i d e _ h o s t s . m e > / e t c / s e n d m a i l . m e
! .
. 13.1.
sendmail
access_db
13.1
. , .
.
. 23
accept_unresolvable_domains ,
bestmxjsjocal
, -
DNS
blacklist_recipients
. .
access_db
dnsbi
, dnsbl DNS
Black List. rbl (Resolve Black List)
domaintable
genericstable
local_procmail
, procmail
mailertable
masquerade_entire_domain
() .
MASQUERADE AS
( MASQUERADE_DOMAIN), ,
MASQUERADE_AS(f1 17.ru)dnl
11
3<ut. 851
321
masquerade_envelope
redirect
relay_based_on_MX
relay_hosts_only
relay_mail_from
smrsh
use_cf_file
use_cw_file
virtusertable
13.1
. received from
.
please try <address>
( )
() ,
- DNS
, access_db
, RELAY
access db
sendmail
sendmail sendmail. cf
sendmail sendmail. cw
/etc/mail/sendmail. cw
. , mail.dhsilabs.ru.
den@mail.dhsilabs.ru,
den. -
den@dhsilabs.ru, ,
dhsilabs ?
sendmail.cw :
dhsilabs.ru
, user@dhsilabs.ru,
mail.dhsilabs.ru.
, sendmail.cf sendmail. :
/etc/init.d/sendmail stop
sendmail :
/etc/init.d/sendmail start
13.2. sendmail
Sendmail 8.10/8.11 SMTP AUTH,
RFC 2554. SASL.
,
,
.
Cyrus SASL,
ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/.
1.5.14.
322
sendmail, .
sendmail : http://
www.sendmail.org. Cyrus SASL
:
t tar -xzf cyrus-sasl-1.5.24.tar.qz
tt cd cyrus-sasl-1.5.24/
t ./configure prefix=/usr
# make
I make i n s t a l l
, root.
, , ,
,
/ u s r / l i b / u s r / i n c l u d e . ,
/ u s r / l i b / s a s l / S e n d m a i l . c o n f . , .
:
pwcheck_method: sasldb
sendmail, SASL. ,
. :
saslpasswd sasldblistusers. /sbin. root.
# saslpasswd -a sendmail newuser
password:<type passwdord for newuser>
,
. :
sasldblistusers
.
- :
u s e r : newuser realm: d h s i l a b s . c o m mech: CRAM-MD5
user: newuser realm: dhsilabs.com mech: DIGEST-MD5
user: newuser realm: dhsilabs.com mech: PLAIN
, newuser
: CRAM-MD5, DIGEST-MD5, PLAIN.
CRAM-MD5,
PLAIN.
, sendmail SASL:
sendmail -dO.1 -bv root I grep SASL
SASL
sendmail.
sendmail. , sendmail, , tar:
tar -xzf senmail-x.xx.xx.tar.gz
cd sendmail-x.xx.xx/
323
s e n d m a i l - x . x x . x / d e v t o o l s / S i t e
/ s i t e . c o n f i g . m 4 , :
A P P E N D D E F ( ' c o n f E N V D E F ' , '-DSASL')
APPENDDEF('conf_sendmail_LIBS', '-Isasl')
APPENDDEF('confLIBDIRS', ' - L / u s r / l i b / ' )
APPENDDEF( x confINCDIRS', ' - I / u s r / i n c l u d e / ' )
, :
cat > sendmail-x.xx.x/devtools/Site/site.config.m4
Build:
./Build
. / B u i l d install
, sendmail
SMTP AUTH. :
sendmail -dO.1 -bv root | grep SASL
sendmail.
sendmail.me :
TRUST_AUTH_MECH('GSSAPI DIGEST-MD5 CRAM-MD5 P L A I N ' ) d n l
define( x confAUTH_MECHANISMS', 'GSSAPI DIGEST-MD5 CRAM-MD5 PLAIN')dnl
define('confDEF_AUTH_INFO', Vetc/mail/auth/auth-info')dnl
F E A T U R E ( ' n o _ d e f a u l t _ m s a ' ) d n l turn o f f default entry for MSA
DAEMONJDPTIONS('Port=25, Name^MSA, M=E')dnl
PLAIN, ,
, ,
PLAIN, SMTP .
4:
4 senmail.mc > sendmail.cf
s e n d m a i l . cf ,
/etc/mail:
./sendmail.cf /etc/mail/sendmail.cf
! sendmail ,
. telnet 25 :
telnet l o c a l h o s t 25
Trying 1 2 7 . 0 . 0 . 1 . . .
Connected to localhost
Escape character is ]'.
220 local.sendmail.ORG ESMTP Sendmail 8.10.0/8.10.0; Thu, 9 Sep
1999 10:48:44 -0700 (PDT)
ehlo localhost
250-local.sendmail.ORG Hello localhost [127.0.0.1], pleased to
meet you
250-ENHANCEDSTATUSCODES
250-DSN
250-AUTH DIGEST-MD5 CRAM-MD5 PLAIN
250 HELP
quit
324
. / e t c / m a i l / s e n d m a i l . c f
:
t##tt###########tf ######
I Format of headers I
#########################
:
$.$?{auth_type}(auth_type is ${auth_type}, user
${auth_author}$.)
, sendmail. cf
. ,
:
(auth_type is CRAM-MD5, user den)
.
13.3.
sendmail . ,
.
Outlook Express. TheBat!
, :
1. TheBat!, 1.38.
2. Outlook Express, 5.00.
3. Netscape Messenger, 4.76.
, . , ,
Outlook .
.
TheBat!
Account-
New... ,
, (SMTP server) ( server).
.
passwd! Finish .
Account -> Properties.
, ,
. 13.3.
325
^| General
-A Transport
^ Mail management
^ Options
| - Fifes & directories
j
Templates
-4 Sound
-JP Network
-Jj Memo
f- Without changes
as (Juoted-pwiiabie
as,8ase64
<?M'
. 73.3. ( TheBat!)
. 13.3. ,
den.dhsilabs.com.
. (, )
Mail management. . ,
,
den.dhsilabs.com.
Outlook Express.
.
. .
, .
Netscape Messenger :
Edit -> Preferences. ,
Netscape Communicator. Preferences
(. 13.4) (Mail servers)
. POP ,
Edit.
. , .
, . -.
TheBat!
More
(. . 13.3). Advanced SMTP Options.
326
Category:
Appearance
!
Fonts
Colors
Navigator
El Mail & Newsgroups
|
Identity
. Savers
Newsgroup Servers !
Addressing
Window Settings
Copies and Folders
1
Formatting
\
Return Receipts
;
Disk Space
Roaming Access
Composer
i-- Offline
liB Advanced
Matt Ssrveis
g MasSefveis
den;*s!!abs,com .............. .
f^ Heyei--
. '. tfPossftrfe
Local directory:
.
,
.
Netscape Messenger
13.4.
POP- , POP- .
, , , kinail Outlook, POP-, , , , , , .
327
POP-
Linux fetchmail, procmail.
. :
1. mail@firma.ru -
. , ,
, .
2. . :
, , : . 19:00.
. . 3 .
- - d e p l @ f i r m a . r u , - - d e p 2 @ f i r m a . r u ,
dep3@f irma . r u . mail,
. m a i l @ f i r m a . r u . ,
LinuxRSP adm@firma.ru.
mail
.procmailrc , 13.2 :
13.2. .procmailrc
:0
* "Subject:.*depl
! depl
:0
* "Subject:.*dep2
! dep2
:0
*
"Sybject:.*dep3
dep3
:0
*
"Sybject:.*LinuxRSP
adm
, .
( Subject) ,
.
.
.procmailrc, root, :
chown m a i l . m a i l .procmailrc
chmod 600 .procmailrc
328
From ,
, :
:0
* "From:.* Subscribe.Ru
! adm
, -
Subscribe.Ru,
adm .
.
Linux,
man procmail.
($HOME/mail) .forward.
root,
.procmailrc. . :
|IFS=' && exec / u s r / b i n / p r o c m a i l USER= <rnail>
procmail '/usr/bin.
,
. forward.
. fetchmailrc. , fetchmail.
:
set postmaster "mail"
poll provider.ru proto no dns
user "mail" pass "my_password" to m a i l here
options f e t c h a l l
( mail.
provider.ru) ,
. mail
my_password. fetchall
provider.ru.
fetchmail ,
crontab. :
fetchmail -d 12000
fetchmail 20
. crontab -e :
0 , 2 0 , 4 0 * .* * * /usr/bin/fetchmail
. , . . , .
, -
. .
- ,
, .
329
. .procmailrc
:
0:
* "Subject.*Price
I (formail -r ; cat $HOME/pricelist.zip)
| sendmail -t
, . :
Q:
, , . i n f o . t x t
.
. fetchmail , a procmail .
fetchmail procmail
. procmail ,
,
.
13.5.
Linux . . ,
, , MySQL
.
Web-
, MySQL
. ,
MailList.Ru,
Perl.
.
. , Linux
mail. Unix-.
, : , .
marina oleg, igor, dmitry, olya, president, director, secretar.
. , ,
, . ,
330
Linux. ,
.
.mailrc
:
alias market marina oleg
alias proizv igor dmitry olya
alias adm director secretar
,
:
mail proizv
mail , .
Ctrl+D mail .
, .
, mail
. ,
. , mail - . ,
, . ,
, bash.
smaller (. 13.3).
13.3. smailer
#!/bin/bash
DT='date'
echo $DT log
f o r user in 'cat u s e r s '
do
echo "Sending message to $user"
mail $user -s Subscribe < msg 2 log
done
, , .
. 19,
,
.
,
/bin/bash. , date. , ,
~.
log. .
( for)
users, ,
mail. mail users.
-s, msg.
33?
log. mail, 2 /.
users.
13.4.
13.4 users
den
u
synthetic
evg
, , msg. :
. /smaller
:
Sending
Sending
Sending
Sending
message to den
message to u
message to synthetic
message to evg
evg ,
:
4 1 0 : 4 3 : 2 8 EEST 2 0 0 2
e v g . . . User u n k n o w n / r o o t / d e a d . l e t t e r . . .
Saved message in / r o o t / d e a d . l e t t e r
,
log. ,
.
mail .
:
mail
, :
No mail for user
user .
, , , . d <> d <>. , q.
mail
,
- , pop.mail.ru,
. kniail.
KDE.
, ,
SMTP (sendmail),
HTML, ,
Outlook .
332
14
14.1. IPChains
. , , ,
.
: .
, , , ,
.
, .
. 1 .
TCP, UDP,
.
, ,
.
(firewall, ) (),
. IPChains
. , , ,
. Linux.
IPChains , , , .
- .
.
IPChains
. IPChains ,
, , IP-, .
,
.
IPChains .
, . 18.
IP:firewalling IP:firewall packet.
333
74.2. IPChains
IPChains . , ,
.
: input, forward, output.
firewall- .
, input ( ).
: ?
. ,
: ?
, .
, ,
. .
, forward.
forward, .
,
.
, , . ,
1 ( ), ,
1.
, , (forward).
, .
,
output.
. : - , -.
, .
, , , . - , syslog
.
ipchains .
,
(. . 14.1).
334
ipchains
14
-N
-X
-
-L
-F
-Z
-I
-R
-D
, -
IPChains
8. ,
IPChains. :
ipchains -P forward DENY
ipchains -A forward -s 192.168.1.0/24 -d 1 9 2 . 1 6 8 . 2 . 0 / 2 4 -j ACCEPT
ipchains -A forward -s 1 9 2 . 1 6 8 . 2 . 0 / 2 4 -d 1 9 2 . 1 6 8 . 1 . 0 / 2 4 -j ACCEPT
forward,
.
192.168.1.0 192.168.2.0. -s
(source), -d (destination). -j
. , , ACCEPT. , DENY.
:
1. IP-, , 192.168.1.1.
2. , , www.host.ru.
3. IP-, , 192.168.1.0/24.
4. , , 192.168.1.0/255.255.255.0.
,
. 14.2.
!.
, . , -s! localhost ,
localhost.
14.2
-d
-i
-
(IP- URL-)
(IP- URL-)
335
-. ,
TCP - TCP. TCP UDP. :
IP-addr/ports_range.
ports_range. , , 0:1023.
, 1023. ,
0. , ,
65535, .
-i. , -i pppO.
,
, -i ppp+. , () () .
, ,
if con fig.
. , telnet . :
ipchains -A prov -p tcp destination-port 23 -j REJECT
prov , .
:
ipchains -N prov
ipchains -A input -i pppO -j prov
, .
, ,
Windows . ,
SMB . 8MB
, , :
ipchains -A prov -p tcp destination-port 137 -j REJECT
ipchains -A prov -p udp destination-port 137 -j REJECT
ipchains -A prov -p tcp destination-port 138 -j REJECT
ipchains -A prov -p udp destination-port 138 -j REJECT
ipchains -A prov -p tcp destination-port 139 -j REJECT
ipchains -A prov -p udp destination-port 139 -j REJECT
. , , Netscape
911.111.111.111. , , -, , IPChains.
ipchains -A output -d 911.111.111.111 -j REJECT
IP-,
- .
, (
IPChains ), ipchains-save
ipchains-restore. , :
# ipchains-save > / e t c / i p c h a i n s . r u l e s
336
14.1 , .
14.1.
#! / b i n / s h
# .,
# , .
[ -f /etc/ipchains.rules ] || exit 0
case "51" in
start)
echo -n " :"
/sbin/ipchains-restore < /etc/ipchains.rules || exit 1
echo 1 > /proc/sys/net/ipv4/ip_forward
echo " . " ; ;
stop)
echo -n " :"
echo 0 > /proc/sys/net/ipv4/ip_forward
/sbin/ipchains -X
/sbin/ipchains -F
/sbin/ipchains -P input ACCEPT
/sbin/ipchains -P output ACCEPT
/sbin/ipchains -P forward ACCEPT
echo " . " ; ;
*)
echo ": / e t c / i n i t . d / p a c k e t f l i t e r { s t a r t | s t o p } "
exit 1 ; ;
esac
exit 0
.
14.3.
.
14.3.1. SYN
SYN .
,
.
,
, , ,
.
SYN -. ,
TCP 192.168.1.34 :
- TCP -s 1 9 2 . 1 6 8 . 1 . 3 4 -
14.3.2.
,
. ,
337
, . ,
, .
,
.
.
IP: always defragment.
.
, .
.
-f.
TCP UDP, ICMP SYN.
,
server.domain.com:
# ipchains -A output -f -d 192.168.1.1 -j DENY
14.3.3.
: Limax
. , ICMP, TCP - .
14.3.4. 1-
IP- IP- .
, IP- ,
.
(Source Address Verification) IPChains:
ipchains -A prov -s 1 9 2 . 1 6 8 . 1 . 1 / 1 6 -1 -j DENY
ipchains -A prov -s 1 2 7 . 0 . 0 . 1 / 8 -1 -j DENY
2.0.x, ,
. -1 .
/var/log/messages. 2.1.x , 127.*, - .
, 14.2.
14.2. 1-
# : Source Address Verification
# .
if [ -e /proc/sys/net/ipv4/conf/all/rp_filter ] ; then
338
echo -n " ... "
f o r f in / p r o c / s y s / n e t / i p v 4 / c o n f / * / r p _ f l i t e r ; do
echo 1 > $f
done
echo "."
else
echo .
echo " CONTROL-D shell . ."
echo
#,
/ s b i n / s u l o g i n $CONSOLE
fi
.
14.3.5.
,
. . Linux , .
IP: always defragment. , .
,
. ,
.
1
<
14.4.
.
DNS-HOWTO.
, , .
, , .
. , , ,
.
, , . , .
IP- 1.1.1.1,
192.168.1.0. IP- 192.168.1.5
http://www.romb.net. IP- 62.244.59.193. . IP- 192.168.1.1.
, 1.1.1.1. ,
339
1.1.1.1 www.romb.net 62.244.59.193.
www.romb.net 1.1.1.1 62.244.59.193.
192.168.1.5 62.244.59.193.
, .
, 192,168.2.0
. IP- 111.1.1.1, DNS [192.168.2.99J
POP/SMTP [192.168.2.98]
ethO IP-
WWW [192.168.2.97]
192.168.2.1,
ethl - 192.168.1.1.
(. . 14.1).
:
, 192.168.2.0 192.168.1.0.
14.1.
,
,
.
, , ping, traceroute. Windows NT
ping tracer! .
, WWW
, Internet. SMTP
,
Internet. . DNS
.
, :
1. WWW.
2. FTP.
3. DNS.
4. SMTP.
:
1. WWW .
2. FTP .
3. SMTP , ,
.
4. DNS , DNS .
5. .
6. WWW .
7. FTP .
340
ping, traceroute, ssh. !
ICQ. ,
Netscape Internet Explorer.
, , ,
IP- .
IP- ( 14.2). (
bash):
for f in /proc/sys/net/ipv4/conf/*/rp_fliter; do echo 1 > $f; done
, ,
(loopback):
# ipchains -A input -i ! lo -j DENY
# ipchains -A output -i ! lo -j DENY
# ipchains -A forward -j DENY
, IP- ,
, . , .
ip_masq_ftp
FTP. FTP- .
.
, forward.
, ,
netl-net2 192.168.1.0
192.168.2.0.
:
ipchains -N netl-net2
' IT'
ipchains -N netl-inet
ipchains -N net2-netl
ipchains -N net2-inet
ipchains -N inet-net2
ipchians -N inet-netl
ICMP-:
ipchains -N icmp
forward , , , ,
. ,
IP-. :
ipchains -A forward -s 192. 168. 1.0/24 -i ethO -j netl-net2
ipchains -A forward -s 192. 168. 1.0/24 -i pppo -j netl-inet
ipchains -A forward -s 192. 168. 2.0/24 -i pppo -j net2-inet
ipchains -A forward -s 192. 168. 2.0/24 -i ethl -j net2-netl
ipchains -A forward -i ethO -j inet-net2
ipchains -A forward -i ethl -j int-netl
ipchains -A forward
DENY -1
34?
ipchains
ipchains
ipchains
ipchains
ICMP-:
-A icmp -p icmp icmp-type destination-unreachable -j ACCEPT
-A icmp -p icmp icmp-type source-quench
-j ACCEPT
-A icmp -p. icmp icmp-type time-exceeded
-j ACCEPT
-A icmp -p icmp icmp-type parameter-problem -j ACCEPT
ICMP- ,
. netl-net2.
, WWW,
FTP, ssh. SMTP, POPS, DNS,
traceroute ping (
). :
ipchains -A netl-net2 -p tcp -d 192.84.219.128 smtp
-j ACCEPT
ipchains -A netl-net2 -p tcp -d 1 9 2 . 8 4 . 2 1 9 . 1 2 8 pop-3
-j ACCEPT
ipchains -A netl-net2 -p udp -d 192.84.219.129 domain -j ACCEPT
ipchains -A netl-net2 -p tcp -d 1 9 2 . 8 4 . 2 1 9 . 1 2 9 domain -j ACCEPT
ipchains -A netl-net2 -p tcp -d 192.84.218.130 w w w
-j-j ACCEPT
ipchains -A netl-net2 -p tcp -d 1 9 2 . 8 4 . 2 1 8 . 1 3 0 rsync -j ACCEPT
ipchains -A netl-net2 -p icmp -j icmp
ipchains -A netl-net2 -j DENY -1
rsync Web. inet-net2. 192.168.2.0
SMTP, DNS Web, .
(), .
. (DNS-) ,
. Web . rsync . :
ipchains -A inet-net2 -p tcp -d 1 9 2 . 1 6 8 . 2 . 9 8 smtp
-j ACCEPT
ipchains -A inet-net2 -p udp -d 1 9 2 . 1 6 8 . 2 . 9 9 domain -j ACCEPT
ipchains -A inet-net2 -p tcp -d 1 9 2 . 1 6 8 . 2 . 9 9 domain -j ACCEPT
ipchains -A inet-net2 -p tcp -d 1 9 2 . 1 6 8 . 2 . 9 7 W W W
-j ACCEPT
ipchains -A inet-net2 -p icmp -j icmp
ipchains -A inet-net2 -j DENY
netl-inet.
WWW, FTP ,
traceroute . ,
, Web-. masq
FTP. .
ssh
, ping.
ipchains -A netl-inet -p tcp
dport
www
-j MASQ
ipchains -A netl-inet -p tcp
dport
ssh
-j MASQ
ipchains -A netl-inet -p udp
-dport
3 3 4 3 4 : 3 3 5 0 0 -j MASQ
ipchains -A netl-inet -p tcp
dport
ftp
-j MASQ
342
ipchains -A netl-inet -p
ipchains -A netl-inet -j
icmp
icmp-type
REJECT -1
ping
-j
MASQ
net2-inet :
net2-inet -p tcp
-s 192. 84,.219.128 smtp
net2-inet -p udp
-s 192.84.219.129 domain -j
net2-inet -p tcp
-s 192.84.219.129 domain -j
-A
-A
-A
-A
-A
-A
net2-inet -p tcp
net2-inet -p icmp
net2-inet -j DENY
-j
ACCEPT
ACCEPT
ACCEPT
ACCEPT
_T
,
,
. DNS
, , .
WWW
. rsync .
inet-netl.
.
ipchains -A inet-netl -j
REJECT
,
input . input
:
ipchains -N inet-if
ipchains -N net2-if
i p c h a i n s -N n e t l - i f
,
. :
ipchains -A input
ipchains -A input
ipchains -A input
-d
-d
-d
192.84.219.1
192.84.219.250
192.168.1.250
-j
-j
-j
inet-if
net2-if
netl-if
inet-if :
ipchaiain-A inet-if -i
!
ipchains -A inet-if -p TCP
PPpO
-dport
-j DENY -1
6 1 0 0 0 : 6 5 0 9 6 -j ACCEPT
343
ipchains
ipchains
ipchains
ipchains
-A
-A
-A
-A
inet-if
inet-if
inet-if
inet-if
-p UDP -dport
-p I CMP icmp-type
-j icmp
-j DENY
61000:65096 -j ACCEPT
pong
-j ACCEPT
, traceroute , ,
ICMP- .
net2-if :
ethO -j DENY
ipchains -A net2-if -i
ipchains -A net2-if -p TCP
! -y -s 192.168.2.99 53 -j ACCEPT
ipchains -A net2-if -p UDP
-s 192.168.2.99 53 -j ACCEPT
ipchains -A net2-if -P ICMP -icmp-type pong -j ACCEPT
ipchains -A net2-if -j icmp
ipchains -A net2-if -j DENY -1
,
inet-if, ethO.
netl-if :
ipchains -A netl-if -i ! ethl -j DENY
ipchains -A netl-if -p ICMP icmp-type ping -j ACCEPT
ipchains -A netl-if -p ICMP -icmp-type pong -j ACCEPT
ipchains -A netl-if -j icmp
ipchains -A netl-if -j DENY -1
WWW, SMTP, POP3. ping, tracer oute, ssh.
:
ipchains -D input I
ipchains -D f o r w a r d 1
ipchains -D output 1
ICQ. , SQUID , ,
( - SQUID ). SQUID
5190. ICQ.
acl SSL_ports port 443 563 5190
socks. , , ICQ, , , , .
socks dame-socks. /etc/socks . conf :
i n t e r n a l : 1 9 2 . 1 6 8 . 1 . 1 port = 1080
e x t e r n a l : 111.1.1.1
, socks:
client pass {
f r o m : 1 9 2 . 1 6 8 . 0 . 0 / 1 6 to: 0 . 0 . 0 . 0 / 0
344
, :
pass {
14.5. IPTables
IPChains Linux 2.4.
( 2.4) IPChains
IPTables. . , , ipchains iptables.
, IPTables.
. 14.3. ,
. 18.
14.3
CONFIG_PACKET
CONFIG_NETFILTER
CONFIG_IP_NF_CONNTRACK
CONFIG_IP_NF_FTP
CONFIG_IP_NF_IPTABLES
CONFIG_IP_NF_MATCH_LIMIT
CONFIG_IP_NF_MATCH_MAC
,
.
tcpdump
,
.
NAT IP-.
FTP-. ,
FTP-. -
FTP- IP_NF_CONNTRACK
FTP-,
CONFIG IP NF FTP
IPTables .
IPTables
.
/
, - ( IP-)
, IPTables,
MATCH, , CONFIG_IP_NF_MATCH_MARK.
.
, , j.
IPChains, IPTables.
IPTables.
, IPChains, ACCEPT DENY. IPTables DENY
DROP. MASQ (. . 14.4) MASQUERADE.
345
(tables) (chains),
, .
, - ,
- 11:12:13:14:15:16.
iptables -A INPUT mac-source 11:12:13:14:15:16.
,
-j. , ,
- 11:12:13:14:15:16,
!
, , - 11:12:13:14:15:16, , 10
. : iptables -A INPUT - limit limit
10/minute. (second),
(minute) (hour).
IPTables ( )
, , :
iptables -A INPUT -p tcp -m multiport -source-port 22,53,80,110
. 15
. ,
destination-port.
, , port:
iptables -A INPUT -p tcp -m multiport -port 22,53,80,110
.
, , . ,
UID 500 .
:
iptables -A OUTPUT -m owner uid-owner 500
, ,
, UID ,
, TCP.
:
iptables -A OUTPUT -m owner gid-owner 0
iptables -A OUTPUT -m owner -pid-owner 78
IPTables IPChains,
: IPChains,
. 14.1...14.4.
346
15
- SQUID
15.1. SQUID?
SQUID , HTTP/FTP- . -
(squid) IP-
(Masquerading ),
(), .
,
. -
, - ,
. -
, ,
. '.
SQUID , -. . SQUID, .
- Squid , : squid, dnsserver
DNS-. squid,
dnsserver, DNS.
DNS.
15.2. SQUID
SQUID RPM. RPM- SQUID
rpm -ih squid-2.3.STABLE2-3mdk.i586.rpm.
347
- SQUID
squid 2.3.
. ftp://ftp.squid.org.
, :
cd / u s r / s r c /
gunzip s q u i d - 2 . 3 . S T A B L E 2 - 3 - s r c . t a r . g z
tar xvf s q u i d - 2 . 3 . S T A B L E 2 - 3 - s r c . t a r . g z
cd squid
:
./configure prefix=/usr/local/squid
make all
make i n s t a l l
SQUID , prefix /usr/local/squid.
prefix , . 15.1.
configure
15.1
--enable-icmp
HTTP- ICMP
--enable-snmp
SNMP-
--enable-delay-pools
--disable-wccp
--enable-kill-parent-hack
shutdown
--enable-splaytree
ACL
/5.3. SQUID
SQUID squid.conf,
/ e t c / s q u i d ( / u s r / l o c a l / s q u i d /
etc ). ,
, joe/usr/local/squid/etc/squid.conf. :
1. :
cache_peer p r o x y . i s p . r u
proxy .isp.ru (neighbour, peer).
2. , squid, :
cache_mem 65536
cache_dir / u s r / l o c a l / s q u i d / c a c h e 1024 16 256
: 65536 , ;
1024 - , .
. ,
, .
3. , -:
acl allowed_hosts src 1 9 2 . 1 6 8 . 1 . 0 / 2 5 5 . 2 5 5 . 2 5 5 . 0
348
- SQUID
acl localhost src 127.0.0.1/255.255.255.255
4. SSL-:
acl SSL_ports port 4 4 3 563
maxium_object_size maxium_object
.
URL, games :
acl GaMS url_regex games
http_access deny GaMS
http_access a l l o w all
15.4. SQUID
, SQUID,
:
/ u s r / l o c a l / s q u i d / b i n / s q u i d -z
-z () ,
. .
SQUID . 15.2.
SQUID
15.2
-
-d
-f
-h
-k reconfigure
-k shutdown
-k kill
-u
-s
-V
-D
-N
-Y
HTTP-
( stderr)
HUP
-
1-
syslog
SQUID
DNS-
( )
349
- SQUID
. 15.1. -
(peer) , icp_port
icp_port 3130
ICP TCP.
enable-htcp
htcp_port 4827.
,
,
.
2.3 :
tcp_incoming_address 0 . 0 . 0 . 0
:
tcp_outgoing_address 0 . 0 . 0 . 0
, ICP:
udp_outgoing_address 0 . 0 . 0 . 0 (, ICP)
, 1' ):
udp_incoming_address 0 . 0 . 0 . 0
, -
(firewall), passive_ftp :
passive_ftp on | o f f
15.5.2.
:
cache_peer hostname type proxy-port icp-port options
: hostname
;
type
: parent , sibling ;
proxy-port
-;
icp-port
ICP;
options
.
,
.
Parent
parent; , ,
350
- SQUID
.. . squid
TCP^DENIED parent, .
Sibling ,
sibling; , ,
.
15.5.3.
cache_swap_high
( ) .
cache_swap_low 90
.
maximum_object_size 4 0 9 6 KB
.
minimum_object_size KB
.
15.5.4.
SQUID . - ,
.
cache_access_log / u s r / l o c a l / s q u i d / l o g s / a c c e s s . l o g
SQUID.
/usr/local/squid/logs/access.log.
cache_log / u s r / l o c a l / s q u i d / l o g s / c a c h e . l o g
. / u s r / l o c a l
/squid/logs/cache.log.
cache_store_log /usr/local/squid/logs/store.log
.
/usr/local/squid/logs/store.log.
15.5.5.
ftp_user email-
email ftp-.
dns_nameservers IP-
DNS-, /etc/resolv.conf; .
cache_dns_program / u s r / l o c a l / s q u i d / b i n / d n s s e r v e r
IP-
( DNS).
351
- SQUID
authenticate_program none
, .
ACL proxy_auth.
authenticate_jprogram / u s r / l o c a l / s q u i d / b i n / n c s a _ a u t h / u s r / l o c a l /
squid/etc/passwd
.
../auth_modules/NCSA.
15.5.6. ACL
.
, ACL,
. 15.3.
352
- SQUID
ACL
15.3
Src ip-address/netmask
Src addr1-addr2/netmask
Dst ip-address/netmask
IP-
URL
, SMTWHFA
Proto
Method
Browser [-i] regexp
HTTP FTP
GET POST
User-Agent
[-i] .
15.5.7.
http_access allow|deny aclname
HTTP.
icp_access a l l o w ! d e n y aclname
ICP.
miss_access a l l o w [ d e n y aclname
MISS .
cache_peer_access cache-host a l l o w ] d e n y aclname
cache_peer_domain.
proxy_auth_realm Squid proxy-caching web server
,
/ .
15.5.8.
cachejmgr email
,
, squid .
cache_effective_user nobody
SQUID root UID
cache_effective_user.
cache_effective_group
nogroup
SQUID root GID
cache_effective_group.
visible_hostname _
.
hostname_aliases
.
12 . 851
353
- SQUID
15.6. .
?
. , SQUID
. /usr/local
/etc/squid/squid.conf:
acl good_url
url_regex
"/usr/local/etc/squid/acl/
good_url"
acl bad_urlpath urlpath_regex "/usr/local/etc/squid/acl/
bad_urlpath"
acl bad_url
url_regex
"/usr/local/etc/squid/acl/
bad_url"
http_access deny bad_urlpath !good_url
http_access deny bad_url
!good_url
, :
good_url,
bad__url_path bad_url. bad_url
URL, : Ahttp://.*doubleclick
/4
h t t p : / / . * - a d . f lycast . c o m / s e r v e r / i m g /
http: / / 1 0 0 0 . stars . r u / c g i - b i n / 1 0 0 0 . cgi
A
http://1000.stars.ru/cgi-bin/1000.cgi
A
http://12.16.1.10/~web_ani/
/4
bad_url_path , :
88x31.*gif
88x31.*GIF
100x80.*gif
100x80.*GIF
100x100.*gif
100x100.*GIF
120x60.*gif
120x60.*GIF
179x69.*gif
193x72.*gif
468x60.*gif
.
good_url, bad_url_path bad_url
http://dkws.narod.ru
15.7.
, - ,
,
. , , , , , . , , . -
SQUID .
354
- SQUID
, ,
, :
delay_pools 2
. :
1. .
2. 255 .
3.
.
squid.conf :
delay_class 1 1 # 1
delay_class 2 2 # 2
, :
acl home src
acl workers src
delay_access 1 allow home
delay_access 1 deny all
delay_access 2 a l l o w w o r k e r s
delay_access 2 deny all
:
delay_parameters I 1 4 4 0 0 / 1 4 4 0 0
delay_parameters 2 3 3 6 0 0 / 3 3 6 0 0 16800/33600
, 1 , 14400 .
(/). .
2, ,
.
3, :
delay_parameters 3 1 2 8 0 0 0 / 1 2 8 0 0 0 6 4 0 0 0 / 1 2 8 0 0 0 1 2 8 0 0 / 6 4 0 0 0
.
,
.
15.8.
SQUID
:
sqmgrlog
http://www.ineparnet.com.br/orso/index.html
mrtg
http://www.switch.ch/misc/leinen/snmp/perl/
iptraf
http://dkws.narod.ra^inux/soft/iptraf-2.4.0.tar.gz
bandmin
http://www.bandmin.org
webalizer ( Apache) .... http://www.mrunix.net/webalizer/
355
- SQUID
,
. MRTG . 8.5.
15.9.
, -, , . ,
, ,
.
Internet Explorer 5
-
-> > .
,
-
(. . 15.2).
wsr
,^^^*
II
You may configure a proxy and port number for each of the internet
protocols that Netscape supports.
;
FTP Proxy;
Gopher Proxy;
HTTP Proxy:
Security Pro)^:
WAtS Proxy;
You:max provide a list of domains that Netscape should access directly/
rather than via the proxy:
No Proxy for:
; SOCKS Host
OK
356
. 15.3.
Netscape
Communicator
- SQUID
Netscape Communicator
Edit - Preferences - Advanced -> Proxies -> Manual Proxy
Configuration -> View (. . 15.3).
Konqueror
> > (. . 15.4).
!" proxy
HTTP:
proxy.company.ru
FTP :
He proxy ;
. 15.4. Konqueror
357
16
MySQL
16.1.
,
MySQL. MySQL
. - MySQL:
, MySQL,
- .
MySQL
, ,
InterBase Server, IBM DB/2, Oracle. MySQL
-. ,
, InterBase Server
Oracle, , MySQL.
, .
, MySQL.
MySQL 3.20, :
MySQL_GPL-3.20.32a-18mdk.
MySQL_GPL-client-3.20.32a-18mdk.
MySQL_GPL-shared-libs-3.20.32a-18mdk.
MySQL_GPL-bench-3.20.32a-18mdk.
MySQL_GPL-resolveip-3.20.32a-18mdk.
rpm -ih MySQL*
. ,
MySQL-client, -
.
mysql. ,
, , , :
mysql_install_db
, .
root. 358
MySQL
root . ,
, .
mysql :
1. db;
2. host;
3. user.
user. , . ()
root.
:
safe_mysqld &
.
, :
m y s q l : ready for connections
, ,
. :
mysql -u root mysql
MySQL.
root, .
mysql.
:
UPDATE user SET P a s s w o r d = P A S S W O R D ( x n e w _ p a s s w o r d ' ) WHERE
user='root';
, SQL-, Password
user root. , MySQL
. SQL:
FLUSH PRIVILEGES;
mysqladmin reload. :
mysqladmin -p reload
- ,
root. mysql , quit.
/ e t c / r e . d / i n i t . d / m y s q l :
chmod + / e t c / r e . d / i n i t . d / m y s q l
:
/ e t c / r e . d / i n i t . d / m y s q l restart
, .
/ v a r / l i b / m y s q l / m y s q l
mysql mysql_install_db.
.
mysql -u root mysql, :
ERROR: Access denied for user: *root@localhost' (Using password: NO)
359
MySQL
mysql u root -p. - .
, MySQL
. /etc/re.d/rc3 . d/ /etc/re.d/init.d/my'sql:
In -s S14mysql / e t c / r e . d / i n i t . d / m y s q l
S14 mysql.
network (S10) portmap (S11).
.
mysqld /var/log/mysql. log.
, ,
. ,
. :
GRANT ALL PRIVILEGES ON *.* TO a d m i n g l o c a l h o s t IDENTIFIED BY
'password' WITH GRANT OPTION;
admin,
. localhost,
password.
*.* ,
. ,
. , admin
,
. :
GRANT ALL PRIVILEGES ON *.* TO admin@"%" IDENTIFIED BY '
password' WITH GRANT OPTION;
,
. ,
:
GRANT CREATE,DROP,SELECT,INSERT,UPDATE,DELETE,INDEX ON user.* TO
user@% IDENTIFIED BY 'user_password';
user. user
.
. 16.1.
GRANT , user mysql.
user :
Host User P a s s w o r d Select_priv Insert_priv Update_priv
Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv
Process_priv File_priv
Host, User, Password - - , , ,
, , .
360
MySQL
MySQL
16.1
:
, , ,
INDEX
REFERENCES
CREATE, DROP
GRANT, ALTER
,
()
.
- , Y. N.
, admin,
. SQL:
INSERT INTO user (Host, User, Password, Selectjpriv, Insert_priv,Update_priv, Deletejpriv,
Createjpriv,Drop_priv,Reloadjpriv,Shutdownjpriv, Process_priv, File_priv) VALUES
('localhost' /admin',password(Mtd561sl2'),'Y',','Y','Y', 'Y',' Y ' , ' Y ' , ' Y ' , ' Y ' , ' Y ' ) ;
.
MySQL ! admin, localhost.
, ,
. admin
. 4td561sl2.
:
INSERT
INTO
user(Host,User,Password,Select_priv,Insert_priv,Update jpriv,Delete_priv)
VALUES % ' , ' u s e r ' , p a s s w o r d ( 1 2 3 4 5 6 ' ) , ' Y ' , ' Y ' , ' Y ' , ' Y ' ) ;
76.2.
mysqlshow. :
mysqlshow -p mysql
, mysql.
Database: mysql
I Tables I
+
+
I db
I
I host
I
user
367
MySQL
mysqlshow , . 16.2.
mysqlshow
16.2
--1=_
--1=_
MySQL
--socket=coKeT
--=
mysql.
.
, mysqlshow. mysql
-s. . , . . .
MySQL
, .
:
lynx h t t p : / / l o c a l h o s t
lynx Apache.
:
/etc/init.d/httpd stop
gd - -
:
rpm -qa I grep gd
gd , , , (
1.8.4):
rpm -Uhv g d - 1 . 8 . 4 - 4 . 1 3 8 6 . r p m
php, :
rpm -Uh php*
Apache, :
rpm -Uh mod_php*
. httpd.conf . . php :
AddType application/x-httpd-php4 .php
: Apache . test. php :
<?
phpinfo ( ) ;
?>
DocumentRoot Apache.
/ v a r / w w w / h t m l .
:
http://localhost/test.php
,
Apache , , gd (. . 16.1).
phpinfoQ : , , Web-.
Web-.
. phpinfo() , . p h p . i n i /etc.
, , m y s q l . s o (
MySQL):
extension=mysql.so
363
MySQL
......
sy^...,.
:.
...
1*19*3 EC
mad Dale
Aug 27 206'
Configure Command
--wlh-fsL- -enable- . -
--wthout-
--wifh-psp
Server API
Apsche -.
dtsauied' '
disabled 1
.
*?.?w..:...
. /6. t. phpinfo()
MySQL p h p . i n i
MySQL :
mysql.default_port =
mysql.default_socket =
mysql.default_host =localhost
mysql.default_user =
mysql.default_password =
, .
root ( ) !
MySQL.
, , Red Hat 7.2,
MySQL 3.23. ,
3.20. 3.23,
mod_auth_mysql.
Apache MySQL. , MySQL :
rpm -Uh mysql*
. MySQL
. MySQL (/etc/re.d /)
364
MySQL
, MySQL
Apache. : Apache
MySQL,
. MySQL Apache,
.
root MySQL:
mysql -u root -e "update user set
p a s s w o r d = p a s s w o r d ( > n e w _ p a s s w o r d ' ) where u s e r = ' r o o t ' " mysql
:
mysqladmin reload
Apache + PHP + MySQL.
mysql_test.php
/var/www/html.
<?
// root passwd
if(!mysql_connect("localhost","root","password"))
{
echo "!"
?>
,
!, , .
16.3.2. :
, ,
. -,
Apache, MySQL ,
Linux. -,
, , , , RPM MySQL. php:
mysql_connect() .
.
Apache, MySQL . , .
/src. , MySQL.
MySQL
(
koi8-r):
./configure with-charset=koi8_ru
make
make i n s t a l l
365
MySQL
Apache, :
./configure
make
make i n s t a l l
configure
configure help.
. :
./configure with-mysql with-apache=../apache_l.3.20 with-mod_charset
make
make i n s t a l l
MySQL Web- Apache. ,
Apache
-with-apache.
, Apache,
:
./configure activate-module=src/modules/php4/libphp4.a
Iibphp4.a.
, php . configure , :
make
make install
Apache
libphp. ( make install) :
httpd -1
Iibphp4.c,
mod_charset.c .
/etc/php.ini
root MySQL ( root root MySQL!). . 16.3.1.
. , MySQL Apache.
366
17
.
,
, .
, . , Linux.
17.1.
, :
1. .
2. IP-
.
3. IP-.
4. .
Linux
:
1. .
2. .
3. IpChains.
4. DNS.
5. Squid.
ethO, , ethl . ethO IP- 111.111.111.111, a ethl 192.168.1.1
17.1.1.
, .
:
N e t w o r k i n g support (CONFIG_NET) []
T C P / I P n e t w o r k i n g (CONFIG_INET) [ ]
IP f o r w a r d i n g / g a t e w a y i n g (CONFIG_IP_FORWARD)
[y]
367
.
IP m u l t i c a s t i n g (CONFIG_IP_MULTICAST) []
IP f i r e w a l l i n g (CONFIG_IP_FIREWALL) []
IP a c c o u n t i n g (CONFIG_IP_ACCT) [y]
Advanced Router,
.
.
17.1.2.
IP-forwarding. :
# echo "1" > / p r o c / n e t / i p _ f o r w a r d
netconf.
, , . 8.
17.1.3. IpChains
IPChains. , :
ipchains -N prov
ipchains -A input -i ethO -j prov
ip-spoofing:
ipchains -A prov -s 1 9 2 . 1 6 8 . 1 . 1 / 1 6 -1 -j DENY
ipchains -A prov -s 1 2 7 . 0 . 0 . 1 / 8 -1 -j DENY
Telnet :
ipchains -A prov -p tcp -destination-port 23 -j REJECT
, samba ,
137-139:
i p c h a i n s -A prov -p tcp d e s t i n a t i o n - p o r t 137 -j REJECT
ipchains -A prov -p udp - d e s t i n a t i o n - p o r t 137 -j REJECT
To 138 129.
samba Samba-HOWTO.
:
ipchains -N t r a f i n
i p c h a i n s -I input -i ethO -s ! 1 2 3 . 1 2 3 . 1 2 3 . 0 / 2 4
trafin
i p c h a i n s -A t r a f i n -d 1 2 3 . 1 2 3 . 1 2 3 . 1 2 3
-p
all
-j
, (
IpChains ), ipchains-save
ipchains-restore. , :
# ipchains-save > /etc/ipchains.rules
, , 17.1.
17.1.
#! / b i n / s h
# .
# , .
368
.
#'. /bin/sh
I .
# , .
[ -f /etc/ipchains . rules ] | | exit
case "$1" in
start)
echo -n " :"
/sbin/ipchains-restore < /etc/ipchains . rules | | exit 1
echo 1 > /proc/sys/net/ipv4/ip_forward
echo " . " ; ;
stop)
echo -n " :"
echo 0 > /proc/sys/net/ipv4/ip_forward
/sbin/ipchains -X
/sbin/ipchains -F
/sbin/ipchains -P input ACCEPT
/sbin/ipchains -P output ACCEPT
/sbin/ipchains -P forward ACCEPT
echo "." ;;
*)
echo ": / e t c / i n i t .d/packetf ilter { start | stop} "
exit 1 ; ;
esac
exit 0
.
17.1.4. DNS
, (Domain Name
System) IP-
. DNS , .
, , :
# ps -ax
grep named
, ( ndc),
, bind.
network.
.
/etc/named. conf
(. 17.2).
17.2. named.conf
logging {
.
zone "." {
type h i n t ;
f i l e "named.ca";
zone " d h s i l a b s . c o m " {
type m a s t e r ;
f i l e "dhsilabs.com";
n o t i f y no;
zone " 0 . 0 . 1 2 7 . i n - a d d r . a r p a " {
type m a s t e r ;
f i l e "named.local";
zone " 1 . 1 6 8 . 1 9 2 . i n - a d d r . a r p a " {
type master;
f i l e "192.168.1";
n o t i f y yes;
/var/named.
d h s i l a b s . c o m , n a m e d . l o c a l , 192.168.1, named.ca (.
17.3, 17.4, 17.5). ()
d h s i l a b s . c o m (. 17.3). named. -- DNS.
.
17.3. dhsilabs.com ( IP-)
@
den
ns
www
ftp
mail
evg
IN
IN
IN
IN
IN
IN
IN
IN
IN
IN
IN
IN
IN
IN
localhost IN
: NS
A..
370
SOA d e n . d h s i l a b s com. h o s t m a s t e r . d h s i l a b s . c o m . (
93011120
3
10800
3600
3600000
1000
TTL 24
86400
)
NS del
den.dhsilabs.com.
A
19:
192.168.1.1
MX 150 d e n . d h s i l a b s . c o m .
A
19:
192.168.1.1
INTEL CELERON (LINUX)
HINFO
MX 100 den
MX 150 evg.dhsilabs.com.
CNAME d e n . d h s i l a b s . c o m .
CNAME d e n . d h s i l a b s . c o m .
CNAME d e n . d h s i l a b s . c o m .
CNAME d e n . d h s i l a b s . c o m .
A
19:
192.168.1.2
MX 100 d e n . d h s i l a b s . c o m .
A
12'
1
27.0.0.1
name server;
IP-a
.
MX
<>. ,
;
HINFO
(
);
;
CNAME
, ..
http://www.dhsilabs.com,
den.dhsilabs.com. :
@ IN SOA d e n . d h s i l a b s . c o m . hostmaster.dhsilabs.com.
( , (..
dhsilabs.com)).
17.4. named.local
@
IN
SOA
199609203
28800
7200
604800
86400)
NS
PTR
dhsilabs.com. root.dhsilabs.com. (
;
; 8
; 2
; 168 (7 )
; TTL -- 24
dhsilabs.com.
localhost.
17.5. 192.168.1
@
IN
SOA
den.dhsilabs.com. hostmaster.dhsilabs.com. (
93011120
;
10800
; 3
3600
;
3600000
; 1000
86400 )
; TTL -- 24
@
IN NS
den.dhsilabs.com
1
IN PTR
den.dhsilabs.com
2 . 1 . 1 6 8 . 1 9 2 IN PTR e v g . d h s i l a b s . c o m
PTR IP- .
IP:
1 . IN PTR d e n . d h s i l a b s . c o m
1.168.192. : IP !
17.1.5. Squid
squid. .
/ e t c / s q u i d / s q u i d , conf. :
cach_peer p r o x y . y o u r _ i s p . c o m
, -:
cache mem
371
.
,
, -,
.
, ( ):
cache_dir /usr/local/squid 2048 16 256
, -:
acl allowed_hosts src 1 9 2 . 1 6 8 . 1 . 0 / 2 5 5 . 2 5 5 . 2 5 5 . 0
acl localhost src 1 2 7 . 0 . 0 . 1 / 2 5 5 . 2 5 5 . 2 5 5 . 2 5 5
,
squid ( den, admin, developer):
ident_lookup on
acl allowed_users user den admin developer
http_access a l l o w a l l o w e d _ u s e r s
http_access deny all
maxium_object_size maxium_object
.
: /etc/services / e t c / i n e t d . c o n f --
. , -, .
77.2. Dial-In
17.2.1.
, ,
Linux. , ,
. 2.3.x (
) mgetty- 1.1.x. mgetty
-DAUTO_PPP. , .
ppp-2.4.0-3mdk.i586.rpm mgetty-1.1.22-2mdk.i586.rpm,
Linux Mandrake 7.2. RedHat/Mandrake,
mgetty :
# mount -t i s o 9 6 6 0 /dev/hdd / m n t y / c d r o m
#cd /mnt/cdrom/Mandrake/RPMS
#rpm -Uvh mgetty*
#rpm -Uvh ppp*
:
1. CDROM /dev/hdd ( Secondary Slave).
2. Linux Mandrake. Red Hat
/mnt/cdrom/RedHat/RPMS.
3. He supermount. supermount ,
.
4. mgetty .
! , .
372
.
17.2.2. mgetty
mgetty
:
/etc/mgetty+sendfax:
dialin.config
login.config
mgetty.config
/etc/ppp:
auth-up
auth-down
,
chap-secrets
ip-up
ip-down
options
pap-secrets
, , .
, . ,
.
/ e t c / m g e t t y + s e n d f a x / d i a l i n . c o n f i g
. / e t c / m g e t t y + s e n d f a x / l o g i n . c o n f i g
:
/ A u t o P P P / - a_ppp /etc/ppp/ppplogin
, . ,
(log-),
:
/AutoPPP//etc/ppp/ppplogin
/etc/ppp/ppplogin (. 17.6).
17.6. /etc/ppp/ppplogin
mesg n
tty -echo
/ u s r / s b i n / p p p d s i l e n t auth -chap +pap login
-chap refuse-chap,
+ require-pap. , /etc/ppp/ppplogin
:
# chmod +x /etc/ppp/ppplogin
- /etc/passwd (. ). /etc/mgetty+sendfax
/mgetty.config , 17.7.
17.7. mgetty.config
# For US Robotics Sportster 28.8 with speaker off
port ttySO
speed 28800
data-only
debug 3
373
.
init-chat "" ATZ OK AT&F1MOE1QOSO=0 OK
answer-chat "" ATA CONNECT \c \r
# For Practical Peripheral 1 4 . 4 w i t h f a x disabled and prolonged
# carrier w a i t time ( 9 0 sec)
port ttySl
speed 1 4 4 0 0
data-only
debug 3
i n i t - c h a t "" ATZ OK AT&F1MOE1QOSO=OS7=90+FCLASS=0 OK
a n s w e r - c h a t "" ATA CONNECT \c \r
# For USRobotics V . E v e r y t h i n g
port ttyS2
speed 5 7 6 0 0
data-only
debug 3
init-chat "" AT OK ATS7=50SO=1+S62=3+S64=2S39=10 OK
ZyXEL U336E :
init-chat "" ATZ OK AT&F1MOE1QOSO=OS OK
answer-chat "" ATA CONNECT \c \r
: US Robotics Sportster
28.8, Practical Peripheral 14.4, USRobotics V.Everything. ZyXEL U336E
:
init-chat "" ATZ OK AT&F1MOE1QOSO=OS OK
answer-chat "" ATA CONNECT \c \r
.
.
/etc/inittab, 17.8.
17.8. inittab
# Run gettys in standard r u n l e v e l s
1:2345:respawn:/sbin/mingetty ttyl
2 : 2 3 4 5 : r e s p a w n : / s b i n / m i n g e t t y tty2
3 : 2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5 : 2 3 4 5 : r e s p a w n : / s b i n / m i n g e t t y tty5
6 : 2345:respawn:/sbin/mingetty tty6
#
S O : 2 3 4 5 : r e s p a w n : / s b i n / m g e t t y -x 3 ttySO
S I : 2 3 4 5 : r e s p a w n : / s b i n / m g e t t y -x 3 ttySl
32:2345:respawn:/sbin/mgetty /dev/ttyS2
SO, SI, S2 -- .
.
. SO...S2 .
mgetty ( ):
# init q
374
.
, /var/log/mesages .
TR,
mgetty .
17.2.3.
/ e t c /
options . ttySx, (. 17.9).
17.9. options
lock
login
auth
netmask 2 5 5 . 2 5 5 . 2 5 5 . 0
modem
crtscts
refuse-chap
require-pap
mtu 576
mru 576
proxyarp
myhost:ppp01
ms-dns C C C . C C C . C C C . C C C
/etc/ppp/options.
myhost .
! .
, , igor, denis .
, ..
options . ttySO, options . ttySl ! .
ms-dns DNS Microsoft.
IP- DNS .
proxyarp, IP-
broadcast . pppd
, ethernet.
: refuse-chap -chap,
require-pap +.
/etc/ppp/pap-secrets (. 17.10).
17.10. /etc/ppp/pap-secrets
* Secrets for authentication using PAP
* client
server secret IP addresses
*
*
""
192.168.0.11
*
*
""
192.168.0.12
*
*
""
192.168.0.13
, .
375
.
/etc/passed ( /etc/shadow).
/etc/hosts (. 17.11).
17.11. /etc/hosts
192.168.0.11 pppOl ppp01.mydomain.com
192.168.0.12 02 ppp02.mydomain.com
192.168.0.13 ppp03.mydomain.com
mydomain.com .
DNS.
/ u s r / s b i n / p p p d :
# chmod u+s / u s r / s b i n / p p p d
17.2.4. IP Forwarding
IP / e t c / s y s c o n f i g
/network : FORWARD_IPV4=yes.
IP_FORWARD.
IP Forwarding :
# echo "1" > / p r o c / n e t / i p _ f o r w a r d
IP Forwarding .
netconf,
IP Forwarding, ,
.
!
17.2.5.
, . / e t c / o p t i o n s / e t c / o p t i o n s . ttySx , myhost:pp01 :
Server_IP:Client_IP
,
192.168.0.1:192.168.0.11
/etc/ppp/pap-secrets
( 17.12).
17.12. /etc/ppp/pap-secrets
#
userl . ""
*
user2 . ""
*
#
: userl
- , ;
. - ;
- / e t c / p a s s w d (/etc/shadow);
*
- IP.
376
.
. ,
,
POP .
!
/etc/ppp/pap-secrets
MD5 ( DES), /etc/shadow (/etc/passwd).
/etc/hosts .
, , .
17.2.6. - ...
/var/log/messages.
. :
modprobe: c a n ' t locate module c h a r - m a j o r - 2 4
/etc/conf .modules :
alias ppp-compress-21 bsd_comp
alias ppp-compress-24 ppp_deflate
alias ppp-compress-26 ppp_deflate
17.2.7. Windows-
, .
IP- DNS ,
. (. . 17.1):
: .
: .
* : TCP/IP.
..
;
<;.-!;.,:-!:.;:;
V;,''-r I :!1*|..(-|
^ :
;
~ :>ijn>i.-t i:i;i'B.jj:ji,75,mr!i
>s-'.] ,
|
'.'.'-.
>': ,
'
'
''
L11 :;.;:,-J
--.--1
I - . '-' . ; . < . - .
.?_1Z~ JZIZri
:
:
" TCP/IP
'
|5
: :
?="':
I...'....
i;
...'
..iWlCSHI
'
t(4K
"
. 17.1.
377
.
17.2.8.
,
, ,
DNS, NET3-HOWTO.
http://dkws.narod.ru,
-.
17.3.
17.3.1. callback?
. : ,
, , -- 1 ,
. ,
. , 1 2,5...3,3
, : Utel. 1...2 .
callback (callback ).
: :
1.
.
callback. , ,
.
.
2. 5...20 callback
, .
callback .
, ,
. ,
, 6 . ,
- callback
.
( ), .
callback :
.
, ( ). ,
,
. ,
. ,
( 25...30 ) 378
.
. . ,
,
, , , .
, ,
- .
( callback) , ,
, , . callback
, callback
, . , callback .
callback.
:
, -
. , . :
,
, , .
17.3.2. . 1
. ,
,
. , - , , , , . , ,
,
, .
, mgetty pppd
. , mgetty . 17.2.
mgetty
pap-. ,
. mgetty RPM, . -
DAUTO_PPP ,
RPM, . mgetty http://alpha.greenie.net/mgetty/.
policy.h-Dist policy.h.
,
.
.
-.
Makefile :
CFLAGS=-02 -Wall -pipe
379
.
:
CFLAGS=-02 -Wall -pipe -DOFIDO -DOAUTO_PPP
, . : SBINDIR=/sbin, BINDIR=/bin
, mgetty:
make all
make i n s t a l l
callback ,
mgetty. callback / u s r / s b i n ,
callback, config /etc/mgetty+sendfax.
/ e t c / m g e t t y + s e n d f a x / l o g i n . c o n f . ( , ) :
/ A u t o P P P / - a_ppp /etc/ppp/ppplogin
:
/AutoPPP/
- _ / u s r / s b i n / p p p d noauth -chap +pap -detach
mgetty pppd.
m g e t t y . c o n f i g ,
(. 17.13).
17.13. mgetty.config
port t t y S O
#
# ( )
dataonly
#
init-chat "" AT OK #
#
force-init-chat "" AT OK
/etc/ppp/options.ttySO (. 17.14). ttySO.
17.14. /etc/ppp/options.ttySO
#
38400
#
crtscts
# ttySO
lock
#
modem
# IP-
192.168.1.1:192.168.1.207
# IP- DNS. Windows-
ms-dns 192.168.1.1
380
.
# LCP-
Icp-echo-interval 20
# LCP-
lcp-echo-fallure 6
#
mtu 576
mru 576
LCP- LCP ,
pppd .
120 (20*6) , .
mgetty, /etc/lnlttab:
S O : 3 5 : r e s p a w n : / s b i n / m g e t t y -D -n 1 /dev/ttySO 38400
, SO ,
. 3,5 . -D
mgetty ,
- 1 mgetty .
() mgetty.
init q. killall -I init.
DTR.
, / v a r / l o g / m e s s a g e s -
.
, .
, (please).
- l o g i n . c o n f i g :
please - - / u s r / s b i n / c a l l b a c k -s 3 8 4 0 0
. , ,
, .
callback cbuser (callback user).
mgetty.
, , .
, Windows-.
17.3.3. . 2
, , . -,
Windows-. -, , callback, .
. ,
, , , .
:
381
.
pppd, pppd,
pppd.
pppd,
callback. : http://www.pbko.sk/~bobovsky/archiv/pppdcbcpS-callback/ine-contrib/ppp-2.x.n.CBCP.patch.
pppd. .
pppd , ,
pppd. pppd
ftp://ftp.linuxcare.com.au/pub/ppp/
pppd ( ) :
patch -pi < - 2 . 3 . 1 0 . . p a t c h
pppd (
). :
/etc/ppp/callback-users
/etc/ppp/callback-client
/etc/ppp/callback-server
,
. Linux callback. .
pppd
:
./configure
make
make i n s t a l l
pppd mgetty. ,
mgetty -DAUTO_PPP ( -).
/etc/mgetty+sendfax/login, conf. :
/AutoPPP/ _ /usr/sbin/pppd auth -chap +pap login callback-server
callback-users
(. 17.15).
17.15. /etc/ppp/callback-users
# User list for callback
# Username option
# option no callback
# option * or empty user definied
# option other admin definied: this number
# in username * and ? wildcars valid, callback uses the best fit
# Examples:
# zotyo 67435 # user zotyo admin definied, number 67453
# gates -- # gates not called back may *
cbuser *
user 320779
382
.
cbuser. * . user , 320779.
callback -.
chniod callback-server callbackclient .
callback-server (. 17.16).
17.16. /etc/ppp/callback-users
#!/bin/sh
# Script callback-server
# Script parameters: delay time in seconds, callback number
DELAY="$1"
NUMBER="$2"
/usr/sbin/chat -v -t 2 "" ATHO
sleep $DELAY
/usr/sbin/chat -v "" AT OK ATS39=5DT$NUMBER CONNECT
, , sleep SDELAY sleep, , sleep 25. : (- DT). , DP (ATDP).
, .
17.3.4. . 1
.
, , .
TCP/IP (. . 17.2).
, , ,
(
17.17).
::^|;
*?||
~(*4-
17.17. callback
a tilfffl;
. 17.2.
proc main
delay 1
#
A
transmit "please M"
#
#
waitfor "phone"
#
383
.
#
w a i n f o r "CONNECT"
endproc
||C:\PfogramFiles\Accessories\Callbacl4scp
callback.scp.
Windows NT \WINNT\SYSTEM32\RAS.
(. . 17.3).
.
. ,
AT&C1SO=1 (. . 17.4).
. 17.3. cal/back.scp
&1 CD - -
. SO ,
(1 ). Motorola Premier 33.6 :
AT&F&COSO=1QOV1&D3\V4
callback - / m n t / c d r o m / d o c / c a l l b a c k .
Windows NT
. :
- ->
; ' '
- (Start ->
ffife
Programs - Accessories - Remote
!
"!!
access). (More).
| .;;
"it
(Users preferences)
::^<;|
JEj-<^
(Callback). ,
::;j|SJATlc1sCfc1j
. ,
, ,
. 17.4.
.
384
.
17.3.5. . 2
,
Windows-. , , Windows . ,
(. . 17.2).
Linux-. Linux-
pppd, . , ,
. pppd
/ e t c / p p p / c a l l b a c k - c l i e n t (. 17.18).
17. IS. /etc/ppp/callback-client
#!/bin/sh
# Script callback-client
# Script parameters: delay time in seconds
DELAY="$1"
#
/usr/sbin/chat -v -t 2 "" \d+++\d\c OK ATHO OK
# $DELAY ,
#
# delay 25 delay 30
sleep $DELAY
# callback
/usr/sbin/chat -v "" ATZ OK "" RING ATA CONNECT
ppp-on pppd, :
/ u s r / s b i n / p p p d auth -chap +pap login callback
13 . 851
385
18
,
.
2.2.17,
(2.3.x , 2.4.x).
18.1.
Linux
. (
).
BootPrompt-HOWTO. LILO,
Linux (, bootlin, bootact).
, LILO,
:
linux _.
: linux , / e t c / l i l o . c o n f .
append,
LILO / e t c / l i l o / c o n f .
:
[=1][,2]...[,]
. , .
:
//
root=/dev/hdal e t h e r = 9 , 0 x 3 0 0 , O x d O O O O , O x d 4 0 0 0 , e t h O
//
root=/dev/hdal ether=9, 0x300, O x d O O O O , Oxd4000, ethO
386
18.1.1.
, ,
:
root=y
. , root=/dev/hdal.
:
1. /dev/hdaN . . /dev/hddN IDE-;
2. /dev/sdaN . . /dev/sdeN SCSI-;
3. /dev/xdaN . . /dev/xdbN XT- ;
4. /dav/fdN . N=0 , N=1 ;
5. /dev/nf s , , NFS.
. ,
rw
/
.
fsck. fsck
.
18.1.2. RAMDISK
Linux ,
. :
.
, . RAM-.
RAM-.
ramdisk_start=<cMetueHMe>
RAM-.
RAM, ,
BIOS .
RAM-,
.
LILO.
, (
boot, root),
= 0.
387
load_ramdisk=
RAM-.
load_ramdisk= 1 , RAM-.
0 ( RAM-).
prompt_ramdisk=
, ,
(: promt_ramdisk=l).
ramdisk_size=
RAM- .
ramdisk=
. no-hit
hit. ,
486DX-100 . , nohit Linux .
387
,
no-scroll
.
reboot=
, . : cold
warm, . 2.0 ,
single
, , .
18.2.
, , . , , :
kernel-2.2.17-21mdk.i586.rpm
kernel-headers-2.2.17-21mdk.1586.rpm
, .
/ u s r / s r c / l i n u x / u s r / s r c / l i n u x - 2 .2.17. linux
linux-2 .2.17.
:
# cd / u s r / s r c / l i n u x
^
II, fa
Ji'f "?&}: ^^^
,
.
.
,
,
lie j
>
s
i
. 18.1. Menuconfig
# make config
# make menuconfig
# make xconfig
, ,
,
.
make menuconfig
(. 18.1).
389
EO device support
General setup
Block devices
ISDN subsystem
Networking options
Telephony Support
Character devices
SCSI support
USB support
j-
. 18.2. xconfig
390
Gfiiieral setup |
Ill|| v
[*
1* i v
ftny)
Help | |
Networking support
Hulp ;
Help j ; :
i I.-V-. ;i v* "
\*
ii -v
HI ii v
' ...Heip:.j
V nil
Backward-compatible /proc/pci
Help j
* n jj MCA support
! --
Help j
- n i l PCI support
| Help
i i Help j
^ n l j System VIPC
Main Menu
Next
-
Help |
/I
Prev
-_-
-:
;r;::::
r'<>V>:.
5 i;!
tafflWWifiiiff10^ '
.- oft .-."'i
Networfdng options j
I; -*'yii v
|; * ii V
i * yj|y
:j ;V n| Routing messages ;
:: :
^
'||||
<->.--sa
ItBlp i
1
Help i
-.'kJiiiis ^,-
|
|
|
|
:.-:->^
; Help \
I i v n !i Network firewalls
Help 1
';.
li.L.yJI.x
1
J:
J*5ii
:.:;;iw
Help i
n
I * y.t"v :;-j!v !| IP: advanced router i
|:1^;^^:::^^
! Menu
fer
Help ;
:.........:..
Next
:SSai;a||;sL:::>,-^...,l
18.1
386
486/486
' ':;Prev':'::-::J 1
AMD/Cyrix/Intel 386DX/DXL/SL/SLC/SX,
Cyrix 486DLC/DLC2, UMC 486SX-S
AMD/Cyrix/lntel/iBM DX4, 486DX/DX2/SL/SX/SX2 AMD/Cyrix 5x86
NexGen Nx586, UMC USD U5S
586/5/586/686
( ) Pentium, AMD K5
Pentium/K6/TSC
/686
397
USBsupportj
Support for USB
-* yj;v r
/ :| v
* ni
",-t
* nj
!! V
v y;iv mi; * n.
,- IK* ml * n
v* y l l x c m i ! *>!
Next
586/5. ,
PPro, Linux ( : Intel Celeron
433). 1 , , , 1 .
Math emulation
, : 386SX/DX/SL/SLC 80387, 486SL/SX/SX2.
SMP (Symmetric multi-processing support)
,
? , .
SMP .
586. , 486.
, Pentium,
. ,
Enhanced Real Time Clock Support.
Advanced Power Management SMP.
MTRR
Intel P6 (Pentium Pro, Pentium II )
Memory Type Range Registers (MTRR).
. ,
PCI AGP. : Cyrix 6x86, 686, , AMD K6-2 (stepping 8
), 6-3, Centaur . BIOS MTRR , .
392
. , MTRR, . MTRR
3 .
18.2.2. Loadable module support
,
. ,
, .
.
18.2.3. General setup
BIGMEM
1GB.
Networking support
, . Linux .
PCI support
PCI.
PCI quirks
, BIOS.
BIOS , PCI.
. , . . BIOS ,
.
PCI bridge optimization (experimental)
PCI . . ,
.
Backward-compatible /proc/pci
/proc/pci,
PCI-. ,
, .
/proc/bus/pci. . ,
() /proc/bus/pci.
MCA support
MCA. MCA --
, IBM, - -
PS1/PS2. .
System V IPC
. metalab (ftp://metalab.unc.edu/pub/Linux/docs/LDP/
programmers-guide).
393
BSD Process accounting
, ,
. .
Sysctl support
Sysctl. Sysctl
. sysctl
8 . , , /, .
Kernel support for a.out/ELF/MISC/JAVA binaries
Linux- ELF-. , .
Parallel port support
.
PC-style hardware
( ),
PC. ,
IBM PC, Alpha .
Support foreign hardware
, ( PC) .
Advanced Power Management () BIOS support
: , - (, VESA-).
, apm=off.
:
1. ( ),
, .
2. no-hit.
3. ( 387).
4. floppy-nodma.
5. , .
6. .
Support Enable PM at boot time
. ,
BIOS , Standby
Suspend,
CPU Idle. ,
.
Make CPU Idle calls when idle
.
!
, .
, ,
394
. ,
SMP , !
Enable console blanking using
. ,
LCD-, Linux.
Ignore multiple suspend/resume cycles
GMT,
, . ,
. GMT.
Allow interrupts during BIOS calls
395
Include IDE/ATAPI CDROM support
CDROM.
.
Include IDE/ATAPI TAPE support
IDE/ATAPI-.
Include IDE/ATAPI FLOPPY support
IDE/ATAPI-. LS-120 lomegaZIP, .
SCSI emulation support
SCSI
ATAPI, .
.
, .
Routing messages
Netlink device emulation
Network firewalls
Socket Filtering
UNIX domain sockets
TCP/IP networking
IP:firewalling (*)
IP:firewall packet (*)
IP: transperent proxy support (*)
IP: masquerading (*)
IP: ICMP masquerading (*)
IP: masquerading virtual
server support (*)
IP: broadcast GRE over IP (*)
IP: aliasing support
IP: TCP syncookie support
IP: allow large windows
. ,
firewall
UNIX-.
TCP/IP
IpChains
IpChains
IP-
-
IP-
broadcasting WAN
.
SYN-
.
16
, (*), . .
firewall .
396
18.2.7. SCSI support
SCSI.
SCSI- .
18.2.8. Network device support
(, ),
. ,
. , PCI- , ISA- .
18.2.9. IrDA, USB support
IrDA- USB-.
18.2.10. Filesystems
: , ,
, . :
Second ext fs (ext2), ISO 9660, MS Joliet CDROM extension,
VFAT, /proc, /dev/pts
78.3.
, ,
.
:
# make dep
:
# make bzlmage
, 20 (
) .
/usr/src/linux/arch/1386/boot.
397
, :
# make modules
:
# make modules_install
( /lib/modules). :
# make i n s t a l l
,
. .
/ e t c / l i l o . c o n f :
# vi / e t c / l i l o . c o n f
(
/ e t c / l i l o . c o n f . 4):
image=/usr/src/linux/arch/i386/boot/bzlmage
label=my_linux
root=/dev/hda5
append=" mem=128M"
read-only
:
# lilo
:
# reboot
.
.
398
.
RPM-
19
19.1.
. Linux
mail, fastmail, locate, which. ,
,
X Window.
. , ,
Intel Pentium 166 32 , ,
pine,
netscape -mail .
, , ,
, .
, ,
. ,
, Linux ,
appres
appres X,
.
: $ appres xterm
arch
.
: $ arch.
: 1686.
399
. RPM-
banner
, . .
[] []
be , .
, , be , .
, .
.
:
scale=3
sqrt(4)+2
4.000
quit
scale , ,
. sqrt .
for, while, continue,
break. s , , ,
, 1 .
bdftopcf
[]
-bdf
19.1
-I
-I
-L
, -I,
, -I,
- file
-
-t
-un
.
: 1,2,4
. : 1,2,4
bmtoa []
bmtoa .
atobm.
cal []
! ,
cksum
cksum (CRC)
. .
400
. RPM-
cpio []
cpio ,
. .
date
date . root .
, man date. MMddhhmmyy ,
, , , . , 14
2002 16:35 : date 0114163502
df []
.
, .
free []
free
. .
, - - ,
dumpkeys
.
echo []
echo .
-,
, .
fsinfo
X
Windows.
id
.
, . UID,
GID, , .
info
.
root.
kill [] PID
. kill . 5.
40?
. RPM-
killall []
.
login []
.
.
su.
Ismod
.
mdSsum .[]
MD5. -
, -t . -
, -s .
minicom []
Minicom . ,
.
minicom.
nice [] []
. nice
. 5.
passwd [] []
. root . .
.
, , , list.
pathchk
.
printenv
.
echo $_
ps
(. . 5).
renice []
. nice,
renice .
reset
() .
402
. -
nrnnod []
.
root.
[]
XModem.
minicom.
rxvt
rxvt xterm.
rz
[]
ZModem.
minicom.
sb []
YModem.
minicom.
setterm
.
.
sleep
. .
.
startx
X Window, . startx xinit.
strace []
.
.
stty
stty
. .
sx []
XMddem.
minicom.
systat
systat ciictfettfy, systat.
.
systat , daytime netstat.
systat , . 19.2.
sz
[]
ZModem.
minicom.
403
. RPM-
systat
19.2
netstat
systat
daytime
-
-S
-t
tee
[]
. ,
. ,
. -.
:
$ some_program | tee f i l e
some_program ( ), , , file
tee.
, tee .
, , ,
some_program.
tload []
.
top
[]
, , .
, . , . 19.3.
top
Q
S
S
I
19.3
,
-
true
, .
.
.
ul
[]
ul , ,
. ,
Linux.
404
. RPM-
users
,
.
w
: , , , .
which
, .
who
, .
whoami
. who am i.
write
. .
xclipboard
X Window.
xcmap
.
xconsole []
X ,
/dev/console. . 19.4.
xconsole
19.4
-daemon
( )
-file
/dev/console
-notify
-nonotify
-verbose
, notify
-exitOnFail
xcpustate
,
xdpyinfo []
X.
xeyes []
, .
xf86config
X XF86Config.
, .
405
. RPM-
xfd []
. -fa font_name.
xfontsel
.
, ,
. ,
xfractint
.
kfract.
xgc
X
Window.
xhost []
X. + X,
- . ,
.
xkill
xkill -. X
. X Window (-)
X.
xkill.
!
xlock
xlock - X.
. xlock vlock,
.
xlogo
X.
man.
xmessage []
1' .
^ (. . 19.5).
xmessage
-buttons
-default
-file
-print
406
19.5
, .
_:_,
. RPM-
echo, X.
.
[]
X.
.
xpaint
. TIFF,
PPM, .
xrefresh
() .
xsetroot []
xsetroot X,
. .
xterm
,
X Window.
xv []
xv
GIF, JPEG, TIFF, PGM, PPM, PBM, BMP, PCX, IRIS RGB
. . gimp.
xvidtune []
X.
, .
xwd []
xwd
.
yes
.
, . .
19.2. 1
> [V
^
. 4,
basename
, . .
chgrp [] /
chgrp , . , (. . 19.6).
407
. RPM-
19.6
chgrp
-R
-V
-f
chown []
chown . , ,
root.
chgrp (. . 19.6).
chroot
.
root.
file
[]
.
find
find . find , .
, , , . . 19.7.
find
19.7
-amin
-anewer
, :
+ ;
m ;
-
,
-atime
, :
+d d ;
d ;
-d d
-cmin
, :
+ ;
m ;
-
-cnewer
-ctime
,
, :
+d d ;
d ;
-d d
-daystart
-empty
-exec
-follow
( , )
-fstype
408
. RPM-
. 19.7
-gid
-iname
.
( ),
-inum
(i-node)
-ipath
-links n
, n
-Inane
-maxdepth
-mindepth
-name
-nogroup
, ,
/etc/group
-nouser
, /etc/passwd,
-path
-exec,
-perm _
-size n
-type _
: b ,
, d , f , I ,
-user
-ok
gzip []
. ,
, ,
.gz. gzip . 19.8.
gzexe []
gzexe .
.
, . , gzexe (SFX). -d
.
locate []
.
.
gzip
19.8
-d
( , gunzip)
..iJil,
,
, ,
-f
-I
-q
-t
-V
409
. -
mkfifo []
FIFO (First In First Out).
0666 , umask. _ .
mkfontdir
,
. ( ) fonts . dir
. X.
mknod [] _
mknod FIFO, ,
. , mkfifo,
0666 umask.
, (. . 19.9).
19.9
(FIFO)
- _.
.
pwd
.
size []
size .
, . 19.10.
sq _ _
sq .
. unsq.
, sq.
umask
.
~ , 0777 umask.
umask 022.
size
19.10
-
-
-d
-X
--target
410
. RPM-
updatedb []
updatedb , locate .
, .
(. . 19.11).
updatedb
~localpaths=dir1 dir2...
--netpaths=dir1 dir2 ...
--netuser=username
--old-format
--11=
--prunepaths=dir1 dir2 ....
19.11
xfilemanager xfm
. Midnight Commander (me),
.
zcat
.
znew [] .Z .gz
znew , compress,
grip. ,
. 19.12.
znew
-9
-f
-
-
-t
-V
19.12
,
!
^'<:
!|"
zoo
[]
-. .
411
. -
19.3.
audiocompose
audiocompose ,
. .
audiosend
audiosend , .
biff
.
sendmail.
chfn []
, finger.
dnshostname []
. root
.
dnsquery []
DNS. (. . 19.13).
dnsquery
19.13
DNS
-t
-
-
-S
elm []
elm .
, mail,
, pine.
fastmail [],, _
. - , . . 19.14.
faucet []
faucet
. faucet , a hose (. )
.
412
. -
fastmail
-
-
-
-d
-f from
-
-r reply-to
-R
-s subject
>
19.14
Comments
from ()
Message-ID ( )
reply-to ()
( subject)
finger []
finger ,
chfh. finger , 79 /etc/services
.
Connection refused. 79 ,
. ,
, .
frm
.
ftp []
ftp FTP, . . 19.15, ftp . 19.16.
ftp
-d
-
-I
-
-V
19.15
.
, user
,
19.16
FTP
,/
account
! 2
append 1 2
ASCII .
Ascii
Bell
Binary
ftp
Bye
Case
cd
Cdup
413
. -
. 19.16
Chmod
Close
Cr
delete
dir
Disconnect
get 1 2
Glob
Hash
help
idle n
Image
led
Is
macdef
mdelete
mdir
mget
mkdir
mis
mode
modtime
mput
newer
open []
Prompt
proxy
put 1 2
Pwd
Quit
recv 1 2
reget 1 2
remotestatus
rename 1 2
Reset
restart
414
.
.
,
close
1, ,
2 . 2 ,
mget, mdelete, mput
. #.
n
dir
.
,
dir
. stream ()
, ,
. ,
! 2
. ,
bye
1, ,
2 . 2 ,
^ 1, ,
2 . 2 ,
. , ,
. ,
, .
. RPM-
. 19.16
.
. ,
Runique
, .1, .2
1 2
send "! 2
. ,
size
Status
struct
. stream
sunique
system
trace
.
type
umask
user ,
verbose
!
$
?
rmdir
fuser []
, .
getpeername []
, .
hose
[]
hose
. faucet , a hose (. )
. .
host [] []
hostname []
: I3R!
'
. $?1
.
< >
lynx [] URL
415
. RPM-
19.17
lynx
-anonymous
,
-ascii
-auth=HMH
-book
-cache n
-case
-=
^ , -traversal, ,
-crawl
-dump
-display=cepsep
X rexeced
-dump
-editor=nporpaMMa
emacs
-emacskeys
HTML
-force html
FTP
-ftp
-get_data
GET
-head
HEAD MIME
-homepage=URL
-image_links
-index=URL
-localhost
,
-loexec
MIME
-mime_header
-nobrowse
-noexec
-dump
-nolist
-nolog
-noprint
-noredir
URL
-nostatus
-numbersjinks
-post_data
POST
-realm
URL
-reload
-
-restrictions=
(. . 19.18)
-rlogin
rlogin
-selective
, .www_browsable
-show_cursor
-source
Web HTML
-telnet
TELNET
-1=
-trace
-traversal
-underscore
-dump
-validate
URL , , http://www.linux.ru
-vikeys
vi
416
. RPM-
19.18
Bookmark
bookmark_exec
change_exec_perms
Default
dired_support
disk save
Download
Editor
Exec
exec frozen
file url
URL file://
goto
inside_ftp
goto
unside_news
Usenet
inside_rlogin
rlogin
inside telnet
telnet
jump
jump
ftp
options_save
.lynxrc
outside_ftp
ftp
outside_news
Usenet
outside_rlogin
rlogin
outsidejelnet
telnet
shell
suspend
Ctrl+Z
telnet_port
telnet
mail []
mail , , . . ,
.
metamail []
metamail .
.
mimeencode []
mimeencode MIME. DOS/Windows/Windows NT UU (Unix to
Unix),
MIME. UU DOS/Windows . MIME. . 19.19.
14 . 851
417
. -
mimeencode
19.19
Base64 ( )
-q
quotes-printable
-U
CR/LF
mimeencode mmencode
.
pine []
. -.
ping
ping .
ICMP ECHO_REQUEST ( 3)
. . Ctrl+C.
popclient []
, 2 . ,
-.
rusers []
, . -1
.
showaudio
showaudio ,
audiocompose.
sliplogin
, SLIP (Serial Line
Internet Protocol). / e t c / s l i p . h o s t s .
, , SLIP
.
talk
[]
.
,
: _@_.
telnet
[]
[]
Telnet.
tftp
tftp FTP (
t ).
418
. -
TFTP.
. tftp
: ascii, binary, connect, get, put, quit, status, timeout, verbose.
uudecode
uudecode UU- .
uuencode
uuencode UU- .
xbiff
xbiff biff, X Window.
19.4.
.
.
. . 19.20.
cat
19.20
Q
S
[]
cat ,
. cat . 19.21.
[] ! 2
.
, . ,
.
, .
. 19.22.
479
. RPM-
19.21
cat
-
-
-S
-t
-
-V
.
. $.
"I
$
"I
"L
"!
.
19.22
. :
0 ;
1 ;
2
-
-i
-I
-S
column []
column , .
.
. 19.23.
column
19.23
-
-S
-t
-X
csplit
.
-t
.
. -s
,
[]
. . .
. , xxOl
. csplit .
.
diff []
[_] ! 2
diff . . ! <,
2 >.
420
. -
.
. 19.24. diff
. (. . 19.25).
diff
19.24
-
-
-d
ed, 1
2
-
-I
-I
RCS
-N
-t
-
-W
diff
19.25
-I
-S
-S
-X
diff3
[]
! 2
. diff3
. :
1. = = = =, ;
2. = = = 1, ;
3. = = = 2, ;
4. = = = 3, .
emacs []
emacs . Linux.
, .
expand []
421
. RPM-
expand .
. -i .
fmt
[]
fmt ,
. .
. 19.26.
19.26
fmt
-
-
-S
-t
-
-W
,
--
. 72
fold []
.
80 .
-w n.
ghostview []
ghostview
PostScript.
ghostscript.
grep []
grep .
. ,
, -,
-.
. 19.27.
grep
-An
-
-
-
-
-
-f
-
-i
-I
-L
-
422
19.27
,
,
, ,
, ,
,
, ,
,
,
, ,
. -
. 19.27
-S
-V
-W
-X
,
,
grodvi []
groff DVI.
groff []
groff.
.
head []
head . .
- .
ispell []
ispell .
, , , .
join [] ! 2
join . .
less []
.
more. more
. more, less
, (. . 19.28).
, Enten ,
, / .
.
19.28
less
-help
-
-
-
-
.
. 1024
423
. -
.
19.28
, -,
-
-d
-
-
-f
-m
-
-
-N
-q
-
-S
-U
-
-V
-
-
more
, -,
. ,
. "
look []
look .
, .
/usr/diet/words.
Ipq []
.
Ipd. ,
, . - .
1 []
. - . -s ,
.
. .
Iprm [] _
. , . , , root. , Ipq. ,
-. -, .
424
. RPM-
more
[]
less, more .
less,
.
, UNIX Linux.
paste []
paste .
pico []
pico . pine pine
. pico . 19.29.
pica
+
-d
-
-Q
-k
-m
-
-
-
-t
-V
-w
-X
-Z
19.29
Delete
. X Window
.
, , pine
Ctrl+Z
[]
.
. .
, . 19.30.
+
-
-
-
-
-d
-
-F
19.30
"
. 1
425
. RPM-
. 19.30
-h
-I
-I
( 66 )
-
-
-
.
, .
,
-s
-t
-V
-w
printf
, .
sed
[]
sed .
, .
-f _.
.
sort []
sort ,
. (. . 19.31).
sort
19.31
+1[-2]
. !
2. 2 ,
-d
-f
-I
, ,
, ASCII,
(Jan, Feb )
, ,
-n
-
-
-1
split [] ! 2
.
-.
, -.
426
. RPM-
tac
[]
. cat.
tail []
head. ,
tail 10 .
-1 .
tr [] ! 2
tr ! 2. .
.
unexpand []
unexpand
. -
. . -t n ,
. n 8.
uniq [] ! 2
uniq ! 2. 2 ,
. . 19.32.
19.32
-d
-f n
-w n
-check-chars=n n
-skip-chars=n
n
-skip-fields=n
vi
n .
[]
vi .
.
we []
,
. , .
. . 19.33.
427
. RPM-
we
19.33
-bytes
--chars
-I
-lines
--words
xedit
xedit , X Window.
kedit gedit. , Gnome.
zdiff
gzip diff.
79.5. RPM-
RPM
, (RPM-).
, , ,
RPM-.
, .
, , , . :
port
.
README
, /usr/doc/port-l.0-99.
port.l
man.
/root/port. ,
, .
. : ,
, , , ,
. port 19.1
19.1. port
Summary: Program to c o n t r o l y o u r s e r i a l device
Name: port
V e r s i o n : 1.0
R e l e a s e : 101
Group: Monitoring
L i c e n s e : GPL
428
. RPM-
Packager: Denis K o l i s n i c h e n k o [ d h s i l a b s @ m a i l . r u ]
URL: h t t p : / / d k w s . n a r o d . r u
%description
port
. (1) - ,
port email
%files
%doc / r o o t / p o r t / R E A D M E
/root/port/port
/root/port/port.1
:
# rpm -bb / r o o t / p o r t / p o r t . s p e c
, :
E x e c u t i n g ( % i n s t a l l ) : / b i n / s h -e / v a r / t m p / r p m - t m p . 3 3 4 3 9
Proces'sing f i l e s : port-1.0-99
Finding
Provides: ( u s i n g / u s r / l i b / r p m / f i n d - p r o v i d e s ) . . .
Finding R e q u i r e s : (using / u s r / l i b / r p m / f i n d - r e q u i r e s ) . . .
Requires: Id-linux.so.2 l i b c . s o . 6 l i b c . s o . 6 ( G L I B C _ 2 . 0 )
: /usr/src/RPM/RPMS/i686/port-l.0-99.1686.rpm'
port-l.0-99.i686.rpm.
/usr/src/RPM/RPMS/i686.
RPM,
. ,
RPM, %preun %postun . ,
%preun
rm -f / u s r / b i n / p o r t
rm -f / u s r / m a n / m a n l / p o r t . 1
, .
.
. Midnight
Commander (me), / u s r / s r c / R P M / R P M S / i 6 8 6 / port-l.0-99.i686.rpm .
INFO, .
, ,
.
, .
, RPM- :
1. .
"2. .
3. RPM-.
429
. RPM-
,
. , .
RPM rpmrc.
/usr/lib/rpm, /etc, $HOME.
:
# rpm showrc
topdir rpmrc ,
,
RPM . :
# rpm showrc | grep topdir
-14
-14
-14
-14
-14
-14
_builddir %{_topdir}/BUILD
_rpmdir
%{_topdir}/RPMS
_sourcedir %{_topdir}/SOURCES
_specdir
%{_topdir}/SPECS
_srcrpmdir %{_topdir}/SRPMS
topdir
%{ usrsrc}/RPM
/usr/src/RPM.
, BUILD, RPMS, SOURCES,
SPECS, SRPMS.
BUILD RPM-. SOURCES . RPMS . , ,
. SRPMS
, . SPECS . _--.8.
, ,
RPM, SOURCES:
# s o u r c e _ c o d e - l . 0 . t a r . g z /usr/src/RPM/SOURCES.
RPM ,
, .
port port-1. 0-99.
/usr/src/RPM/port-l .0-99.
, RPM.
. :
, , , . . 19.1
Summary, Name, Version, Release, Group License.
, 19.1.
: BuildRoot.
BUILD. / u s r / s r c / R P M
, $RPM_BUILD_ROOT.
%RPM_BUILD_ROOT.
430
. RPM-
, .
BuildRoot - ,
.
.
%description, %files, %doc, %install. . 19.34
.
19.34
%description
%
%setup
%build
%files
%config
%doc
%install
%pre
%post
%preun
%postun
%clean
.
, .
% shell
. - ,
. , SOURCES, BUILD
. make
, .
, . $RPM_BUILD_ROOT.
BUILD.
%setup % (. )
, /etc
,
/usr/doc/[package] - [ver] - [release]
. ,
, .
install, 19.1
,
,
,
,
BUILD. clean rpm.
: rm -rf $RPM_BUILD_ROOT
%config
%doc. , %files.
%files
, %doc (
) %doc. :
%doc README TODO Changes
%doc I n s t a l l
%doc
README
TODO
Changes
Install
,
.
431
. -
-bb rpm.
RPM-,
, ,
-. SRPMS
port-1.0-99. src. rpm. To ,
.
SOURCES .
rpm, (. . 19.35).
rpm
-
-bb
-be
-bi
-
-bp
--recompile packag
e. src. rpm
--rebuild
package. src. rpm
--test
--clean
--showrc
19.35
: .
,
. ,
% %build.
%pre, %build, %install
, %files
%,
, , ,
,
BUILD
19.6. vi
, Unix- vi.
, ,
vi . vi , ,
,
vi. .
(vi visual editor), vi
. vi
:
1. .
2. .
3. .
,
, vi.
.
.
i ( insert)
432
. -
. Esc.
.
, ,
. ,
, vi . ,
w, q,
, wq, q!. , ":".
vi :
vi s o m e _ f i l e . t x t
some_file.txt , vi
. ,
~. ,
: , .
_.
i .
Enter,
Backspace Del.
Esc. .
i, .
. ,
, first second:
first_second third
, .
: , dd, dw.
, ,
dw , .
R.
, . ,
Insert.
vi , - ,
- . h, j, k, 1 ,
, . w
, a b . 0 ()
$ .
Ctrl+F , a Ctrl+B
.
G. , 1G
, G ( ) .
433
. RPM-
vi ,
, ":", q!.
w, wq.
vi,
filename .
! filename
.
filename .
:! ,
, :r! Is /etc.
.
79.7. bash
, . ( ) bash (Bourne
Again Shell).
: sh, ash, bsh, tcsh, csh, zsh.
/etc/shells.
, .
, . .
. , ,
, .
:
#!/bin/bash
# ! .
(, ),
/etc/shells. , :
#!/usr/bin/my_proga
/usr/bin/my_proga
. :
#!/usr/bin/my_proga -f
:
#!/usr/bin/my_proga -f <_>
, . .
test:
#!/bin/bash
#
clear
echo $1
434
. RPM-
. , ,
. . ,
(1) .
:
. / t e s t Vasya Pupkin
, Vasya.
, :
echo $1 $2
, , :
echo "$1"
,
,
, . ,
Vasya Pupkin, Vasya
Pupkin. Ivanov Ivan Ivanovich,
Ivanov Ivan Ivanovich.
19.7.1.
. 5, /.
,
, . 5.
. :
cat / v a r / l o g / s e c u r e | less
ps -ax | grep "$UID" | less
cat (
/var/log/secure) less,
.
, . ps-ax , (grep
"$U1D") , (UID)
,
less. $UID , . .
.
:
l p r ~ f i l e . t x t ; Ipq
, . :
ps -ax | head -n I; ps -ax | grep httpd
ps , httpd.
435
. RPM-
, :
commandl && comand2
commands | | command4
commandl
commandl ( 0). command4
, commands 0. :
mkdir mydir && cd mydir
bash ,
. , . & , :
program &
19.7.2. /
/ . 5,
:
> ()
> ()
, ,
, , . :
{date; free; who; } > l o g f i l e
/
. , URL
:
Ipr URL
http://www.linux.ru
http://linux.ru.net
http://www.linux.org
URL
19.7.3.
. - , .
. ,
, , .
,
,
. , Pascal:
P r o g r a m Test;
V a r A : integer;
436
{ }
. RPM-
procedure GetLocal;
var A : integer; { )
begin
:=10;
writeln(A);
end;
begin
: =7;
writeln(A);
GetLocal(A);
writeln(A);
end;
7
10
7
bash . . ,
, , . ,
:
#!/bin/bash
# 1
NUM="one";
echo $NUM
#!/bin/bash
# 2
NUM="one"; {NUM="two"; echo $NUM;};
echo $NUM
1 :
two
one
2:
two
two
. , ,
:
pwd; (cd /tmp; p w d ; ) ; pwd
:
/home/user
/tmp
/home/user
437
. RPM-
19.7.4.
. bash , ,
, Pascal. bash .
, , . . , :
VAR="my var"
echo $VAR
, . ,
VAR=13, , . , :
VAR="value 1"
read:
echo -n "Enter value: "
read x
echo $x
- echo
Enter value:, . read
, , . .
read :
read a b
, . Enter.
, ,
. , .
bash ,
:
* ? ; & ( ) | < > <_> <> <>
, ,
\. , \, \t, \?
. , ' '
. " "
. "\", ",", " ' ", " $ "
: \\, \$, \'
, . 19.36.
438
. -
19.36
$0
. , .
Pascal,
ParamStr(O)
$ ( -
, $1,
$2, ...)
. Pascal ParamStr(n)
$#
, .
ParamCount Pascal
$'
$@
, : "$1 $2 ..."
$?
$$
(PID)
(PID) (,
)
$!
.
echo " : "
echo $*
bash . , , ksh 1024- .
:
_[]=
:
[1]=23
[3]=54
[0]=77
. ,
, .
set. , :
set -A a r r a y 3 56 77 12
:
array[0]=3
array[1]=56
array[2]=77
array[3]=12
bash, ksh, . , ,
, bash:
array = ( [ 0 ] = 3 [3]=12 [2]=77 [1]=5)
:
${_[]}
439
. -
, () :
echo { $ a r r a y [ 0 ] }
:
${_[*]} ${_[@]}
, :
echo $ { a r r a y [ @ ] }
.
.
.
,
export. , ,
.
export:
export
export =
export . . .
export = = . . .
, ( ),
.
, .
unset:
unset
, . 19.37.
19.37
PWD
UID
REPLY
RANDOM
SECONDS
IPS (Internal Filed
Separator)
HOME
PATH
LOGNAME
MAIL
SHELL
TERM
,
, read
0 32767
,
. read . " \t\n",
: ;
\t ;
,<\
,
,
.
echo "$"
440
. -
19.7.5.
. 13 (. 13.5) .
DT date:
x
DT=Mate
,
( ). , :
x
USERS= who I wd -1
UP='date; uptime
,
date uptime.
,
, :
grep 'id -un' / e t c / p a s s w d
/etc/passwd
id -un
$ ( ( > )
:
= $((
e.cho $A
(10+51/2 ))
7, 7.5, . . ,
:
hrs = $ ( ( $SECONDS/3600 ) )
19.7.6.
:
if-fi.
case-esac.
if-fi
if-fi:
if
! then
2
e l i f then
4
else
fi
if-fi , . ! () , !, 441
. RPM-
.. if. :
if uuencode m y f i l e m y f i l e > m y f i l e . u u ; then
echo " ";
else
echo "";
fi
:
if ! then
2
fi
:
if [ $? -ne 0 ]; then echo ". . "; fi;
test
[]. , :
test -e /etc.passwd
[- /etc/passwd]
,
/etc/passwd. test . 19.38.
test
-d
-
-f
-k
-L
-
-s
-
-w
-
-z
-
19.38
,
,
,
,
,
,
, 0
,
,
,
, 0
, 0
test, ,
, 0 .
, test 0, :
[ word ] ; echo $?
[]; echo $?
1
(true), () .
test (false).
: strl =
str2 strl = = str2 , strl str2 .
: !
442
. -
str , f , /etc/passwd .
: = ,
0.
str , f . : = .
, . 19.39.
True
True
False
AND
True
False
19.39
False
False
False
OR
True
False
True
True
True
False
True
False
XOR
True
False
True
False
True
False
True
False
XOR . bash.
test, . 19.40.
19.40
-eq
-
-It
-gt
-le
-ge
bash , .
, : =0.
.
=124 ; export ;
; echo $?
443
. RPM-
, test if,
, if test. 19.2.
19.2.
echo -n " ? "
read x
if [ $ = 5 ]
5, ,
4 . , 1
, :
???.
case-esac
(case ) :
case in
!) ! ;;
)
esac
;;
(. 19.3), 19.2,
case if.
19.3. cose
echo -n " ?
\\
read x
case $x in
5) echo " !" ;;
4) echo "" ;;
3) echo "" ;;
2) echo " " ;;
*} echo " ???"
/ /
esac
: 2, 3,
4, 5 ,
.
444
. -
.
case case
Pascal, . *) ,
. , .
case
Pascal. :
, 3, 3, 4, 5, ... N. case break. bash .
,
| (OR).
case num in
1 | 2 | 3 ) echo "1 or 2 or 3
4 | 5 ) echo "4 or 5" ; ;
*) echo "other num"
;;
esac
2
done
:
for i in 1 2 3 4 5; do echo $i; done
:
1 2 3 4 5
, bash
. ,
. :
/etc/passwd
:
for
do
str
in
'cat
/etc/passwd4
for , , ,
/etc/passwd.
while:
while !
do
2
done
445
. RPM-
while , , !,
. while
. ,
=1
echo $
X
$((
))
done
: 1 2 3 4 5 6 7 8 9
10, ,
test false (x , 10).
until () ,
:
until !
do
done
until , , !,
. ,
. while, , .
( 19.4 19.5)
19.4. while
=1;
=1;
while ! [$ - 10]
do
echo $x
X = $(( $ + 1 ))
done
19.5. until
until [$x - 10]
do
echo $x
X = $<(
$ + 1
))
done
, 19.4 19.5, :
1 2 3 4 5 6 7 8 9 10
select, . :
select in !
do
2
done
:
echo "
select file in /home/den/temp/* QUIT
do
if [-e $file]; then less $file
else
break
done;
446
. RPM-
/home/den/temp f i l e . t x t , p r o t o . t x t , :
:
/home/den/temp/.
/home/den/temp/..
/home/den/temp/file.txt
/home/den/temp/proto.txt
QUIT
.
3 4 , .
QUIT .
break .
19.7.7.
, (. . 19.41).
19.41
${:-)
${ := }
${:?}
${:+)
${}
,
, , .
,
,
(),
.
, .
, ,
.
${1 :? " "}
,
. ,
.
19.7.8.
:
() { ; }
:
cdir()
{
#
cd /
447
. RPM-
,
, . .
,
. , :
#!/bin/bash
# fn
echo $$
cdir()
{
#
echo "=$"
=2
echo
cdir
echo
echo
"X=$X"
/etc
# "cd"
$?
"X=$X"
:
788
=1
=1
Params fn I /etc
788
=2
. , , PID 788
, . X
, .
X, * .
X
(=2). /etc,
. fn. :
bash,
cdir (change dir). , cd return 0, .
448
. -
19.7.9.
,
- .
() trap. trap
:
trap
:
- ,
;
-- ,
. 19.42. . 5.
19.42
01
02
SIGHUP
SIGINT
03
SIGQUIT
(quit)
09
SIGKILL
(kill). He
15
SIGTERM
(hangup)
(interrupt)
. 1, 2, 3, 15
trap : 1 2 3 15
: , .
, . -- tee
script.
1:
$LOGFILE=my_log
if ["$LOGGING" != "true"] then export LOGGING="true"; exec $0
I tee $LOGFILE; fi
2:
$LOGFILE=my_log
if ["$LOGGING" != " t r u e " ] ;
script $0 $LOGFILE; fi
LOGGING
.
tee, .
,
script.
:
script program -/program.log
15 . 851
449
20
.
X Window
. X Window
, X ,
.
X? Linux-,
, . Intel Pentium III 600 MHz/32 MB
, Celeron 433 MHz/64
MB. -
64 128 . 64...128
-. 200 MHz. ,
, , , Intel Pentium
133 MHz 32 MB , X
. , ,
Celeron 400 MHz /128 MB,
. ,
- IP 166 /32 MB,
,
. ,
Windows 98 + WinGate,
Pentium III. , ,
Word 4. , . ,
. ,
Linux, X Window.
Linux + X Window. IP
166. - , X ,
.
, , fvwm fvwml, ,
.
20.1.
X Window
. ,
. Linux. /mnt/cdrom/Mandrake/RPMS,
Mandrake, /mnt/cdrom/RedHat/RPMS, Red
Hat Linux. :
rpm -in XFree*
X Window :
rpm -ih x*
,
xinetd. RPM-
, xinetd .
, ( )
-
451
. X Window
. X Window
. :
X F r e e 8 6 - 4 . 0 . l - 2 8 m d k . 1 5 8 6 . r p m
XFree86-libs-4.0.l-28mdk.1586.rpm
XFree86-server-4.0.l-28mdk.1586.rpm
XFree86-server-common-3.3.6-18mdk.i586.rpm
XFree86-xf s-4 . 0 . l-28mdk. 1586 . rpm
XFree86-glide-module-4 .0 . l-28mdk. 1586. rpm glide
XFree86-FBDev-3.3.6-18mdk.1586.rpm
XFree86-Xvfb-4.0. l-28mdk. 1586. rpm X Window
XFree86-Xnest-4..l-28mdk.1586.rpm
XFree86-100dpi-fonts-4.0.1-28mdk.i586.rpm
XFree86-75dpi-fonts-4.0.l-28mdk.1586.rpm
XFree86-cyrillic-fonts-4.0.l-28mdk.1586.rpm
xinitrc-2.4.4-32mdk.noarch.rpm
XFree86-SVGA-3.3.6-18mdk.1586.rpm
.
SVGA.
, , Mach 8, 32, 64; AGX, S3, VIRGE, IBM 8514,
.
. X Window. X KDE.
:
rpm -ih kde*
.
kde-il8n* ,
. KDE.
kde-il8n-Russian-2.0-lmdk.i586.rpm.
KDE.
:
1. kdebase-2.0-7mdk.i586.rpm
2. kdelibs-2.0-5mdk.i586.rpm
3. kdelibs-sound-2.0-5mdk.i586.rpm ()
4. kdeutils-2.0-3mdk.i586.rpm KDE
5. kdesupport-2.0-lmdk.i586.rpm -- (
)
6. kdepim-2.0-lmdk.i586.rpm
7. kdenetwork-2.0-lmdk.i586.rpm (, kppp)
8. kdemultimedia-2.0-4mdk.i586.rpm
()
9. kdegraphics-2.0-4mdk.i586.rpm (
)
10. kdeadmin-2.0-2mdk.i586.rpm
11. kdeaddutils-2.0-3mdk.i586.rpm
12. kdel-compat-1.1.2-7mdk.i586.rpm
1 ()
13. kdegames-2.0-lmdk.i586.rpm ()
14. kdetoys-2.0-lmdk.i586.rpm ()
452
. X Window
15. kdesdk-2.0-lmdk.i586.rpm SDK ( )
16. kdelibs-devel-2.0-5mdk.i586.rpm KDE ()
17. koffice-2.0-2mdk.i586.rpm K-Office
Gnome,
:
rpm -in gnome*
( )
. X Window. xf86config. , :
(,
) .
DrakConf X Window.
20.3.
:
In -sf /usr/XllR6/bin/XF86S3 /etc/Xll/X
XF86S3. , , xf86config Xconfigurator,
, - .
X. ,
X Window Linux.
X
. ,
X , X Window
, .
640x480 8- (256 ).
, X
, startx. X
, Ctrl+Alt+Fn,
. X ( X Window )
Alt+F7. ,
Alt+Fn. X
Window Ctrl+Alt+BackSpace.
startx
, .
. ,
Ctrl+Alt+Fl.
startx ,
xinit. X
Window. xinit,
. startx ,
. startx
( 20.1).
453
. X Window
20.1. startx
#!/bin/sh
# $ X C o n s o r t i u m : s t a r t x . c p p , v 1.4 9 1 / 0 8 / 2 2 11:41:29 rws Exp $
# $XFree86: xc/programs/xinit/startx.cpp,v 3.2 1998/12/20 11:58:22 dawes Exp $
#
# (c) 1999 Red Hat S o f t w a r e , Inc.
userclientrc=$HOME/.xinitrc
userserverrc=$HOME/.xserverrc
sysclientrc=/etc/Xll/xinit/xinitrc
sysserverrc=/et/XI1/xinit/xserverrc
clientargs=""
serverargs=""
if [ -f $userclientrc ]; then
clientargs=$userclientrc
else if [ -f $sysclientrc ]; then
clientargs=$sysclientrc
fi
fi
if [ -f $userserverrc ]; then
serverargs=$userserverre
else if [ -f $sysserverrc ]; then
serverargs=$sysserverrc
fi
fi
display=:0
whoseargs="client"
while [ "x$l" != "x" ]; do
case "$1" in
/"*l\.*>
if [ "$whoseargs" = "client" ] ; then
if [ "x$clientargs" = x ]; then
clientargs="$l"
else
clientargs="$clientargs $1"
fi
else
serverargs="$serverargs $1"
fi;;
)
whoseargs="server" ;;
*)
if [ "$whoseargs" = "client" ]; then
clientargs="$clientargs $1"
else
case "$1" in
:[0-9]) display="$l"
I
esac
shift
454
esac
fi ;;
*) serverargs="$serverargs $1"
/t
. X Window
done
# set up default Xauth info for this machine
mcookie= ^cookie
serverargs="$serverargs -auth $HOME/.Xauthority"
xauth add $display . $mcookie
xauth add 'hostname -f'$display . $mcookie
exec xinit $clientargs -- $display $serverargs
# various machines need special cleaning up,
# which should be done here
20.2. XF86Config
, X Window . ,
/etc. XF86Config
/ e t c / x i l .
, : , , , , ,
X Window. 20.2.
!
.
,
: Riva TNT2 Vanta, Samsung SyncMaster 550s.
20.2. XF86Config
Section "Files"
RgbPath "/usr/XllR6/lib/Xll/rgb"
FontPath
FontPath
"/usr/XllR6/lib/Xll/fonts/cyrillic"
"unix/:-l"
EndSection
Section "ServerFlags"
EndSection
Section "Keyboard"
Protocol
"Standard"
AutoRepeat 250 30
LeftAlt
Meta
RightAlt
Meta
ScrollLock
Compose
RightCtl
Control
XkbDisable
"xfree86"
XkbKeycodes
"default"
XkbTypes
"default"
XkbCompat
XkbSymbols
"us(pclOS)"
XkbGeometry
"pc"
"xfree86"
XkbRules
XkbModel
"pel 05"
455
. X Window
XkbLayout
EndSection
Section "Pointer"
Protocol
"PS/2"
Device
"/dev/psaux"
EmulateSButtons
Emulate3Timeout
50
EndSection
Section "Monitor"
Identifier "My Monitor"
VendorName "Samsung"
ModelName
"SyncMaster 550s"
HorizSync
30-61
V e r t R e f r e s h 50-120
ModeLine "1024x768" 75.00 1024 1048 1184 1328 768 771 777 806 -hsync -vsync
ModeLine "1024x768"
65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync
# 1024x768, 70.0Hz; hfreg=56.476002, vfreq=70.069000
ModeLine "1024x768"
75.00 1024 1048 1184 1328 768 771 777 806 -hsync -vsync
# 1024x768, 75.0Hz; hfreq=60.022999, vfreq=75.028999
ModeLine "1024x768"
78.75 1024 1040 1136 1312 768 769 772 800 +hsync +vsync
# 1024x768, 75.0Hz; hfreq=60.022999, vfreq=75.028999
ModeLine "1024x768"
78.75 1024 1040 1136 1312 768 769 772 800 +hsync +vsync
# 1280x1024, 75.0Hz; hfreq=79.975998, vfreq=75.025002
ModeLine "1280x1024" 135.00 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync
I
# ModeLine
#
EndSection
Section "Device"
Identifier "Generic VGA"
Chipset
"generic"
EndSection
Section "Device"
Identifier
"RIVA TNT2"
VendorName "Unknown"
BoardName
"Unknown"
#
Chipset
"RIVATNT2"
#
VideoRam
8192
Option
"power_saver"
EndSection
Section "Screen"
Driver "svga"
Device
"RIVA TNT2"
Monitor
" My Monitor "
DefaultColorDepth 32
Subsection "Display"
Depth
8
Modes
"1024x768" "800x600" "640x400"
Viewport
456
. X Window
EndSubsection
Subsection "Display" ,
Depth
16
Modes
"1024x768" "800x600" "640x480"
ViewPort
EndSubsection
Subsection "Display"
Depth
24
Modes
"1024x768" "800x600" "640x480"
ViewPort
EndSubsection
Subsection "Display"
Depth
32
Modes
"1024x768" "800x600" "640x480"
ViewPort
EndSubsection
EndSection
Section "Screen"
Driver "vga!6"
Device
"Generic VGA"
Monitor
" My Monitor "
Subsection "Display"
Modes
"640x480" "800x60'0"
ViewPort
EndSubsection
EndSection
Section "Screen"
Driver "vga2"
Device
"Generic VGA"
Monitor
" My Monitor "
Subsection "Display"
Modes
"640x480" "800x600"
ViewPort
EndSubsection
EndSection
Section "Screen"
Driver "accel"
Device
"RIVA TNT2"
Monitor
" My Monitor "
DefaultColorDepth 32
Subsection "Display"
Depth
8
Modes
"1024x768" "800x600" "640x400"
ViewPort
.
EndSubsection
Subsection "Display"
Depth
16
Modes
"1024x768" "800x600" "640x480"
ViewPort
EndSubsection
457
. X Window
Subsection "Display"
Depth
24
Modes
"1024x768" "800x600" "640x480"
Viewport
EndSubsection
Subsection "Display"
Depth
32
Modes
"1024x768" "800x600" "640x480"
Viewport
EndSubsection
EndSection
Section. "Screen"
Driver "fbdev"
Device
"RIVA TNT2"
Monitor
" My Monitor "
DefaultColorDepth 32
Subsection "Display"
Depth
8
Modes
"default"
Viewport
EndSubsection
Subsection "Display"
Depth
16
Modes
"default"
Viewport
EndSubsection
Subsection "Display"
Depth
24
Modes
"default"
. Viewport
EndSubsection
Subsection "Display"
Depth
32
Modes
"default"
Viewport
EndSubsection
EndSection
Files , X
Window. :
Font Path
"/usr/XHR6/lib/Xll/fonts/cyrillic"
, X Ctrl+Alt+Backspace
System. ,
System. Restart X Server
.
Server Flags. . ( ).
458
. X Window
20.3. X Window
X Window. Red Hat Linux, setup.
XF86Setup ( ) Xconfigurator.
X : , .
X (, \186config), , ,
, !
, . xf86config X,
, .
Linux Mandrake.
XFdrake. Xconfigurator XFdrake (. . 20.1).
((
iref'fi
.
.
i 02.4
, pTft^H^v^^-l^^il'nyiiaiiifn^ij^^?;;'^! |
. 20.1.
. ,
Ctrl+Alt++,
Ctrl+Alt+-.
+ - . (. 20.2)
, X [ ?
?
, , - Z0m2m
X.
.
,
, , (. . 20.4).
459
. X Window
X .
, X ?
. 20.3. X Window
.
, .
Choose the window manager to run:
OK
KDE
. 20.4.
. ,
. , , .
XFdrake .
, . 20.5.
(. . 20.6).
, (Generic), .
(. . 20.7).
.
, .
. 20.5. XFdrake
Genoa
Hercules
Intel
Leadtek
Matrox
Miro
NVIDIA
-GeForce
-GeForce 256 (generic)
- GeForce DDR (generic)
- GeForce2 DDR (generic)
- Riva 128 (generic)
- Riva TNT (aen
Number Nin
Oak
Octek
Orchid
JOther
L-M
. 20.6.
460
. 20.7.
. X Window
20.4. Windows
, . XF86Config
X. , Windows. , Windows, Linux.
windows-ttf .
DrakConf DrakFont ( drakfont). (. 20.8)
Windows.
'
/ ;.
'
":
.;;:
14
actionis
anagnostiko
aplos
arial (monotype)
arial (val)
arial black
arial narrow
"
; :
. ;|
tf,16
:
Wipdows .
. 20.8. DrakFont
: (. 20.9).
Drakf onifmmii Wimluws
ere are the fonts that you can jri stall:
XF86Config:
FontPath " / u s r / X l l R 6 / l i b / X l l /
fonts/win-ttf"
/ u s r / x i l R 6 / l i b /
x i l / f o n t s / w i n - t t f
windows
.
anblkttf
comic.ttf
comicbd.ttf
mpactttf
verdana.ttf
verdanab.ttf
. 20.9. Windows
461
. X Window
20.5.
, X Window,
. KDE. Desktop Environment.
, ,
. (API) X Window, ,
, .
MacOS Windows 9x. , LookNFeel (
), drag-and-drop.
.
Windows,
:
. Windows, , , . ()
. Windows Explorer , - .
Windows 95
(. . 20.10).
.
:
1. . - Windows.
,
. : ,
, , , , , Konqueror. , Windows,
. . ,
.
2. . ,
.
, .
3. -- KDE. ,
. , , .
4. SysTray Windows.
, -- (
), .
462
. X Window
. 20.10.
, KDE, , .
. 20.10
KDE. , KDE ""
MacOS , . ,
, , , ,
KDE
(Control Center).
,
(. . 20.11).
File Browsing -File Manager
. Konqueror.
.
File Browsing - () - .
Hardware .
, :
, .
463
. X Window
, QOMOIUb
|
S-jf!|JFileerowsing
*SHardarV
S ^Information
^LOokNFeel
S f^PowerControl
|
!
S ^System
(^WebBrowsing
3
?!
^
S
Z.O
':
root
dhsMebf.com
Linux
2.2.17-21mdk
(686
> ""
^ ,
. 20.11.
Information
System Information. ,
(. . 20.12).
LookNFell
.
LookNFeel Font Manager , .
Font KDE:
1. .
2. .
3. .
4. .
5. .
6. .
7. .
General .
, .
Icon Icons . Panel.
,
, Style (. 20.13).
, , .
CDE (Common Desktop Environment) ,
Unix- Linux. ,
464
. X Window
<
S^FileBrowiin
- ^Hardware
^Information
I
[--^Interrupts
15.437.824 -
"
15,08
0 -
0,00
11.608.064 -
11,34
73.990.144 -
72,26
2,26
DMA
h^ /
j- ^
!- ^ Samba
!"-0
!
- PCI
JLookNFeel
-fijWebBrowsing
(3
5 ^
-|
6 ^
1
115,58
115-58
. 20.12.
...
fiJFileBrowsing
CT 1L
- -
'
'
"
'
Q-^Hardware
^Information
^LookNFeel
[
I OBorders
H^General
f--Blcon
KDE-SGI
SGI
'
"
!
i
] -B I cons
., , .. .- , KDE .
:;:
U(g Taskber
'
{* . . . : ' '
H^Virtual Desktops
[--^
| L.*U.-a
- qPowerControl
ffi ^System
-^WebBrowsing
i ^
E 1*
^
j,
te
-^
t
~ |
J|
||
||
|| Srne
X Window Linux,
KDE. ,
Gnome KDE.
, Enlightment.
.
Fvwm, Fvwm2, AfterStep BlackBox.
465
. X Window
,
. , AfterStep
.
, GNOME. KDE .
Taskbar.
,
: ,
, , .
Virtual Desktops
.
16.
.
,
(. 20.14).
, .
(. 20.15).
, KDE 1, KDE1.
Power Control .
System - Login Manager
(. 20.16).
, , X .
S f^FtleBrowsing
-- ^Hardware
- ^Information
| Loo kN Feel
0Borders
BFont Manager
i-aicon
h-Blcom
J? 6<
-^ System Notifications
- Taskbar
[^Virtual Desktops
^Power-Control
. 20.14.
466
. X Window
&
Atlas green
BeOS
Blue slate
CDE
Desert red
Digital CDE
Next
. Pale gray
^j
...
| |
..-:.- --. i-
vj
.1
'I
p KOHTP9CT
" ,
sH_-, "
*:<:,;=
. 20.15.
Mi
Xf,t,b:,t.*-r>tM
- ^Hardware
^Information
-QjPowerControl
'j/sbin/haft
psbin/in
Sawfish
failsafe
default
. GUI :
Motif. . : , ,
, . . .
,
467
. X Window
, ( ).
Menu Editor ,
. ,
System root.
,
. (. 20.17) ( ).
. (/) Crtl. Caps.
( ), Caps Lock. ,
- , Alt.
( Linux, Windows):
Ctrl+Shift Alt+Shift ( ).
, Alt : Alt
,
, XF86Config
. Alt
, , , koi8-r. ,
koi8.
^Hardware
- fij Information
El SJjPowerControl
Sj System
^WebBrowsng
^Cookies
OKonqueror Browser
{^Netscape Plugins
! -^Proxies
. .
()
(ru)
: .
koi8-r
6(3
- Q System Bell
^
(
!--@ Accessibility
1-0 Email
|
! '^Passwords
-
^
^
.:
.
SeHfbir . ;.;
.-.
1.234,567,89 / -1.34<67,9
. 12 3-456 789JOfl f,l 323,456:789,00- ?,.
-: : :''"' ZS/WfQZ
' :
" ' 'i"i;41:01
. 20.17.
468
'
||
.-.. .
.. .
[ &K
||
- '-
-^'-^
: v.
-.-
\\
. X Window
KDE .
www.kde.org
.
kde.themes.org
KDE.
developer.kde.org
.
kdecvs.stud.fli-heilbronn.de
CVS-.
il8n.kde.org
.
ftp.kde.org
FTP-.
20.6. GNOME
GNOME (GNU Network Object Model Environment GNU) .
GNOME GNU, 1984
Unix- .
GNOME , . GNOME ,
,
, . GNOME, , :
. GNOME .
.
Gnome www.gnome.or
GNU www.gnu.org
GNOME :
, ,
.
, GNOME drag and drop.
GNOME.
( )
. (. 20.18).
, , , -.
, .
Gnome :
Windows, GNOME. :
1. ( , )
, . , , ,
.
2. () .
3. () -,
Ctrl.
469
. X Window
. 20.18. Gnome
4. - (, ), .
5. , Shift,
.
, :
, .
.
, .
,
.
GNOME.
GNOME , :
. KDE, ,
, .
Gnome.
, , X Window.
-- , ,
X Window.
470
. X Window
Enlightenment, Icewm, Window Maker, Fvwm.
, GNOME.
GNOME Enlightenment.
GNOME - .
,
GNOME , , GNOME.
GNOME,
GNOME , , . :
.
, .
( ).
,
. GNOME,
.
GNOME. GNU Midnight Commander gmc
(. . 20.19).
Location . gmc.
gmc . FTP-, ,
ftp://ftp.redhat.com.
Windows Explorer: , , . . ,
Ot-
5L
/root
inet
- gloptapplix
I ft
NewImages
article
axhome
- Hi pvm
811
-|S1-Newlmages
EJ- Desktop
-& Mail
-fiRPM
article
cron.
daily
gar*es
Hail
nsmail
port
471
. X Window
'
<3
,OL.
; .
"O.J.
.
.
Q4U
/root
. 20.20. gmc
, (. 20.20).
,
, Ctrl.
Edit > Select All
( - ). (, *.gif)
Edit -> Select files ( >
).
. ,
Shift. Alt, , : ,
, .
(Move) ().
gmc ,
-> . !
.
,
, , GNOME.
GNOME.
GNOME -
KDE. ,
.
Document Handlers
(. . 20.21).
472
. X Window
I
iilLSJlHl
..
[-
'
,-
MIME
-': " .
'
JHcxc
application/x-applix
.as
i 3D Studio image
image<fr-3ds
,3tJs
j AbiWotd document
lext/abiword
.abw
$* j edit
applications-asp
.asp
application/x-font-afm
.afm
1 % URL
audioj*-aiff
;^ s ound Recorder
|- GNOME
6- 131
!.
-^Panel
_J
- .^
-
-**e vice/ py
]
MlME
| .
]
]
-
:
- jr^
L- <%
-".='.
\ ' '
...... .:.::
:
1
[-Session Properties & Startup
L% Startup Hint
^
222|ff^!
Specify wtiicn programs are used to open or view each file type
iG* P vib
' ' ' : '
<$
..
MIME- , ,
(. 20.22) ,
gmc.
Multimedia
GNOME.
, , , ,
, (. . 20.23).
Session
: ,
, GNOME.
,
MIME "appllcaJronA-wals-source"
.
GNOME,
, .
.
(Window Manager) (. 20.24).
.
. 20.22. MIME
473
. X Window
I Document Handlers
'' I
L GNOME
^ Multimedia
; Logout
|" Informational Messages
f- Warning Messages
;L Error Messages
|- Question Dialogs
^ Startup Hint
lnfo.wav
warning.wav
error.wav
question.wav
QJMOt
9
j&
f Panel
^J
% Window Manager
,:
) :
. . .
, ^^
/j ...
)f
GNOME
. 20.23.
|
bj
{^
-^
-^'
^!;:;/:
^ :
. 20.24.
20.7. -
, 486- X-.
, X-. , X- ,
. , X Window, a X-
. ,
. 474
. X Window
X Window IP166/16MB
Netscape ( 4.51)? ,
, , Netscape 70-80
. X-
486- , . ,
-.
X-
, ,
, X .
X-? , 386DX.
! DX, SX.
,' 386DX 32-.
486 (DX SX) ,
. 8 .
X Window,
X-. 16
32 . 32 ,
X Window.
X-.
-
X-. -
Slackware- , ,
Slackware Debian. . -, Slackware :
Slackware 386DX/4
, RedHat- (Mandrake, Black
Cat) 486/8 . -,
,
Slackware-
.
RPM. , tar RedHat,
Red Hat.
Patrick Swieskowski,
. , ,
.
, : ()
486.
.
: Intel Celeron 600MHz/192MB/Quantum
FireBall 7200rpm/Riva TNT2/Netcard Realtek 10/100Mbit PCI.
. X Window
, . , , PCI,
100 Mbps. 10 Mbps,
, .
Linux. ,
, , -.
, , Debian
Linux. Debian www.debian.org. base2_2.tgz. ,
, , : ( bin), (etc) . X Window. / u s r / x t e r m :
tar -xvzf base2_2.tgz / u s r / x t e r m
/usr/xterm
. , :
chroot / u s r / x t e r m
/ e t c / r e s o l v . c o n f , . -. IP- /etc/hosts.
, IP- . / e t c / f s t a b :
192.168.0.1:/usr/xterm / nfs defaults 0
proc /proc proc d e f a u l t s
, , 192.168.0.1 IP- -.
, X Window -.
RPM Debian
apt-get. X :
apt-get update
apt-get i n s t a l l xserver-s3 xfonts-lOOdpi xfonts-base
X S3.
, . SVGA-
xserver-svga. .
.
X Window .
Linux Mandrake ( Red Hat)
, X Window ,
(. 20.1). apt-get
XF86Config.
( :
).
476
. X Window
,
root, X Window
inittab:
X : 1 2 3 4 5 6 : r e s p a w n : / u s r / b i n / X l l / X -query 1 9 2 . 1 6 8 . 0 . 1
( 18).
/ u s r / s r c / l i n u x make menuconfig.
: Networking options
IP: kernel level configuration,
support. DHCP,
DHCP (DHCP support). ,
DHCP-. Filesystems Network filesystems NFS NFS filesystem support. (
, )
Root file system on NFS. .
,
. 2.2.x
, 2.4.x.
.
:
make dep
make bzImage
, :
make modules
make modules i n s t a l l
,
:
dd if=bzlmage o f = / d e v / f d O
/ u s r / s r c / l i n u x / a r c h / 1 3 8 6 / b o o t .
, .
, :
rdev / d e v / f d O / d e v / f d O
NFS,
:
mknod /dev/boot255 0 255
rdev / d e v / f d O /dev/boot255
rm -f /dev/boot255
/dev/boot255,
, NFS,
, .
chroot.
. NFS
8, .
nfs (nfsd). , nfsutils Mandrake Red Hat.
477
. X Window
Debian , apt-get nfs-user-server.
/etc/exports :
/usr/xterm 192.168.0.2/255.255.255.0(rw,no_root_squash)
192.168.0.2 IP- X-. , , X-
. :
Mandrake RedHat rpm ih /mnt/cdrom/Mandrake/RPMS/bootparamd*
Debian apt-get install bootp
/etc/bootptab ( /etc/bootparams)
xtermOl:vm=auto:ip=192.168.0.2:ht=ethernet:ha=xxxxxxxxxxx:rp=/usr/xterm
: xtermOl
-;
1 9 2 . 1 6 8 . 0 . 2 ... IP-;
xxxxxxxxxxx... - X-.
/ e t c / i n e t d . c o n f , inetd, ( ):
bootps dgram
udp wait root
/usr/sbin/tcpdbootpd -i -t 120
:
bootps dgram udp
wait
root
/usr/sbin/bootpd bootpd -i -t 120
xinetd:
service bootps
{
socket_type = dgram
protocol
= udp
user
= root
wait
= yes
# Linux Mandrake / Red Hat
server
= /usr/sbin/rpc.bootparamd
# Debian
server
= /usr/sbin/bootpd
}
xinetd (inetd) :
k i l l a l l -HUP inetd
xdm. Red Hat Mandrake xdm, , .
Debian, xdm
. (
) :
apt-get i n s t a l l xdm
xdm / e t c / x i l / x d m .
Xservers :
1 9 2 . 1 6 8 . 0 . 2 : 0 foreign
X-. Xaccess :
192.168.0.2
478
. X Window
xdm-conf ig DisplayManager.requestPort:
, .
xmd 20.3...20.5. , , .
20.3. /etc/Xl 1/xdm/Xservers
# $XConsortium: Xserv.ws.,v 1.3 93/09/28 14:30:30 gildea Exp
$
I
#
# $XFree86: xc/programs/xdm/config/Xserv.ws.cpp,v 1.1.1.1.12.2
1998/10/04 15:23:14 hohndel Exp $
#
I Xservers file, workstation prototype
t
# Each X terminal line should
# look like:
#
XTerminalName:0 foreign
#
:0 local /usr/XllR6/bin/X
192.168.0.2:0 foreign
20.4.
/etc/Xl 1/xdm/Xaccess
192.168.0.2
20.5. /etc/Xl 1/xdm/xdm-config
! $ X C o n s o r t i u m : x d m - c o n f . c p p / m a i n / 3 1996/01/15 1 5 : 1 7 : 2 6 gildea
$
DisplayManager.errorLogFile:
/var/log/xdm-error.log
DisplayManager.pidFile:
/var/run/xdm.pid
DisplayManager.keyFile:
/etc/Xll/xdm/x.dm-keys
DisplayManager.servers:
/etc/Xll/xdm/Xservers
displayManager.accessFile: /etc/Xll/xdm/Xaccess
! All displays should use authorization, but we cannot be sure
! X terminals will be configured that way, so by default
! use authorization only for loca! displays :0, :1, etc.
DisplayManager._0.authorize:
true
DisplayManager._!.authorize:
true
! The following three resources set up display :0 as the
console.
DisplayManager._0.setup:/etc/Xll/xdm/Xsetup_0
DisplayManager._0.startup: /etc/Xll/xdm/GiveConsole
DisplayManager._0.reset:/etc/Xll/xdm/TakeConsole
DisplayManager._0.startAttempts: 1
i
DisplayManager*resources:
/etc/Xll/xdm/Xresources
DisplayManager*session:
/etc/Xll/Xsession
DisplayManager*authComplain:
false
479
21
Linux
v
21.1.
Linux
. :
? : Linux-
,
, Windows.
, , , 20...30
Linux. , Linux-
,
.
( , ) .
: , .
. , ,
, ,
, .
Windows XP Home Edition 160
. 30
$ 4800. OEM- Windows $ 2400. , 30 Windows.
,
$ 1000. $ 5800. , , , .. $ 350...450,
80 OEM-?
Linux
$ 5...10 ( ,
480
Linux
-, ).
.
.
, . , Linux-
,
, .
-, Windows,
. Linux : Linux .
,
, Linux. ,
- , ,
Windows-. ,
,
Linux , Windows, Linux. Linux
Linux
-, -.
. Linux,
. ,
5...10 - ,
. .
Linux ,
Microsoft.
. , Linux .
Linux-. Linux
.
Windows-,
- Windows, . , Windows- . -,
- , . -,
, . , -
, ,
- , .
, Linux ,
, , Counter Strike
83...88 fps, Windows 98 92...95 fps
( 800x600 Linux
nVidia). : AMD Athlon 700 MHz/256 MB/
40 GB Quantum 7200 rpm/32 MB/RivaTNT2 Pro.
. Linux
, X-. X- 16 . 851
487
Linux
PC- . ,
- , ,
. ,
. ,
Linux, , Linux , .
,
- . , ,
25 .
. X- . 20 .
21.2.
. , . , , . , . , , ,
, , .
:
Pentium II, IV. ,
, .
(
) , :
1. .
2. .
3. .
.
, . ,
, . , ... 17 19 . ,
, . , .
: , . : .
nVidia, , GeForce. 32 64 .
,
, 128- (
482
Linux
) . , nVidia Linux, .
nVidia .
ATI,
. ,
,
.
. lOBase2(5) !
(switch) 10 /. (30
) 10 / .
7...10 .
Linux . Windows 256 ( ). ,
Windows 98 128 , a Windows
- - 256. : Athlon (Celeron)
700MHz 128 MB/20 GB/32 MB RivaTNT2 Pro/100 MBit netcard.
, AMD ( Athlon)
- ( ) ,
Celeron , Intel Linux
. Athlon
Celeron, Celeron .
: Intel Pentium III 900 MHz (1 GHz)
256 MB/40 Gb/64 MB nVidia GeForce 400MX.
.
Pentium IV,
, , . Pentium IV.
27.3. nVidia
Alt Junior Linux 1.1.
.
,
Red Hat Mandrake Linux.
, ,
, --
, .
.
ALT Junior Linux 1.1 .
483
Linux
nVidia Linux ,
nVidia http://www.nvidia.com/view.asp?PAGE=linux
:
1. GLX-.
2. nVidia.
RPM,
.
: .
GLX-:
http://down]oad.nvidia.com/XFree86_40/1.0-2960/NVIDIA_GLX-1.0-2960.i386.rpm
, (. . 21.1).
21.1
NVIDIA_kernel-1.0-2960.mdk82up.i586.rpm
,
(386, 586, 686).
:
rpm -ivh N V I D I A _ k e r n e l . 1 3 8 6 . r p m
rpm -ivh N V I D I A _ G L X . 1 3 8 6 . r p m
, ,
. :
, GLX-.
. , , 1280x1024, 1024x768 800x600.
.
, .
:
mkinitrd-2.7.1
mktemp-1.3.1
modutils-2.4.10
( 2.4.12)
ALSA ( 2.4.12).
, :
rpm -Uvh <package.rpm>
/ e t c / X H / X 8 6 C o n f ig-4
:
Driver "nv"
( , , Driver "vesa"). :
Driver "nvidia"
484
Linux
, :
Load"glx"
, :
Load"dbe"
:
LoacTMri"
Load"GLcore"
/ e t c / X H / X F 8 6 C o n f i g - 4
(. 21.1).
21.1. /etc/Xll/XF86Config-4 nVidia
Section "ServerLayout"
Identifier "Anaconda Configured"
Screen 0 "ScreenO"
InputDevice "Moused" "CorePointer"
InputDevice "KeyboardO" "CoreKeyboard"
EndSection
Section "Files"
RgbPath "/usr/XHR6/lib/Xll/rgb"
FontPath "unix/:7100"
FontPath "/usr/XHRG/lib/Xll/fonts/cyrillic/"
EndSection
Section "Module"
Load"dbe"
Load"glx"
Load"extmod"
Load"fbdevhw"
Load"pex5"
Load"pex5"
Load"record"
Load"xie"
EndSection
Section "InputDevice"
Identifier "KeyboardO"
Driver "keyboard"
Option "XkbRules" "xfree86"
Option "XkbModel" "pclOS"
Option "XkbLayout" "ru"
Option "XkbVariant"
"basic"
EndSection
Section "InputDevice"
Identifier "Moused"
Driver
"mouse"
Option "Protocol" "PS/2"
Option "Device" "/dev/psaux"
Option "ZAxisMapping" "4 5"
485
Linux
Option
EndSection
"EmulateSButtons" "no"
Section "Monitor"
Identifier "MonitorO"
VendorName "Monitor Vendor"
ModelName
"Monitor Model"
HorizSync
30-61
VertRefresh 50-120
Option "dpms"
# -- 1400x1050 # 1400x1050 @ 60Hz, 65.8 kHz hsync
Modeline "1400x1050"
129 1400 1464 1656
1050 1051 1054 1100 +HSync +VSync
# 1400x1050 @ 70Hz, 76.8 kHz hsync
Modeline "1400x1050"
151 1400 1464 1656
1050 1051 1054 1100 +HSync +VSync
# 1400x1050 @ 75Hz, 82.3 kHz hsync
Modeline "1400x1050"
162 1400 1464 1656
1050 1051 1054 1100 +HSync +VSync
# 1400x1050 @ 85Hz, 93.2 kHz hsync
Modeline "1400x1050"
184 1400 1464 1656
1050 1051 1054 1100 +HSync +VSync
EndSection
1960
1960
1960
1960
Section "Device"
Identifier "RIVA TNT2"
Driver
"nvidia"
VendorName "RIVA TNT2"
BoardName
"RIVA TNT2"
EndSection
Section "Screen"
Identifier "ScreenO"
Device "RIVA TNT2"
Monitor "MonitorO"
DefaultDepth
16
Subsection "Display"
Depth
16
Modes
"1024x768"
EndSubsection
EndSection
Section "DRI"
Mode 0 6 6 6
EndSection
Ctrl+Alt+Backspace X. ,
nVidia. X , AGP 2. , ,
HbGlwrapper:
486
Linux
# rpm -qa I grep -i libglwrapper
, :
# rpm -ihv libGLwrapper*
,
RPM .
libGlwrapper .
:
libglwrapper
(Quake II, Heretic II)
GL.
:
I rm -rf / u s r / X l l R 6 / l i b / l i b G L . s o
# rm -rf / u s r / X H R 6 / l i b / l i b G L . s o . l
# In -s / u s r / X l l R 6 / l i b / l i b G L . s o . n v i d i a / u s r / X l l R 6 / l i b / l i b G L . s o
# In -s / u s r / X H R 6 / l i b / l i b G L . s o . n v i d i a / u s r / X H R 6 / l i b / l i b G L . so . 1
- HbGL.so
libGL.so. 1 ,
.
.
nVidia ,
, Linux.
Windows-, wine, ,
. ,
Windows- .
487
Linux
21.5. wine
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
wine :
Counter Strike
StarCraft
Fallout
Fallout 2
Gunman
Quake 2
Quake 3
Soldier of Fortune
Unreal Tournament
Red Alert ( )
Diablo 2
Cesaer
Return to Castle Wolfenstain
Star track
Kingpin
Nox
Jadded Alliance
4x4 Evolution
American McGee Alice
Daikatana
Heroes of Might and Magic III
Delta Force 1,2
, .
reg .wine root:
# rm -rf / r o o t / . w i n e / * . r e g
, :
startx
X , , , ,
xterm. :
# wine install_program
, setup.exe
-.
:
wine /mnt/cdrom/setup.exe
/usr/local/wine-c/games/<HasBa_> / u s r / share/wine-c/games/<Ha3BaHMe_Mr>. , ,
, / r o o t / . wine/ . conf ig. Drive :
488
Linux
[Drive ]
"Path" = V u s r / s h a r e / w i n e - c "
"Type" = "hd"
"Label" = "MS-DOS"
"Filesystem" = "win95"
config, $/ .wine.
/ e t c / w i n e . r e g .
,
, / u s r / s h a r e / w i n e - c / g a m e s / < H a 3 B a H M e
, :
wine game.exe
winex game.exe
winex2 game.exe
winexS game.exe
, game.exe
. X,
, kterm, KDE. ,
. / u s r / s h a r e / w i n e - c /
/< ,
wine (. . 21.1).
. , Unreal Tournament
(Software Rendering), Direct3D.
. 21.1. wine
489
Linux
.
/ r o o t / . w i n e /root/.wine_<Ha3Baime
/root/ >_:
touch /root/ >_
,
(wine, winex, winex2).
wine :
export WINEPREFIX=$HOME/.wine_<Ha3BaHne >
cd "//1!/1-//< >"
wine < > <>
winex:
export LD_LIBRARY_PATH=/usr/local/winex/lib:$LD_LIBRARY_PATH
export P A T H = / u s r / l o c a l / w i n e x / b i n : $ P A T H
export WINEPREFIX=$HOME/.!_< >
cd " / u s r / l o c a l / w i n e - c / g a m e s / < H a 3 B a H n e >"
winex < > <>
winexl:
export LD_LIBRARY_PATH=/usr/local/winex2/lib:$LD_LIBRARY_PATH
export P A T H = / u - s r / l o c a l / w i n e x 2 / b i n : $PATH
export WINEPREFIX=$HOME/.!_< >
cd " / u s r / l o c a l / w i n e - c / / >"
winex2 < > <>
:
chmod u+x < >_run
/!/<
>_.
Microsoft,
/usr/local/wine-c/system. , / u s r / l o c a l / w i n e - c .
chmod -R o+w /usr/local/wine-c. /usr/local/wine-c,
.
/root/ . w i n e / c o n f i g Managed, N, Desktop:
; Allow the window manager to manage created windows
"Managed" = "N"
; Use a desktop w i n d o w of 6 4 0 x 4 8 0 for W i n e
; "Desktop" = " 8 0 0 x 6 0 0 "
, , game.
, .
/home/game
. :
/ r o o t / * _ r u n /home/game
cd /home/game
490
Linux
chmod o+x *_start
cd /root/Desktop/* /home/game/Desktop
chown -R game:game /home/game/Desktop
mkdir /home/game/.kde/apps/share/WINE
cp -R /root/.kde/apps/share/WINE /home/game/.kde/apps/share/WINE
chown -R game:game /home/game/.kde/apps/share/WINE
game .
, : ,
Windows 98, xterm
quake quake_run. ,
, , ,
:
xterm? ,
*_run.
':
;:
KDE
- (. . 21.2).
. 21.2,
KDE,
Windows
ll/home/game/unreal start
';";;..; :: /*:
I
.
;1
.--:
|~- :: .}
.
^>|:
(. 21.3). . 21.3
,
UNREAL (
. 21.3.
;
491
Linux
unreal_start).
.
- ^
;";;: :: - -
';1.;:
"
SUID t
, /home/game/rnireal_start
ifpynna- xterm e /
game/unreal_start.
jgame
:
xterm, ,
. 21.4.
.
(. 21.4).
.
:
Mozilla, licq, Star (Open) Office, XMMS.
.-> PHwram.flesktt
21.6.
Linux
-.
Linux xmms.
winanip.
-, . winamp, xmms
(. . 21.5).
xmms, Media Player. , xmms (. 21.6).
Ji; Hoatun - Media Haver
;
. 21.5. xmms
. 21.6. Media Player
492
Linux
-
cdplayer (. 21.7). cdp
cdplay, .
X Window,
, mpgl23.
MPEG1, MPEG2, MPEG3. .
VCD MPEG gtv (. . 21.8). Double, Loop.
1
CD Player
. 21.7. -CD
. 21.8. gtv
MIDI- Brahms.
MIDI-, , .
, aRts (. . 21.9).
Sound Mixer
(. . 21.10). ,
, .
Karaoke Media/Karaoke Player.
jf4->" aRts B'i :;1
WOUJb;-^.;;: .,,,.:;.,::.::;;,
; . I ,;;.;
1
1
[Si
H
. _:y
:.'.'
}.-:':-
ifes
[;;,..;:
| : Yii
. . :V.:'.:
'. .'.
: ;::::
: ::
ill:;:
-33
-'i5B.-;::::l;:;i
. 21.9.
aRts
493
Linux
Linux -
(cdrecord), -CD. ,
,
Linux .
27.7.
.
. , , :
1. , .
2. .
3. .
4. 4, -.
, ,
.
, . ,
, . ,
. ,
, 47,
?
.
,
Linux, , , . ,
, TCP/IP Linux
, Windows.
Gnome
, .
,
.
21.7.1.
,
. , .
, Online .
. , , -.
, , :
1. .
2. Online-.
3. -.
494
Linux
.
.
Online-,
:
1. IPChains IPTables ( ).
2. - SocksS.
. . , Unreal
Tournament 7777 .
7777, , ,
, .
. 14 .
SocksS ,
IP-. 1-, . 14, SocksS.
SocksS ,
ICQ.
(-) :
1. .
2. - SQUID.
3. DNS.
4. SocksS.
5. Web-.
6. .
,
. ,
. SQUID Web- ,
Web-.
DNS .
DNS , , DNS, :
1. DNS.
2. .
.
- SMTP-, ,
smtp.mail.ru, . , . 13, DNS
. 10, SQUID . 15.
, -
,
.
495
Linux
21.7.2.
, . , . , , . ,
,
, .
, 30 ,
10 30 .
-. .
. , , :
, () , .
, ,
, , ,
. , ,
, .
, ,
. .
,
, .
, , ,
, .
, . ,
, .
. , Windows, . ,
Linux. 12 Linux Terminal Server,
,
. ,
. , :
1. , .
2. .
3. .
, .
: , .
, Linux (,
). ,
. , ,
den (. . 21.11):
l a s t den
496
Linux
,
Crooteiocalhost root] last den
:
last den
ttal
Tue Jun 4 16 :35 - down
<00 :05)
den
Tue Jim 4 15 :12 - doun
(00 :10)
,
l
den
:0
Tue Jun 4 15 :12 - 15:13
(00 :01)
I
den
(00 :09)
:0
Tue Jun 4 15 :01 - 15:11
i
len
:0
Tue Jun 4 14 :57 - 14:58 (00 :00)
den
pts/l
:0
. 1
Tue Jun 4 14 :54 - 14:54 (00:00)
;
den
:0
Pti:/0
Tue Jun 4 14 :49 - 14:57
(00 :07>
den
:/0
:0
Tue Jun 4 14 :42 - 14:49
(00 :07)
.
den
Tue Jun 4 14 :4l - 14:57 (00 :16)
:0
den
(00 :00)
tty2
Hon Jun 3 14 :42 - doun
i
den
tta2
Won Jun 3 14:40 - 14:41
(00 :oo>
den
tty2
Won Jun 3 14 :3B - 14:40
(00:02)
I
begins Tue May 28 15:12:02 2002
CrootSlocalhost root]* |
lastlog
(. 21.12). last lastlog
tmsM:,
/var/log/lastlog,
. 21.11.
.
. -
, .
, .
: - -. -
. -
.
-
itnp begins Tue 2 15:12:02 2002
irooteiocalhost root]* lastloe
Latest
6 11:51:58 0300 2002
,
*Never logged in*
Never logged in*
Never logged in
Never logged in
,
Never logged in
Never logged in
, Never logged in
Never logged in*
Never logged in
timeout Never logged in
jucp
Never logged in
Dperator
Never logged
games
Never logged
iopher
.
Never logged
Ftp
Never
nobody
Never logged
ailnull
Never logged
rpr>
Never logged
Never logged
-,
Never logged
-, .
. 21.12.
|^ 1. - rootfi'localhost:- -
folBE!
- ':::,'-. :.:'.;:.;,:.::
pti!/l
pt!
UtBp
497
Linux
. , . , , , , .
.
, X- .
X- . 20. .
. , gamel,
gamel. : gamel, game2, ..., gameN.
,
.
. -
, .
. 20 X-,
X- ,
.
X-. ? , X Window.
/etc/initab :
X:123456:respawn:/usr/bin/Xll/X
:
X : 1 2 3 4 5 6 : r e s p a w n : / u s r / b i n / X l l / X -query 1 9 2 . 1 6 8 . 0 . 1
(X -query 192.168.0.1) X
( 5)
X IP- 192.168.0.1. ,
.
, . 20.
X Window.
,
, : X
Window , NFS
X Window.
X Window,
, NFS.
(NFS) . 8.
. , , NFS. ,
,
100 /. (hub)
(switch).
.
, :
Linux shell. -,
498
Linux
bash . -,
Pascal,
, .
rj" " - rootfrlocalhost:
A
CrootSlocalhost root] u
4:37 up 18 min, 5 users, load average: 0.03, 0.14, 0.10
USER
TTY
FROM
LOGINS
IDLE
JCPU
PCPU
den
ttal
4:35pn 17.00s 0,58s 0.26s ssh localhost
root
pts/0
4:19p 17 : 17 0 .03s 0.03s /bin/cat
w
root
pts/1
4:19p O.OOs 1.87s 1.70s /usr/bin/mc -P
root
pts/2
4:24p\ 12 : 18 0 Is 0 . 11s /bin/bash
(. 21.13).
root
pts/4
localhost.locald 4:36pn 12 .OOs 0 ,07s 0 ,07s -bash
CrootMocalhost root]" I
,
,
, V
HO
^aiiiiilliliiiA
,
. 21.13. w
(load
average). , w
. , ,
.
, ,
:
ps user username
. 21.14.
-*- - raotui-iocalhost:
!root@localhost root} ps user root
f^j|
,
TIME CHD
PID TTY
1
00:00:04 imt
root.
2
00:00:00 keventd
3
00:00:00 kapi-idled
H
4
00:00:00 ksoftirqd_CPUO
5
00:00:00 ksuapd
6
00:00:00 kreclaind
7
00:00:00 bdflush
.
e
00:00:00 kupdated
9
334
339
472 ?
490 ?
566 ttul
567 tt2
568 tta3
569 tta4
570 tta5
571 ttu6
572 ?
580 ?
581 ?
00:00:00 mdrecoverad
00:00:00 sysiogd
00:00:00 klogd
00:00:00 xinetd
00:00:00 gpn
00:00:00
00:00:00
00:00:00
00:00:00
00:00:00
00:00:00
login
mingetty
mingetta
ningetta
ningettu
mingetta
00:00:00 gd
00:00:00 gdn
00:00:18 x
pj
[*]]
sar
. 21.14. , root
499
Linux
21.2. newclient
#!/bin/bash
#
# GPL
# () 2002 Denis Kolisnichenko, dhsilabs@mail.ru
#
FONT="-cronyx-fixed-*-*-*-*-*-*-*-*-*-*-koi8-r"
#
GM="700x70"
#
MSG="Bame . 5
"
if [ $# -It 4 ]; then
{ echo "Usage: newclient warntime time user num";
exit 1;
}
fi;
f
sleep $1
# , warntime
xmessage -display server:$4 -fn $FONT -geometry $GM -bg black -fg green $MSG
sleep $2
P='ps user $3 | grep -i gnome-session | /bin/awk -F " " '{ print $1 }' '
echo $P
#
kill -9 $P
echo "Time of user $3 is out"
:
newclient 3540 3600 gamel 1
newclient 55m 60m game2 2
newclient 55m Ih game3 3
newclient 23h Id game4 4
.
, .
,
MSG ( , ). ,
.
, ( ), ( h),
( d).
. ,
. ,
gamel, 1.
:
xmessage -display server:$4 -fn $FONT -geometry $GM -bg black -fg green $MSG
500
Linux
MSG
$4 server. X-
$4.
, . 21.15.
-* xmessage
! . 5
okay
. 21.15.
,
. Gnome,
gnome-session. , .
. 21.2 , Gnome:
=*ps user $3 | grep -i gnome-session | /bin/awk -F " " ' print $1 }' '
KDE,
:
P='ps -user $3
| grep -i kdeinit
/ b i n / a w k -F " "
M print $1
f >
, ? : : , Gnome.
newclient, , ?
. , :
newclient 55m 60m gamel 1 &
.
(1 ), :
Time of user gamel is out
21.7.3.
Linux
, , ( , ),
. ,
: ,
. , , /usr/bin/mc /usr/bin/kcontrol-panel
root: Norton
Commander Linux KDE.
507
22.1.
,
, .
, ,
. : ,
.
Linux
. , ,
Unix- , . Linux
: Bliss, Lion, Nuxbee, Ramen, RST Satyr.
Linux , , , ,
.
http://www.avp.ru.
AVP DrWeb. DOS-
.
AVP ( , http://www.avp.ru) DrWeb (
, http://www.drweb.ru) Linux.
,
- AVP,
.
AVP Linux ( DrWeb Linux) Linux
Windows. , Linux , :
,
Windows.
, ,
, ,
, .
502
22.1.1. DrWeb Linux
.
DrWeb, . . 22.2
.
DrWeb :
rpm -ihv d r w e b d - 4 . 2 7 - l i n u x . 1 3 8 6 . r p m
, .
www.drweb.ru.
DrWeb /opt/drweb.
. drweb32.key, , .
. ,
, .
/opt/drweb, drweb32.key
drweb.key drwebd.key:
. / d r w e b 3 2 . k e y /opt/drweb
/opt/drweb/drweb32.key /opt/drweb/drweb.key
cp / o p t / d r w e b / d r w e b 3 2 . k e y / o p t / d r w e b / d r w e b d . k e y
/ o p t / d r w e b /
d r w e b . i n i .
:
OutputMode = Terminal
Color, Terminal. .
:
/opt/drweb/drweb /root/cih.exe
(. . 22.1), DrWeb
/ r o o t / c i h . Win95.CIH.1035. DrWeb
(Cured: 0), (Deleted: 0), (Renamed: 0 Moved: 0).
(0 ), 45 /.
,
t e s t . c o m . -
,
:
50!%@[4\PZX54( )7)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$+*
test.com. :
EICAR Test File (Not a V i r u s ! )
, .
,
. :
http://www.dials.ru/drweb/free.
503
-
[root@dhsilabs /root] /opt/drweb/drweb /root/cih.exe
Key file: /opt/drweb/drweb.key
Registration info:
0000000000
xxxxxxxxxx
Loading /opt/druieb/drwebase.vdb - Ok, virus records: 28520
/root/cih.exe infected with Uin95.CIH.1035
Scan report for "/root/cih.exe":
Cured
Scanned
Infected
Deleted
Renamed
Modified
Suspicious
Moved
Scan time
00:00:00 Scan speed : 45 Kb/s
CrootSlocalhost root] Croot@localhost ]
. 22.1. DrWeb
,
, . update.pl.
/opt/drweb/update.
:
./update.pl /opt/drweb
/opt/drweb ,
. ,
. ,
:
.
,
.
update_drweb:
#!/bin/sh
/opt/drweb/update/update.pi /opt/drweb
/ e t c / c r o n . daily. ,
. ,
.
drwebd.
, . :
# /opt/drweb/drwebd
504
:
Key f i l e : /opt/drweb/drwebd.key
Registration i n f o :
0000000000
xxxxxxxxxx
Loading / o p t / d r w e b / d r w e b a s e . v d b Ok, v i r u s records: 2 8 5 2 0
Daemon is installed, TCP socket created on port 3000
,
. drwebd .
22.1.2. AVP Linux
AVP :
1. - ().
2. .
3. , Windows 9x,
Windows NT, Linux/UNIX, OS/2.
4. -, MS Office.
5. Java-.
6. .
386 ( ) 8 ( 16 ). , Linux.
- CD-ROM
:
mount -t iso9660 /dev/hdd /mnt/cdrom
/dev/hdd CDROM.
/mnt/cdrom/Products/KAVLinux.
AVPWSELinux. tgz. -
.
, , :
chmod 4 4 4 A V P W S E L i n u x . t g z
:
tar zxvf AVPWSELinux.tgz
:
A V P i n s t a l l e r A V P W S L i n u x . t g z . :
./AVPInstaller
. AVP 3.0 build 135.1.
:
I t h i n k you use Redhat-like s y s t e m . Y o u didnt write package in
command l i n e . Search in current d i r e c t o r y ?
(Redhat-) , ,
505
. ,
AVP:
In package / K A V L i n u x / A V P W S E L i n u x / A V P W S L i n u x . t g z f o u n d AVPWSLinux
( A n t i v i r a l Toolkit Pro f o r L i n u x ) (Foundation f i l e s ) ) , version
3.0 build 135. Do you want to install it?
d e f U n i x . p r f (
). AVPTuner, .
AvpUnix.key. ,
, BasePath.
. , BasePath,
AvpLmux .
- , avp.set.
. ,
avp. set . ,
/opt/AVP/Bases,
:
506
[Configuration]
KeyFile=AvpUnix.key
KeysPath=/opt/AVP
SetFile=/opt/Bases/avp.set
BasePath=/opt/AVP/Bases
SearchInSubDir=No
,
/ o p t / A V P / B a s e s . , - /mnt/cdrom/Bases, . Windows,
.
, Windows .
avp.set, AvpLinux (,
). Linux
.
. (. . 22.2):
/opt/AVP/AvpLinux /home/den
(. . 22.3).
. 22.3, 290 87 .
78 /, 10 .
, (Suspicious).
Registration info:
Key name
Ser. number
Price pos.
Antiviral databases were loaded. Known records:
Current object: /home/den
/home/den/.bash_logout ok.
/home/den/.bash_proflie ok,
/home/den/.bashrc ok.
/home/den/.gtkrc ok.
/home/den/.gnome/gdm ok.
/home/den/.gnome/acceIs/Terminal ok.
/home/den/.gnome/gnome-upgrade ok.
/home/den/,gnome/default.urn ok.
/home/den/.gnome/.gnome-smproxy-qX2x4T ok.
/home/den/.gnome/panel ok,
/home/den/.gnome/panel.d/default/launchers/eek-00475daf56.desktop ok.
/home/den/.gnome/panel.d/default/launchers/hadjaha-005ebab078.desktop ok|
/home/den/.gnome/panel.d/default/launchers/moe-0047b660ca.desktop ok,
/home/den/,gnome/panel.d/default/launchers/gegl-000abbd79f.desktop ok.
/home/den/.gnome/panel,d/default/launchers/gegl-0p7b96ee25.desktop ok.
==
. 22.2. AVP
507
D-* , rootiSlocalhosU" -
r
:A*i..
9^^&
>
0
290
87
0
Speed (Kb/sec)
78
Packed
Scan time
[root@localhost root] |
00:00:10
'
Known viruses
Virus bodies
Disinfected
Deleted
Warnings
Suspicious
Corrupted
I/O Errors
0
0
0
0
0
0
0
0
^^
. 22.3. AVP
,
:
Report Only (Ok)
( ).
disinfect
.
Delete
.
- , Enter, d D
. , , AVP
, .
, -,
AvpLinux. AVP .
( )
, disinfect.
, AvpLinux
. , ( -
) AvpLinux
. AVP Linux
, ,
, AVP , ,
. , AVP .
AVP Linux ,
, , , ,
. , , .
508
, . MBR --. Boot --. - - .
AVP
DOS 6.0,
.
, .
Linux.
, qmkbootdisk.
AVP. , AvpDaemon
-- .
.
AVP: , Web-, .
/ e t c / i n i t . d avpdaemon
/opt/AVP/avpdaemon.rh, Redhat- . AVP
. , :
/etc/init.d/avpdaemon start
AVP AVPTuner. : / o p t / A V p / A V P T u n e r
(. . 22.4).
I
i :;
. 22.4.
'
AVPTuner
509
/ e t c / c r o n . daily. , . ,
daily.avc, , .
,
. ( ),
.
22.2.
AVPKeeper . AVP AVPKeeper,
():
sendmail, postfix, qmail.
sendmail, AVPDaemon .
510
AVPKeeper : .
, .
, ,
.
, ,
( Internet) . , , .
.
, :
.
,
. :
.
AVPKeeper.
AVP, .
kavselinux. tgz /mnt/cdrom/Products/KAVLinux
- .
( ) :
chmod 4 4 4 k a v s e l i n u x . t g z
tar zxvf k a v s e l i n u x . t g z
kavinstaller.
. , ,
AVP , . ,
. ,
AVPKepper . ()
:
/KAVLinux/kavs/kavkeeper-sendmail-linux-3.5.136.tgz
kavkeeper-sendmail (KAV Keeper for sendmail), 3.5 build 135. Do you
want to install it?
,
:
Found [file] What do you want doing with this file? (Overwrite/Write with
new e x t e n s i o n / S k i p )
w -- . ,
, .
KAV (Kaspersky AntiVirus) , , .
kavscanner, -- kavtuner.
kavdaemon. kavupdater. AVP KAV :
.
511
sendmail. , sendmail
:
/
/etc/init.d/sendmail stop
/opt/AVP/kavkeeper
sendmail-cf / u s r / s h a r e .
:
m4 kav_glb.mc > / e t c / s e n d m a i l . c f
m4 kav_loc.mc > / e t c / s e n d m a i l . c f
,
AVPKeeper, - -
. , AVPKeeper.
.
1. - /etc/sendmail. cf
.
2. kav_glb.mcu kav_loc. me .~ , ,
, . ,
- .
.
kav_loc.mc (. 22.2).
22.2. kav_loc.mc
divert(-1)
dnl This is the macro config file used to generate the /etc/
sendmail.cf
dnl file. If you modify thei file you will have to regenerate
the
dnl preprocessor:
dnl
dnl You will need to have the sendmail-cf package installed for this to
dnl work.
include ( *. ./m4/cf .m4' )
define('confDEF_USER_ID',"8:12")
OSTYPE ( 4inux' )
u n d e f i n e ( 4JUCP_RELAY')
undefine('BITNET^RELAY')
define('confAUTO_REBUILD' )
definerconfTO_CONNECT', 4m')
define('confTRY_NULL_MX_LIST',true)
define('confDONT_PROBE_INTERFACES',true)
dnl definerKAVKEEPER_MAILER', V u s r / l o c a l / b i n / k a v k e e p e r ' )
dnl d e f i n e ( ' K A V K E E P E R _ C O N F I G ' , V e t c / k a v k e e p e r . i n i ' )
512
dnl define( 'KAVKEEPER_LOCAL_MAILER', 'mail.local')
FEATURE('smrsh', Vusr/sbin/smrsh')
FEATURE(mailertable)
FEATURE ( Virtusertable', 'hash -o /etc/mail/virtusertable')
FEATURE(redirect)
FEATURE(always_add_domain)
FEATURE (use_cw__file)
FEATURE (local_kav)
MAILER(smtp)
FEATURE('access_db')
FEATURE('blacklist_recipients')
dnl We strongly recommend to comment this one out if you want
dnl to protect
dnl yourself from spam. However, the laptop and users on
dnl computers that do
dnl not hav 24x7 DNS do need this.
FEATURE('accept_unresolvable_domains')
dnl FEATURE('relay_based_on_MX')
-
kav_loc.mc, , ,
, , mc- :
m4 mysystem.mc > /etc/sendmail.cf
, mc-
:
dnl d e f i n e ( ' K A V K E E P E R _ M A I L E R ' , V u s r / l o c a l / b i n / k a v k e e p e r ' )
dnl define('KAVKEEPER_CONFIG', V e t c / k a v k e e p e r . i n i ' )
define( 'KAV_LOCAL_HACK')
dnl define('confDEF_USER_ID','kavuser:kavuser')
dnl define('confRUN_AS_USER','kavuser')
dnl define('KAVKEEPER_MAILER_FLAGS', "APhnu9')
MAILER(kavkeeper)
! sendmail .
, . sendmail (/etc/init.d/sendmail start)
:
uuencode / r o o t / k e r n 3 8 6 . e x e kern386.exe | mail -s Just_Run_It evg
, Win95.CIH, evg. .
(. /var/mail/root). -
, 22.3.
22.3.
Return-Path:
From: root@domain.ru
: rootSlocalhost.localdomain
S u b j e c t : SENDER ! V i r u s found in message f r o m you !
MIME-Version: 1.0
Content-Type: t e x t / p l a i n ; charset="US-ASCII"
17 3ait. 851
513
You sent to user evg message with VIRUS
KAV Report:
kern386.exe infected: Win95.CIH.1035
Bye !
Return-Path:<>
From:rootSdomain.ru
To:rootSdomain.ru
Subject:ADMIN ! ALARM ! Virus found !
MIME-Version:!. 0
Content-Type :multipart/mixed;
boundary="=NEXT=AVPCHECK=2002=l84=1025707050=1225=0="
This is a MIME-encapsulated message
-=NEXT=AVPCHECK=2002=184=1025707050=1225=0=
Content-Type:text/plain
Content-Transfer-Encoding:US-ASCII
User rootSlocalhost.localdomain send to user evg. mail with virus.
KAV report:
kern386.exe
infected:
Win95.CIH.1035
, , ,
, . ,
evg , .
/var/log/kavkeeper- [date] .log .
AVPKeeper -: . , , ,
, ( ) .
, , ,
. ,
.
kavkeeper. ini. , AVPKeeper.
574
23
23.1. SATAN
, . SATAN,
,
. SATAN (Security Administrator Tool for Analyzing Networks)
.
SATAN ,
( )
.
, . ,
, . . , ,
FreeBSD,
Linux, . ,
,
, FreeBSD , Linux.
, SATAN Linux,
, FreeBSD.
: FreeBSD
Linux. Linux :
http://www.ibiblio.org/pub/packages/security/Satan-for-Linux/
satan-1.1.l.linux.fixed2.tgz
FreeBSD http://www.fish.com/satan.
Linux satan-1.1.1.
:
perl reconfig
, Perl
5, , ,
. reconfig. He
515
Perl,
51...70: :
f o r $dir (@all_dirs) {
:
Idle " \ n C a n ' t find perlS! Bailing o u t . . . \ n " u n l e s s $PERL;
Perl. Perl
, /usr/bin, :
print "\nPerl5 is in $PERL\n";
:
$PERL=/path-to-perl/
SPERL Perl.
src/boot boot..
:
char * s t r c h r ( ) ;
( 24).
/ s r c / f p i n g / f p i n g . c
SATAN FreeBSD. ( 189...191):
tifndef SYS_ERRLIST_DECLARED
extern char * s y s _ e r r l i s t [ ] ;
tendif
, . :
structure has no member named *th_sport' ( * t h _ d p o r t ' ) th_sport source, a th_dport dest. pa tcphdr (TCP Header) TCP. BSD , - th_sport, Linux source (, th_dport
dest). tcphdr / u s r / i n c l u d e / n e t i n e t / t c p . h .
:
make linux
linux SATAN Linux.
,
, SATAN. conf ig/
paths.pi.
, 23.1. - ( ),
.
23.1. paths.pl
$FINGER="/usr/bin/finger";
$FTP="/usr/bin/ftp",
$RPCINFO="/usr/sbin/rpcinfo";
516
$RUSERS="/usr/bin/rusers";
$SHOWMOUNT="/usr/sbin/showmount";
$YPWHICH="/usr/bin/ypwhich";
$NSLOOKUP="/usr/bin/nslookup";
$XHOST="/usr/bin/Xll/xhost";
$PING="/bin/ping",
$MOSAIC="/usr/bin/netscape";
$TCP_SCAN="bin/tcp_scan";
$UDP_SCAN="bin/udp_scan";
$FPING="bin/fping";
$NFS_CHK="bin/nfs-chk";
$YP_CHK="bin/yp-chk";
$SAFE_FINGER="bin/safe_finger";
$MD5="bin/md5";
$SYS_SOCKET="bin/sys_socket";
$BOOT="bin/boot";
$GET_TARGETS="bin/get_targets";
$TIMEQUT="bin/timeout";
$SATAN_CF="config/satan.cf"; $SERVICES="config/services";
SATAN Netscape.
Mosaic Lynx, Netscape. SATAN
./satan
. SATAN
HTTP- Netscape,
. SATAN .
SATAN Web-,
, .
: SATAN , SATAN.
root. Netscape SATAN (. . 23.1).
Data Management ,
. ( satandata) Open/Create.
. Target Selection.
, (. . 23.2).
, ,
. (light),
(normal) (heavy). ,
Start the scan.
: SATAN
, , , . 517
N;*>tf: SATAN
IMt
I
1
:|* Bookmarks--^
1||||:
lifeile://localhost/usr/src/satan-1.1.
(Seciii-ity i
|1
. 23. J. SATAN
Netscape.
. ,
light .
SATAN, ( root), SATAN
(Reporting and Data Analysis).
SATAN root , , SATAN.
Netscape HTTP_REFERER,
SATAN.
SATAN Configuration Management,
satan.cf .
: max_proximity_level.
.
. ,
518
host',
Scan;%e:t
,,
. 23.2.
11
, . SATAN
host.depl.company.ru. , depl.company.ru DNS ns.depl.company.ru. NS
> ns.company.ru. company
. max_proximityjevel 2,
.
23.2.
, ,
180 e-mail
?? ,
.
579
() : !!!
,
(). , Cool Girl! Enjoy It!.
- (Worm) .
... :
AVP ,
.
/etc/mail/access ( access.db,
access). sendmail.
, () SMTP. :
I |
:
localhost. localdomain
localhost
RELAY
127.0.0.1
OK
spammer@spamworld.com
spamworld.com
192.168.1
RELAY
host.mydomain.ruREJECT
mydomain.ru
RELAY
RELAY
REJECT
E R R O R : " 5 5 0 Access denied"
- SMTP.
spammer@spamworld.com, spamworld.com. 192.168.1.*.
SMTP- ,
mydomain.ru host.
RELAY ,
() , sendmail
, , ( DNS).
REJECT.
Access denied. ERROR , (
). ERROR -:
ERROR:D.S.N:Message, D.S.N RFC 1893.
, :
makemap hash / e t c / m a i l / a c c e s s < /etc/mail/access
makemap. sendmail !
520
23.3.
,
. --
. , , - :
#!/bin/bash
# loop
echo " "
./loop
,
. - .
,
:
Unable to fork
. ,
/ e t c / s e c u r i t y / l i m i t s . c o n f .
l i m i t s . c o n f . :
<domain> <type> <item> <value>
(domain) :
1. .
2. . @.
3. *. .
(type) : (soft) (hard).
, , .
, .
(item), :
core
core ().
data
().
fsize
().
memlock
().
nofile
.
stack
().
().
.
as
.
niaxlogins
.
locks
.
. , user.
:
user s o f t nproc 50
user hard nproc 60
521
( 50),
.
, dialupl dialup2.
30 . 30 ,
15
. :
Sdialupl maxlogins 14
@dialup2 -- maxlogins 14
15 (maxlogins 14 ).
:
Too many logins for ' d i a l u p l '
,
root. , . /etc/securetty,
, , root. root . (
) /etc/securetty.
, su (super user). , root,
, root.
522
24
.
, ,
, Linux. , ,
, .
, , , Web FTP- ,
.
, ?
,
. (,
!), . : - ( ) , , . -
, , .
, , .
.
, , ,
.
, . ,
.
?
. , IP . ,
: .
, ,
IP-, .
, IP-
, .
, ,
523
, , ,
. , , 100%.
: ,
,
. ,
( IP-), :
,
.
Windows ( ), 135...139 129.
. 17.
Internet Explorer ( ,
). IE
Microsoft. Netscape
Communicator IE, TheBat! Outlook, Microsoft.
, Web FTP-.
.
40-60 ,
. , .
, .
. 4.
RAID .
RAID .
.
, . . ,
(
)
. ,
, . ( ) .
, ,
, .
, . , . -
- ,
, HOWTO, . HOWTO .
!
524
.
Linux
Linux /etc. , . .
.
. 1
codepages
CORBA/servers
CORBA.
Gnome
crond*
, crond
. /etc/crontab
cups
CUPS
default/useradd
DrakConf
useradd
DrakConf
emacs
emacs ( )
gnome
Gnome
gtk
, Gtk.
, .
. , ,
htdig
( ) ht:/Dig
httpd
Apache
sendmail
openldap
pam.d
LDAP
postfix
postfix
PPP
profile. d
pppd
rc.d
.
. /etc/inittab
skel
ssh
ssh
urpmi
urpmi. RPM .
525
. . 1
at. deny
auto.*
bashrc
conf.linuxconf
crontab
csh.cshrc
csh. login
exports
fax.config
fb. modes
fdprm
filesystem
fstab
ftpusers
gettydefs
gpm-root.conf
group
gshadow
host.conf
hosts
hosts.allow
hosts.deny
identd.conf
inetd.conf
inittab
isapnp.gone
issue, issue.net
lilo.conf
Imhosts
login.defs
lynx.cfg
mime-magic
mime-types
modules. conf
mold
mtab
11
xinet.d
aliaces
anacrontab
526
X Window
xinetd
Anacron
at
automount ( autofs)
bash
linuxconf.
linuxconf
crond
Shell
, ,
Shell
. NFS
.
, FTP
( getty)
gpm. gpm
Shadow Passwords
.
IP-.
,
,
inetd
. init
ISA
. issue
, issue.net , , telnet
LILO
Samba.
Windows NT. , NetBIOS IP-
useradd groupadd
lynx
MIME-
MIME-. Apache
apache-mime. types, httpd.conf
(Message of The Day)
. . 1
networks
passwd
printcap
proftpd.conf
ProFTPD
protocols
pwdb
quota.conf
sendmail.cf
services
passwd
shells
shutmsg
smb.conf
termcap
xinetd.conf
, RFC 1340
pwdb
sendmail
-.
RFC 1700
(Shadow Passwords)
wu-ftpd
Samba
xinetd
/etc/xinet.d
xinetd.conf,
xinetd /etc/xinetd.d.
,
. , ,
. .
, xinetd. conf. xinetd.conf ,
, , . .
xinetd.conf
. 1.
. xinetd.conf
#
t xinetd
#
defaults
{
instances
= 60
log_type
= SYSLOG authpriv
log_on_success
= HOST PID
log_on_failure
= HOST RECORD
includedir /etc/xinetd.d
527
defaults . includedir .
( .2):
.2
# :
# : echo [top]
service echo
{
type
= INTERNAL
id
= echo-stream
socket_type = stream
p r o t o c o l = tcp
user
= root
wait
= no
disable
= yes
/etc/urpmi/urpmi.cfg
urpmi
RPM-.
root. u r p m i . c f g ,
.
/etc/aliases
(. .). :
: _
.
newaliases.
.. /etc/aliases
#
MAILER- DAEMON:
postmaster
p o s t m a s t e r : root
#
bin :
root
daemon:
root
games:
root
Ingres:
root
nobody:
root
system:
root
toor:
root
uucp:
root
t
manager: root
dumper:
root
528
operator:
root
decode:
root
# root
troot:
marc
/etc/host, conf
. .
order (. .4). : hosts,
bind, nis, . hosts
order , /etc/hosts. bind
DNS. nis (Network
Information Server), .
IP- ,
order. multi ,
IP-. on.
.4. /etc/host.conf
order h o s t s , b i n d
multi on
/etc/hosts
/etc/hosts IP-. :
IP- _
/etc/hosts .5.
. 5. /etc/hosts
127.0.0.1
localhost.localdomain
localhost
127.0.0.1
dhsilabs.com
dhsilabs
1 9 2 . 1 6 8 . 1 . 2 pppO.com
PPPO
/etc/networks
.
:
_ #
, , netstat
,
, , .
networks .6.
^ .6.
/etc/networks
/etc/motd
(Message of The Day).
. . .
/etc/resolv.conf
DNS.
nameserver , ,
. search
, .
(. .7).
. 7. /etc/resolv.conf
-search .dhsilabs.com .com .ru
nameserver 1 2 7 . 0 . 0 . 1
nameserver 192.168.1.1
nameserver 1 9 2 . 1 6 8 . 9 9 . 1
search domain, ,
, , .
/etc/protocols
.8. /etc/protocols
# /etc/protocols:
#
# (IP)
#
# RFC 1340
0 IP
# (IP)
ip
icmp
1 ICMP
t
igmp
2 IGMP
#
3 GGP
# -
ggp
ipencap
4 IP-ENCAP # IP, IP
5 ST
st
# ST
6 TCP
tcp
# .
egp
8 EGP
#
pup
12 PUP
# PARC -
udp
17 UDP
#
hmp
20 HMP
#
xns-idp
22 XNS-IDP
# Xerox NS IDP
rdp
27 RDP
tt "reliable datagram" protocol
iso-tp4
29 ISO-TP4
# ISO 4
xtp
36 XTP
# Xpress
ddp
37 DDP
#
idpr-cmtp 39 IDPR-CMTP # IDPR Control Message Transport
ipv6
41 IPv6
t IPv6
530
ipv6-route43 IPv6-Route# IPv6
ipv6-frag 44 IPv6-Frag # IPv6
ipv6-crypt50 IPv6-Crypt# IPv6
ipv6-auth 51 IPv6-Auth # IPv6
ipv6-icmp 58 IPv6-ICMP # ICMP IPv6
ipv6-nonxt59 IPv6-NoNxt# "No Next" IPv6
ipv6-opts 60 IPv6-Opts f IPv6
rspf
73 RSPF
# Radio Shortest Path F i r s t ,
vmtp
81 VMTP
# V e r s a t i l e Message Transport
ospf
89 OSPFIGP
# Open Shortest Path F i r s t IGP
ipip
94 IPIP
# IP
encap
98 ENCAP
t IP
DARPA . DDN.
/etc/services
.9. /etc/services
# /etc/services:
#
#
# RFC
tcpmux
1/tcp
echo
7/tcp
7/udp
echo
discard
9/tcp
sink null
9/udp
discard
sink null
systat
11/tcp
users
13/tcp
daytime
13/udp
daytime
netstat
15/tcp
17/tcp
quote
qotd
18/tcp
msp
18/udp
msp
19/tcp
ttytst so
chargen
1 9/udp
ttytst so
chargen
ftp-data
20/tcp
21/tcp
ftp
21/udp
fspd
fsp
ssh
22/tcp
ssh
22/udp
23/tcp
telnet
# 24 --
25/tcp
mail
smtp
I 26 -
timserver
37/tcp
time
37/udp
timserver
time
rip
3 9/udp
resource
name
nameserver 42/tcp
1700
# TCP
#
#
# SSH
# SSH
IEN 116
531
whois43/tcp
nicname
#
re-mail-ck50/tcp
#
re-mail-ck50/udp
#
nameserver
domain
53/tcp
domain
53/udp
nameserver
#
mtp
57/tcp
#
bootps
67/tcp
bootps
67/udp
#
bootpc
68/tcp
bootpc
68/udp
69/udp
tftp
# Internet Gopher
gopher
70/tcp
gopher
70/udp
77/tcp
netrjs
rje
finger
79/tcp
WWW
http
# WorldWideWeb HTTP
80/tcp
I HyperText Transfer Protocol
WWW
80/udp
link
ttylink
87/tcp
kerberosS krb5 # Kerberos v5
kerberos 88/tcp
kerberos 88/udp
kerberosS krbS # Kerberos v5
supdup
95/tcp
# 100 -
# usually from sri-nic
hostnames 101/tcp
hostname
# part of ISODE.
iso-tsap 102/tcp
tsap
# also used by CSO name server
cso-ns
csnet-ns 105/tcp
csnet-ns 105/udp
cso-ns
poppassd
#3com-tsmux
106/tcp
#3com-tsmux
106/udp
poppassd
# Telnet
rtelnet
107/tcp
rtelnet
107/udp
postoffice# POP 2
pop2
109/tcp
pop-2
pop-2
pop2
109/udp
# POP 3
pop-3
110/tcp
110/udp
pop-3
sunrpc
111/tcp
portmapper
# RPC 4.0 portmapper TCP
sunrpc
111/udp
portmapper
# RPC 4.0 portmapper UDP
authentication tap ident
auth
113/tcp
sftp
115/tcp
uucp-path 117/tcp
nntp
119/tcp
readnews untp # USENET News Transfer Protocol
ntp
123/tcp
ntp
123/udp
#
netbios-ns!37/tcp
# NETBIOS
netbios-ns!37/udp
netbios-dgm
138/tcp
# NETBIOS
netbios-dgm
138/udp
netbios-ssn
139/tcp
NETBIOS
netbios-ssn
139/udp
imap2
143/tcp
imap
# Interim v2
imap2
143/udp
imap
532
snmp
161/udp
# Simple Net Mgmt Proto
snmp-trap 162/udp
snmptrap # Traps for SNMP
cmip-man 163/tcp
# ISO mgmt over IP (CMOT)
cmip-man 163/udp
cmip-agent!64/tcp
cmip-agent164/udp
xdmcp
177/tcp
# X Display
xdmcp
177/udp
nextstep 178/tcp
NeXTStep Nextstep
# NeXTStep
nextstep 178/udp
NeXTStep Nextstep
#
bgp
179/tcp
# Border Gateway
bgp
179/udp
prospero 191/tcp
prospero 191/udp
ire
194/tcp
# Internet Relay Chat
194/udp
ire
smux
199/tcp
# SNMP Unix
smux
199/udp
at-rtmp
201/tcp
# AppleTalk
at-rtmp
201/udp
202/tcp
at-nbp
# AppleTalk
at-nbp
202/udp
at-echo
204/tcp
I AppleTalk echo
at-echo
204/udp
at-zis
206/tcp
# AppleTalk
206/udp
at-zis
gmtp
209/tcp
# qmail
209/udp
qmtp
# The Quick Mail Transfer Protocol
210/tcp
z3950
wais
# NISO Z39.50 database
z3950
210/udp
wais
ipx
213/tcp
# IPX
ipx
213/udp
imap3
220/tcp
# Interactive Mail Access (IMAP)
220/udp
imap3
# , 5 (IMAP)
rpc2portmap
369/tcp
rpc2portmap
369/udp
# Coda portmapper
codaauth2 370/tcp
codaauth2 370/udp
# Coda-
ulistserv 372/tcp
I UNIX L i s t s e r v
ulistserv 372/udp
Idap
389/tcp
t Lightweight Directory Access Protocol
Idap
389/udp
# Lightweight Directory Access Protocol
https
443/tcp
# MCom
https
443/udp
# MCom
snpp
444/tcp
t Simple Network Paging Protocol
snpp
444/udp
# Simple Network Paging Protocol
saft
487/tcp
# Simple Asynchronous File Transfer
saft
487/udp
I Simple Asynchronous File Transfer
npmp-local610/tcp
dqs313_qmaster # npmp-local / DQS
npmp-loca!610/udp
dqs313_qmaster I npmp-local / DQS
533
npmp-gui
npmp-gui
hmmp-ind
hmmp-ind
611/tcp
611/udp
612/tcp
612/udp
dqs313 execd
dqs313_execd
dqs313 intercell
dqs313 intercell
t
#
#
#
npmp-gui / DQS
npmp-gui / DQS
HMMP Indication / DQS
HMMP Indication / DQS
#
# UNIX
t
exec
512/tcp
biff
512/udp
comsat
login
513/tcp
who
513/udp
whod
shell
514/tcp
cmd
syslog
514/udp
printer
515/tcp
spooler
talk
517/tcp
ntalk
518/udp
route
520/udp
router routed
timed
525/udp
timeserver
tempo
526/tcp
newdate
courier
530/tcp
rpc
conference531/tcp
chat
n,etnews
532/tcp
readnews
netwall
533/udp
uucp
540/tcp
uucpd
afpovertcp548/tcp
afpovertcp548/udp
remotefs 556/tcp
rfs server rfs
klogin
543/tcp
kshell
544/tcp
krcmd
kerberos-adm
749/tcp
1
#
# RIP
#
#
#
#
#
#
#
#
#
webster
765/tcp
webster
765/udp
*
ingreslock
1524/tcp
ingreslock
1524/udp
prospero-np
1525/tcp
prospero-np
1525/udp
datametrics
1645/tcp
datametrics
1645/udp
sa-msg-port
1646/tcp
sa-msg-port
1646/udp
radius
1812/tcp
radius
1812/udp
radacct
1813/tcp
radacct
1813/udp
cvspserver
2401/tcp
cvspserver
2401/udp
venus
2430/tcp
venus
2430/udp
534
# Network dictionary
# Prospero non-privileged
old-radius
old-radius
old-radacct
old-radacct
venus-se 2431/tcp
# tcp side effects
venus-se 2431/udp
I udp sftp side effect
codasrv
2432/tcp
# not used
codasrv
2432/udp
# server port
codasrv-se2433/tcp
# tcp side effects
codasrv-se2433/udp
# udp sftp side effect
mysql
3306/tcp
# MySQL
mysql
3306/udp
# MySQL
rfe
5002/tcp
# Radio Free Ethernet
rfe
5002/udp
# Actually uses UDP only
cfengine
5308/tcp
# CFengine
cfengine 5308/udp
# CFengine
bbs
7000/tcp
t BBS service
#
# Kerberos 5
#
kerberos4
750/udp
kerberos-iv kdc# Kerberos () udp
kerberos4
750/tcp
kerberos-iv kdc# Kerberos () tcp
kerberos_master 751/udp
# Kerberos
kerberos_master 751/tcp
# Kerberos
# Kerberos
passwd_server 752/udp
krb_prop
# Kerberos slave propagation
754/tcp
kreg
# Kerberos
krbupdate
760/tcp
kpasswd
kpwd
# Kerberos "passwd"
761/tcp
kpop
1109/tcp
# Pop, Kerberos
knetd
# Kerberos
2053/tcp
zephyr-srv
# Zephyr
2102/udp
2103/udp
# Zephyr serv-hm
zephyr-clt
zephyr-hm
2104/udp
eklogin
2105/tcp # Kerberos:
#
# ( NetBSD)
supfilesrv871/tcp
supfiledbg1127/tcp
#
#
#
rtmp
1/ddp
nbp
2/ddp
echo
4/ddp
zip
6/ddp
# Debian
poppassd 106/tcp
poppassd 106/udp
mailq
174/udp
mailq
174/tcp
ssmtp
465/tcp
gdomap
538/tcp
gdomap
538/udp
Eudora
Eudora
# SMTP SSL
535
snews
563/tcp
ssl-ldap
636/tcp
omirr
808/tcp
omirr
808/udp
rsync
873/tcp
rsync
873/udp
swat
901/tcp
inetd
simap
993/tcp
spopS
995/tcp
socks
1080/tcp
socks
1080/udp
rmtcfg
1236/tcp
xtel
1313/tcp
support
1529/tcp
cfinger
2003/tcp
ninstall 2150/tcp
ninstall 2150/udp
afbackup
2988/tcp
afbackup 2988/udp
icp
3130/tcp
icp
3130/udp
postgres 5432/tcp
postgres 5432/udp
fax "
4557/tcp
hylafax
4559/tcp
noclog
5354/tcp
noclog5354/udp
hostmon
5355/tcp
hostmon
5355/udp
ircd
6667/tcp
ircd
6667/udp
webcache
8080/tcp
webcache 8080/udp
tproxy
8081/tcp
tproxy
8081/udp
mandelspawn
9359/udp
amanda
10080/udp
kamanda
10081/tcp
kamanda
10081/ud
amandaidx 10082/tcp
amidxtape 10083/tcp
isdnlog
20011/tcp
isdnlog
20011/udp
vboxd
20012/tcp
vboxd
20012/udp
jserver
22273/tcp
binkp
24554/tcp
binkp
24554/udp
asp
27374/tcp
a'sp
27374/udp
536
t NNTP SSL
t LDAP SSL
omirrd
omirrd
# rsync
# rsync
# Add swat service used via
#
#
#
#
IMAP SSL
POP-3 SSL
- socks
- socks
# GNU Finger
# ninstall
# ninstall
# Afbackup system
I Afbackup system
# Internet Cache Protocol (Squid)
t (Squid)
# POSTGRES
# POSTGRES
# FAX: ()
# HylaFAX - ()
# noclogd, TCP (nocol)
# noclogd, UDP (nocol)
# hostmon, TCP (nocol)
# hostmon, TCP (nocol)
# Internet Relay Chat
t Internet Relay Chat
# WWW:
# WWW:
#
#
mandelbrot
# amanda
# amanda (Kerberos)
# amanda (Kerberos)
# amanda
# amanda
# isdn
# isdn
I voice box system
# voice box system
# JServer
# Binkley
# Binkley
#
t
tfido
60177/tcp
tfido
60177/udp
fido
60179/tcp
fido
60179/udp
#
linuxconf 98/tcp
smtp 465/tcp
imaps993
pop3s 995
#
#
I
#
Ifmail
Ifmail
Ifmail
Ifmail
(FIDO Mail)
services , . - , , .
/etc/modules.conf
,
(. ).
. 10. /etc/modules.conf
alias net-pf-4 ipx
pre-install pcmcia_core /etc/re.d/init.d/pcmcia start
alias parport_lowlevel parport_pc
pre-install plip modprobe parport_pc ; echo 7 > /proc/parport/
0/irq
alias sound-slot-0 via82cxxx_audio
if, else,
elseif, endif. :
if
elseif
endif
path :
path=nyTb
path net, misc, scsi, video, ipv4
. - .
- , , , path :
path[net]=.
path : []=.
install, pre-install,
post-install. . ,
install, insmod. , pre-install post-install, . :
537
remove . :
remove
,
rmmod. alias . , alias
iso9660 isofs. (keep, add, define)
.
.
X Window
, X Window,
, . .1.
X Window
538
. 1
X. 0
.
xfontsel
.
xfontsel
-reverse
,
X. 0
.
. . 18
. ,
IDE-, SCSI? ,
,
.
( )
, , , .
, .
: .
RPM:
, . -
, ,
(warning)
.
,
, , . make menuconfig (config xconfig)
. (make zlmage). :
. , ,
make menuconfig.
.1 .
, ,
. .1 , . -,
.
, ,
. -, , , .
:
,
, , . , .1. ,
, ,
, , .
-
. , , , ,
.
?
539
.2 .
.
? : make
menuconfig : ,
. , ,
menuconfig.
( ):
make config. ,
Y, N . Y - -
, N ,
. :
CONFIG_EXPERIMENTAL ?
Y N.
.1.
#
# Automatically generated by make menuconfig: don't edit
I
# Code maturity level options
#
CONFIG_EXPERIMENTAL=N
#
# Processor type and features
#
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
CONFIG_M686=y
CONFIG_X8 6_WP_WORKS_OK=y
CONFIG_X8 6_INVLPG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_TSC=y
CONFIG_X86_GOOD_APIC=y
CONFIG_lGB=y
# CONFIG_2GB is not set
# CONFIG_MATH_EMULATION is not set
CONFIG_MTRR=y
# CONFIG_SMP is not set
#
# Loadable module support
#
540
# CONFIG MODULES is not set
# General setup
I
# CONFIG_BIGMEM is not set
CONFIG_NET=y
CONFIG_PCI=y
# CONFIG_PCI_GOBIOS is not set
# CONFIG_PCI_GODIRECT is not set
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
# CONFIG_PCI_QUIRKS is not set
CONFIG_PCI_OLD_PROC=y
# CONFIGJ4CA is not set
# CONFIG_VISWS is not set
CONFIG_SYSVIPC=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_SYSCTL=y
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_MISC is not set
# CONFIG_BINFMT_JAVA is not set
CONFIG_PARPORT=y
# CONFIG_PARPORT_PC is not set
f CONFIG_APM is not set
# CONFIGJTOSHIBA is not set
#
# Plug and Play support
#
# CONFIG_PNP is not set
#
# Block devices
f
CONFIG_BLK_DEV_FD=y
# CONFIG_BLK_DEV_IDE is not set
I CONFIG_BLK_DEV_HD_ONLY is not set
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_NBD=y
CONFIG_BLK_DEV_MD=y
I CONFIG_AUTODETECT_RAID is not set
I CONFIG_MD_LINEAR is not set
# CONFIG_MD_STRIPED is not set
# CONFIG_MD_MIRRORING is not set
I CONFIG_MD_RAID5 is not set
# CONFIG_MD_TRANSLUCENT is not set
# CONFIG MD HSM is not set
54?
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SZE=4096
t CONFIG_BLK_DEV_INITRD is not set
# CONFIG_BLK_DEV_XD is not set
# CONFIG_BLK_DEV_DAC960 is not set
CONFIG_PARIDE_PARPORT=y
# CONFIG_PARIDE is not set
# CONFIG_BLK_DEV_IDE_MODES is not set
t CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG BLK DEV HD is not set
# Networking options
#
CONFIG_PACKET=y
CONFIG_NETLINK=y
CONFIG_RTNETLINK=y
CONFIG_NETLINK_DEV=y
CONFIG_FIREWALL=y
CONFIG_FILTER=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_RTNETLINK=y
CONFIG_NETLINK=y
# CONFIG_IP_MULTIPLE_TABLES is not set
# CONFIG_IP_ROUTE_MULTIPATH is not set
# CONFIG_IP_ROUTE_TOS is not set
# CONFIG_IP_ROUTE_VERBOSE is not set
CONFIG_IP_ROUTE_LARGE_TABLES=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG_IP_PNP_BOOTP=y
# CONFIG_IP_PNP_RARP is not set
CONFIG_IP_FIREWALL=y
CONFIG_IP_FIREWALL_NETLINK=y
CONFIG_NETLINK_DEV=y
CONFIG_IP_TRANSPARENT_PROXY=y
CONFIG_IP_MASQUERADE=y
CONFIG_IP_MASQUERADE_ICMP=y
CONFIG_IP_MASQUERADE_MOD=y
CONFIG_IP_MASQUERADE_IPAUTOFW=y
CONFIG_IP_MASQUERADE_IPPORTFW=y
CONFIG_IP_MASQUERADE_MFW=y
CONFIG_IP_MASQUERADE_PPTP=y
# CONFIG_DEBUG_IP_MASQUERADE_PPTP is not set
# CONFIG_IP_MASQUERADE_IPSEC is not set
# CONFIG IP MASQUERADE GENERIC is not set
542
CONFIG_IP_MASQUERADE_VS=y
CONFIG_IP_MASQUERADE_VS_TAB_BITS=12
CONFIG_IP_MASQUERADE_VS_RR=y
CONFIG_IP_MASQUERADE_VS_WRR=y
CONFIG_IP_MASQUERADE_VS_LC=y
CONFIG_IP_MASQUERADE_VS_WLC=y
# CONFIG_IP_ROUTER is not set
CONFIG_NET_IPIP=y
CONFIG_NET_IPGRE=y
CONFIG_NET_IPGRE_BROADCAST=y
CONFIG_IP_MROUTE=y
CONFIG_IP_PIMSM_Vl=y
# CONFIG_IP_PIMSM_V2 is not set
CONFIG_IP_ALIAS=y
# CONFIG_ARPD is not set
CONFIG_SYN_COOKIES=y
CONFIG_INET_RARP=y
CONFIG_SKB_LARGE=y
CONFIG_IPV6=y
CONFIG_IPV6_EUI64=y
CONFIG_IPV6_NO_PB=y
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_BRIDGE is not set
# CONFIG_LLC is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_FASTROUTE is not set
# CONFIG_NET_HW_FLOWCONTROL is not set
# CONFIG_CPU_IS_SLOW is not set
#
# QoS and/or fair queueing
#
# CONFIG_NET_SCHED is not set
#
# Telephony Support
#
# CONFIG_PHONE is not set
# CONFIG PHONE IXJ is not set
-# SCSI support
I
# CONFIG SCSI is not set
543
#
#
#
#
#
#
#
# Network device support
#
CONFIG_NETDEVICES=y
#
# ARCnet devices
#
# CONFIG_ARCNET is not ' set
CONFIG_DUMMY=y
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
# CONFIG_ETHERTAP is not set
f CONFIG NET SB1000 is not set
# Ethernet (10 or lOOMbit)
#
CONFIG_NET_ETHERNET=y
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_LANCE is not set
# CONFIG_NET_VEN.DOR_SMC is not set
# CONFIG_NET_VENDOR_RACAL is not set
CONFIG_RTL8139=y
CONFIG_RTL8139TOO=y
# CONFIG_NET_ISA is not set
# CONFIG_NET_EISA is not set
# CONFIG_NET_POCKET is not set
#
#
#
f
#
#
#
#
#
544
# CONFIG_PLIP is not set
CONFIG_PPP=y
# CONFIG_SLIP is not set
CONFIG_CIPE=y
# CONFIG_NET_RADIO is not set
t
#
I
#
#
#
#
#
#
#
#
#
I
#
#
#
#
#
I
# IrDA (infrared) support
*
# CONFIG_IRDA is not set
#
# ISDN subsystem
#
# CONFIG_ISDN is not set
.#
# Old CD-ROM drivers (not SCSI, not IDE)
#
# CONFIG_CD_NO_IDESCSI is not set
#
# Character devices
#
18 . 851
545
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_SERIAL_CONSOLE=y
CONFIG_SERIAL_EXTENDED=y
CONFIG_SERIAL_MANY_PORTS=y
CONFIG_SERIAL_SHARE_IRQ=y
# CONFIG_SERIAL_DETECT_IRQ is not set
CONFIG_SERIAL_MULTIPORT=y
# CONFIG_HUB6 is not set
# CONFIG_SERIAL_NONSTANDARD is not set
CONFIG_UNIX98_PTYS=y
CONFIG_UN1X9 8_PTY_COUNT=2 5 6
# CONFIG_PRINTER is not set
CONFIG_MOUSE=y
# Mice
#
# CONFIG_ATIXL_BUSMOUSE is not set
CONFIG_BUSMOUSE=y
t CONFIG_MS_BUSMOUSE is not set
# CONFIG_PSMOUSE is not set
# CONFIG_82C710_MOUSE is not set
# CONFIG_PC110_PAD is not set
#
# Joysticks
I
# CONFIG_JOYSTICK is not set
# CONFIG_QIC02_TAPE is not set
t CONFIG_WATCHDOG is not set
CONFIG_NVRAM=y
CONFIG_RTC=y
#
#
t
t
#
t
I2C support
CONFIG_I2C is not set
CONFIG_AGP is not set
CONFIG_DRM is not set
#
t Video For Linux
i
# CONFIG_VIDEO_DEV is not set
# CONFIG_DTLK is not set
#
# Ftape, the floppy tape device driver
546
#
i CONFIG_FTAPE is not set
# CONFIG UNIKEY is not set
# USB support
#
f CONFIG_USB is not set
#
I Filesystems
#
CONFIG_QUOTA=y
CONFIG_AUTOFS_FS=y
# CONFIG_SUPERMOUNT is not set
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_FAT_FS is not set
# CONFIG_MSDOS_FS.is not set
# CONFIG_UMSDOS_FS is not set
# CONFIG_VFAT_FS is not set
CONFIG_IS09660_FS=y
# CONFIG_JOLIET is not set
# CONFIG_UDF_FS' is not set
# CONFIG_MINIX_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_HPFS_FS is not set
CONFIG_PROC_FS=y
CONFIG_DEVPTS_FS=y
# CONFIG_QNX4FS_FS is not set
CONFIG_ROMFS_FS=y
CONFIG_EXT2_FS=y
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
# CONFIG_REISERFS_FS is not set
# CONFIG_EFS_FS is not set
#
# Network File Systems
#
# CONFIG_CODA_FS is not set
CONFIG_NFS_FS=y
CONFIG_ROOT_NFS=y
CONFIG_NFSD=y
CONFIG_NFSD_SUN=y
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
CONFIG_SMB_FS=y
CONFIG_NCP_FS=y
547
CONFIG_NCPFS_PACKET_SIGNING=y
CONFIG_NCPFS_IOCTL_LOCKING=y
CONFIG_NCPFS_STRONG=y
CONFIG_NCPFS_NFS_NS=y
# CONFIG_NCPFS_OS2_NS is not set
CONFIG_NCPFS_MOUNT_SUBDIR=y
CONFIG_NCPFS_NLS=y
CONFIG_NCPFS_EXTRAS=y
I
# Partition Types
f
CONFIG_BSD_DISKLABEL=y
CONFIG_MAC_PARTITION=y
CONFIG_SMD_DISKLABEL=y
CONFIG_SOLARIS_X86_PARTITION=y
CONFIG_UNIXWARE_DISKLABEL=y
CONFIG_NLS=y
#
# Native Language Support
#
CONFIG_NLS_DEFAULT="cp437"
# CONFIG_NLS_CODEPAGE_437
# CONFIG_NLS_CODEPAGE_737
# CONFIG_NLS_CODEPAGE_775
t CONFIG_NLS_CODEPAGE_850
# CONFIG_NLS_CODEPAGE_852
# CONFIG_NLS_CODEPAGE_855
# CONFIG_NLS_CODEPAGE_857
# CONFIG_NLS_CODEPAGE_860
# CONFIG_NLS_CODEPAGE_861
# CONFIG_NLS_CODEPAGE_862
# CONFIG_NLS_CODEPAGE_863
# CONFIG_NLS_CODEPAGE_864
# CONFIG_NLS_CODEPAGE_865
CONFIG_NLS_CODEPAGE_866=y
# CONFIG_NLS_CODEPAGE_869
# CONFIG_NLS_CODEPAGE_874
# CONFIG_NLS_CODEPAGE_932
# CONFIG_NLS_CODEPAGE_936
# CONFIG_NLS_CODEPAGE_949
# CONFIG_NLS_CODEPAGE_950
CONFIG_NLS_IS08859_l=y
CONFIG_NLS_IS08859_2=y
# CONFIG_NLS_IS08859_3 is
# CONFIG_NLS_IS08859_4 is
CONFIG_NLS_IS08859_5=y
# CONFIG_NLS_IS08859_6 is
I CONFIG NLS IS08859 7 is
548
'
is
is
is
is
is
is
is
is
is
is
is
is
is
not
not
not
not
not
not
not
not
not
not
not
not
not
set
set
set
set
set
set
set
set
set
set
set
set
set
is
is
is
is
is
is
not
not
not
not
not
not
set
set
set
set
set
set
not set
not set
not set
not set
# CONFIG_NLS_IS08859_8 is not set
# CONFIG_NLS_IS08859_9 is not set
I CONFIG_NLS_IS08859_14 is not set
CONFIG_NLS_IS08859_15=y
CONFIG NLS KOI8 R=y
# Console drivers
I
CONFIG_VGA_CONSOLE=y
CONFIG_VIDEO_SELECT=y
# CONFIG_MDA_CONSOLE is not set
# CONFIG_FB is not set
#
# Sound
#
# CONFIG_SOUND is not set
#
# Kernel hacking
#
# CONFIG_MAGIC_SYSRQ is not set
.2.
#
# Automatically generated by make menuconfig: don't edit
#
#
# Code maturity level options
I
CONFIG_EXPERIMENTAL=y
I
# Processor type and features
#
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
CONFIG_M686=y
CONFIG_X8 6_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X8 6_BSWAP=y
CONFIG_X8 6_POPAD_OK=y
CONFIG_X86_TSC=y
CONFIG_X8 6_GOOD_APIC=y
549
CONFIG_lGB=y
# CONFIG_2GB is not set
# CONFIG_MATH_EMULATION is not set
CONFIG_MTRR=y
# CONFIG_SMP is not set
#
t Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODVERSIONS=y
CONFIG_KMOD=y
t General setup
I
CONFIG_BIGMEM=y
CONFIG_NET=y
CONFIG_PCI=y
# CONFIG_PCI_GOBIOS is not set
# CONFIG_PCI_GODIRECT is not set
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
CONFIG_PCI_QUIRKS=y
# CONFIG_PCI_OPTIMIZE is not set
CONFIG_PCI_OLD_PROC=y
# CONFIG_MCA is not set
# CONFIG_VISWS is not set
CONFIG_SYSVIPC=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_SYSCTL=y
CONFIG_BINFMT_AOUT=m
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_MISC=m
CONFIG_BINFMT_JAVA=m
CONFIG_PARPORT=m
CONFIG_PARPORT_PC=m
# CONFIG_PARPORT_OTHER is not set
CONFIG_APM=y
# CONFIG_APM_IGNORE_USER_SUSPEND is not set
# CONFIG_APM_DO_ENABLE is not set
t CONFIG_APM_CPU_IDLE is not set
# CONFIG_APM_DISPLAY_BLANK is not set
# CONFIG_APM_IGNORE_SUSPEND_BOUNCE is not set
# CONFIG_APM_RTC_IS_GMT is not set
# CONFIG_APM_ALLOW_INTS is not set
I CONFIG_APM_REAL_MODE_POWER_OFF is not set
CONFIG TOSHIBA=m
550
#
# Plug and Play support
I
CONFIG_PNP=y
CONFIG PNP PARPORT=m
# Block devices
#
CONFIG_BLK_DEV_FD=y
CONFIG_BLK_DEV_IDE=y
I CONFIG_BLK_DEV_HD_IDE is not set
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_IDEDISK_MULTI_MODE=y
CONFIG_BLK_DEV_IDECD=y
I CONFIG_BLK_DEV_IDETAPE is not set
CONFIG_BLK_DEV_IDEFLOPPY=m
CONFIG_BLK_DEV_IDESCSI=m
f CONFIG_IDE_TASK_IOCTL_DEBUG is not set
CONFIG_BLK_DEV_CMD6 4 0=y
f CONFIG_BLK_DEV_CMD640_ENHANCED is not set
CONFIG_BLK_DEV_RZ1000=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_AUTO is not set
CONFIG_IDEDMA_NEW_DRIVE_LISTINGS=y
CONFIG_IDEDMA_PCI_EXPERIMENTAL=y
CONFIG_IDEDMA_PCI_WIP=y
# CONFIG_BLK_DEV_OFFBOARD is not set
CONFIG_BLK_DEV_AEC62XX=y
CONFIG_AEC62XX_TUNING=y
CONFIG_BLK_DEV_ALI15X3=y
# CONFIG_WDC_ALI15X3 is not set
OONFIG_BLK_DEV_AMD7 4 0 9=y
CONFIG_AMD7 4 0 9_OVERRIDE=y
CONFIG_BLK_DEV_CMD64X=y
CONFIG_CMD64X_RAID=y
CONFIG_BLK_DEV_CY82C693=y
CONFIG_BLK_DEV_CS5530=y
CONFIG_BLK_DEV_HPT34X=y
CONFIG_HPT34X_AUTODMA=y
CONFIG_BLK_DEV_HPT366=y
HPT366_FIP=y
HPT366_MODE3=y
CONFIG_BLK_DEV_PIIX=y
CONFIG_BLK_DEV_OPTI621=y
CONFIG_BLK_DEV_PDC202XX=y
CONFIG_PDC202XX_BURST=y
CONFIG PDC202XX MASTER=y
551
CONFIG_BLK_DEV_SIS5513=y
CONFIG_BLK_DEV_TRM290=y
CONFIG_BLK_DEV_VIA82CXXX=y
# CONFIG_VIA82CXXX_TUNING is. not set
# CONFIG_IDE_CHIPSETS is not set
CONFIG_IDEDMA_IVB=y
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_NBD=m
CONFIG_BLK_DEV_MD=y
CONFIG_AUTODETECT_RAID=y
CONFIG_MD_LINEAR=mi
CONFIG_MD_STRIPED=m
CONFIG_MD_MIRRORING=m
CONFIG_MD_RAID5=m
I CONFIG_MD_TRANSLUCENT is not set
# CONFIG_MD_HSM is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE= 4 0 9 6
CONFIG_BLK_DEV_INITRD=y
CONFIG_BLK_DEV_XD=m
CONFIG_BLK_DEV_DAC960=m
CONFIG_PARIDE_PARPORT=m
CONFIG_PARIDE=m
CONFIG_PARIDE_PD=m
CONFIG_PARIDE_PCD=m
CONFIG_PARIDE_PF=m
CONFIG_PARIDE_PT=m
CONFIG_PARIDE_PG=m
CONFIG_PARIDE_ATEN=m
CONFIG_PARIDE_BPCK=m
CONFIG_PARIDE_COMM=m
CONFIG_PARIDE_DSTR=m
CONFIG_PARIDE_FIT2=m
CONFIG_PARIDE_FIT3=m
CONFIG_PARIDE_EPAT=m
CONFIG_PARIDE_EPIA=m
CONFIG_PARIDE_FRIQ=m
CONFIG_PARIDE_FRPW=m
CONFIG_PARIDE_KBIC=m
CONFIG_PARIDE_KTTI=m
CONFIG_PARIDE_ON20=m
CONFIG_PARIDE_ON26=m
CONFIG_BLK_DEV_IDE_MODES=y
CONFIG_BLK_C PQ_DA=m
CONFIG_BLK_CPQ_CIS S_DA=m
# CONFIG_BLK_DEV_HD is not set
#
# Networking options
#
552
CONFIG_PACKET=y
CONFIG_NETLINK=y
CONFIG_RTNETLINK=y
CONFIG_NETLINK_DEV=y
CONFIG_FIREWALL=y
CONFIG_FILTER=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_RTNETLINK=y
CONFIG_NETLINK=y
# CONFIG_IP_MULTIPLE_TABLES is not set
f CONFIG_IP_ROUTE_MULTIPATH is not set
# CONFIG_IP_ROUTE_TOS is not set
# CONFIG_IP_ROUTE_VERBOSE is not set
# CONFIG_IP_ROUTE_LARGE_TABLES is not set
# CONFIG_IP_PNP is not set
CONFIG_IP_FIREWALL=y
CONFlG_IP_FIREWALL_NETLINK=y
CONFIG_NETLINK_DEV=y
CONFIG_IP_TRANSPARENT_PROXY=y
CONFIG_IP_MASQUERADE=y
CONFIG_IP_MASQUERADE_ICMP=y
CONFIG_IP_MASQUERADE_MOD=y
CONFIG_IP_MASQUERADE_IPAUTOFW=m
CONFIG_IP_MASQUERADE_IPPORTFW=m
CONFIG_IP_MASQUERADE_MFW=m
CONFIG_IP_MASQUERADE_PPTP=m
# CONFIG_DEBUG_IP_MASQUERADE_PPTP is not set
# CONFIG_IP_MASQUERADE_IPSEC is not set
# CONFIG_IP_MASQUERADE_GENERIC is not set
CONFIG_IP_MASQUERADE_VS=y
CONFIG_IP_MASQUERADE_VS_TAB_BITS=12
CONFIG_IP_MASQUERADE_VS_RR=m
CONFIG_IP_MASQUERADE_VS_WRR=m
CONFIG_IP_MASQUERADE_VS_LC=m
CONFIG_IP_MASQUERADE_VS_WLC=m
# CONFIG_IP_ROUTER is not set
CONFIG_NET_IPIP=m
CONFIG_NET_IPGRE=m
CONFIG_NET_IPGRE_BROADCAST=y
# CONFIG_IP_MROUTE is not set
CONFIG_IP_ALIAS=y
# CONFIG_ARPD is not set
CONFIG_SYN_COOKIES=y
CONFIG_INET_RARP=m
CONFIG_SKB_LARGE=y
CONFIG_IPV6=m
CONFIG IPV6 EUl64=y
553
CONFIG_IPV6_NO_PB=y .
CONFIG_IPX=m
# CONFI,G_IPX_INTERN is not set
# CONFIG_SPX is not set
CONFIG_ATALK=m
# CONFIG_X25 is not set
CONFIG_LAPB=m
# CONFIG_BRIDGE is not set
# CONFIG_LLC is not set
# CONFIG_ECONET is not set
CONFIG_WAN_ROUTER=m
# CONFIG_NET_FASTROUTE is not set
# CONFIG_NET_HW_FLOWCONTROL is not set
# CONFIG_CPU_IS_SLOW is not set
#
# QoS and/or fair queueing
I
# CONFIG_NET_SCHED is not set
#
# Telephony Support
t
CONFIG_PHONE=m
CONFIG PHONE IXJ=m
# SCSI support
f
CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_ST=m
CONFIG_BLK_DEV_SR=y
CONFIG_BLK_DEV_SR_VENDOR=y
CONFIG_CHR_DEV_SG=m
# CONFIG_SCSI_MULTI_LUN is not set
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
#
# SCSI low-level drivers
#
CONFIG_BLK_DEV_3W_XXXX_RAID=m
CONFIG_SCSI_7000FASST=m
CONFIG_SCSI_ACARD=m
CONFIG_SCSI_AHA152X=m
CONFIG_SCSI_AHA1542=m
CONFIG_SCSI_AHA1740=m
CONFIG_SCSI_AACRAID=m
CONFIG SCSI AIC7XXX=m
554
# CONFIG_AIC7XXX_TCQ_ON_BY_DEFAULT is not set
CONFIG_AIC7XXX_CMDS_PER_DEVICE=8
CONFIG_AIC7XXX_PROC_STATS=y
CONFIG_AIC7XXX_RESET_DELAY=5
CONFIG_SCSI_IPS=m
CONFIG_SCSI_ADVANSYS=m
CONFIG_SCSI_IN2000=m
CONFIG_SCSI_AM53C974=m
CONFIG_SCSI_MEGARAID=m
CONFIG_SCSI_BUSLOGIC=m
# CONFIG_SCSI_OMIT_FLASHPOINT is not set
CONFIG_SCSI_CPQFCTS=m
CONFIG_SCSI_DTC3280=m
CONFIG_SCSI_DPT_I20=m
CONFIG_SCSI_EATA=m
CONFIG_SCSI_EATA_TAGGED_QUEUE=y
# CONFIG_SCSI_EATA_LINKED_COMMANDS is -not set
CONFIG_SCSI_EATA_MAX_TAGS=1
CONFIG_SCSI_EATA_DMA=m
CONFIG_SCSI_EATA_PIO=m
CONFIG_SCSI_FUTURE_DOMAIN=m
CONFIG_S SI_GDTH=m
CONFIG_SCSI_GENERIC_NCR5380=m
t CONFIG_SCSI_GENERIC_NCR53C400 is not set
CONFIG_SCSI_G_NCR5380_PORT=y
# CONFIG_SCSI_G_NCR5380_MEM is not set
CONFIG_SCSI_INITIO=m
CONFIG_SCSI_INIA100=m
CONFIG_SCSI_PPA=m
CONFIG_SCSI_IMM=m
# CONFIG_SCSI_IZIP_EPP16 is not set
# CONFIG_SCSI_IZIP_SLOW_CTR is not set
CONFIG_PPSCSI=m
CONFIG_PPSCSI_T348=m
CONFIG_PPSCSI_T358=m
CONFIG_PPSCSI_ONSCSI=ra
CONFIG_PPSCSI_SPARCSI=m
CONFIG_PPSCSI_EPSA2=m
CONFIG_PPSCSI_EPST=m
CONFIG_SCSI_NCR53C406A=m
CONFIG_SCSI_SYM53C416=m
CONFIG_SCSI_SIM710=m
CONFIG_SCSI_NCR53C7xx=m
t CONFIG_SCSI_NCR53C7xx_sync is not set
CONFIG_SCSI_NCR53C7xx_FAST=y
CONFIG_SCSI_NCR53C7xx_DISCONNECT=y
CONFIG_SCSI_NCR5 3C8XX=m
CONFIG_SCSI_SYM53C8XX=m
CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8
CONFIG SCSI NCR53C8XX MAX TAGS=32
555
CONFIG_SCSI_NCR53C8XX_SYNC=20
CONFIG_SCSI_NCR53C8XX_PROFILE=y
# CONFIG_SCSI_NCR53C8XX_IOMAPPED_ is not set
# CONFIG_SCSI_NCR53C8XX_PQS_PDS is not set
f CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT is not set
CONFIG_SCSI_PAS16=m
CONFIG_SC SI_PC12 =m
CONFIG_SCSI_PCI2220I=m
CONFIG_SCSI_PSI240l=m
CONFIG_SCSI_QLOGIC_FAS=m
CONFIG_SCSI_QLOGIC_ISP=m
CONFIG_SCSI_QLOGIC_1280=m
CONFIG_SCSI_QLOGIC_FC=m
CONFIG_SCSI_QLOGIC_2xOO=m
CONFIG_SCSI_SEAGATE=m
CONFIG_SCSI_DC395x_TRMS1040=m
CONFIG_SCSI_DC3 9 OT=m
# CONFIG_SCSI_DC390T_NOGENSUPP is not set
CONFIG_SCSI_T128=m
CONFIG_SCSI_U14_34F=m
# CONFIG_SCSI_U14_34F_LINKED_COMMANDS is not set
CONFIG_SCSI_U14_34F_MAX_TAGS=8
CONFIG_SCSI_ULTRASTOR=m
CONFIG SCSI DEBUG=m
t 120 device support
#
CONFIG_l20=m
CONFIG_I20_PCI=m
CONFIG_l20_BLOCK=m
CONFIG_I20_SCSI=m
I
# IEEE 1394 (FireWire) support
#
CONFIG_IEEE1394=m
CONFIG_IEEE139 4_PCILYNX=m
CONFIG_IEEE1394_PCILYNX_LOCALRAM=y
CONFIG_IEEE1394_PCILYNX_PORTS=y
CONFIG_IEEE1394_AIC5800=m
CONFIG_IEEE1394_OHCI1394=m
CONFIG_IEEE1394_VIDE01394=m
CONFIG_IEEE1394_RAWIO=m
# CONFIG_IEEE1394_VERBOSEDEBUG is not set
t
# Network device support
i
CONFIG NETDEVICES=y
556
#
# ARCnet devices
#
# CONFIG_ARCNET is not set
CONFIG_DUMMY=m
CONFIG_BONDING=m
CONFIG_EQUALIZER=m
CONFIG_ETHERTAP=m
CONFIG_NET_SB1000=m
#
# Ethernet (10 or lOOMbit)
#
CONFIG_NET_ETHERNET=y
CONFIG_NET_VENDOR_3COM=y
CONFIG_ELl=m
CONFIG_EL2=m
CONFIG_ELPLUS=m
CONFIG_EL16=m
CONFIG_EL3=m
CONFIG_3C515=m
CONFIG_BC90X=m
CONFIG_VORTEX=m
CONFIG_LANCE=m
CONFIG_NET_VENDOR_SMC=y
CONFIG_WD80x3=m
CONFIG_ULTRA=m
CONFIG_ULTRA32=m
CONFIG_SMC9194=m
CONFIG_NET_VENDOR_RACAL=y
CONFIG_NI5010=m
CONFIG_NI52=m
CONFIG_NI65=m
CONFIG_RTL8139=m
CONFIG_RTL8139TOO=m
CONFIG_NET_ISA=y
CONFIG_AT1700=m
CONFIG_E2100=m
CONFIG_DEPCA=m
CONFIG_EWRK3=m
CONFIG_EEXPRESS=m
CONFIG_EEXPRES S_PRO=m
CONFIG_FMV18X=m
CONFIG_HPLAN_PLUS=m
CONFIG_HPLAN=m
CONFIG_HP100=m
CONFIG_ETH16I=m
CONFIG_NE2000=m
# CONFIG_SEEQ8005 is not set
CONFIG_SK_G16=y
557
CONFIG_NET_EISA=y
CONFI.G_PCNET32=m
CONFIG_AC3200=m
CONFIG_APRICOT=m
CONFIG_CS89xO=m
CONFIG_DM9102=m
CONFIG_DE4X5=m
CONFIG_DEC_ELCP=m
CONFIG_DEC_ELCP_OLD=m
CONFIG_DGRS=m
CONFIG_EEXPRESS_PR0100=m
CONFIG_E100=m
CONFIG_EEXPRESS_PR01000=m
CONFIG_LNE390=m
CONFIG_NE3210=m
CONFIG_NE2K_PCI=m
CONFIG_RL100ATX=m
CONFIG_TLAN=m
CONFIG_VIA_RHINE=m
CONFIG_SIS900=m
CONFIG_ES3210=m
CONFIG_EPIC100=m
# CONFIG_ZNET is not set
CONFIG_NET_POCKET=y
CONFIG_ATP=y
CONFIG_DE600=m
CONFIG DE620=m
#
CONFIG_LTPC=m
CONFIG_COPS=m
CONFIG_COPS_DAYNA=y
CONFIG_COPS_TANGENT=y
CONFIG_IPDDP=m
CONFIG_IPDDP_ENCAP=y
CONFIG_IPDDP_DECAP=y
558
CONFIG_PLIP=m
CONFIG_PPP=m
CONFIG_SLIP=m
CONFIG_SLIP_COMPRESSED=y
CONFIG_SLIP_SMART=y
CONFIG_SLIP_MODE_SLIP6=y
CONFIG_CIPE=m
CONFIG_NET_PADIO=y
CONFIG_STRIP=m
CONFIG_WAVELAN=m
CONFIG_ARLAN=m
#
# Token ring devices
I
CONFIG_TR=y
CONFIG_IBMTR=m
CONFIG_IBMLS=m
CONFIG_IBMOL=m
CONFIG_SKTR=m
CONFIG_NET_FC=y
CONFIG_IPHASE5526=m
CONFIG_RCPCI=m
CONFIG_SHAPER=m
f
# Wan interfaces
#
CONFIG_HOSTESS_SVll=m
CONFIG_COSA=m
CONFIG_SEALEVEL_4021=m
CONFIG_SYNCLINK_SYNCPPP=m
CONFIG_LANMEDIA=m
CONFIG_COMX=m
CONFIG_COMX_HW_COMX=m
CONFIG_COMX_HW_LOCOMX=m
CONFIG_COMX_HW_MIXCOM=m
CONFIG_COMX_PROTO_PPP=m
CONFIG_COMX_PROTO_LAPB=m
CONFIG_COMX_PROTO_FR=m
CONFIG_HDLC=m
CONFIG_N2=m
CONFIG_C101=m
CONFIG_WANXL=m
CONFIG_PC300=m
CONFIG_PC300_X25=y
CONFIG_DLCI=m
CONFIG_DLCI_COUNT=24
CONFIG_DLCI_MAX=8
CONFIG SDLA=m
559
.,
.
CONFIG_WAN_DRIVERS=y
CONFIG_VENDOR_SANGOMA=m
CONFIG_WANPIPE_CARDS=4
# CONFIG_WANPIPE_FR is not set
CONFIG_WANPIPE_PPP=y
CONFIG_WANPIPE_CHDLC=y
CONFIG_SBNI=m
#
# Amateur Radio support
#
# CONFIG_HAMRADIO is not set
t
# IrDA (infrared) support
#
CONFIG_IRDA=m
CONFIG_IRLAN=m
CONFIG_IRCOMM=m
CONFIG_IRDA_ULTRA=y
CONFIG_IRDA_OPTIONS=y
CONFIG_IRDA_CACHE_LAST_LSAP=y
CONFIG_IRDA_FAST_RR=y
f CONFIG_IRDA_DEBUG is not set
CONFIG_IRDA_COMPRESSION=y
CONFIG_IRDA_DEFLATE=m
#
# Infrared-port device drivers
#
CONFIG_IRTTY_SIR=m
CONFIG_IRPORT_SIR=m
CONFIG_NSC_FIR=m
CONFIG_WINBOND_FIR=m
CONFIG_TOSHIBA_FIR=m
CONFIG_SMC_IRCC_FIR=m
CONFIG_DONGLE=y
CONFIG_ESI_DONGLE=m
CONFIG_ACTISYS_DONGLE=m
CONFIG_TEKRAM_DONGLE=m
CONFIG_GIRBIL_DONGLE=m
CONFIG_LITELINK_DONGLE=m
CONFIG_OLD_BELKIN_DONGLE=m
CONFIG_AIRPORT_DONGLE=m
#
# ISDN subsystem
#
CONFIG_ISDN=m
CONFIG_ISDN_PPP=y
560
>
CONFIG_ISDN_PPP_VJ=y
CONFIG_ISDN_MPP=y
CONFIG_ISDN_AUDIO=y
# CONFIG_ISDN_TTY_FAX is not set
t
# ISDN feature submodules
#
CONFIG_IS DN_DRV_LOOP=m
# CONFIG ISDN DIVERSION is not set
# Passive ISDN cards
#
CONFIG_ISDN_DRV_HISAX=m
CONFIG_HISAX_EURO=y
CONFIG_DE_AOC=y
# CONFIG_HISAX_NO_SENDCOMPLETE is not set
# CONFIG_HISAX_NO_LLC is not set
# CONFIG_HISAX_NO_KEYPAD is not set
CONFIG_HISAX_lTR6=y
CONFIG_HISAX_NIl=y
CONFIG_HISAX_16_0=y
CONFIG_HISAX_16_3=y
CONFIG_HISAX_TELESPCI=y
CONFIG_HISAX_SOBOX=y
CONFIG_HISAX_AVM_Al=y
CONFIG_HISAX_FRITZPCI=y
CONFIG_HISAX_AVM_A1_PCMCIA=y
CONFIG_HISAX_ELSA=y
CONFIG_HISAX_IXlMICROR2=y
CONFIG_HISAX_DIEHLDIVA=y
CONFIG_HISAX_ASUSCOM=y
CONFIG_HISAX_TELEINT=y
CONFIG_HISAX_HFCS=y
CONFIG_HISAX_SEDLBAUER=y
'CONFIG_HISAX_SPORTSTER=y
CONFIG_HISAX_MIC=y
CONFIG_HISAX_NETJET=y
CONFIG_HISAX_NETJET_U=y
CONFIG_HISAX_NICCY=y
CONFIG_HISAX_ISURF=y
CONFIG_HISAX_HSTSAPHIR=y
CONFIG_HISAX_BKM_A4T=y
CONFIG_HISAX_SCT_QUADRO=y
CONFIG_HISAX_GAZEL=y
CONFIG_HISAX_HFC_PCI=y
CONFIG_HISAX_W6692=y
# CONFIG HISAX HFC SX is not set
561
#
# Active ISDN cards
#
CONFIG_ISDN_DRV_ICN=m
CONFIG_ISDN_DRV_PCBIT=m
# CONFIG_ISDN_DRV_SC is not set
# CONFIG_ISDN_DRV_ACT2000 is not set
CONFIG_ISDN_DRV_EICON=m
CONFIG_ISDN_DRV_EICON_ISA=y
CONFIG_ISDN_CAPI=m
CONFIG_ISDN_CAPI_MIDDLEWARE?=y
CONFIG_ISDN_CAPIFS=y
CONFIG_ISDN_DRV_AVMBl_BlISA=y
CONFIG_ISDN_DRV_AVMBl_BlPCI=y
CONFIG_ISDN_DRV_AVMBl_BlPCIV4=y
CONFIG_ISDN_DRV_AVMBl_TlISA=y
CONFIG_ISDN_DRV_AVMBl_BlPCMCIA=y
# CONFIG_ISDN_DRV_AVMB1_T1PCI is not set
# CONFIG_ISDN_DRV_AVMB1_C4 is not set
CONFIG_ISDN_DRV_AVMBl_VERBOSE_REASON=y
i
i Old CD-ROM drivers (not SCSI, not IDE)
#
# CONFIG CD NO IDESCSI is not set
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_SERIAL_CONSOLE=y
CONFIG_SERIAL_EXTENDED=y
CONFIG_SERIAL_MANY_PORTS=y
CONFIG_SERIAL_SHARE_IRQ=y
# CONFIG_SERIAL_DETECT_IRQ is not set
CONFIG_SERIAL_MULTIPORT=y
# CONFIG_HUB6 is not set
CONFIG_SERIAL_NONSTANDARD=y
CONFIG_COMPUTONE=m
CONFIG_ROCKETPORT=m
CONFIG_CYCLADES=m
# CONFIG_CYZ_INTR is not set
CONFIG_DIGIEPCA=m
CONFIG_ESPSERIAL=m
CONFIG_MOXA_INTELLIO=m
CONFIG_MOXA_SMARTI0=m
CONFIG_ISI=m
CONFIG RISCOM8=m
562
CONFIG_SPECIALIX=m
CONFIG_SPECIALIX_RTSCTS=y
CONFIG_SX=m
CONFIG_RIO=m
CONFIG_RIO_OLDPCI=y
CONFIG_STALDRV=y
CONFIG_STALLION=m
CONFIG_ISTALLION=m
CONFIG_SYNCLINK=m
CONFIG_N_HDLC=m
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
CONFIG_PRINTER=m
CONFIG_PRINTER_READBACK=y
CONFIG_MOUSE=y
#
i Mice
f
CONFIG_ATIXL_BUSMOUSE=m
CONFIG_BUSMOUSE=m
CONFIG_MS_BUSMOUSE=m
CONFIG_PSMOUSE=y
CONFIG_82C710_MOUSE=m
CONFIG_PC110_PAD=m
#
t Joysticks
tt
CONFIG_JOYSTICK=m
CON FI G_JOY_ANALOG=m
CONFIG_JOY_ASSASSIN=m
CONFIG_JOY_GRAVIS=m
CONFIG_JOY_LOGITECH=m
CONFIG_JOY_SIDEWINDER=m
CONFIG_JOY_THRUSTMASTER=m
CONFIG_JOY_CREATIVE=m
CONFIG_JOY_LIGHTNING=m
CONFIG_JOY_PCI=m
CONFIG_JOY_MAGELLAN=m
CONFIG_JOY_SPACEORB=m
CONFIG_JOY_S PACEBALL=m
CONFIG_JOY_WARRIOR=m
CONFIG_JOY_CONSOLE=m
CONFIG_JOY_DB9=m
CONFIG_JOY_TURBOGRAFX=m
# CONFIG_QIC02_TAPE is not set
CONFIG WATCHDOG=y
563
I Watchdog Cards
#
# CONFIG_WATCHDOG_NOWAYOUT is not set
CONFIG_WDT=m
I CONFIG_WDT_501 is not set
CONFIG_SOFT_WATCHDOG=m
CONFIG_PCWATCHDOG=m
CONFIG_ACQUIRE_WDT=m
CONFIG_60XX_WDT=m
CONFIG_MIXCOMWD=m
CONFIG_NVRAM=m
CONFIG_RTC=y
#
I I2C support
f
CONFIG_I2C=m
CONFIG_I2C_ALGOBIT=m
CONFIG_I2C_PHILIPSPAR=m
CONFIG_l2C_ELV=m
CONF'lG_I2C_VELLEMAN=m
CONFIG_I2C_ALGOPCF=m
CONFIG_I2C_ELEKTOR=m
CONFIG_I2C_MAINBOARD=y
CONFIG_I2C_ALI15X3=m
CONFIG_I2C_HYDRA=m
CONFIG_I2C_PIIX4=m
CONFIG_I2C_VIA=m
CONFIG_I2C_ISA=m
CONFIG_I2C_CHARDEV=m
#
# Hardware sensors support
#
CONFIG_SENSORS=m
CONFIG_SENSORS_ADM1021=m
CONFIG_SENSORS_ADM9240=m
CONFIG_SENSORS_GL518 SM=m
CONFIG_SENSORS_LM75=m
CONFIG_SENSORS_LM78=m
CONFIG_SENSORS_LM80=m
CONFIG_SENSORS_SIS5595=m
CONFIG_SENSORS_W83781D=m
CONFIG_SENSORS_OTHER=y
CONFIG_SENSORS_EEPROM=m
CONFIG_SENSORS_LTC1710=m
CONFIG_AGP=m
CONFIG_AGP_INTEL=y
CONFIG AGP I810=y
564
CONFIG_AGP_VIA=y
CONFIG_AGP_AMD=y
CONFIG_AGP_SIS=y
CONFIG_AGP_ALI=y
CONFIG_DRM=y
CONFIG_DRM_TDFX=m
CONFIG_DRM_GAMMA=m
CONFIG_DRM_R128=m
CONFIG_DRM_l810=m
CONFIG DRM MGA=m
I Video For Linux
i
CONFIG_VIDEO_DEV=m
CONFIG_RADIO_RTRACK=m
CONFIG_RADIO_RTRACK2=m
CONFIG_RADIO_AZTECH=m
CONFIG_RADIO_CADET=m
CONFIG_RADIO_MIROPCM20=m
CONFIG_RADIO_GEMTEK=m
CONFIG_RADIO_TRUST=m
CONFIG_VIDEO_BT848=m
CONFIG_VIDEO_BWQCAM=m
CONFIG_VIDEO_CQCAM=m
CONFIG_VIDEO_CPIA=m
CONFIG_VIDEO_CPIA_PP=m
CONFIG_VIDEO_CPIA_USB=m
CONFIG_VIDEO_PMS=m
CONFIG_VIDEO_SAA5249=m
CONFIG_RADIO_SF16FMI=m
CONFIG_RADIO_TYPHOON=m
CONFIG_RADIO_TYPHOON_PROC_FS=y
CONFIG_RADIO_ZOLTRIX=m
CONFIG_VIDEO_ZORAN=m
CONFIG_VIDEO_BUZ=m
CONFIG_DTLK=m
#
# Ftape, the floppy tape device driver
#
CONFIG_FTAPE=m
CONFIG_ZFTAPE=m
CONFIG_ZFT_DFLT_BLK_SZ=10240
CONFIG_ZFT_COMPRESSOR=ra
CONFIG_FT_NR_BUFFERS=3
# CONFIG_FT_PROC_FS is not set
CONFIG_FT_NORMAL_DEBUG=y
# CONFIG_FT_FULL_DEBUG is not set
# CONFIG FT NO TRACE is not set
565
# CONFIG_FT_NO_TRACE_AT_ALL is not set
CONFIG_FT_STD_FDC=y
# CONFIG_FT_MACH2 is not set
# CONFIG_FT_PROBE_FC10 is not set
t CONFIG_FT_ALT_FDC is not set
CONFIG_FT_FDC_THR= 8
CONFIG_FT_FDC_MAX_RATE=2
CONFIG_FT_ALPHA_CLOCK=0
# CONFIG_UNIKEY is not set
#
# USB support
#
CONFIG_USB=m
# CONFIG_USB_DEBUG is not set
CONFIG_USB_DEVICEFS=y
CONFIG_USB_BANDWIDTH=y
CONFIGJJSB_UHCI=m
CONFIG_USB_UHCI_ALT=m
CONFIG_USB_OHCI=m
CONFIG_USB_PRINTER=m
CONFIG_USB_SCANNER=m
CONFIG_USB_AUDIO=m
CONFIG_USB_ACM=m
CONFIG_USB_SERIAL=m
CONFIG_USB_SERIAL_GENERIC=y
CONFIG_USB_SERIAL_VISOR=ra
CONFIG_USB_SERIAL_WHITEHEAT=m
CONFIG_USB_SERIAL_FTDI_SIO=m
CONFIG_USB_SERIAL_KEYSPAN_PDA=m
CONFIG_USB_SERIAL_KEYSPAN=m
CONFIG_USB_SERIAL_KEYSPAN_USA28=y
CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
CONFIG_USB_SERIAL_KEYSPAN_USA19=y
CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
CONFIG_USB_SERIAL_OMNINET=m
CONFIG_USB_SERIAL_DEBUG=y
CONFIG_USB_IBMCAM=m
CONFIG_USB_OV511=m
CONFIG_USB_DC2XX=m
CONFIG_USB_MDC800=m
CONFIG_USB_STORAGE=m
# CONFIG_USB_STORAGE_DEBUG is not set
CONFIG_USB_DABUSB=m
CONFIG_USB_PLUSB=m
CONFIG_USB_PEGASUS=m
CONFIG_USB_RI0500=m
CONFIG_USB_DSBR=m
CONFIG USB BLUETOOTH=m
566
CONFIG_USB_KAWETH=m
CONFIG_USB_HID=m
CONFIG_USB_KBD=ra
CONFIG_USB_MOUSE=m
CONFIG_USB_WACOM=m
CONFIG_USB_WMFORCE=m
CONFIG_INPUT_KEYBDEV=m
CONFIG_INPUT_MOUSEDEV=m
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_INPUT_JOYDEV=m
CONFIG_INPUT_EVDEV=m
#
# Filesystems
#
CONFIG_QUOTA=y
CONFIG_AUTOFS_FS=m
CONFIG_SUPERMOUNT=m
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
CONFIG_HFS_FS=m
CONFIG_FAT_FS=m
CONFIG_MSDOS_FS=m
# CONFIG_UMSDOS_FS is not set
CONFIG_VFAT_FS=m
CONFIG_IS09660_FS=y
CONFIG_JOLIET=y
CONFIG_UDF_FS=m
# CONFIG_UDF_RW is not set
CONFIG_MINIX_FS=m
CONFIG_NTFS_FS=m
# CONFIG_NTFS_RW is not set
CONFIG_HPFS_FS=m
CONFIG_PROC_FS=y
CONFIG_DEVPTS_FS=y
# CONFIG_QNX4FS_FS is not set
CONFIG_ROMFS_FS =m
CONFIG_EXT2_FS=y
CONFIG_SYSV_FS=m
CONFIG_UFS_FS=m
# CONFIG_UFS_FS_WRITE is not set
CONFIG_REISERFS_FS=m
# CONFIG_REISERFS_CHECK is not set
CONFIG_EFS_FS=m
CONFIG_SGI_PARTITION=y
I
# Network File Systems
i
CONFIG CODA FS=m
567
CONFIG_NFS_FS=m
CONFIG_NFSD=m
CONFIG_NFSD_SUN=y
CONFIG_SUNRPC=m
CONFIG_LOCKD=m
CONFIG_SMB_FS=m
CONFIG_NCP_FS=m
CONFIG_NCPFS_PACKET_SIGNING=y
CONFIG_NCPFS_IOCTL_LOCKING=y
CONFIG_NCPFS_STRONG=y
CONFIG_NCPFS_NFS_NS=y
CONFIG_NCPFS_OS2_NS=y
CONFIG_NCPFS_SMALLDOS=y
CONFIG_NCPFS_MOUNT_SUBDIR=y
CONFIG_NCPFS_NLS=y
CONFIG_NCPFS_EXTRAS=y
# Partition Types
I
CONFIG_BSD_J5ISKLABEL=y
CONFIG_MAC_PARTITION=y
CONFIG_SMD_DISKLABEL=y
CONFIG_SOLARIS_X86_PARTITION=y
CONFIG_UNIXWARE_DISKLABEL=y
CONFIG_NLS=y
#
# Native Language Support
#
CONFIG_NLS_DEFAULT="cp437"
CONFIG_NLS_CODEPAGE_437=m
CONFIG_NLS_CODEPAGE_737=m
CONFIG_NLS_CODEPAGE_775=m
CONFIG_NLS_CODEPAGE_850=m
CONFIG_NLS_CODE PAGE_8 5 2 =m
CONFIG_NLS_CODEPAGE_855=m
CONFIG_NLS_CODEPAGE_857=m
CONFIG_NLS_CODEPAGE_860=m
CONFIG_NLS_CODEPAGE_861=m
CONFIG_NLS_CODEPAGE_8 62=m
CONFIG_NLS_CODEPAGE_8 63=m
CONFIG_NLS_CODEPAGE_864=m
CONFIG_NLS_CODEPAGE_865=m
CONFIG_NLS_CODEPAGE_866=m
CONFIG_NLS_CODEPAGE_869=m
CONFIG_NLS_CODEPAGE_874=m
CONFIG_NLS_CODEPAGE_932=m
CONFIG_NLS_CODEPAGE_936=m
CONFIG NLS CODEPAGE 949=m
568
CONFIG_NLS_CODEPAGE_950=m
CONFIG_NLS_IS08859_l=m
CONFIG_NLS_IS08859_2=m
CONFIG_NLS_IS08859_3=m
CONFIG_NLS_IS08859_4=m
CONFIG_NLS_IS08859_5=m
CONFIG_NLS_IS08859_6=m
CONFIG_NLS_IS08859_7=m
CONFIG_NLS_IS08859_8=m
CONFIG_NLS_IS08859_9=m
CONFIG_NLS_IS08859_14=m
CONFIG_NLS_IS08859_15=m
CONFIG_NLS_KOI8_R=m
t
# Console drivers
#
CONFIG_VGA_CONSOLE=y
CONFIG_VIDEO_SELECT=y
CONFlG_MDA_CONSOLE=m
CONFIG_FB=y
CONFIG_DUMMY_CONSOLE=y
# CONFIG_UNICON is not set
CONFIG_FB_PM2=m
CONFIG_FB_ATY=m
CONFIG_FB_VESA=y
# CONFIG_FB_VGA16 is not set
CONFIG_VIDEO_SELECT=y
CONFIG_FB_MATROX=m
CONFIG_FB_MATROX_MILLENIUM=y
CONFIG_FB_MATROX_MYSTIQUE=y
CONFIG_FB_MATROX_G100=y
CONFIG_FB_MATROX_MULTIHEAD=y
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_VIRTUAL is not set
# CONFIG_FBCON_ADVANCED is not set
CONFIG_FBCON_CFB8=y
CONFIG_FBCON_CFB16=y
CONFIG_FBCON_CFB2 4 =y
CONFIG_FBCON_CFB32=y
# CONFIG_/BCON_FONTWIDTH8_ONLY is not set
tt CONFIG_FBCON_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8xl6=y
#
# Sound
#
CONFIG_SOUND=m
CONFIG SOUND CMPCI=m
569
CONFIG_SOUND_CMPCI_FM=y
CONFIG_SOUND_CMPCI_MIDI=y
CONFIG_SOUND_CS4281=m
CONFIG_SOUND_FUSION=m
CONFIG_SOUND_EMU10Kl=m
CONFIG_SOUND_ES1370=m
CONFIG_SOUND_ES1371=m
CONFIG_SOUND_MAESTRO=m
CONFIG_SOUND_ESSSOL01=m
CONFIG_SOUND_ICH=m
CONFIG_SOUND_SONICVIBES=m
CONFIG_SOUND_TRIDENT=m
CONFIG_SOUND_MSNDCLAS=m
# CONFIG_MSNDCLAS_HAVE_BOOT is not set
CONFIG_MSNDCLAS_INIT_FILE="/etc/sound/msndinit.bin"
CONFIG_MSNDCLAS_PERM_FILE="/etc/sound/msndperm.bin"
CONFIG_SOUND_MSNDPIN=m
# CONFIG_MSNDPIN_HAVE_BOOT is not set
CONFIG_MSNDPIN_INIT_FILE="/etc/spund/pndspini.bin"
CONFIG_MSNDPIN_PERM_FILE="/etc/sound/pndsperm.bin"
CONFIG_SOUND_VIA82CXXX=m
CONFIG_SOUND_OSS=m
CONFIG_SOUND_PAS=m
CONFIG_SOUND_SB=m
CONFIG_SOUND_GUS=m
CONFIG_GUS16=y
CONFIG_GUSMAX=y
CONFIG_SOUND_MPU401=m
CONFIG_SOUND_PSS=m
# CONFIG_PSS_MIXER is not set
CONFIG_SOUND_MSS=m
CONFIG_SOUND_SSCAPE=m
CONFIG_SOUND_TRIX=m
CONFIG_SOUND_MAD16=m
CONFIG_MAD16_OLDCARD=y
# CONFIG_SOUND_WAVEFRONT is not set
CONFIG_SOUND_CS4232=m
CONFIG_SOUND_OPL3SA2=m
CONFIG_SOUND_MAUI=m
CONFIG_SOUND_SGALAXY=m
CONFIG_SOUND_AD1816=m
CONFIG_SOUND_OPL3SAl=m
# CONFIG_SOUND_SOFTOSS is not set
CONFIG_SOUND_YM3812=m
CONFIG_SOUND_VMIDI=m
CONFIG_SOUND_UART6850=m
CONFIG_SOUND_NM256=m
CONFIG SOUND YMPCI=m
570
.
Linux
Web-
http://www.redhat.com
http://www.linux-mandrake.com/ru
http://www.asplinux.ru
http://www.altlinux.ru
http://www.ksi-linux.com
http://www.blackcatlinux.com
http://www.calderasystems.com
http://www.terrasoftsolutions.com
http://www.suse.com
http://www.debian.org
http://www.infomagic.com
http://www.linuxppc.com
http://www.turbolinux.com
http://www.slackware.com
http://www.kernel.org
571
Linux
Linux. Ru
Linux. Ru. Net
Linux RSP Web Site (Russian Security Project)
Linux. Org.Ru
()
Linux World Kiev
Linux
Linuxoid Linux
Linux
Internet
SQUID:
Linux -
GIMP
SAG ( )
FTP- LDP (Linux Documentation Project)
Web- LDP
.
Denis Kolisnichenko's Web Site
PHP
Dago.Org
Web-
http://www.linux.ru
http://linux.ru.net
http://www.linuxrsp.ru
http ://www.linux.org .ru
http://www.softerra.ru/freeos/
http://linux.kiev.ua
http://linux.cn.ua
http://www.linuxoid.ru
http://www.nevod.ru/linux
http://www.atlas.net.ru
http://squid.opennet.ru/
http://linux-ve.chat.ru
http://gimp.linux.ru.net
http://hibase.cs.hut/fi/~liw/linux/sag
ftp://metalab.unc.edu/pub/linux/docs
http://metalab.unc.edu/LDP/
http://www.mailinfo.ru/
http://come.to/vodolaz/
http://dkws.narod.ru
http://phpclub.net
http://www.dago.org
Desktop (KDE)
GNOME
Enlighment
FVWM
Window Maker
Afterstep
Blackbox
XFce:
11
Gnome
GNU- X Window Linux
Web-
http://www.kde.org
http://www.gnome.org
http://www.enlightment.org
http://www.fvwm.org
http://www.windowmaker.org
http://www.afterstep.org
http://www.blackbox.org
http://www.xfce.org/
http://www.x1 1 .org
http://www.themes.org
http://www.xfree86.org
RPM -
Linux
GNU-
Web-
http://linuxwww.db.erau.edu
http://rpmfind.net
http://freshmeat.com
http://www.gnu.org
http://www.linuxgames.org
http://www.happypenguin.org
Quake
Open Sound Systems
HP
Java- Linux
http://www.linuxquake.org
http ://www.opensound .com
http://hpinkjet.sourceforge.net/
http://www.blackdown.org
http://www.linuxlinks.com
572
Web-
http://www.apache.ru
http://www.apache.org
http://www.proftpd.org
http://www.ics.org
http://www.isc.org/products/BIND/
http://www.sendmail.org
http://www.qmail.org
http://www.squid.org
http://www.samba.org
http://www.eudora.com/free/qpop.html
http://www.postfix.org/start.html
http://www.mosix.cs.huji. . il/txt_distribution. html
http://www.zope.org
http://www.covalent.net/projects/comanche/
http://www.aspseek.org
ftp://ftp.linuxcare.com.au/pub/ppp/
http://k12os.org/
Web-
:
CFS:
TCFS:
Generic Graphic Interface
SATAN: Security Administrators Tool for Analyzing Networks
PGP:
Secure Shell
IBM - JFS
ReiserFS 3.6.25:
SAINT
Internet
Libsafe Linux
http://www.kernel.org/pub/linux/libs/pam/index.html
ftp://ftp.research.att.com/dist/mab
http://edu-gw.dia.unisa.it/tcfs
http://synergy.caltech.edu/~ggi/
http://www.trouble.org/--zen/satan/satan.html
http://www.pgp.com
http://www.cs.hut.fi/ssh/
http://oss.software.ibm.com/developer/opensource/jfs/
http://devlinux.com/pub/namesys/
http://www.wwdsi.com/saint/
http://www.atlas.net.ru
http://www.avaya.ru/
Linux
ftp://ftp.redhat.com
ftp://updates.redhat.com
ftp://contrib.redhat.com
ftp://ftp.calderasystems.com
ftp://ftp.suse.com
ftp://ftp.debian.org
ftp://ftp.linuxppc.com
ftp://ftp.turbolinux.com
http://schoolforge.net/
http://richtech.ca/seul/
573
Web-
http://www.lwn.com
http://www.linux.com
http://www.linuxtoday.com
http://www.linuxpower.org
http://www.linuxfocus.org
http ://www.linuxworld .org
http://www.linuxmail.org
http://www.linuxjournal.org
http://www.linuxgazette.org
http://www.linux.org
http://www.li.org
http://www.uk.linux.org
http://www.kernelnotes.org
http://slashdot.org
http://www.linuxnews.ru
http://webwatcher.org
http://linux.ru.net
http://www.linux-online.ru
http://www.linux.ru
comp.os.linux.announce
comp.os.linux.development.apps
Linux-.
, Linux.
comp.os.linux.development.system....TO .
comp.os.linux.hardware
, Linux.
comp.os.linux.admin
.
comp.os.linux.misc
.
comp.os.linux.setup
Linux.
comp.os.linux.networking
Linux .
Oracle
Sybase
IBM - DB2
Informix for Linux
Ingress II
AdabasD
MySQL
GNU SQL
InterBase SQL Server
PostgreSQL
Falgship xBase
Gaby Gnome
574
Web-
http://www.oracle.com
http://www.sybase.com
http://www.software.ibm.com/data/db2/
http://www.informix.com/linux
http://www.cai.com/products/ingres.htm
http://www.softwareag.com
http://www.mysql.com
http://www.ispras.ru/~kml/gss
http://www.borland.com
http://www. postgresql .org
http://www.fship.com/free.html
http://gaby.netpedia.net
Web-
Office
Corel (WordPerfect, Corel Linux)
Star Office
Gnome Workshop Project
http://koffice.kde.org
http://linux.corel.com
http://www.stardivision.com
http://www.gnome.org/gw.html
http://www.openoffice.org/dev_docs/
OpenOffice
source/get_binaries.html
Mozilla
http://mozilla.org/releases/
Opera Web-
http://www.opera.com/download/linux.html
Netscape Communicator
http://www.netscape.com
Galeon: GNOME
http://galeon.sourceforge.net/
Amaya 4.2.1: W3C http://www.w3.org/Amaya/
Links:
http://artax.karlin.mff.cuni.cz/~mikulas/links/
Lynx:
http://lynx.browser.org
Quanta+: HTML-
http://quanta.sourceforge.net/
Balsa:
http://www.balsa.net/
Evolution:
http://www.helixcode.com/apps/evolution.php3
Sylpheed
http://sylpheed.good-day.net/
VIM
http://www.vim.org
XEmacs
http://www.xemacs.org/
Linux
Linux
, Tkc
Java-
Perl
GNOME
OpenProjects Network
Free Pascal for Linux
GTK+
Python
: Web
Web-
http://www.linuxprogramming.org
http://www.scriptics.com
http://java.sun.com
http://www.perl.com
http://developers.gnome.org
http://developer.kde.org
http://www.openprojects.nu
http://www.freepascal.org
http://www.gtk.org/
http://www.python.org/
http://phpclub.net
http://www.php.net
Bootkit
Rescue Shell Scripts
Cat Rescue
SAR Search and Rescue
SAR Search and Rescue
Yard
()-
ftp://sunsite.unc.edu/pub/Linux/system/Recovery/Bootkit-vw.tar.gz
ftp://sunsite.unc.edu/pub/Linux/system/Recovery/rescue.tgz
ftp://gd.cs.csufresno.edu/pub/sun4bin/src/CatRescue100.tgz
http://www.icce.rug.nl/karel/programs/SAR.html
ftp://ftp.icce.rug.nl/pub/unix/SAR-vw.tar.gz (vw - )
http://www.cs.umass.edu/~fawcett/yard.html
575
Pine:
Fetchmail:
Zope:
GNU Parted:
Licq: ICQ
Modutils:
Linuxconf:
NcFTP: FTP-client
FreeAmp:
LILO: Linux LOader
WINE: WIN32, WIN16 DOS
VMWare
(dos, win)
OpenGUI:
Downloader:
, ,
Web-
http://www.washington.edu/pine/
http://www.tuxedo.org/-esr/fetchmail/
http://www.zope.org
http://www.gnu.org/software/parted/parted.html
http://licq.sourceforge.net
ftp://ftp.ocs.com.aU/pub/modutils/v2.4/
http://www.solucorp.qc.ca/linuxconf/
http://www.ncftp.com/ncftp/
http://www.freeamp.org/
ftp://sd.dynhost.com/pub/linux/lilo/
ftp://metalab.unc.edu/pub/Linux/ALPHA/
wine/development/
http://www.vmware.com
http://www.bochs.com
http://www.tutok.sk/fastgl/
http://www.krasu.ru/soft/chuchelo
^F<?r<bn4
4^-A' -^ .
7,^v<y >^
^o ^Z^-^ V% Ob %, *