From 23c2b40003d600e44c1f27e6f69b281074f02fc0 Mon Sep 17 00:00:00 2001 From: Hideyuki KURASHINA Date: Fri, 24 Sep 2004 08:28:27 +0000 Subject: Merge the following from the English version: 1.130 -> 1.131 books/handbook/ports/chapter.sgml Submitted by: Ryusuke Suzuki References: [doc-jp-work 915] --- ja_JP.eucJP/books/handbook/ports/chapter.sgml | 208 +++++++++++++------------- 1 file changed, 108 insertions(+), 100 deletions(-) (limited to 'ja_JP.eucJP') diff --git a/ja_JP.eucJP/books/handbook/ports/chapter.sgml b/ja_JP.eucJP/books/handbook/ports/chapter.sgml index 017c996514..88852d64cb 100644 --- a/ja_JP.eucJP/books/handbook/ports/chapter.sgml +++ b/ja_JP.eucJP/books/handbook/ports/chapter.sgml @@ -2,7 +2,7 @@ The FreeBSD Documentation Project The FreeBSD Japanese Documentation Project - Original revision: 1.130 + Original revision: 1.131 $FreeBSD$ --> @@ -79,7 +79,7 @@ 各種設定ファイルやドキュメントが含まれています。 FreeBSD に用意されている &man.pkg.add.1;, &man.pkg.delete.1;, &man.pkg.info.1; - といった pkg_* コマンドで、 + といった package 管理コマンドで、 ダウンロードした package ファイルを扱うことができます。 新しいアプリケーションをインストールするには、 @@ -98,8 +98,9 @@ 自動的にアプリケーションのソースコードがダウンロードされ、展開、 パッチ作業、コンパイル、そして、インストール作業が行われます。 - さらに ports システムは、pkg_* コマンドで - 扱うことのできる packages を生成することもできます。 + さらに ports システムは、pkg_add + コマンドや他の package 管理コマンドで扱うことのできる + packages を生成できます。 packages と ports は依存関係を理解します。 ある特定のライブラリに依存する @@ -135,7 +136,7 @@ packages を用いれば、 - ソフトウェアのコンパイルに関する知識は必要ありません。 + ソフトウェアのコンパイルに関する知識は必要ありません。 @@ -195,8 +196,10 @@ - ports の更新状況を把握するために、freebsd-ports + ports の更新状況を把握するために、 + freebsd-ports@freebsd.org メーリングリストを購読するとよいでしょう。 + この章では、packages と ports を用いた FreeBSD 上での サードパーティ製ソフトウェアの インストール方法や管理方法について説明します。 @@ -226,6 +229,8 @@ すべてのアプリケーションを表示させることもできます。 + FreshPorts + Dan Langille は http://www.freshports.org/ @@ -235,6 +240,8 @@ 変更があるとメールで更新情報を送ってくれます。 + FreshMeat + ご希望のアプリケーションの名前がわからなければ、 FreshMeat @@ -279,7 +286,7 @@ package をダウンロードしてローカルからインストールする - &prompt.root; ftp ftp2.freebsd.org + &prompt.root; ftp -a ftp2.freebsd.org Connected to ftp2.freebsd.org. 220 ftp2.freebsd.org FTP server (Version 6.00LS) ready. 331 Guest login ok, send your email address as password. @@ -291,17 +298,17 @@ Connected to ftp2.freebsd.org. 230 Guest login ok, access restrictions apply. Remote system type is UNIX. Using binary mode to transfer files. -ftp> cd /pub/FreeBSD/ports/packages/irc +ftp> cd /pub/FreeBSD/ports/packages/sysutils/ 250 CWD command successful. -ftp> get xchat-1.7.1.tgz -local: xchat-1.7.1.tgz remote: xchat-1.7.1.tgz -150 Opening BINARY mode data connection for 'xchat-1.7.1.tgz' (471488 bytes). -100% |**************************************************| 460 KB 00:00 ETA +ftp> get lsof-4.56.4.tgz +local: lsof-4.56.4.tgz remote: lsof-4.56.4.tgz +200 PORT command successful. +150 Opening BINARY mode data connection for 'lsof-4.56.4.tgz' (92375 bytes). +100% |**************************************************| 92375 00:00 ETA 226 Transfer complete. -471488 bytes received in 5.37 seconds (85.70 KB/s) +92375 bytes received in 5.60 seconds (16.11 KB/s) ftp> exit -&prompt.root; pkg_add xchat-1.7.1.tgz -&prompt.root; +&prompt.root; pkg_add lsof-4.56.4.tgz (FreeBSD CD-ROM セットのような) @@ -314,7 +321,7 @@ local: xchat-1.7.1.tgz remote: xchat-1.7.1.tgz pkg_add - &prompt.root; pkg_add -r xchat-1.7.1 + &prompt.root; pkg_add -r lsof-4.56.4 適当な package がダウンロードされた後、インストールされます。 ユーザーはこれ以外に作業をする必要はありません。 @@ -341,7 +348,6 @@ local: xchat-1.7.1.tgz remote: xchat-1.7.1.tgz package の削除 - &prompt.root pkg_delete xchat-1.7.1 pkg_delete @@ -349,9 +355,11 @@ local: xchat-1.7.1.tgz remote: xchat-1.7.1.tgz packages 削除 - &man.pkg.delete.1; は、インストールされている - package を削除するためのユーティリティです。 + インストールされている package を削除するには、 + &man.pkg.delete.1; ユーティリティを使ってください。 + + &prompt.root pkg_delete xchat-1.7.1 @@ -424,9 +432,6 @@ docbook = その他 - &man.pkg.add.1; &man.pkg.delete.1; &man.pkg.info.1; - &man.pkg.version.1; &man.pkg.create.1; - package に関するすべての情報は /var/db/pkg ディレクトリ以下に置かれています。 このディレクトリの下にあるファイルの中に、 @@ -539,11 +544,11 @@ docbook = それがどこにあるのかが次のように表示されます。 - &prompt.root; whereis xchat -xchat: /usr/ports/irc/xchat + &prompt.root; whereis lsof +lsof: /usr/ports/sysutils/lsof - この表示は、xchat (irc クライアントの一つ) が - /usr/ports/irc/xchat + この表示は、lsof (システムユーティリティの一つ) が + /usr/ports/sysutils/lsof というディレクトリに見つかったことを示しています。 @@ -555,20 +560,18 @@ xchat: /usr/ports/irc/xchat make search key=プログラム名 と入力してください。 プログラム名 の部分には検索したいプログラム名を入れます。 - たとえば、xchat + たとえば、lsof を探したい場合には次のようにします。 &prompt.root; cd /usr/ports -&prompt.root; make search key=xchat -Port: xchat-1.3.8 -Path: /usr/ports/irc/xchat -Info: An X11 IRC client using the GTK+ toolkit, and optionally, GNOME -Maint: jim@FreeBSD.org -Index: irc -B-deps: XFree86-3.3.5 bzip2-0.9.5d gettext-0.10.35 giflib-4.1.0 glib-1.2.6 gmake-3.77 gtk-1.2.6 - imlib-1.9.8 jpeg-6b png-1.0.3 tiff-3.5.1 -R-deps: XFree86-3.3.5 gettext-0.10.35 giflib-4.1.0 glib-1.2.6 gtk-1.2.6 imlib-1.9.8 jpeg-6b - png-1.0.3 tiff-3.5.1 +&prompt.root; make search key=lsof +Port: lsof-4.56.4 +Path: /usr/ports/sysutils/lsof +Info: Lists information about open files (similar to fstat(1)) +Maint: obrien@FreeBSD.org +Index: sysutils +B-deps: +R-deps: 出力のうち特に注意して見なければならないのは Path という行です。 @@ -604,12 +607,12 @@ R-deps: XFree86-3.3.5 gettext-0.10.35 giflib-4.1.0 glib-1.2.6 gtk-1.2.6 imlib-1. (マウントポイントは必ず /cdrom でないといけません) にマウントされていれば、port をインストールすることができます。 - まず、カレントディレクトリをインストールしたい port - のあるディレクトリに変更してください。 + まず、インストールしたい port + のあるディレクトリに移動してください。 - &prompt.root; cd /usr/ports/irc/xchat + &prompt.root; cd /usr/ports/sysutils/lsof - xchat ディレクトリに移動すると、 + lsof ディレクトリに移動すると、 port スケルトンがあるのが確認できると思います。 次に行なうのは、port のコンパイル (構築、ビルド (build) とも呼ばれます) @@ -619,22 +622,20 @@ R-deps: XFree86-3.3.5 gettext-0.10.35 giflib-4.1.0 glib-1.2.6 gtk-1.2.6 imlib-1. そうすると、次のような出力が現われるはずです。 &prompt.root; make ->> xchat-1.3.8.tar.bz2 doesn't seem to exist on this system. +>> lsof_4.57D.freebsd.tar.gz doesn't seem to exist in /usr/ports/distfiles/. >> Attempting to fetch from file:/cdrom/ports/distfiles/. -===> Extracting for xchat-1.3.8 ->> Checksum OK for xchat-1.3.8.tar.bz2. -===> xchat-1.3.8 depends on executable: bzip2 - found -===> xchat-1.3.8 depends on executable: gmake - found -===> xchat-1.3.8 depends on shared library: gtk12.2 - found -===> xchat-1.3.8 depends on shared library: Imlib.5 - found -===> xchat-1.3.8 depends on shared library: X11.6 - found -===> Patching for xchat-1.3.8 -===> Applying FreeBSD patches for xchat-1.3.8 -===> Configuring for xchat-1.3.8 +===> Extracting for lsof-4.57 +... +[extraction output snipped] +... +>> Checksum OK for lsof_4.57D.freebsd.tar.gz. +===> Patching for lsof-4.57 +===> Applying FreeBSD patches for lsof-4.57 +===> Configuring for lsof-4.57 ... [configure output snipped] ... -===> Building for xchat-1.3.8 +===> Building for lsof-4.57 ... [compilation snipped] ... @@ -647,27 +648,31 @@ R-deps: XFree86-3.3.5 gettext-0.10.35 giflib-4.1.0 glib-1.2.6 gtk-1.2.6 imlib-1. install を指定することだけです。 &prompt.root; make install -===> Installing for xchat-1.3.8 -===> xchat-1.3.8 depends on shared library: gtk12.2 - found -===> xchat-1.3.8 depends on shared library: Imlib.5 - found -===> xchat-1.3.8 depends on shared library: X11.6 - found +===> Installing for lsof-4.57 ... [install routines snipped] ... ===> Generating temporary packing list -===> Installing xchat docs in /usr/X11R6/share/doc/xchat -===> Registering installation for xchat-1.3.8 +===> Compressing manual pages for lsof-4.57 +===> Registering installation for lsof-4.57 +===> SECURITY NOTE: + This port has installed the following binaries which execute with + increased privileges. &prompt.root; プロンプトに戻ったら、 - インストールしたプログラムは実行できるようになっています。 + インストールしたプログラムは実行できるようになっています。 + lsof は高い権限で動作するプログラムなので、 + セキュリティに関する警告が表示されます。 + ports のコンパイルや + インストール中に表示されるこれらの警告に注意してください。 makemake install と二つに分けられた手順の代わりに、 最初から make install と実行することで、 手順の二番目の操作を省くことができます。 - + port には CDROM @@ -678,7 +683,7 @@ R-deps: XFree86-3.3.5 gettext-0.10.35 giflib-4.1.0 glib-1.2.6 gtk-1.2.6 imlib-1. CDROM に含まれていない port をインストールしたい場合には、 ネットワークに接続する必要があります (次のセクションをご覧ください)。 - + @@ -698,37 +703,35 @@ R-deps: XFree86-3.3.5 gettext-0.10.35 giflib-4.1.0 glib-1.2.6 gtk-1.2.6 imlib-1. 次のように、必要な手順は同じです。 &prompt.root; make install ->> xchat-1.3.8.tar.bz2 doesn't seem to exist on this system. ->> Attempting to fetch from http://xchat.org/files/v1.3/. -Receiving xchat-1.3.8.tar.bz2 (305543 bytes): 100% -305543 bytes transferred in 2.9 seconds (102.81 Kbytes/s) -===> Extracting for xchat-1.3.8 ->> Checksum OK for xchat-1.3.8.tar.bz2. -===> xchat-1.3.8 depends on executable: bzip2 - found -===> xchat-1.3.8 depends on executable: gmake - found -===> xchat-1.3.8 depends on shared library: gtk12.2 - found -===> xchat-1.3.8 depends on shared library: Imlib.5 - found -===> xchat-1.3.8 depends on shared library: X11.6 - found -===> Patching for xchat-1.3.8 -===> Applying FreeBSD patches for xchat-1.3.8 -===> Configuring for xchat-1.3.8 +>> lsof_4.57D.freebsd.tar.gz doesn't seem to exist in /usr/ports/distfiles/. +>> Attempting to fetch from ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/. +Receiving lsof_4.57D.freebsd.tar.gz (439860 bytes): 100% +439860 bytes transferred in 18.0 seconds (23.90 kBps) +===> Extracting for lsof-4.57 +... +[extraction output snipped] +... +>> Checksum OK for lsof_4.57D.freebsd.tar.gz. +===> Patching for lsof-4.57 +===> Applying FreeBSD patches for lsof-4.57 +===> Configuring for lsof-4.57 ... [configure output snipped] ... -===> Building for xchat-1.3.8 +===> Building for lsof-4.57 ... [compilation snipped] ... -===> Installing for xchat-1.3.8 -===> xchat-1.3.8 depends on shared library: gtk12.2 - found -===> xchat-1.3.8 depends on shared library: Imlib.5 - found -===> xchat-1.3.8 depends on shared library: X11.6 - found +===> Installing for lsof-4.57 ... [install routines snipped] ... ===> Generating temporary packing list -===> Installing xchat docs in /usr/X11R6/share/doc/xchat -===> Registering installation for xchat-1.3.8 +===> Compressing manual pages for lsof-4.57 +===> Registering installation for lsof-4.57 +===> SECURITY NOTE: + This port has installed the following binaries which execute with + increased privileges. &prompt.root; ご覧のとおり、 @@ -756,25 +759,24 @@ Receiving xchat-1.3.8.tar.bz2 (305543 bytes): 100% さて、前の例 (例のまま何も変更していない人は - xchat) + lsof) を削除してみましょう。ports のインストールと同じように、 まず最初にやらなければならないのは port のディレクトリに移動することです。 - port のディレクトリは /usr/ports/irc/xchat でしたね。 - ディレクトリを移動したら、xchat + port のディレクトリは /usr/ports/sysutils/lsof でしたね。 + ディレクトリを移動したら、lsof を削除するのに必要な準備は終わりです。 削除するには、make deinstall コマンド - (わかりやすいですよね?) を実行します。 + を実行します。 - &prompt.root; cd /usr/ports/irc/xchat + &prompt.root; cd /usr/ports/sysutils/lsof &prompt.root; make deinstall -===> Deinstalling for xchat-1.3.8 -&prompt.root; +===> Deinstalling for lsof-4.57 極めて簡単な作業です。 - これでうまく xchat + これでうまく lsof をシステムから削除することができました。 もう一度再インストールしたい場合には、 - /usr/ports/irc/xchat から + /usr/ports/sysutils/lsof ディレクトリから make reinstall を実行することで行なうことができます。 @@ -855,10 +857,10 @@ Receiving xchat-1.3.8.tar.bz2 (305543 bytes): 100% インターネット上でプログラムのソースコードを配布するために 広く使われている方法です。 - これらのファイルの中身を見たり、 - 展開したりすることもできます。FreeBSD - の基本システムに付属する Unix 標準の tar - コマンドを使ってみると 次のようになります。 + これらのファイルの中身を見たり、 + 展開したりすることもできます。FreeBSD + の基本システムに付属する Unix 標準の tar + コマンドを使ってみると次のようになります。 &prompt.user; tar tvzf foobar.tar.gz &prompt.user; tar xzvf foobar.tar.gz @@ -867,7 +869,7 @@ Receiving xchat-1.3.8.tar.bz2 (305543 bytes): 100% - checksum + チェックサム チェックサムとは何ですか? @@ -972,6 +974,8 @@ Receiving xchat-1.3.8.tar.bz2 (305543 bytes): 100% (省略せずに記述したらこのページに収めるには長すぎるのですが、 考え方は理解していただけたと思います)。 + imake + (X Window System に含まれる) &man.imake.1; を使用する ports の場合は PREFIX が機能せず、 /usr/X11R6 の下へインストールしようとします。 @@ -1165,11 +1169,11 @@ Receiving xchat-1.3.8.tar.bz2 (305543 bytes): 100% - 大丈夫、次のようにしてください。 + 大丈夫、次のように入力してください。 &prompt.root; pkg_delete grizzle-6.5 - もしくは、次のようにします。 + もしくは、次のよう入力します。 &prompt.root; cd /usr/ports/somewhere/grizzle &prompt.root; make deinstall @@ -1192,6 +1196,10 @@ Receiving xchat-1.3.8.tar.bz2 (305543 bytes): 100% &prompt.root; pkg_info -I 'grizzle*' Information for grizzle-6.5: grizzle-6.5 - the combined piano tutorial, LOGO interpreter and shoot 'em up arcade game. + + バージョン番号は、pkg_info または + ls /var/db/pkg と入力すればわかります。 + @@ -1339,7 +1347,7 @@ grizzle-6.5 - the combined piano tutorial, LOGO interpreter and shoot 'em up arc ファイルを見てください。 (複雑なシェルスクリプトを嫌う読者は、 - このリンクを追いかけないほうが良いでしょう…。) + このディレクトリにあるファイルを見ない方が良いでしょう。) -- cgit v1.2.3