View | Details | Raw Unified | Return to bug 101392
Collapse All | Expand All

(-)zh_TW.Big5/books/handbook/ports/chapter.sgml (-284 / +197 lines)
Lines 94-100 Link Here
94
    <para>¨Æ¹ê¤W¡Aports ¾÷¨îÁÙ¥i¥H¥Î¨Ó²£¥Í packages¡A¥H«K¥L¤H¥i¥H¥Î 
94
    <para>¨Æ¹ê¤W¡Aports ¾÷¨îÁÙ¥i¥H¥Î¨Ó²£¥Í packages¡A¥H«K¥L¤H¥i¥H¥Î 
95
      <command>pkg_add</command> ¨Ó¦w¸Ë¡A©Î¬Oµy«á·|¤¶²Ð¨ìªº¨ä¥L®M¥óºÞ²z«ü¥O¡C</para>
95
      <command>pkg_add</command> ¨Ó¦w¸Ë¡A©Î¬Oµy«á·|¤¶²Ð¨ìªº¨ä¥L®M¥óºÞ²z«ü¥O¡C</para>
96
96
97
    <para>¦Ó packages ¥H¤Î ports ¥¦­Ì³£¬O¤@¼Ë¡A³£·|»{ <emphasis>dependencies(³nÅé¬Û¨ÌÃö«Y)</emphasis>¡C
97
    <para>¦Ó packages ¥H¤Î ports ¥¦­Ì³£¬O¤@¼Ë·|»{ <emphasis>dependencies(³nÅé¬Û¨ÌÃö«Y)</emphasis>¡C
98
      °²³]¡G±z·Q¦w¸Ë¬Yµ{¦¡¡A¦ý¥¦¦³¬Û¨Ì¥t¤@­Ó¤w¸Ëªº¨ç¦¡®w(library)¡A
98
      °²³]¡G±z·Q¦w¸Ë¬Yµ{¦¡¡A¦ý¥¦¦³¬Û¨Ì¥t¤@­Ó¤w¸Ëªº¨ç¦¡®w(library)¡A
99
      ¦Ó¦b FreeBSD ªº port ¥H¤Î package ³£¦³³oµ{¦¡¥H¤Î¸Ó¨ç¦¡®w¤F¡C
99
      ¦Ó¦b FreeBSD ªº port ¥H¤Î package ³£¦³³oµ{¦¡¥H¤Î¸Ó¨ç¦¡®w¤F¡C
100
      ©Ò¥HµL½×¬O¥Î <command>pkg_add</command> «ü¥O©ÎªÌ port ¤è¦¡¨Ó¸Ë¸Óµ{¦¡¡A
100
      ©Ò¥HµL½×¬O¥Î <command>pkg_add</command> «ü¥O©ÎªÌ port ¤è¦¡¨Ó¸Ë¸Óµ{¦¡¡A
Lines 237-269 Link Here
237
      </listitem>
237
      </listitem>
238
238
239
      <listitem>
239
      <listitem>
240
	<para>If you know the exact name of the port, but just need to
240
	<para>­Yª¾¹D¸Ó port ªº¥¿½T¦WºÙ¡A¦ý¤£ª¾¹D©ñ¦b­þ­Ó¤ÀÃþ¥Ø¿ý¡A
241
        find out which category it is in, you can use the
241
        ¥i¥H¥Î &man.whereis.1; «ü¥O¨Ó§ä¥X¨Ó¡C
242
        &man.whereis.1; command.
242
	¥u­n¥´ <command>whereis
243
	Simply type <command>whereis
243
        <replaceable>file</replaceable></command> §Y¥i¡A¦Ó 
244
        <replaceable>file</replaceable></command>, where
244
        <replaceable>file</replaceable> ªº¦a¤è½Ð§ï¬°·Q¸Ëªº³nÅé¦WºÙ¡C
245
        <replaceable>file</replaceable> is the program you want to
245
        ­Y§ä¨ì¸Ó³nÅé¡A´N·|§i¶D§A¡A´N¹³¤U­±³o¼Ë¡G</para>
246
        install.  If it is found on your system, you will be told
247
        where it is, as follows:</para>
248
246
249
      <screen>&prompt.root; <userinput>whereis lsof</userinput>
247
      <screen>&prompt.root; <userinput>whereis lsof</userinput>
250
lsof: /usr/ports/sysutils/lsof</screen>
248
lsof: /usr/ports/sysutils/lsof</screen>
251
249
252
      <para>This tells us that <command>lsof</command> (a system
250
      <para>¦p¦¹¤@¨Ó¡A´N·|ª¾¹D <command>lsof</command> (¨t²Î¤u¨ãµ{¦¡) ¬O©ñ¦b 
253
	utility) can be found in the
251
	<filename>/usr/ports/sysutils/lsof</filename> ¥Ø¿ý¡C</para></listitem>
254
	<filename>/usr/ports/sysutils/lsof</filename>
255
	directory.</para></listitem>
256
252
257
      <listitem>
253
      <listitem>
258
	<para>Yet another way to find a particular port is by using the
254
	<para>ÁÙ¦³¥t¤@©Û¡A´N¬O¥Î Ports Collection ¥»¨­¤º«Øªº·j´M¾÷¨î¡C
259
        Ports Collection's built-in search mechanism.  To use the
255
        ­n¥Îªº®É­Ô¡A½Ð¥ý¤Á´«¨ì <filename>/usr/ports</filename> ¥Ø¿ý¡C
260
        search feature, you will need to be in the
256
        µM«á¡A¥´ <command>make search 
261
        <filename>/usr/ports</filename> directory.  Once in that
257
	name=<replaceable>program-name</replaceable></command>¡A¨ä¤¤
262
        directory, run <command>make search
258
        <replaceable>program-name</replaceable> ½Ð§ï¬°·Q§äªº³nÅé¦WºÙ¡C
263
        name=<replaceable>program-name</replaceable></command> where
259
        Á|¨Ò¨Ó»¡¡A­Y­n§äªº¬O <command>lsof</command> ªº¸Ü¡A¨º»ò´N¬O¡G</para>
264
        <replaceable>program-name</replaceable> is the name of the
265
        program you want to find.  For example, if you were looking
266
        for <command>lsof</command>:</para>
267
260
268
      <screen>&prompt.root; <userinput>cd /usr/ports</userinput>
261
      <screen>&prompt.root; <userinput>cd /usr/ports</userinput>
269
&prompt.root; <userinput>make search name=lsof</userinput>
262
&prompt.root; <userinput>make search name=lsof</userinput>
Lines 275-297 Link Here
275
B-deps: 
268
B-deps: 
276
R-deps: </screen>
269
R-deps: </screen>
277
270
278
      <para>The part of the output you want to pay particular
271
      <para>³o¨Ç·j´Mµ²ªG¤¤¡A­nª`·Nªº¬O <quote>Path:</quote> ³o¦æ¡A
279
        attention to is the <quote>Path:</quote> line, since that
272
        ¦]¬°³o¦æ·|§i¶D§A¥i¥H¦b­þÃä§ä¨ì¸Ó port¡C
280
        tells you where to find the port.  The other information
273
	¦Ó·j´Mµ²ªGªº¨ä¥L³¡¤À¡A¦]¬°»P port ¦w¸Ë¸ûµLÃö«Y¡A©Ò¥H³o¸Ì´N¤£Á¿¤F¡C</para>
281
        provided is not needed in order to install the port, so it
274
282
        will not be covered here.</para>
275
      <para>­Y­n§ó¹ý©³ªº·j´M¡A¨º»ò¥i¥H§ï¥Î <command>make
283
276
        search key=<replaceable>string</replaceable></command>¡A¨ä¤¤ 
284
      <para>For more in-depth searching you can also use <command>make
277
        <replaceable>string</replaceable> ½Ð§ï¬°·Q·j´MªºÃöÁä¦r¡C
285
       search key=<replaceable>string</replaceable></command> where
278
        ¦p¦¹¤@¨Ó·|§ä port ¦WºÙ¡B³nÅ鲤¶(comments)¡B³nÅé±Ô­zÀÉ(descriptions)
286
       <replaceable>string</replaceable> is some text to search for.
279
        ¥H¤Î³nÅé¬Û¨ÌÃö«Y(dependencies)¸Ì­±¬O§_¦³²Å¦XÃöÁä¦r¡A
287
       This searches port names, comments, descriptions and
280
        ¦¹¥~¡A¤£²M·¡³nÅé¦WºÙªº¸Ü¡A¤]¥i¥H®³¨Ó§ä¦³²Å¦XÃöÁä¦r¥DÃDªº port¡C</para>
288
       dependencies and can be used to find ports which relate to a
281
289
       particular subject if you do not know the name of the program
282
      <para>­èÁ¿ªº³o¨âºØ¤è¦¡¡A·j´M¦r²´³£¬O case-insensitive(¤£¥²°Ï¤À¤j¤p¼g)¡C
290
       you are looking for.</para>
283
        ¤ñ¦p¡A·j´M <quote>LSOF</quote> »P <quote>lsof</quote> ¨âªÌµ²ªG³£·|¬O¤@¼Ëªº¡C</para>
291
292
      <para>In both of these cases, the search string is case-insensitive.
293
       Searching for <quote>LSOF</quote> will yield the same results as 
294
       searching for <quote>lsof</quote>.</para>
295
      </listitem>
284
      </listitem>
296
285
297
    </itemizedlist>
286
    </itemizedlist>
Lines 351-421 Link Here
351
&prompt.root; <userinput>pkg_add <replaceable>lsof-4.56.4.tgz</replaceable></userinput></screen>
340
&prompt.root; <userinput>pkg_add <replaceable>lsof-4.56.4.tgz</replaceable></userinput></screen>
352
      </example>
341
      </example>
353
342
354
      <para>If you do not have a source of local packages (such as a
343
      <para>­Y¤âÃä¨S¦³ package ¨Ó·½(¹³¬O FreeBSD ¥úºÐ)ªº¸Ü¡A
355
        FreeBSD CD-ROM set) then it will probably be easier to use the
344
        ¨º»ò«ØÄ³¨Ï¥Î &man.pkg.add.1; ®É¡A¥[¤W <option>-r</option> 
356
        <option>-r</option> option to &man.pkg.add.1;.  This will
345
	¿ï¶µ¨Ó§ó»´ÃP¦w¸Ë package¡C¦p¦¹¤@¨Ó¡A´N·|¦Û°Ê§PÂ_¥¿½Tªº package ®æ¦¡¡B
357
        cause the utility to automatically determine the correct
346
	¥H¤Î©Ò·f°tªº§@·~¨t²Î release ª©¥»¡A
358
        object format and release and then fetch and install the
347
	µM«á·|¦Û¤v±q FTP ¯¸§ì¦^¡B¦w¸Ë¬Û¹ïÀ³ªº package¡C
359
        package from an FTP site.
360
      </para>
348
      </para>
361
349
362
      <indexterm>
350
      <indexterm>
363
        <primary><command>pkg_add</command></primary></indexterm>
351
        <primary><command>pkg_add</command></primary></indexterm>
364
      <screen>&prompt.root; <userinput>pkg_add -r <replaceable>lsof</replaceable></userinput></screen>
352
      <screen>&prompt.root; <userinput>pkg_add -r <replaceable>lsof</replaceable></userinput></screen>
365
353
366
      <para>The example above would download the correct package and
354
      <para>¤W­±³o¨Ò¤l·|¦Û°Ê¤U¸ü¥¿½Tªº package ¨Ã¦w¸Ë¡C
367
	add it without any further user intervention.
355
	­Y·Q§ï´«¥Î¨ä¥L &os; Packages Mirror ¯¸¡A¨º»ò´N­n³]©w <envar>PACKAGESITE</envar> Àô¹ÒÅܼơA
368
	If you want to specify an alternative &os; Packages Mirror,
356
	¦p¦¹¤@¨Ó¤~·|¨ú¥N¹w³]³]©w¡C  &man.pkg.add.1;
369
	instead of the main distribution site, you have to set
357
	·|¥Î &man.fetch.3; «ü¥O¨Ó¤U¸üÀɮסA¦Ó &man.fetch.3; ¥»¨­«h·|¨Ï¥Î¬ÛÃöÀô¹ÒÅܼƪº³]©w¡A
370
	<envar>PACKAGESITE</envar> accordingly, to
358
	¹³¬O¡G
371
	override the default settings.  &man.pkg.add.1;
359
	<envar>FTP_PASSIVE_MODE</envar>¡B<envar>FTP_PROXY</envar> ¥H¤Î 
372
	uses &man.fetch.3; to download the files, which honors various
360
	<envar>FTP_PASSWORD</envar>¡C  ¦pªG§Aºô¸ôÀô¹Ò³B©ó firewall «á­±¡A©ÎªÌ»Ý­n¥Î
373
	environment variables, including
361
	FTP/HTTP proxy ªº¸Ü¡A¨º»ò´N»Ý­n³]©w¡C ³]©w²Ó¸`½Ð°Ñ¾\ &man.fetch.3;¡C
374
	<envar>FTP_PASSIVE_MODE</envar>, <envar>FTP_PROXY</envar>, and
362
	½Ðª`·N¡G¤W­±©Ò»¡ªº¨Ò¤l¬O¼g <literal>lsof</literal> ¦Ó«D 
375
	<envar>FTP_PASSWORD</envar>.  You may need to set one or more
363
	<literal>lsof-4.56.4</literal>¡C  ·í¨Ï¥Î»·ºÝ§ì¨ú¥\¯à®É¡A¸Ó package ª©¸¹´N¤£¥²¥[¤W¥h¤F¡C
376
	of these if you are behind a firewall, or need to use an
364
	&man.pkg.add.1; ·|¦Û°Ê¤U¸ü¸Ó³nÅ骺³Ì·sª©¦^¨Ó¦w¸Ë¡C</para>
377
	FTP/HTTP proxy.  See &man.fetch.3; for the complete list.
378
	Note that in the example above
379
	<literal>lsof</literal> is used instead of
380
	<literal>lsof-4.56.4</literal>.  When the remote fetching
381
	feature is used, the version number of the package must be
382
	removed.  &man.pkg.add.1; will automatically fetch the latest
383
	version of the application.</para>
384
365
385
      <note>
366
      <note>
386
	<para>&man.pkg.add.1; will download the latest version of
367
	<para>­Y¥Îªº¬O &os.current; ©Î &os.stable; ªº¸Ü¡A&man.pkg.add.1; 
387
	  your application if you are using &os.current; or
368
	  ·|¦Û°Ê¤U¸ü¸Ó³nÅé³Ì·sª©¦^¨Ó¡C
388
	  &os.stable;.  If you run a -RELEASE version, it will grab
369
	  ­Y¥Îªº¬OÄÝ©ó -RELEASE ª©¥»¡A¨º»ò¥L·|§ì¦^ÄÝ©ó¸Ó release ¤W©Ò½sĶªº package¡C
389
	  the version of the package that was built with your
370
	  ¤]¥i¥H§ó§ï <envar>PACKAGESITE</envar> Àô¹ÒÅܼơA¥H§ïÅܤU¸ü¤è¦¡¡C
390
	  release.  It is possible to change this behavior by
371
	  Á|¨Ò¨Ó»¡¡A¦pªG¬O &os;&nbsp;5.4-RELEASE ªº¸Ü¡A¨º»ò &man.pkg.add.1; ¹w³]·|±q
391
	  overriding the <envar>PACKAGESITE</envar> environment
372
	  <literal>ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-5.4-release/Latest/</literal>
392
	  variable.  For example, if you run a &os;&nbsp;5.4-RELEASE
373
	  ¨Ó§ì package¡C­Y­n±j¨î &man.pkg.add.1; ¤U¸ü &os;&nbsp;5-STABLE ©Ò¥Îªº package
393
	  system, by default &man.pkg.add.1; will try to fetch
374
	  ¡A¨º»ò´N§â <envar>PACKAGESITE</envar> §ï³]¬° 
394
	  packages from
375
	  <literal>ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/Latest/</literal>§Y¥i¡C
395
	  <literal>ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-5.4-release/Latest/</literal>.
396
	  If you want to force &man.pkg.add.1; to download
397
	  &os;&nbsp;5-STABLE packages, set <envar>PACKAGESITE</envar>
398
	  to
399
	  <literal>ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/Latest/</literal>.
400
	</para>
376
	</para>
401
      </note>
377
      </note>
402
378
403
      <para>Package files are distributed in <filename>.tgz</filename>
379
      <para>Package Àɦ³ <filename>.tgz</filename> ¥H¤Î <filename>.tbz</filename> ¨âºØ®æ¦¡¡C
404
          and <filename>.tbz</filename> formats.  You can find them at <ulink
380
          ³o¨Ç³£¥i³z¹L <ulink
405
          url="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/packages/"></ulink>,
381
          url="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/packages/"></ulink>¡A©ÎªÌ FreeBSd ¥úºÐ¤º¨ú±o¡C
406
          or on the FreeBSD CD-ROM distribution.  Every CD on the
382
          Every CD on the
407
          FreeBSD 4-CD set (and the PowerPak, etc.) contains packages
383
          FreeBSD 4 ¥úºÐ®M¥ó¤º¥H¤Î PowerPak(«Â¤O¥]) µ¥µ¥..¨C¤@¤ù¥úºÐ³£·|¦b <filename>/packages</filename>
408
          in the <filename>/packages</filename> directory.  The layout
384
	  ¥Ø¿ý¤º©ñ package¡C¸Ì­±ªº¥Ø¿ý¬[ºcÃþ¦ü <filename>/usr/ports</filename> ªº¥Ø¿ý¬[ºc¡C
409
          of the packages is similar to that of the
385
          ¨C­Ó¤ÀÃþ³£¦U¦Û¦³±MÄݥؿý¡A¥B¨C¥÷ package ³£·|©ñ¦b <filename>All</filename> ¥Ø¿ý¤º¡C
410
          <filename>/usr/ports</filename> tree.  Each category has its
411
          own directory, and every package can be found within the
412
          <filename>All</filename> directory.
413
      </para>
386
      </para>
414
387
415
      <para>The directory structure of the package system matches the
388
      <para>package ¥Ø¿ý¬[ºc»P port ªº³£¤@­P¡F¥¦­Ì¦@¦Pºc¦¨¾ã­Ó package/port ¨t²Î¾÷¨î¡C</para>
416
        ports layout; they work with each other to form the entire
417
        package/port system.
418
      </para>
419
389
420
    </sect2>
390
    </sect2>
421
391
Lines 426-434 Link Here
426
        <primary>packages</primary>
396
        <primary>packages</primary>
427
        <secondary>managing</secondary>
397
        <secondary>managing</secondary>
428
      </indexterm>
398
      </indexterm>
429
      <para>&man.pkg.info.1; is a utility that lists and describes 
399
      <para>&man.pkg.info.1; ¥i¥Î¨Ó¦C¥X©Ò¦³¤w¦w¸Ëªº³nÅé¡B³nÅ鲤¶¡C</para>
430
        the various packages installed.
431
      </para>
432
400
433
      <indexterm>
401
      <indexterm>
434
        <primary><command>pkg_info</command></primary>
402
        <primary><command>pkg_info</command></primary>
Lines 437-445 Link Here
437
cvsup-16.1          A general network file distribution system optimized for CV
405
cvsup-16.1          A general network file distribution system optimized for CV
438
docbook-1.2         Meta-port for the different versions of the DocBook DTD
406
docbook-1.2         Meta-port for the different versions of the DocBook DTD
439
...</screen>
407
...</screen>
440
      <para>&man.pkg.version.1; is a utility that summarizes the
408
      <para>&man.pkg.version.1; «h¬O¦C¥X©Ò¦³¤w¦w¸Ëªº³nÅ骩¥»¡C
441
        versions of all installed packages.  It compares the package 
409
        ¥¦·|Åã¥Ü¤w¸Ëª©¥»¥H¤Î¥Ø«e¾÷¾¹¤W port tree ªºª©¥»®t²§¡C
442
        version to the current version found in the ports tree.
443
      </para> 
410
      </para> 
444
      <indexterm>
411
      <indexterm>
445
        <primary><command>pkg_version</command></primary>
412
        <primary><command>pkg_version</command></primary>
Lines 449-457 Link Here
449
docbook                     =
416
docbook                     =
450
...</screen>
417
...</screen>
451
418
452
      <para>The symbols in the second column indicate the relative age
419
      <para>²Ä¤GÄæªº²Å¸¹ªí¥Ü¡G¤w¦w¸Ëªº³nÅ骩¥»»P¥Ø«e¾÷¾¹¤W port tree ªºª©¥»®t²§¡C</para>
453
        of the installed version and the version available in the
454
        local ports tree.</para>
455
420
456
      <informaltable frame="none" pgwide="1">
421
      <informaltable frame="none" pgwide="1">
457
        <tgroup cols="2">
422
        <tgroup cols="2">
Lines 464-490 Link Here
464
429
465
 	  <tbody>
430
 	  <tbody>
466
  	    <row>
431
  	    <row>
467
	    <entry>=</entry> <entry>The version of the
432
	    <entry>=</entry> <entry>¤w¸Ëªºª©¥»»P¥Ø«e¾÷¾¹¤W port tree ªºª©¥»¬O¦P¤@ª©ªº¡C
468
	    installed package matches the one found in the
433
	    </entry>
469
	    local ports tree.</entry>
470
  	    </row>
434
  	    </row>
471
 
435
 
472
        <row><entry>&lt;</entry>
436
        <row><entry>&lt;</entry>
473
	<entry>The installed version is older than the one available
437
	<entry>»P¥Ø«e¾÷¾¹¤W port tree ª©¥»¬Û¤ñ°_¨Ó¡A¤w¸Ëªºª©¥»¸û¡C</entry>
474
	in the ports tree.</entry>
475
	</row>
438
	</row>
476
439
477
        <row><entry>&gt;</entry><entry>The installed version is newer
440
        <row><entry>&gt;</entry><entry>»P¥Ø«e¾÷¾¹¤W port tree ª©¥»¬Û¤ñ°_¨Ó¡A
478
          than the one found in the local ports tree. (The local ports
441
	  ¤w¸Ëªºª©¥»¸û·s¡C(¥i¯à¬O¥Ø«e¾÷¾¹¤W port tree ©|¥¼§ó·s¡C)</entry></row>
479
          tree is probably out of date.)</entry></row>
442
480
443
        <row><entry>?</entry><entry>¤w¸Ëªº³nÅé¦b ports ¯Á¤Þ¤º§äµL¬ÛÃö¸ê®Æ¡C
481
        <row><entry>?</entry><entry>The installed package cannot be
444
	  (³q±`¥i¯à¬O¡AÁ|¨Ò¨Ó»¡¡G¤w¦w¸Ëªº¸Ó port ¤w±q Ports Collection ¤¤²¾°£©Î§ï¦W¤F¡C)
482
	  found in the ports index.  (This can happen, for instance, if an
445
	  </entry></row>
483
	  installed port is removed from the Ports Collection or
484
	  renamed.)</entry></row>
485
446
486
        <row><entry>*</entry><entry>There are multiple versions of the
447
        <row><entry>*</entry><entry>¸Ó³nÅé¦P®É¦³³\¦hª©¥»¡C</entry></row>
487
        package.</entry></row>
488
448
489
	</tbody>
449
	</tbody>
490
	</tgroup>
450
	</tgroup>
Lines 557-597 Link Here
557
517
558
	  <para>½Ð§â
518
	  <para>½Ð§â
559
	    <replaceable>cvsup.tw.FreeBSD.org</replaceable> ½Ð§ï¦¨Â÷§A¤ñ¸ûªñ(§Ö)ªº 
519
	    <replaceable>cvsup.tw.FreeBSD.org</replaceable> ½Ð§ï¦¨Â÷§A¤ñ¸ûªñ(§Ö)ªº 
560
	    <application>CVSup</application> Server¡C
520
	    <application>CVSup</application> ¥D¾÷¡C
561
	    ³o³¡¤À¥i¥H°Ñ¾\§¹¾ãªº <link linkend="cvsup-mirrors">CVSup mirror</link> ¯¸¦Cªí(<xref
521
	    ³o³¡¤À¥i¥H°Ñ¾\§¹¾ãªº <link linkend="cvsup-mirrors">CVSup mirror</link> ¯¸¦Cªí(<xref
562
	    linkend="cvsup-mirrors">)¡C</para>
522
	    linkend="cvsup-mirrors">)¡C</para>
563
523
564
	  <note>
524
	  <note>
565
	    <para>One may want to use his own
525
	    <para>­Y·Q§ï¥Î¦Û¤v³]ªº 
566
	      <filename>ports-supfile</filename>, for example to avoid
526
	      <filename>ports-supfile</filename>¡A¤ñ¦p»¡¡A¤£·Q¨C¦¸³£±o¥´«ü¥O¨Ó«ü©w©Ò¨Ï¥Îªº 
567
	      the need of passing the <application>CVSup</application>
527
	      <application>CVSup</application> ¥D¾÷¡C</para>
568
	      server on the command line.</para>
569
528
570
	    <procedure>
529
	    <procedure>
571
	      <step>
530
	      <step>
572
		<para>In this case, as <username>root</username>, copy
531
		<para>³oºØ±¡ªp¤U¡A½Ð¥H <username>root</username> Åv­­§â 
573
		  <filename>/usr/share/examples/cvsup/ports-supfile</filename>
532
		  <filename>/usr/share/examples/cvsup/ports-supfile</filename>
574
		  to a new location, such as
533
		  ½Æ»s¨ì¨ä¥L¦ì¸m¡A¤ñ¦p  
575
		  <filename>/root</filename> or your home
534
		  <filename>/root</filename> ©ÎªÌ¦Û¤v±b¸¹ªº®a¥Ø¿ý¡C</para>
576
		  directory.</para>
577
	      </step>
535
	      </step>
578
536
579
	      <step>
537
	      <step>
580
		<para>Edit <filename>ports-supfile</filename>.</para>
538
		<para>­×§ï·sªº <filename>ports-supfile</filename> ÀÉ¡C</para>
581
	      </step>
539
	      </step>
582
540
583
	      <step>
541
	      <step>
584
		<para>Change
542
		<para>§â 
585
		  <replaceable>CHANGE_THIS.FreeBSD.org</replaceable>
543
		  <replaceable>CHANGE_THIS.FreeBSD.org</replaceable>
586
		  to a <application>CVSup</application> server near
544
		  §ï¬°Â÷§A¤ñ¸ûªñ(§Ö)ªº <application>CVSup</application> ¥D¾÷¡C
587
		  you.  See <link linkend="cvsup-mirrors">CVSup
545
		  ³o³¡¤À¥i¥H°Ñ¾\§¹¾ãªº <link linkend="cvsup-mirrors">CVSup
588
		  Mirrors</link> (<xref linkend="cvsup-mirrors">) for
546
		  Mirrors</link> (<xref linkend="cvsup-mirrors">) ¯¸¦Cªí</para>
589
		  a complete listing of mirror sites.</para>
590
	      </step>
547
	      </step>
591
548
592
	      <step>
549
	      <step>
593
		<para>And now to run <command>cvsup</command>, use the
550
		<para>µM«á´N¶}©l¥HÃþ¦ü¤U¦C«ü¥O¶] <command>cvsup</command>¡G</para>
594
		  following:</para>
595
551
596
		<screen>&prompt.root; <userinput>cvsup -L 2 <replaceable>/root/ports-supfile</replaceable></userinput></screen>
552
		<screen>&prompt.root; <userinput>cvsup -L 2 <replaceable>/root/ports-supfile</replaceable></userinput></screen>
597
	      </step>
553
	      </step>
Lines 600-651 Link Here
600
	</step>
556
	</step>
601
557
602
	<step>
558
	<step>
603
	  <para>Running the &man.cvsup.1; command later will download and apply all
559
	  <para>°õ¦æ &man.cvsup.1; ¤§«á¡A´N·|¶}©l§ó·s Ports Collection¡C
604
	    the recent changes to your Ports Collection, except
560
	    ¤£¹L³o°Ê§@¥u¬O¡y§ó·s¡z¨Ã¤£¬O¡y¤É¯Å¡z¡A¤£·|§â¤w¸Ëªº³nÅé­«·s½sĶ¡B¤É¯Å¡C</para>
605
	    actually rebuilding the ports for your own system.</para>
606
	</step>
561
	</step>
607
      </procedure>
562
      </procedure>
608
563
609
      <procedure>
564
      <procedure>
610
	<title>Portsnap ¤è¦¡</title>
565
	<title>Portsnap ¤è¦¡</title>
611
566
612
	<para>&man.portsnap.8; is an alternative system for distributing the
567
	<para>&man.portsnap.8; ¤]¬O§ó·s Ports Collection ªº¤è¦¡¤§¤@¡C
613
	  Ports Collection.  It was first included in &os;&nbsp;6.0.  On older
568
	  &os;&nbsp;6.0 °_¶}©l¤º«Ø Portsnap ¾÷¨î¡A¦Ó¸ûªº¨t²Î¡A«h¥i³z¹L <filename
614
	  systems, you can install it from <filename
569
	  role="package">sysutils/portsnap</filename> port ¨Ó¦w¸Ë¡G</para>
615
	  role="package">sysutils/portsnap</filename> port:</para>
616
570
617
	<screen>&prompt.root; <userinput>pkg_add -r portsnap</userinput></screen>
571
	<screen>&prompt.root; <userinput>pkg_add -r portsnap</userinput></screen>
618
572
619
	<para>Please refer to <link linkend="portsnap">Using Portsnap</link>
573
	<para><application>Portsnap</application> ²Ó¸`¥\¯à¡A½Ð°Ñ¾\ 
620
	  for a detailed description of all <application>Portsnap</application>
574
	  <link linkend="portsnap">Portsnap ¨Ï¥Î½g</link>¡C</para>
621
	  features.</para>
622
575
623
	<step>
576
	<step>
624
	  <para>Create an empty directory <filename
577
	  <para>­Y <filename
625
	    role="directory">/usr/ports</filename> if it does not exists.</para>
578
	    role="directory">/usr/ports</filename> ¥Ø¿ý¤£¦s¦bªº¸Ü¡A´N«Ø¥ß¤@¤U§a¡G</para>
626
579
627
	  <screen>&prompt.root; <userinput>mkdir /usr/ports</userinput></screen>
580
	  <screen>&prompt.root; <userinput>mkdir /usr/ports</userinput></screen>
628
	</step>
581
	</step>
629
582
630
	<step>
583
	<step>
631
	  <para>Download a compressed snapshot of the Ports Collection into
584
	  <para>±µ¤U¨Ó¡A¤U¸üÀ£ÁYªº Ports Collection ©w´Á§ó·sÀɨì 
632
	    <filename role="directory">/var/db/portsnap</filename>.  You can
585
	    <filename role="directory">/var/db/portsnap</filename> ¥Ø¿ý¡C
633
	    disconnect from the Internet after this step, if you wish.</para>
586
	    §¹¦¨¤U¸ü«á¡A­nÂ_½u»P§_³£¥i¥H¡C</para>
634
587
635
	  <screen>&prompt.root; <userinput>portsnap fetch</userinput></screen>
588
	  <screen>&prompt.root; <userinput>portsnap fetch</userinput></screen>
636
	</step>
589
	</step>
637
590
638
	<step>
591
	<step>
639
	  <para>If you are running <application>Portsnap</application> for the
592
	  <para>­Y¬O²Ä¤@¦¸¶] <application>Portsnap</application> ªº¸Ü¡A«h»Ý­n¥ý¸ÑÀ£¨ì <filename
640
	    first time, extract the snapshot into <filename
593
	    role="directory">/usr/ports</filename>¡G
641
	    role="directory">/usr/ports</filename>:
642
	  </para>
594
	  </para>
643
595
644
	  <screen>&prompt.root; <userinput>portsnap extract</userinput></screen>
596
	  <screen>&prompt.root; <userinput>portsnap extract</userinput></screen>
645
597
646
	  <para>If you already have a populated <filename
598
	  <para>­Y¤w¦³ <filename
647
	    role="directory">/usr/ports</filename> and you are just updating,
599
	    role="directory">/usr/ports</filename> ¦Ó¥B¥u¬O·Q§ó·s¦Ó¤w¡A¨º»ò´N·Ó¤U­±§@¡G</para>
648
	    run the following command instead:</para>
649
600
650
	  <screen>&prompt.root; <userinput>portsnap update</userinput></screen>
601
	  <screen>&prompt.root; <userinput>portsnap update</userinput></screen>
651
	</step>
602
	</step>
Lines 655-709 Link Here
655
      <procedure>
606
      <procedure>
656
	<title>Sysinstall ¤è¦¡</title>
607
	<title>Sysinstall ¤è¦¡</title>
657
608
658
	<para>This method involves using <application>sysinstall</application>
609
	<para>³o¤è¦¡­n¥Î <application>sysinstall</application> ³z¹L¦w¸Ë¨Ó·½¨Ó¸Ë Ports Collection¡C
659
	  to install the Ports Collection from the installation media.  Note
610
	  ½Ðª`·N¡G©Ò¦w¸Ëªº Ports Collection ª©¥»¥u¬O¸Ó release µo§G®Éªºª©¥»¦Ó¤w¡A¦Ó«D³Ì·s¡C
660
	  that the old copy of Ports Collection from the date of the release
611
	  ­Y¯à¤Wºô(Internet)ªº¸Ü¡A½Ð¨Ï¥Î¤W­z¤è¦¡¤§¤@·|¤ñ¸û¦n¡C</para>
661
	  will be installed.  If you have Internet access, you should always
662
	  use one of the methods mentioned above.</para>
663
612
664
	<step>
613
	<step>
665
	  <para>As <username>root</username>, run
614
	  <para>¥H <username>root</username> Åv­­°õ¦æ
666
	    <command>sysinstall</command>
615
	    <command>sysinstall</command> 
667
	    (<command>/stand/sysinstall</command> in &os;
616
	    (¦b &os; 5.2 ¤§«eª©¥»«h¬O <command>/stand/sysinstall</command>)¡A¤è¦¡¦p¤U¡G</para>
668
	    versions older than 5.2) as shown below:</para>
669
617
670
	  <screen>&prompt.root; <userinput>sysinstall</userinput></screen>
618
	  <screen>&prompt.root; <userinput>sysinstall</userinput></screen>
671
	</step>
619
	</step>
672
620
673
	<step>
621
	<step>
674
	  <para>Scroll down and select <guimenuitem>Configure</guimenuitem>,
622
	  <para>½Ð¥H¤è¦VÁä²¾°Ê¿ï¾Ü¶µ¥Ø¡A¿ï¾Ü <guimenuitem>Configure</guimenuitem>¡AµM«á«ö 
675
	    press <keycap>Enter</keycap>.</para>
623
	    <keycap>Enter</keycap> Áä¡C</para>
676
	</step>
624
	</step>
677
625
678
	<step>
626
	<step>
679
	  <para>Scroll down and select
627
	  <para>¿ï¾Ü
680
	    <guimenuitem>Distributions</guimenuitem>, press
628
	    <guimenuitem>Distributions</guimenuitem>¡AµM«á«ö 
681
	    <keycap>Enter</keycap>.</para>
629
	    <keycap>Enter</keycap> Áä¡C</para>
682
	</step>
630
	</step>
683
631
684
	<step>
632
	<step>
685
	  <para>Scroll down to <guimenuitem>ports</guimenuitem>, press
633
	  <para>¿ï¾Ü <guimenuitem>ports</guimenuitem>¡AµM«á«ö 
686
	    <keycap>Space</keycap>.</para>
634
	    <keycap>Space</keycap> Áä¡C</para>
687
	</step>
635
	</step>
688
636
689
	<step>
637
	<step>
690
	  <para>Scroll up to <guimenuitem>Exit</guimenuitem>, press
638
	  <para>¿ï <guimenuitem>Exit</guimenuitem>¡AµM«á«ö 
691
	    <keycap>Enter</keycap>.</para>
639
	    <keycap>Enter</keycap> Áä¡C</para>
692
	</step>
640
	</step>
693
641
694
	<step>
642
	<step>
695
	  <para>Select your desired installation media, such as CDROM,
643
	  <para>¿ï¾Ü­n¥Îªº¦w¸Ë¨Ó·½¡A¤ñ¦p¡GCDROM(¥úºÐ)¡BFTP µ¥¤è¦¡¡C</para>
696
	    FTP, and so on.</para>
697
	</step>
644
	</step>
698
645
699
	<step>
646
	<step>
700
	  <para>Scroll up to <guimenuitem>Exit</guimenuitem> and press
647
	  <para>¿ï <guimenuitem>Exit</guimenuitem>¡AµM«á«ö
701
	    <keycap>Enter</keycap>.</para>
648
	    <keycap>Enter</keycap> Áä¡C</para>
702
	</step>
649
	</step>
703
650
704
	<step>
651
	<step>
705
	  <para>Press <keycap>X</keycap> to exit
652
	  <para>«ö¤U <keycap>X</keycap> Áä´N¥iÂ÷¶}
706
	    <application>sysinstall</application>.</para>
653
	    <application>sysinstall</application> µ{¦¡¡C</para>
707
	</step>
654
	</step>
708
      </procedure>
655
      </procedure>
709
    </sect2>
656
    </sect2>
Lines 715-827 Link Here
715
        <primary>ports</primary>
662
        <primary>ports</primary>
716
        <secondary>installing</secondary>
663
        <secondary>installing</secondary>
717
      </indexterm>
664
      </indexterm>
718
      <para>The first thing that should be explained when it comes to
665
      <para>´£¨ì Ports Collection¡A­º¥ý­n¥ý»¡©úªº¬O¡G¦ó¿× <quote>skeleton</quote>¡C
719
        the Ports Collection is what is actually meant by a
666
        ²³æ¨ÓÁ¿¡Aport skeleton ´N¬OÅý³nÅé¦p¦ó¦b FreeBSD ¶¶§Q½sĶ¡B¦w¸Ëªº³Ì°ò¥»ÀɮײզX¡C
720
        <quote>skeleton</quote>.  In a nutshell, a port skeleton is a
667
        ¨C¥÷ port skeleton °ò¥»¤W·|¦³¡G</para>
721
        minimal set of files that tell your FreeBSD system how to
722
        cleanly compile and install a program.  Each port skeleton
723
        includes:</para>
724
668
725
      <itemizedlist>
669
      <itemizedlist>
726
	<listitem>
670
	<listitem>
727
	  <para>A <filename>Makefile</filename>.  The
671
	  <para><filename>Makefile</filename> ÀÉ¡C
728
	    <filename>Makefile</filename> contains various statements
672
	    ³o­Ó <filename>Makefile</filename> ¤º®e¦³¤À³\¦h³¡¤À¡A
729
	    that specify how the application should be compiled and
673
	    ¬O¥Î¨Ó«ü©w­n¦p¦ó½sĶ¡A¥H¤Î¸Ó¸Ë¦b¨t²Îªº¦ó³B¡C</para>
730
	    where it should be installed on your system.</para>
731
	</listitem>
674
	</listitem>
732
675
733
	<listitem>
676
	<listitem>
734
	  <para>A <filename>distinfo</filename> file.  This file
677
	  <para><filename>distinfo</filename> ÀÉ¡C  
735
	    contains information about the files that must be
678
	    ½s͏ӳnÅé©Ò»Ý¤U¸üªºÀɮסBchecksum(ÀËÅçÀÉ®×¥Î)³£·|°O¿ý¦b³oÀÉ¡A
736
	    downloaded to build the port and their checksums, to
679
	    ¨Ã·|¥Î &man.md5.1; ¬ÛÃö¤u¨ã¨Ó½T«O©Ò¤U¸üªºÀɮ׬O¥¿½TµL»~ªº¡C</para>
737
	    verify that files have not been corrupted during the
738
	    download using &man.md5.1;.</para>
739
	</listitem>
680
	</listitem>
740
	
681
	
741
	<listitem>
682
	<listitem>
742
	  <para>A <filename>files</filename> directory.  This
683
	  <para><filename>files</filename> ¥Ø¿ý¡C ³o¥Ø¿ý©ñªº¬OÅý³nÅ饿±`½sĶ¡B¦w¸Ëªº patch ÀÉ¡C
743
	    directory contains patches to make the program compile and
684
	    Patches Àɰò¥»¤W¬O¤@¨Ç¤pÀɮסA¨Ã°w¹ï¯S©wÀɮרӰµ­×§ï¡A¥B¬O¯Â¤å¦rÀɮ榡¡A
744
	    install on your FreeBSD system.  Patches are basically
685
	    °ò¥»¤W¤º®e³q±`·|¹³¬O <quote>Remove line 10(§R°£²Ä 10 ¦æ)</quote> ©Î
745
	    small files that specify changes to particular files.
686
	    <quote>Change line 26 to this ...(§â²Ä 26 ¦æ§ï¬°...)</quote> ¤§Ãþªº¡C
746
	    They are in plain text format, and basically say
687
	    ³o¨Ç Patches ³q±`¤]ºÙ¬° <quote>diffs</quote>
747
	    <quote>Remove line 10</quote> or <quote>Change line 26 to
688
	    ¡A¦]¬°³£¬O¥Ñ &man.diff.1; µ{¦¡©Ò²£¥Íªº¡C</para>
748
	    this ...</quote>.  Patches are also known as
749
	    <quote>diffs</quote> because they are generated by the
750
	    &man.diff.1; program.</para>
751
689
752
	  <para>This directory may also contain other files used to build
690
	  <para>¦¹¥~¡A¥»¥Ø¿ý¤]¥i¯à·|©ñ¤@¨Ç¨ó§U½sĶ¸Ó port ªºÀɮסC</para>
753
	    the port.</para>
754
	</listitem>
691
	</listitem>
755
692
756
	<listitem>
693
	<listitem>
757
	  <para>A <filename>pkg-descr</filename> file.  This is a more
694
	  <para><filename>pkg-descr</filename> ÀÉ¡A¤º®e¬O¤ñ¸û¸Ô²Óªº³nÅ餶²Ð¡A³q±`·|¼g±o¤ñ¸û¦h¦æ¡C</para>
758
	    detailed, often multiple-line, description of the program.</para>
759
	</listitem>
695
	</listitem>
760
	
696
	
761
	<listitem>
697
	<listitem>
762
	  <para>A <filename>pkg-plist</filename> file.  This is a list
698
	  <para><filename>pkg-plist</filename> ÀÉ¡A¸Ó port ·|¦w¸Ëªº©Ò¦³ÀɮײM³æ¡C
763
	    of all the files that will be installed by the port.  It
699
	    ¤]¬O§i¶D¨t²Î¦b²¾°£¸Ó port ®É¡A»Ý­n§R°£­þ¨ÇÀɮסC</para>
764
	    also tells the ports system what files to remove upon
765
	    deinstallation.</para>
766
	</listitem>
700
	</listitem>
767
      </itemizedlist>
701
      </itemizedlist>
768
702
769
      <para>Some ports have other files, such as
703
      <para>¦³¨Ç port ÁÙ·|¦³¨ä¥LÀɮסA¹³¬O <filename>pkg-message</filename> ÀÉ¡C
770
        <filename>pkg-message</filename>.  The ports system uses these
704
        port ¨t²Î¦b¤@¨Ç±¡ªp®É¡A·|¥Î³o¨ÇÀɮסC
771
        files to handle special situations.  If you want more details
705
        ¦pªG·Qª¾¹D³o¨ÇÀɮתº§ó¦h²Ó¸`¥Î³~¡A¥H¤Î port ¤@¯ë¥Îªk¡A½Ð°Ñ¾\ <ulink
772
        on these files, and on ports in general, check out the <ulink
773
        url="&url.books.porters-handbook;/index.html">FreeBSD Porter's
706
        url="&url.books.porters-handbook;/index.html">FreeBSD Porter's
774
        Handbook</ulink>.</para>
707
        Handbook</ulink>¡C</para>
775
708
776
      <para>The port includes instructions on how to build source
709
      <para>port ¤º¼gªº¬O§i¶D¨t²Î¦p¦ó½sĶ source code ªº¬ÛÃö«ü¥O¡A¦ý¨Ã¤£¬O¯u¥¿ªº source code¡C
777
        code, but does not include the actual source code.  You can
710
        ¦Ó source code ¥i¥H±q¥úºÐ©Îºô¸ô(Internet)¨Ó¨ú±o¡A
778
        get the source code from a CD-ROM or from the Internet.
711
        ¸Ó³nÅé¶}µoªÌ¥i¯à·|§â source code ¥H¦UºØ®æ¦¡¨Óµo§G¡C
779
        Source code is distributed in whatever manner the software
712
        ³q±`¬O¥H tar ¥H¤Î gzip ³o¨âªÌ¤u¨ã¤@°_À£ÁYªºÀɮסA¤]¦³¥i¯à¬O¥H¨ä¥L¤u¨ãÀ£ÁY¡A©Î®Ú¥»¨SÀ£ÁY¡C
780
        author desires.  Frequently this is a tarred and gzipped file,
713
	¦Ó³nÅ骺 source code µL½×¬O¥H­þ¤@ºØÀ£ÁYÀÉ«¬ºA¡A§Ú­Ì³£ºÙ¤§¬° <quote>distfile</quote>¡C
781
        but it might be compressed with some other tool or even
714
        ¤U­±±N¤¶²Ð¨âºØ¦w¸Ë &os; port ªº¤è¦¡¡C</para>
782
        uncompressed.  The program source code, whatever form it comes
783
        in, is called a <quote>distfile</quote>.  The two methods for
784
        installing a &os; port are described below.</para>
785
715
786
      <note>
716
      <note>
787
        <para>You must be logged in as <username>root</username> to
717
        <para>­n¦w¸Ë port ªº¸Ü¡A½Ð°È¥²¤Á¬° <username>root</username> ¨­¥÷¡C</para>
788
          install ports.</para>
789
      </note>
718
      </note>
790
719
791
      <warning>
720
      <warning>
792
	<para>Before installing any port, you should be sure to have
721
	<para>¦b¦w¸Ë¥ô¦ó port ¤§«e¡A½Ð°È¥²½T»{¦³§ó·s Ports Collection ¨ì³Ì·sª©¡A
793
	  an up-to-date Ports Collection and you should check <ulink
722
	  ¦¹¥~½ÐÀ˾\ <ulink
794
	  url="http://vuxml.freebsd.org/"></ulink> for security issues
723
	  url="http://vuxml.freebsd.org/"></ulink> ¨ÓÀˬd©Ò­n¸Ëªº port 
795
	  related to your port.</para>
724
	  ¬O§_¦³¬ÛÃö¦w¥þº|¬}ijÃD»Ý­nª`·Nªº¡C</para>
796
725
797
	<para>A security vulnerabilities check can be automatically
726
	<para><application>portaudit</application> ·|¦b¦w¸Ë¥ô¦ó port ¤§«e¡A
798
	  done by <application>portaudit</application> before any new
727
	  ¥ý¦Û°ÊÀˬd¬O§_¦³¬ÛÃö¤wª¾ªº¦w¥þº|¬}¡C³o­Ó¤u¨ã¦b Ports Collection ¤º¦³
799
	  application installation.  This tool can be found in the
728
	  (<filename role="package">security/portaudit</filename>)¡C
800
	  Ports Collection (<filename
729
	  ¦b¦w¸Ë port ¤§«e¡A¥i¥H¥ý¶] <command>portaudit -F</command> «ü¥O¡A
801
	  role="package">security/portaudit</filename>).  Consider
730
	  ¦p¦¹¤@¨Ó´N·|§ì³Ì·sªº¸ê¦wº|¬}¸ê®Æ®w¦^¨Ó®Ö¹ï¡C
802
	  running <command>portaudit -F</command> before installing a
731
	  ¨C¤Ñªº¨t²Î©w´Á¦wÀË·|¦Û°Ê§ó·s¸ê®Æ®w¡A¨Ã§@¦w¥þ½]®Ö¡C
803
	  new port, to fetch the current vulnerabilities database.  A
732
	  ¸Ô±¡½Ð°Ñ¾\ &man.portaudit.1; ¥H¤Î &man.periodic.8; ªº½u¤W»¡©ú¡C</para>
804
	  security audit and an update of the database will be
805
	  performed during the daily security system check.  For more
806
	  information read the &man.portaudit.1; and &man.periodic.8;
807
	  manual pages.</para>
808
      </warning>
733
      </warning>
809
734
810
      <para>The Ports Collection makes an assumption that you have a working
735
      <para>Ports Collection ·|°²³]§Aªººô¸ô¬O¥i¥¿±`³s½uªº¡C
811
	Internet connection.  If you do not, you will need to put a copy of the
736
        ¦pªG¨S¦³ªº¸Ü¡A¨º»ò»Ý¤â°Ê§â©Ò»Ýªº distfile Àɽƻs¨ì 
812
	distfile into <filename>/usr/ports/distfiles</filename>
737
	<filename>/usr/ports/distfiles</filename> ¤~¦æ¡C</para>
813
	manually.</para>
814
738
815
	<para>To begin, change to the directory for the port you want to
739
	<para>¶}©l¾Þ§@¤§«e¡A­n¥ý¶i¤J¥´ºâ¦w¸Ëªº port ¥Ø¿ý¤º¡G</para>
816
	  install:</para>
817
740
818
        <screen>&prompt.root; <userinput>cd /usr/ports/sysutils/lsof</userinput></screen>
741
        <screen>&prompt.root; <userinput>cd /usr/ports/sysutils/lsof</userinput></screen>
819
742
820
        <para>Once inside the <filename>lsof</filename> directory, you
743
        <para>¤@¥¹¶i¤J <filename>lsof</filename> ¥Ø¿ý«á¡A´N¥i¥H¬Ý¨ì³o­Ó port ªº skeleton µ²ºc¡C
821
	  will see the port skeleton.  The next step is to compile, or
744
	  ±µ¤U¨Ó¡A´N¬O½sĶ¡A¤]´N¬O <quote>build</quote> ³o­Ó port¡C
822
	  <quote>build</quote>, the port.  This is done by simply
745
	  ¥u»Ý²³æ¿é¤J <command>make</command> «ü¥O¡A´N¥i»´ÃP§¹¦¨½sĶ¡C
823
	  typing <command>make</command> at the prompt.  Once you have
746
	  §¹¦¨«á¡AÀ³¸Ó¥i¥H¬Ý¨ìÃþ¦ü¤U­±°T®§¡G</para>
824
	  done so, you should see something like this:</para>
825
747
826
        <screen>&prompt.root; <userinput>make</userinput>
748
        <screen>&prompt.root; <userinput>make</userinput>
827
&gt;&gt; lsof_4.57D.freebsd.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
749
&gt;&gt; lsof_4.57D.freebsd.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
Lines 843-853 Link Here
843
...
765
...
844
&prompt.root;</screen>
766
&prompt.root;</screen>
845
767
846
        <para>Notice that once the compile is complete you are
768
        <para>½Ðª`·N¡G½sͧ¹¦¨«á¡A´N·|¦^¨ì´£¥Ü¦C(prompt)¡C±µ¤U¨Ó´N¬O¦w¸Ë¸Ó port ¤F¡A
847
	  returned to your prompt.  The next step is to install the
769
	  ­n¸Ëªº¸Ü¡A¥u»Ý¦b­ì¥»ªº <command>make</command> «ü¥O«á­±¦A¥[¤W¤@­Ó¦r§Y¥i¡A
848
	  port.  In order to install it, you simply need to tack one word
770
	  ¨º­Ó¦r´N¬O <command>install</command>¡G</para>
849
	  onto the <command>make</command> command, and that word is
850
	  <command>install</command>:</para>
851
771
852
        <screen>&prompt.root; <userinput>make install</userinput>
772
        <screen>&prompt.root; <userinput>make install</userinput>
853
===&gt;  Installing for lsof-4.57
773
===&gt;  Installing for lsof-4.57
Lines 862-903 Link Here
862
      increased privileges.
782
      increased privileges.
863
&prompt.root;</screen>
783
&prompt.root;</screen>
864
784
865
        <para>Once you are returned to your prompt, you should be able to
785
        <para>¤@¥¹¦^¨ì´£¥Ü¦C(prompt)¡A´N¥i¥H°õ¦æ­è¸Ëªºµ{¦¡¤F¡C
866
          run the application you just installed.  Since 
786
	  ¥t¥~¡A¦]¬° <command>lsof</command> ³oµ{¦¡°õ¦æ®É·|¦³ÃB¥~Åv­­¡A
867
	  <command>lsof</command> is a
787
	  ©Ò¥H·|¥X²{¦w¥þĵ§i¡C¦b½sĶ¡B¦w¸Ë port ªº®É­Ô¡A
868
	  program that runs with increased privileges, a security
788
	  ½Ð¯d·N¥ô¦ó¥X²{ªºÄµ§i¡C</para>
869
	  warning is shown.  During the building and installation of
789
870
	  ports, you should take heed of any other warnings that
790
	<para>¦¹¥~¡A«ØÄ³§R°£½sĶ¥Îªº¤u§@¥Ø¿ý(¹w³]¬O <filename>work</filename>)¡A
871
	  may appear.</para>
791
	  ³o¥Ø¿ý¤º¬°¦b½s͹Lµ{¤¤©Ò¥Î¨ìªº¤@¨ÇÁ{®ÉÀɮסA
872
792
	  ³o¨ÇÀɮפ£¥u¦ûµwºÐªÅ¶¡¡A¦Ó¥B¤]¥i¯à·|¦b¸Ó port ¤É¯Å·sª©®É¡A
873
	<para>It is a good idea to delete the working subdirectory,
793
	  ³y¦¨¤£¥²­nªº§xÂZ¡C</para>
874
	  which contains all the temporary files used during compilation.
875
	  Not only it consumes a valuable disk space, it would also cause
876
	  problems later when upgrading to the newer version of the port.</para>
877
794
878
	<screen>&prompt.root; <userinput>make clean</userinput>
795
	<screen>&prompt.root; <userinput>make clean</userinput>
879
===&gt;  Cleaning for lsof-4.57
796
===&gt;  Cleaning for lsof-4.57
880
&prompt.root;</screen>
797
&prompt.root;</screen>
881
798
882
        <note>
799
        <note>
883
          <para>You can save an extra step by just running <command>make
800
          <para>¥Î <command>make install clean</command> ´N¥i¥H¤@¤f®ð§¹¦¨­è©Ò»¡ 
884
	    install clean</command> instead of <command>make</command>,
801
	    <command>make</command>¡B<command>make install</command>¡B
885
	    <command>make install</command> and <command>make clean</command>
802
	    <command>make clean</command> ³o¤T­Ó¨BÆJ¤F¡C</para>
886
	    as three separate steps.</para>
887
	</note>
803
	</note>
888
804
889
	<note>
805
	<note>
890
	  <para>Some shells keep a cache of the commands that are
806
	  <para>¦³¨Ç shell ·|¨Ì¾Ú <envar>PATH</envar> Àô¹ÒÅܼƪº¸ô®|¡A
891
	    available in the directories listed in the
807
	    §â¨º¨Ç¸ô®|ªº°õ¦æÀÉ cache °_¨Ó¡A¨Ó¥[³t·j´M°õ¦æÀÉ¡C
892
	    <envar>PATH</envar> environment variable, to speed up
808
	    ¦pªG§A¥Îªº¬O³oÃþªº shell¡A¨º»ò¦b¸Ë§¹ port «á»Ý­n¥´ 
893
	    lookup operations for the executable file of these
809
	    <command>rehash</command> «ü¥O¡A¤~¯à°õ¦æ·s¸Ëªº°õ¦æÀÉ¡A¦Ó 
894
	    commands.  If you are using one of these shells, you might
810
	    <command>rehash</command> «ü¥O¥i¥H¦b <command>tcsh</command> 
895
	    have to use the <command>rehash</command> command after
811
	    ¤§Ãþªº shell ¤W¨Ï¥Î¡A­Y¬O <command>sh</command> ªº¸Ü¡A«h¬O 
896
	    installing a port, before the newly installed commands can
812
	    <command>hash -r</command>¡C
897
	    be used.  This command will work for shells like
813
	    ¸Ô±¡½Ð°Ñ¾\§A©Ò¨Ï¥Îªº shell ¬ÛÃö¤å¥ó¡C</para>
898
	    <command>tcsh</command>.  Use the <command>hash -r</command>
899
	    command for shells like <command>sh</command>.  Look at the
900
	    documentation for your shell for more information.</para>
901
	</note>
814
	</note>
902
815
903
	<para>Some third party DVD-ROM products such as the FreeBSD Toolkit
816
	<para>Some third party DVD-ROM products such as the FreeBSD Toolkit

Return to bug 101392