Configuration HOWTO <author>By Guido Gonzato, <url url="mailto:guido ``at'' ibogeo.df.unibo.it"> <date>v1.3.7, 6 September 1999 <trans>遠藤明と JF Project <tdate>v1.3.7j, 30 November 1999 <abstract> <!--O This HOWTO aims at making the fine-/-tuning of your newly installed Linux box quicker and easier. Here you will find a set of configurations for the most common applications and services. --> この HOWTO は、新しくインストールした Linux box の調整を短時間で容易に行う ために作成されました。ここで多くの一般的なアプリケーションやサービスの 設定を覚えることができます。 </abstract> <toc> <sect><!-- Introduction -->はじめに<label id="Introduction"> <p> <sect1> <!-- Why This HOWTO -->この HOWTO の存在理由 <p> <!--O I have installed Linux on many PCs and noted that current distributions are terrific but, annoyingly, lack some basic configuration. Most applications will work out of the box, but others won't. Moreover, I have noted that the same questions crop up on c.o.l.setup over and over again. To try and remedy this situation, and for my own convenience, I wrote a to-/-do list that eventually became this HOWTO. Here you will find configuration tips and examples for the most common applications, programs, and services, which should save you a fair amount of time and work. --> 筆者が今までたくさんの PC に Linux をインストールしてきた中で思うよう になったことですが、現在のディストリビューションは素晴らしいけれど、基 本的な設定が欠けていてイライラすることがあります。 また、ほとんどのアプリケーションはそのまま動くのですが、一部にそうで ないものもあります。 さらには、 c.o.l.setup では何度も何度も同じ質問が繰り返されています。 この状態を改善するため、そして筆者自身が便利に使うため、筆者は すべきことのリストを作成しました。それがこの HOWTO 文書になりました。 この文書には設定の際のテクニックと、一般的なアプリケーション、プログラム、 サービスの設定を載せています。これを利用すれば時間と手間を かなり節約できるはずです。 <!--O A few of the examples outlined in this HOWTO depend somehow on the distribution. Currently, I only have access to Red Hat 5.2 machines, kernel 2.0.36; so don't take any of my tips as gospel if you have other distributions. It shouldn't be hard to adapt my tips to other distros, though. --> この HOWTO の例の中には、ディストリビューションに依存するものがいくつ かあります。現在、筆者は RedHat 5.2、カーネル 2.0.36 のマシンにしか触 れません。したがって、他のディストリビューションをお持ちの方は筆者の テクニックが万能だとは考えないでください。しかし、筆者のテクニックを 他のディストリビューションに当てはめるのも難しくはないはずです。 <!--O This HOWTO can't, and is not meant to, replace others. Reading docs and HOWTOs always pays, so you're strongly advised to do so if you want to know more. Also, no spoon-/-feeding here: if you realise you don't understand something, please refer to the relevant HOWTO. Let me remind you that the right place for seeking help with Linux configuration is Usenet, i.e. <url url="news:comp.os.linux.setup">. <em>Please</em>, don't seek help from me because I'm quite overloaded. --> この HOWTO は他のものの代わりになれませんし、その意図もありません。 文書や HOWTO を読むと必ず得るものがあるので、何かを詳しく知りたければ 文書を読むことを強くお勧めします。また、誰かがご飯をスプーンで優しく食 べさせてくれることはありません。何か分からないことがあれば、関連する HOWTO 文書をご自分で参照してください。Linux の設定について助けを求める ための適切な場所は Usenet つまり <url url="news:comp.os.linux.setup"> であることも忘れないでください。<em>どうか</em>筆者に問い合わせないで ください。私はとても忙しいのです。 <!--O The official place for this document, including some translations, is available at <url url="http://metalab.unc.edu/mdw/HOWTO">. Here you will also find all other HOWTOs I refer to. The very latest version is available at <url url="http://ibogeo.df.unibo.it/guido/Configuration">. --> この文書といくつかの言語への翻訳の公式な置き場所は <url url="http://metalab.unc.edu/mdw/HOWTO"> から探せます。ここには 本文書から参照している他の HOWTO も全てあります。最新版は <url url="http://ibogeo.df.unibo.it/guido/Configuration"> から入手でき ます。 <sect1><!-- What We Will Be Configuring --> 何を設定しようとしているのか <p> <!--O There can be endless hardware configurations for a PC, but in my experience one is quite common: a PC fitted with a large HD split into three partitions (one for DOS/Windows, one for Linux, one for the swap), sound card, modem, CD-/-ROM drive, printer, mouse. A parallel port Zip Drive is also very common. This machine is possibly part of a mixed Windows-Linux network, where it acts as server. --> PC のハードウェアがどのように構成されているかは千差万別ですが、私の経験では、 3つのパーティション(DOS/Windows、Linux、スワップの3つ)のはいった大容量 ハードディスク、サウンドカード、モデム、CD-ROM ドライブ、プリンタ、 マウスを共通項目としてあげることができます。 パラレルポート接続の Zip ドライブもよく用いられています。 このマシンは Windows と Linux が混在しているネットワーク上にあり、そこ でサーバとして動作しているでしょう。 <!--O This is the hardware I'll assume you want to configure, but it's easy to adapt the following tips to different configurations. It's implicitly assumed that you'll be root when editing/fixing/hacking. --> このようなハードウェアを設定しようとしているものと仮定して話をすすめますが、 異なった設定でも参考になるものと思います。 特に断わらない限り、設定は root 権限で行ないます。 <!--O And now, lads, sleeves up. --> さあ、腕まくりをして取り掛かりましょう。 <sect><!-- General System Setup -->全般的な設定 <p> <sect1><!-- A Few Words About Security -->セキュリティに関する簡単な説明 <p> <!--O Even before your system boots, you should decide what level of security you want to implement. To begin with, don't connect your machine to the network until you have decided what to do. --> たとえシステムを立ち上げる前でも、実現すべきセキュリティのレベルを決め ておかなければなりません。最初は、すべきことが決まるまではマシンを ネットワークに接続してはいけません。 <!--O Security is a vast subject that goes beyond the scope of this HOWTO; two good starting points are the Linux Security Administrator's Guide at <url url="http://www.seifried.org/lasg"> and the Linux Security Guide at <url url="http://nic.com/~dave/Security">. You should consider at least the following steps: using shadow passwords (Shadow Password HOWTO), restricting network access to the machine (Section <ref id="Restricting" name="Restricting Network Access">), using the Secure Shell (<url url="http://www.cs.hut.fi/ssh/">) or the Secure Remote Password (<url url="http://srp.stanford.edu/srp/">). Good luck. --> セキュリティの分野はとても広範囲であり、この HOWTO の対象を超えていま す。最初の手がかりとしては、Linux Security Administrator's Guide (<url url="http://www.seifried.org/lasg">)と Linux Security Guide (<url url="http://nic.com/~dave/Security">)をお勧めします。少なくとも、 以下のことは考慮してください: シャドウパスワードの使用(Shadow Password HOWTO)、 マシンへのネットワークアクセスの制限(<ref id="Restricting" name="Restricting Network Access"> の節)、 Secure Shell (<url url="http://www.cs.hut.fi/ssh/">) または Secure Remote Password (<url url="http://srp.stanford.edu/srp/">) の使用。 好運を祈ります。 <sect1><!-- Start the Logbook! --> 記録帳を付けよう! <p> <!--O To keep your installation in shape, it's <em>essential</em> that you know exactly what happened to your machine, which packages you installed that day, what you removed or modified, and so on. So, the first thing you'll do before you tamper with your machine is start a ``logbook''. Therein you'll take note of <em>every</em> move you make as root; in my own logbook I also keep a section where I list all modified system files, additional .rpms, and .tar.gz I installed. Optimally, backtracking your moves you should be able to re-obtain a pristine installation. --> インストール済みのマシンを問題無い状態に保つためには、マシンに対して行っ た変更を正確に把握することが<em>重要</em>です。把握すべきなのは、その日に インストールしたパッケージや、削除や修正を行ったファイル等です。したがっ て、マシンをいじる前にまず行うべきことは「記録帳」を付けることです。 記録帳には root で行った<em>全て</em>の変更をメモします。筆者の記録帳 には、修正したシステムファイル、追加した RPM パッケージ、インストール した .tar.gz ファイルが書いてあるページもあります。理想的には、この変更 を逆にたどることによって、マシンを最初にインストールした状態に戻すことが できます。 <!--O Make a backup copy of the system files you touch. Better still, use RCS; you'll be able to backtrack all changes. Never work as root without logging your moves! --> 触ったシステムファイルはバックアップしておきましょう。もっと良いのは、 RCS を使うことです。RCS を使えば全ての変更を遡ることができます。root になって作業したら、行った変更は必ず記録しましょう! <sect1><!-- Keyboard -->キーボード <p> <!--O If you missed this step during installation or have changed your keyboard, you'll have to: --> インストール中に設定していなかったり、キーボードを替えた時には次のよう にします。 <itemize> <!--O <item> find a suitable key table starting from <file>/usr/lib/kbd/keymaps/</file>; for example, <tt/it.map/ selects the Italian keyboard; --> <item><file>/usr/lib/kbd/keytables/</file> の中から適当なキーテーブル を見つけます。 例えば、<tt/it.map/はイタリアのキーボード用のテーブルです: <!--O <item> edit the file <file>/etc/sysconfig/keyboard</file> so as it reads: <tt>KEYTABLE="it"</tt>; --> <item> <file>/etc/sysconfig/keyboard</file> を編集し、 <tt>KEYTABLE="it"</tt> とします: <!--O <item> to set up the keyboard repeat rate and delay time, add this line to <file>/etc/rc.d/rc.sysinit</file> (Red Hat) or <file>/etc/rc.d/rc.boot</file> (Caldera) or <file>/etc/rc.d/boot</file> (S.u.S.E.): --> <item>キーボードのリピート速度とディレイ時間を設定するには、 <file>/etc/rc.d/rc.sysinit</file> (Red Hatの場合) <file>/etc/rc.d/rc.boot</file> (Calderaの場合) <file>/etc/rc.d/boot</file> (S.u.S.Eの場合) に次の行を加えます: <!--O <tscreen><verb> /sbin/kbdrate -s -r 16 -d 500 # or whatever you like </verb></tscreen> --> <tscreen><verb> /sbin/kbdrate -s -r 16 -d 500 # お好みに合わせてください </verb></tscreen> </itemize> <!--O To load the key table, issue <file>/etc/rc.d/init.d/keytable start</file>. Other special keys will be considered in the following sections. --> このキーテーブルを読み込むためには <file>/etc/rc.d/init.d/keytablestart</file> を実行してください。その他の特殊キーに関しては続いて説明します。 <!--O To enable NumLock on by default, add these lines to <file>/etc/rc.d/rc.sysinit</file>: --> NumLock キーをデフォルトで on にしたい場合には、 <file>/etc/rc.d/rc.sysinit</file> に次の行を追加してください: <tscreen><verb> for tty in /dev/tty[1-9]*; do setleds -D +num < $tty done </verb></tscreen> <sect1> <!-- Boot and Rescue Floppy -->起動フロッピーとレスキューフロッピー <p> <!--O Make a couple of boot floppies for your newly installed system. Your distribution may include a command for creating such a floppy; if not, these commands will do: --> 新しくインストールしたシステムに対しては、起動フロッピーを 2 枚くらい 用意しておきましょう。お使いのディストリビューションにはこういった フロッピーを作成するコマンドがあると思います。もしなければ、以下の コマンドで作成できます: <!--O <tscreen><verb> #~ dd if=/boot/vmlinuz-2.0.36-0.7 of=/dev/fd0 # use your kernel image #~ rdev /dev/fd0 /dev/hda2 # your Linux partition </verb></tscreen> --> <tscreen><verb> #~ dd if=/boot/vmlinuz-2.0.36-0.7 of=/dev/fd0 # 実際のカーネルイメージを指定 #~ rdev /dev/fd0 /dev/hda2 # 実際の Linux パーティション </verb></tscreen> <!--O Also, have at least a couple of rescue disks ready. There's a wide choice of rescue disks at <url url="ftp://metalab.unc.edu/pub/Linux/system/recovery">; if you don't know which one to choose, I suggest you try out Tomsbtrt. --> また、すぐ使えるレスキューディスクを少なくとも 2 枚は用意しておきましょ う。レスキューディスクには色々な種類があり、それらは <url url="ftp://metalab.unc.edu/pub/Linux/system/recovery"> から入手で きます。どれを選べば良いか分からない方には Tomsbtrt をお勧めしておきま す。 <sect1><!-- Kernel Matters -->カーネルの再構築について <p> <!--O IMHO, the first thing to do next is build a kernel that best suits your system. It's very simple to do but, in any case, refer to the <tt/README/ file in <file>/usr/src/linux/</file> or the Kernel HOWTO. Hints: --> 次に行なうべきことは、あなたのシステムに最適なカーネルを構築すること です。非常に単純ではありますが、とにかく<file>/usr/src/linux/</file> に ある <tt/README/ ファイルか Kernel-HOWTO を読んでください。ヒントとしては: <itemize> <!--O <item> consider carefully your needs. Choosing a kernel configuration, applying the patches, and compiling it once and for all is more productive than reconfiguring and recompiling each month; this is especially true if your Linux box is a server. Don't forget to include support for all the hardware you might likely add in the future (e.g. SCSI, Zip, network cards, etc); using modules is usually the best choice; --> <item> あなたが何を必要としているかを考えてください。カーネルの設定や パッチ当て、コンパイルを一度だけで終わらせられれば、毎月毎月設定とコン パイルをやり直すよりもずっと生産的です。これはあなたのマシンがサーバ ならば、なおさら重要なことです。将来増やすことになるかもしれないハード ウェア(SCSI、Zip、ネットワークカードなど)のサポートを忘れないでくださ い。モジュールを使うのは良い選択です。 <!--O <item> if your PC is based on a Cyrix CPU that is not properly recognised as such by the kernel, apply appropriate patches to improve its performance. Information on <url url="http://www.linuxhq.com/patch/20-p0591.html">; --> <item> もしあなたの PC が Cyrix の CPU なら、性能を改善するためのパッチ を当ててください。情報は <url url="http://www.linuxhq.com/patch/20-p0591.html"> にあります。 <!--O <item> notebook users will want to improve their LCD screen legibility. I once suggested that a kernel patch should be applied, but <tt>SVGATextMode</tt> (see Section <ref id="SVGA" name="SVGATextMode">) is probably the best solution. Anyway, the Big Cursor kernel patch is on <url url="http://www.linuxhq.com/patch/20-p0239.html">; --> <item> ノートパソコンのユーザは、液晶画面を見やすくしたいと思っているでしょう。 これまで私は、カーネルにパッチを当てることを勧めてきましたが、 <tt>SVGATextMode</tt> がおそらくは最善の方法でしょう (詳しくは、<ref id="SVGA" name="SVGATextMode"> をご覧ください)。 ともかく、カーソルを大きくするパッチに関する情報は、 <url url="http://www.linuxhp.com/patch/20-p0239.html"> にあります。 <!--O <item> again for notebook users, if you plan to use a PCMCIA modem/fax <em/don't/ compile serial support as a module; compile it in the kernel, otherwise your PCMCIA modem won't work; --> <item> また、ノートパソコンで PCMCIA モデム/ファックスを使う場合には、 シリアルポートのサポートをモジュール<em/ではなく/カーネルに組み込んで ください。そうしないと PCMCIA モデムは動作しません。 <!--O <item> if you use PCMCIA cards, remember to compile those modules as well; also, don't forget to edit <file>/etc/pcmcia/network.opts</file> if you use a PCMCIA network card; --> <item> PCMCIA カードを使う場合には、これらのモジュールのコンパイルも忘 れないでください。また、PCMCIA ネットワークカードを使う場合には、 <file>/etc/pcmcia/network.opts</file> ファイルの編集も忘れないでください。 <!--O <item> if you get those pesky messages from <tt>modprobe</tt> indicating that some modules can't be located, that means that your <file>/etc/conf.modules</file> needs mending. For instance, if you don't use the ipx and appletalk modules, add these lines: --> <item> modprobe が、見つからないモジュールがあるというおかしなメッセー ジを出すようなら、<file>/etc/conf.modules</file>を直す必要があります。 ipx と appletalk モジュールを使わないなら、次の行を加えてください: <tscreen><verb> alias net-pf-4 off alias net-pf-5 off </verb></tscreen> <!--O <item> to save time the next time you reconfigure and recompile the kernel, it's a good idea to save your configuration on a file and keep it in a safe place. Beware: if you upgrade your kernel this config file is bound to be useless, because it doesn't contain the features of the new kernel. --> 次にカーネルの再構築を行うときのために、設定ファイルを安全なところに保 存しておくと良いでしょう。注意 - カーネルのアップグレードを行うときには、 新しいカーネルの機能についての記述が無いため、この設定ファイルは役に 立ちません。 </itemize> <sect1><!-- Sendmail Lock -->Sendmail によるロック <p> <!--O On some systems, <tt/sendmail</tt> hangs the machine for a couple of minutes at boot time. There are two cases: 1) the machine is not directly connected to the Internet, 2) the machine is connected, and has a permanent IP address. --> システムによっては、ブート時に <tt/sendmail/ がシステムを 2〜3 分停止さ せてしまうことがあります。これは、1)インターネットに直接接続されていな い場合と 2)インターネットに直接接続されていて、固定IPアドレスを持ってい る場合の 2 つが考えられます。 <!--O Quick fix for the first case: make sure your <file>/etc/hosts</file> contains a line that reads --> 前者の場合に、最も簡単な修正方法は、<file>/etc/hosts</file> に、 以下の行を挿入することです。 <tscreen><verb> 127.0.0.1 localhost </verb></tscreen> <!--O For the second case: the lock is caused by <file>/etc/hosts</file> containing a line like --> 後者の場合には、<file>/etc/hosts</file> に以下のような行があると問題 が発生します。 <tscreen><verb> 127.0.0.1 localhost your_host_name </verb></tscreen> <!--O which you will split this way: --> この場合には、以下のように分割してください: <tscreen><verb> 127.0.0.1 localhost w.x.y.z your_host_name </verb></tscreen> <!--O See also Section <ref id="Hostname" name="Hostname">. --> <ref id="Hostname" name="Hostname">の節も参考にしてください。 <sect1><!-- Hard Disk Performance -->ハードディスクの性能向上 <p> <!--O Your (E)IDE hard disk's performance can be greatly enhanced by <em>carefully</em> using <tt>hdparm</tt>(8). If your Linux distribution doesn't include it, you'll find on <url url="ftp://metalab.unc.edu/pub/Linux/system/hardware">; look for a file called <file>hdparm-X.Y.tar.gz</file>. --> ハードディスクの性能は <tt>hdparm</tt> (8)を<em>注意深く</em>使うこと によって改善するかもしれません。もし <tt>hdparm</tt> がないなら、 <url url="ftp://sunsite.unc.edu/pub/Linux/system/hardware"> で <file>hdparm-X.Y.tar.gz</file> を探してください。 <!--O Since many details depend on your hard disk and HD controller, I can't give you a general recipe. You risk to toast your filesystem, so <em>read the man page carefully</em> before using some of the options. At its simplest, you could add the following line to <file>/etc/rc.d/rc.sysinit</file>: --> 詳細な部分については、ハードディスクとハードディスクコントローラに依 存しますので、どうすれば良いかを一般的に示すことはできません。ファイル システムを駄目にしてしまわないように、<em>man page を注意深く読んで</em> から使ってください。最も簡単な方法は、 <file>/etc/rc.d/rc.sysinit</file> に以下の行を加えることです: <!--O <tscreen><verb> /sbin/hdparm -c1 /dev/hda # first IDE drive assumed </verb></tscreen> --> <tscreen><verb> /sbin/hdparm -c1 /dev/hda # 一番目のIDEドライブの場合 </verb></tscreen> <!--O which enables (E)IDE 32-bit I/O support. As for the `<tt>-m</tt>' option, this is what <tt>hdparm</tt> author Mark Lord emailed me: --> これによって、(E)IDE 32ビット入出力が可能になります。-m オプションにつ いては、<tt>hdparm</tt> の作者 Mark Lord からこんな email がきています: <quote> <!--O (...) if your system uses components from the past couple of years [< 1997], it will be fine. Older than that, there *may* be a problem (unlikely). The really buggy chips were the CMD0646 and RZ1000 chips, used *extensively* on 486 and (early) 586 motherboards about 2-3 years ago. --> (...) もしあなたのシステムがここ 1、2 年の部品を使っているなら問題はありません。 それより古い場合には(あまり考えにくいのですが)問題があるかもしれません。 バグの多いチップは、CMD0646 と RZ1000 で、2、3 年前まで、486 や初期の 586 用の マザーボードのほとんどで使われていました。 </quote> <!--O For recent machines, these settings should work fine: --> 最近のマシンならば、以下の設定でうまく動作するはずです: <tscreen><verb> /sbin/hdparm -c1 -A1 -m16 -d1 /dev/hda </verb></tscreen> <sect1><!-- Parallel Port Zip Drive -->パラレルポート Zip ドライブ <p> <!--O To use the parallel port version of the Zip drive you can use the default driver that comes with recent (2.x.x) kernels. During kernel configuration, make sure that SCSI support and SCSI disk support are enabled. Remember, there can be conflicts between the printer and the Zip drive on the same parallel port, so you will want to use kernel modules. There's an alternative <tt/ppa/ driver at <url url="http://www.torque.net/~campbell">. --> パラレルポートの Zip ドライブを使うには、最近の(2.x.x)カーネルのデフォ ルトドライバで大丈夫です。カーネル再構築の際には、SCSI のサポートと SCSI ディスクのサポートを使えるようにしておいてください。Zip ドライブとパラレル プリンタが同じパラレルポート上にあると、競合が起こることがあります。そ んな時は、モジュールを使うようにしてください。これとは別の <tt/ppa/ が <url url="http://www.torque.net/~campbell"> にあります。 <!--O Zip disks are sold preformatted on partition <file>/dev/sda4</file>. To enable the Zip, append this to <file>/etc/rc.d/rc.sysinit</file>: --> Zip ディスクは、<file>/dev/sda4</file> パーティションを使うように予め フォーマットされた状態で売られています。Zip を使えるようにするには、 以下の設定を <file>/etc/rc.d/rc.sysinit</file> に追加します: <!--O <tscreen><verb> # Enable the Zip drive /sbin/modprobe ppa </verb></tscreen> --> <tscreen><verb> # Zip ドライブを使えるようにします /sbin/modprobe ppa </verb></tscreen> <!--O Zip disks can be mounted via <file>/etc/fstab</file> as shown below, or via Mtools adding this line to your <file>/etc/mtools.conf</file>: --> Zip ディスクは <file>/etc/fstab</file> を以下のように設定すればマウン トできます。あるいは、この行を <file>/etc/mtools.conf</file> に追加す れば Mtools で使えます。 <tscreen><verb> drive z: file="/dev/sda4" exclusive </verb></tscreen> <!--O besides, the command <tt>mzip</tt> allows you to eject, query the status, write and password protect Zip disks; <tt>man mzip</tt> for details. The Mtools home page is atp <url url="http://linux.wauug.org/pub/knaff/mtools">. --> これに加えて、<tt>mzip</tt> コマンドを使うとディスクのイジェクト、状態 の問い合わせ、書き込み、Zip ディスクのパスワード保護ができます。詳しく は <tt>man mzip</tt> をご覧ください。Mtools のホームページは <url url="http://linux.wauug.org/pub/knaff/mtools"> です。 <sect1><!-- Device Drivers -->デバイスドライバ <p> <!--O Devices in <tt>/dev</tt> (or better, links to the actual device drivers) may be missing. Check what devices your mouse, modem, and CD-/-ROM drive correspond to, then do what follows: --> <tt>/dev</tt> にデバイス(というよりは実際のデバイスドライバへのリンク) が無いことがあります。マウス、モデム、CD-ROM ドライブなどのデバイスを 確認してください。もしも無い場合には、次のようにしてください: <tscreen><verb> ~# cd /dev /dev# ln -s ttyS0 mouse; ln -s ttyS1 modem; ln -s hdb cdrom; ln -s sda4 zip </verb></tscreen> (訳注: 上記は例ですので、それぞれのデバイスがそれぞれのデバイスファイ ルに接続されているとは限りません。確認の上でシンボリックリンクを張るよ うにしてください) <!--O In most notebooks the mouse device is <file>/dev/psaux</file>: take this into account when configuring X11. --> ノートブックの大部分はマウスが <file>/dev/psaux</file> になっています。 X11 の設定の際にもこの点に注意してください。 <!--O If you want, do <tt>chmod 666</tt> to these devices to make them fully accessible by every user. --> 必要ならば、これらのデバイスに対して <tt>chmod 666</tt> を実行すると誰 でもアクセスできるようになります。 <!-- 原文のコメント --> <!-- Security problems ahead! Alternatively, create the ``cdrom'' group, make <tt>/dev/cdrom</tt> owned by <tt>root.cdrom</tt>, then add users to this group. A similar procedure applies to other devices. --> <sect1> <!-- Sound Card -->サウンドカード <p> <!--O All I own is an old Sound Blaster 16; even if you've got something different, you may take what follows as guidelines. --> 筆者は古い Sound Blaster 16 しか持っていません。しかし、読者のみなさん が何か別のカードを持っていても、以下の説明をガイドとして参考にできるで しょう。 <!--O I compiled the sound card support as a module (<tt>sb.o</tt>). Then I put this in <file>/etc/conf.modules</file>: --> 筆者はサウンドカードのサポートをモジュール(<tt>sb.o</tt>)としてコンパ イルしています。それから <file>/etc/conf.modules</file> に以下の行を追 加しています: <tscreen><verb> options sb io=0x220 irq=5 dma=1 dma16=5 mpu_io=0x330 alias sound sb </verb></tscreen> <!--O To enable the sound, make sure that <tt>modprobe sound</tt> is invoked in <file>/etc/rc.d/rc.sysinit</file>. Alternatively, get the tool <tt>sndconfig</tt> from the RedHat site. --> サウンド機能を有効にするには、<file>/etc/rc.d/rc.sysinit</file> 内で <tt>modprobe sound</tt> を必ず実行してください。これを行う代わりに、 RedHat のサイトから <tt>sndconfig</tt> ツールを入手してもよいでしょう。 <sect1><!-- Login Messages -->ログインメッセージ <p> <!--O If you wish to customise the login messages, check whether your <file>/etc/rc.d/rc.local</file> overwrites <file>/etc/issue</file> and <file>/etc/motd</file>. (RedHat does.) If so, get on with your editor. --> ログイン時のメッセージを変更したいなら、<file>/etc/rc.d/rc.local</file> で <file>/etc/issue</file> と <file>/etc/motd</file> が上書きされていないかを 調べてください(RedHat の場合)。 その場合には、エディタで変更してください。 <!--O If you'd like a colourised login message, you may adapt your <tt>rc.local</tt> inserting lines like these: --> ログインメッセージに色を付けたければ、<tt>rc.local</tt> に以下のような 設定を入れてください: <!--O <tscreen><verb> # put a real escape character instead of ^[. To do this: # emacs: ^Q ESC vi: ^V ESC joe: ` 0 2 7 jed: ` ESC ESC="^[" # a real escape character BLUE="$ESC[44;37m" NORMAL="$ESC[40;37m" CLEAR="$ESC[H$ESC[J" > /etc/issue echo "$CLEAR" >> /etc/issue echo "$BLUE Welcome to MyServer (192.168.1.1) " >> /etc/issue echo "$NORMAL " >> /etc/issue echo "" >> /etc/issue </verb></tscreen> --> <tscreen><verb> # ^[ ではなく、実際のエスケープ文字を入れます。これは以下の操作で行います: # emacs: ^Q ESC vi: ^V ESC joe: ` 0 2 7 jed: ` ESC ESC="^[" # 実際のエスケープ文字 BLUE="$ESC[44;37m" NORMAL="$ESC[40;37m" CLEAR="$ESC[H$ESC[J" > /etc/issue echo "$CLEAR" >> /etc/issue echo "$BLUE Welcome to MyServer (192.168.1.1) " >> /etc/issue echo "$NORMAL " >> /etc/issue echo "" >> /etc/issue </verb></tscreen> <sect1><!-- Hostname -->ホスト名<label id="Hostname"> <p> <!--O Issuing the command <tt>hostname new_host_name</tt> may not be enough. To avoid the dreaded <tt>sendmail</tt> lock, follow these steps (only valid for a stand-/-alone machine): --> ホスト名を変える場合には、<tt/hostname new_host_name/ としただけでは不十分です。 恐ろしい <tt>sendmail</tt> のロックを避けるためには以下のようにします (これが当てはまるのはスタンドアロンのマシンだけです): <itemize> <!--O <item> edit <file>/etc/sysconfig/network</file> and change the hostname therein (e.g. <tt>new_host_name.localdomain</tt>); --> <item> <file>/etc/sysconfig/network</file> を編集して、そこにあるホスト名を 変更します(例 <tt>new_host_name.localdomain</tt>)。 <!--O <item> edit <file>/etc/HOSTNAME</file> appropriately; --> <item> <file>/etc/HOSTNAME</file> を適切に編集します。 <!--O <item> append the new hostname in the line in <file>/etc/hosts</file>: --> <item> <file>/etc/hosts</file> に新しいホスト名を追加します: <!--O <tscreen><verb> 127.0.0.1 localhost new_host_name.locadomain </verb></tscreen> --> <tscreen><verb> 127.0.0.1 localhost new_host_name.localdomain </verb></tscreen> </itemize> <sect1><!-- Mouse -->マウス <p> <!--O <tt/gpm/ mouse services are useful to perform cut and paste in tty mode, and to use the mouse in some applications. For Red Hat, check that you have a file called <file>/etc/sysconfig/mouse</file> and that it reads: --> <tt/gpm/のマウスサービスは、tty モードでカットアンドペーストを行ったり、 アプリケーションでマウスを使うのに有効です。RedHat の場合、 <file>/etc/sysconfig/mouse</file> に次のような行があるのを確認してください: <tscreen><verb> MOUSETYPE="Microsoft" XEMU3=yes </verb></tscreen> <!--O Moreover, you must have a file <file>/etc/rc.d/init.d/gpm</file>, where you'll put additional command line parameters. Mine reads: --> さらに、<file>/etc/rc.d/init.d/gpm</file> があることを確認してください。 ここで、コマンドラインパラメータの追加をしてください。私の場合には: <tscreen><verb> ... daemon gpm -t $MOUSETYPE -d 2 -a 5 -B 132 # two-button mouse ... </verb></tscreen> としました。 <!--O Obviously, make sure this configuration is right for your mouse type. In most notebooks, <tt/MOUSETYPE/ is ``<tt>PS/2</tt>''. --> もちろんマウスの設定があなたのマウス用に正しく設定されている必要があります。 ほとんどのノートブックの場合、<tt/MOUSETYPE/ は ``<tt>PS/2</tt>'' です。 <!--O For Caldera, all you have to do is append this line to <file>/etc/rc.d/rc.boot</file>: --> Caldera では、<file>/etc/rc.d/rc.boot</file>に次の行を加えてください: <tscreen><verb> /usr/bin/gpm </verb></tscreen> <!--O On S.u.S.E., <tt>gpm</tt> options go in <file>/etc/rc.config</file>; on Debian, you'll edit <file>/etc/gpm.conf</file>. --> S.u.S.E の場合には、<tt>gpm</tt> のオプションは <file>/etc/rc.config</file> に記述します。 Debian の場合には <file>/etc/gpm.conf</file> を編集してください。 <!--O If you like to use menus in console with Ctrl-button, then configure <tt>gpm-root</tt>. Edit the default menu in <file>/etc/gpm-root.conf</file>, then launch <tt>gpm-root</tt> from <file>/etc/rc.d/rc.local</file>. --> コンソールの中で、Ctrl-buttonでメニューを呼び出したい場合には、 <tt>gpm-root</tt> を編集してください。 <file>/etc/gpm-root.conf</file> のデフォルトメニューを編集して、 <file>/etc/rc.d/rc.local</file> より <tt>gpm-root</tt> を立ち上げるようにしてください。 <sect1><!-- Mount Points -->マウントポイント <p> <!--O It's handy to have mount points for the floppy, other devices and NFS-exported directories. For example, you can do the following: --> フロッピーディスクなどのデバイスや、NFS でエクスポートされたディレクトリのために、 マウントポイントを用意しておくと便利です。例えば以下のようにします: <tscreen><verb> ~# cd /mnt /mnt# mkdir floppy; mkdir cdrom; mkdir win; mkdir zip; mkdir server </verb></tscreen> <!--O This creates mount points for a DOS/Win floppy, an ext2 floppy, the CD-/-ROM, the Windows partition, the parallel port Zip drive, and a NFS directory. --> これらは、DOS/Win フロッピ, ext2 フロッピ, CD-ROM, Windows パーティション、Zip ドライブや NFS ディレクトリのマウントポイントとなります。 <!--O Now edit the file <file>/etc/fstab</file> and add the following entries: --> <file>/etc/fstab</file>を編集して、以下の項目を追加してください。 <tscreen><verb> /dev/fd0 /mnt/floppy auto user,noauto 0 1 /dev/cdrom /mnt/cdrom iso9660 ro,user,noauto 0 1 /dev/zip /mnt/zip vfat user,noauto,exec 0 1 /dev/hda1 /mnt/win vfat user,noauto 0 1 server:/export /mnt/server nfs defaults </verb></tscreen> <!--O Obviously, you must use the correct device in the first field. Recent kernels support fat32 partitions natively; for older ones, there's a kernel patch at <url url="http://bmrc.berkeley.edu/people/chaffee/fat32.html">. <tt>man mount</tt> for further information. --> 最初の欄には正確なデバイス名を書いてください。最近のカーネルでは fat32 が 最初から組み込まれていますが、古いバージョンの場合には、 <url url="http://bmrc.berkeley.edu/people/chaffee/fat32.html"> にある パッチを当ててください。詳しくは<tt>man mount</tt>をご覧ください。 <!--O Note the ``auto'' filesystem type in the first line; it allows you to mount both ext2 and vfat (DOS/Windows) floppies. You may find <tt>mtools</tt> more convenient. --> 最初の行ではファイルシステムの種類が ``auto'' になっている点に注意して ください。これを用いると、ext2 と vfat (DOS/Windows) のどちらのフロッピー もマウントできます。ただし <tt>mtools</tt> の方がもっと便利でしょう。 <sect1><!-- lilo(8) and LOADLIN.EXE --> lilo(8) と LOADLIN.EXE <p> <!--O Many users run both Linux and DOS/Windows on their PC, and want to choose at boot time which os to use; this should be done at install time, but in case, do what follows. Let's suppose that <file>/dev/hda1</file> contains DOS/Windows and that <file>/dev/hda2</file> contains Linux. --> 多くのユーザは、 Linux と DOS/Windows の両方をPC上で動かしており、ブート時に どちらの OS を使うかを選択しています。-これはインストール時に設定しておくべきです。 そうでない場合は以下のようにしてください。 <file>/dev/hda1</file> に DOS/Windows がインストールされていて、<file>/dev/hda2</file> に Linux がインストールされている としましょう。 <tscreen><verb> ~# fdisk Using /dev/hda as default device! Command (m for help):a Partition number (1-4): 2 Command (m for help):w ~# </verb></tscreen> <!--O This makes the Linux partition bootable. Then write this basic <file>/etc/lilo.conf</file> file: --> これで、 Linux パーティションから起動できるようになります。次に、基本的な <file>/etc/lilo.conf</file> ファイルを書きます: <!--O <tscreen><verb> boot = /dev/hda2 compact # may conflict with "linear" delay = 100 # 10 seconds linear # gets rid of the "1024 cylinder" problem # message = /boot/bootmesg.txt # write your own, if you will root = current image = /boot/vmlinuz # boot linux by default as this entry comes first label = linux read-only # append="mem=128M" # to see more memory than 64M other = /dev/hda1 table = /dev/hda label = dos </verb></tscreen> --> <tscreen><verb> boot = /dev/hda2 compact # "linear" と衝突するかもしれません delay = 100 # 10 秒 linear # 「1024 シリンダ」問題を回避します # message = /boot/bootmesg.txt # 指定するならば、実際のファイルを指定します root = current image = /boot/vmlinuz # この項目が最初なので、デフォルトでは Linux が起動します label = linux read-only # append="mem=128M" # 64M 以上のメモリを扱うため other = /dev/hda1 table = /dev/hda label = dos </verb></tscreen> <!--O Now issue <file>/sbin/lilo</file> and you're done. Being <tt/lilo/ a crucial part of your installation, you're strongly advised to read its documentation anyway. --> 次に <tt>/sbin/lilo</tt> を実行すれば終りです。<tt/lilo/ はインストールの中でも 特に重要な部分ですので、ドキュメントを良く読むことを強くお勧めします。 <!--O To boot Linux from DOS/Windows without resetting, put <tt/LOADLIN.EXE/ in a directory (in the DOS partition!) included in the DOS path; then copy your kernel to, say, <tt>C:\TEMP\VMLINUZ</tt>. The following simple <tt/.BAT</tt> file will boot Linux: --> DOS/Windows からリセットをかけずに Linux を起動するには、 <tt/LOADLIN.EXE/ を DOS パーティションの中のパスの通ったディレクトリに置き、 カーネルを、たとえば <tt>C:\DOS\VMLINUZ</tt> にコピーします。 次のバッチファイルで Linux を起動できます: <tscreen><verb> rem linux.bat smartdrv /C loadlin c:\temp\vmlinuz root=/dev/hda2 ro </verb></tscreen> <!--O If you use Windows 9x, set the properties of this <tt/.BAT</tt> so as it starts in MS-/-DOS mode. --> もし、Windows 9x を使っているなら、このバッチファイルが、 MS-DOS モードで 実行されるようにしてください。 <sect2><!-- Security Tip -->セキュリティのために <p> <!--O Making a backup copy of your MBR before installing Linux is a safe move. Use <tt>restorrb</tt> (included in the <tt>FIPS</tt> package) before installation, or a Linux rescue floppy to issue this command: --> Linux のインストールの前に MBR のバックアップをとっておくと、非常に安全です。 インストール前に <tt/restorrb/ (<tt/FIPS/ パッケージに含まれています。) を使うか、Linux のレスキューフロッピーを使って以下のコマンドを実行して ください: <tscreen><verb> rescue:~# dd if=/dev/hda of=MBR bs=512 count=1 </verb></tscreen> <!--O then make at least two copies of the file <tt>MBR</tt> on floppies. Should disaster strike, you'll be able to restore your old MBR by issuing: --> フロッピーに <tt>MBR</tt> のコピーを最低 2 つは作っておきましょう。 古い MBR を復旧させる場合は <tt>/mnt</tt> 以下に <tt>MBR</tt> の入ったフロッピー をマウントさせてから以下のコマンドを実行します: <tscreen><verb> rescue:~# dd if=/mnt/MBR of=/dev/hda bs=446 count=1 </verb></tscreen> <!--O assuming that a floppy containing <tt>MBR</tt> is mounted under <tt>/mnt</tt>. Alternatively, use a DOS rescue floppy to issue <tt>FDISK /MBR</tt>. --> ここでは <tt>MBR</tt> が入っているフロッピーは <tt>/mnt</tt> にマウン トされているものとします。以上の作業を行う代わりに、DOS の レスキューフロッピーを使って <tt>FDISK /MBR</tt> を実行しても構いませ ん。 <sect1><!-- Mail Capabilities -->メールの機能 <p> <!--O You will want to be able to read mail messages written in HTML or containing exotic file formats. Make sure you have two files: <file>/etc/mime.types</file> and <file>/etc/mailcap</file>. The first one lists file types and related extensions, like: --> HTML で書かれたメールやテキスト以外のファイル形式を含むメールを読みたく なることがあるでしょう。このような時には、<file>/etc/mime.types</file> と <file>/etc/mailcap</file> の 2 つのファイルがあることを確認してください。 最初のファイルには、以下のようにファイルの形式と、関係する拡張子を書いて おきます: <tscreen><verb> application/postscript ps eps image/jpeg jpe jpeg jpg text/html html </verb></tscreen> <!--O while the second one tells the mail client how to display that file type. --> 2 番目のファイルには、メールクライアントがどのようにそのファイルを表示 するかを書いておきます。 <!--O You may receive mail from people who use Microsoft Outlook, whose messages are in multi-/-part MIME format. These two lines, put in <file>etc/mailcap</file>, should let you read those messages: --> Microsoft Outlook を使っている人からメールを受け取ると、そのメールは マルチパート MIME 形式になっていますが、<file>/etc/mailcap</file> に次 の 2 行を追加することで、読むことができます: <tscreen><verb> text/plain; less %s; needsterminal text/html; lynx -force_html %s; needsterminal </verb></tscreen> <sect1><!-- Printer Configuration -->プリンタの設定 <p> <!--O All distributions I know have a configuration tool for setting up the printer (<tt>printtool</tt>, <tt>yast</tt>, or <tt>magicfilter</tt>); if you don't have it, this is a basic manual configuration. --> 私の知っているすべてのディストリビューションでは、プリンタの設定ツール が用意されています。(<tt/printtool/, <tt>yast</tt>, <tt>magicfilter</tt> など)。 もし、これらのツールが用意されていない場合には、以下の設定を行ってください。 <!--O Let's suppose you have a non-/-PostScript (non ``Windows-only'' too!) printer you want to use to print raw text (e.g., C source files) and PostScript files via Ghostscript, which is assumed to be already installed. --> なお、PostScript 対応でない(また、「Windows 専用」ではない!) プリンタに テキスト (たとえば C のソースファイルなど) を印刷したいと仮定します。 また、PostScript ファイルに関してはすでにインストールされているであろう Ghostscript を使って印刷することを仮定します: <!--O Setting up the printer involves a few steps: --> プリンタの設定はいくつかのステップで行います: <itemize> <!--O <item> find out which one the parallel print device is: try --> <item> どのパラレルポートが使われているか調べます。以下のコマンドを試 し、どちらが動作したかをメモしておいてください: <tscreen><verb> ~# echo "hello, world" > /dev/lp0 ~# echo "hello, world" > /dev/lp1 </verb></tscreen> <!--O and take note which one works. --> <!--O <item> make two spool directories: --> <item> スプール用ディレクトリを 2 つ作ります: <tscreen><verb> ~# cd /var/spool/lpd /var/spool/lpd/# mkdir raw; mkdir postscript </verb></tscreen> <!--O <item> if your printer exibits the ``staircase effect'' (most inkjets do), you'll need a filter. Try to print two lines with --> <item> もし「階段状」に印刷されてしまうようなら(ほとんどのインクジェッ トプリンタがそうです)、フィルタが必要です。次のようにして 2 桁印刷して みてください。 <tscreen><verb> ~# echo "first line" > /dev/lp1 ; echo "second line" > /dev/lp1 </verb></tscreen> <!--O if the output is like this: --> 出力が以下のようであれば: <!--O <tscreen><verb> first line second line </verb></tscreen> --> <tscreen><verb> 最初の行 その次の行 </verb></tscreen> <!--O then save this script as <file>/var/spool/lpd/raw/filter</file>: --> のようになっていたら、次のスクリプトを <file>/var/spool/spd/raw/filter</file> として保存してください: <tscreen><verb> #!/bin/sh # This filter eliminates the "staircase effect" awk '{print $0, "\r"}' </verb></tscreen> <!--O and make it executable with <tt>chmod 755 /var/spool/lpd/raw/filter</tt>. --> 次にこのファイルを <tt>chmod 755 /var/spool/lpd/raw/filter</tt> として、 実行可能にしてください。 <!--O <item> make a filter for PostScript emulation. Write the following filter as <file>/var/spool/lpd/postscript/filter</file>: --> <item> 次にこのファイルを <tt>chmod 755 /var/spool/lpd/raw/filter</tt> として実行可能にしてください。 <tscreen><verb> #!/bin/sh DEVICE=djet500 RESOLUTION=300x300 PAPERSIZE=a4 SENDEOF= nenscript -TUS -ZB -p- | if [ "$DEVICE" = "PostScript" ]; then cat - else gs -q -sDEVICE=$DEVICE \ -r$RESOLUTION \ -sPAPERSIZE=$PAPERSIZE \ -dNOPAUSE \ -dSAFER \ -sOutputFile=- - fi if [ "$SENDEOF" != "" ]; then printf "\004" fi </verb></tscreen> <!--O (in this example an HP DeskJet printer is assumed. Fix it to suit your printer). --> (この例では、 HP DeskJet プリンタを仮定しています。あなたのプリンタに 合わせて修正してください。) <!--O <item> finally, add the following entries in <file>/etc/printcap</file>: --> <item> 最後に、次の項目を <file>/etc/printcap</file> に追加して ください: <tscreen><verb> # /etc/printcap lp|ps|PS|PostScript|djps:\ :sd=/var/spool/lpd/postscript:\ :mx#0:\ :lp=/dev/lp1:\ :if=/var/spool/lpd/postscript/filter:\ :sh: raw:\ :sd=/var/spool/lpd/raw:\ :mx#0:\ :lp=/dev/lp1:\ :if=/var/spool/lpd/raw/filter:\ :sh: </verb></tscreen> </itemize> <!--O For more complex or exotic printing configurations, the Printing-HOWTO awaits you. --> もっと複雑なプリンタの設定については、 Printing-HOWTO をご覧ください。 <!--O If you use <tt>printtool</tt>, be aware that the GSDEVICE chosen by Printtool will work, but not necessarily at its best for your printer. You may consider fiddling a bit with the file <tt/postscript.cfg</tt>; for instance, I changed GSDEVICE from <tt>cdj500</tt> to <tt>djet500</tt> and now my prints come out much quicker. --> <tt>printtool</tt> を使う場合、Printtool の選ぶ GSDEVICE で動作しますが、 必ずしも最善ではないことに注意してください。<tt>postscript.cfg</tt> ファイル をちょっといじってみてください。たとえば、私の場合 GSDEVICE を <tt>cdj500</tt> から <tt>djet500</tt> に変更したら、とても印刷が早くなりました。 <sect1> SVGATextMode <label id="SVGA"> <p> <!--O This utility, available on <url url="ftp://tsx-11.mit.edu/pub/linux/sources/sbin">, is useful for changing the console screen resolution, font, and cursor shape. Users whose language include accented characters will be able to use them in console applications, while notebook users may change the cursor shape to make it more visible. --> <url url="ftp://tsx-11.mit.edu/pub/linux/sources/sbin"> にある このツールは、コンソール画面の解像度、フォント、カーソル形状を変えるの に便利です。アクセント記号を含むような文字を利用しているユーザは、 これらをコンソール上に表示できます。ノート PC のユーザの場合には、 カーソル形状をもっと見やすくすることができます。 <!--O Edit <file>/etc/TextConfig</file> or <file>/etc/TextMode</file>, starting with the default VGA definition. Europeans should be happy with this ``LoadFont'' section: --> <file>/etc/TextConfig</file> もしくは <file>/etc/TextMode</file> の default VGA difinition で始まる部分を編集してください。ヨーロッパの人 は、``LoadFont'' のところを以下のようにすると、幸せになれるでしょう: <tscreen><verb> Option "LoadFont" FontProg "/usr/bin/setfont" FontPath "/usr/lib/kbd/consolefonts" FontSelect "lat1u-16.psf" 8x16 9x16 8x15 9x15 FontSelect "lat1u-14.psf" 8x14 9x14 8x13 9x13 FontSelect "lat1u-12.psf" 8x12 9x12 8x11 9x11 FontSelect "lat1u-08.psf" 8x8 9x8 8x7 9x7 </verb></tscreen> <!--O Once you're done, try your configuration with a command like <tt>SVGATextMode "80x34x9"</tt>, and if everything appears to be working fine, remove the warnings from <file>/etc/TextMode</file> and include this line in <file>etc/rc.d/rc.sysinit</file>: --> これが終わったら、<tt>SVGATextMode "80x34x9"</tt> のようなコマンドで設 定を試します。これできちんと動作するようであれば、 <file>/etc/TextMode</file> から警告部分を削除し、以下の行を <file>etc/rc.d/rc.sysinit</file> に入れます: <tscreen><verb> # SVGATextMode /usr/sbin/SVGATextMode "80x34x9" </verb></tscreen> <!--O Please note that the block cursor only works with some modes; on my notebook, "80x32x9". --> ブロックカーソルは、一部のモードでしか動作しないことに注意してください。 筆者のノートマシンでは "80x32x9" で動作しました。 <sect> <!-- Common Administration Tasks -->一般的な管理作業 <p> <!--O So many things to do, so little time! Here is where the fun begins. This section is rather network-centric, though many other tasks await you. --> 書くことはたくさんありますが、時間は限られています! ここは楽しくやりま しょう。他にもたくさんの作業があなたを待ちかまえていますが、この節は ネットワーク中心で行きます。 <!--O Networking is a vast subject which cannot be fully covered here. The reference is the NET-3 HOWTO, and most distributions provide documentation on setting up network services. Only a few points will be recalled here. --> ネットワークの分野はとても広く、ここで説明し尽くすことはできません。参 考文献として NET-3 HOWTO を挙げておきます。また、ほとんどのディストリ ビューションにはネットワークサービスの設定についての文書が付属していま す。ここではいくつかの点だけを再確認しましょう。 <!--O A quick to-do list for the services you may want to install: cron and timed tasks like calendar or reminder, Http, Samba, telnet/ssh access, anonymous ftp, POP/IMAP server, NFS services... --> あなたがインストールすると思われるサービスについてすべきことの簡単なリ ストを示します: cron や timed といったカレンダーや備忘録。http, samba, telnet/ssh のアクセス、anonymous FTP, POP/IMAP サーバ、NFS サービス…。 <sect1> <!-- Network configuration -->ネットワークの設定 <p> <!--O Although the actual method of starting network services of your distribution may be much more complex, the following script should be enough to get you started: --> お使いのディストリビューションにおいてネットワークサービスを新しく追加 するための実際の手順はもっとずっと複雑ですが、以下のスクリプトは最初の 手がかりとしては十分なはずです: <tscreen><verb> #!/bin/sh # net-up.sh: set up network access DEVICE=eth0 IPADDR=192.168.1.100 NETMASK=255.255.255.0 NETWORK=192.168.1.0 GATEWAY=192.168.1.1 ifconfig $DEVICE $IPADDR netmask $NETMASK up route add -net $NETWORK netmask $NETMASK $DEVICE route add default gw $GATEWAY </verb></tscreen> <!--O This script is handy for enabling network access when you use a rescue disk. Obviously, this lets you only ping, ftp and telnet to the outside. --> このスクリプトを使うと、レスキューディスクの使用時に手軽にネットワーク アクセスを有効にできます。見ての通りですが、このスクリプトでは外部に ping, ftp, telnet しかできません。 <sect1> <!-- Sharing the Internet -->インターネットへの接続の共有 <p> <!--O One of the most useful tasks for a Linux server. Currently, most stock kernels come with IP firewalling, masquerading and forwarding enabled by default; if in doubt, consult the IP-Masquerade mini-HOWTO to learn how to enable them. Then install ipfwadm (kernels 2.0.x; <url url="http://www.xos.nl/linux/ipfwadm/">) or ipchains (kernels 2.2.x; <url url="http://www.adelaide.net.au/~rustcorp/ipfwchains/ipfwchains.html">). Remember to enable kernel modules for the services you need, e.g. for ftp you'll add this line to <file>/etc/rc.d/rc.sysconfig</file>: --> これは Linux をサーバとして使うと便利な仕事のひとつです。現在は、ごく 平凡なカーネルでも IP ファイアウォール機能, IP マスカレード機能、 フォワーディング機能がデフォルトで有効になっています。有効になっていな いようであれば、IP-Masquerade mini-HOWTO をご覧になって、これらの機能 を有効にする方法を調べてください。それから ipfwadm (カーネル 2.0.x; <url url="http://www.xos.nl/linux/ipfwadm/">) または ipchains (カーネル 2.2.x; <url url="http://www.adelaide.net.au/~rustcorp/ipfwchains/ipfwchains.html">) をインストールしてください。必要なサービスのためのカーネルモジュールを 有効にするのを忘れないでください。例えば、FTP を使うためには以下の行を <file>/etc/rc.d/rc.sysconfig</file> に追加します: <tscreen><verb> /sbin/modprobe ip_masq_ftp </verb></tscreen> <!--O Other modules are usually found in <file>/lib/modules/KERNEL-VERSION/ipv4</file>. --> この他のモジュールは普通、 <file>/lib/modules/KERNEL-VERSION/ipv4</file> にあります。 <!--O Enabling IP masquerading for other machines in your local network is very simple. First, check the network initialisation scripts (<file>/etc/sysconfig/network</file> should be the right place) to see if they contain a line that reads <tt>FORWARD_IPV4=true</tt>. It's used to set <file>/proc/sys/net/ipv4/ip_forward</file> to 1 when the network subsystem comes up. --> あなたの LAN にいる他のマシンに対して IP マスカレード機能を有効にする のはとても簡単です。まず、ネットワーク初期化スクリプト (<file>/etc/sysconfig/network</file> が正しい場所のはずです)を調べて、 <tt>FORWARD_IPV4=true</tt> という行があるかどうかを確認します。これは、 ネットワークサブシステムが立ち上がる時に <file>/proc/sys/net/ipv4/ip_forward</file> を 1 に設定するために使われ ます。 <!--O Add these lines to <file>/etc/rc.d/rc.sysinit</file>: --> 以下の行を <file>/etc/rc.d/rc.sysinit</file> に追加します: <tscreen><verb> # default: packets cannot go reach the outside /sbin/ipfwadm -F -p deny # allow all machines on the local network to reach the Internet /sbin/ipfwadm -F -a m -S 192.168.1.0/24 -D 0.0.0.0/0 # alternatively, allow only these two machines # /sbin/ipfwadm -F -a m -S 192.168.1.100/24 -D 0.0.0.0/0 # /sbin/ipfwadm -F -a m -S 192.168.1.101/24 -D 0.0.0.0/0 </verb></tscreen> <!--O If you use a kernel of the 2.2.x series, use <tt>ipfwadm-wrapper</tt> instead of <tt>ipfwadm</tt> to get started quickly. --> カーネル 2.2.x 系をお使いであれば、<tt>ipfwadm</tt> ではなく <tt>ipfwadm-wrapper</tt> を使うと素早く立ち上がります。 <!--O Now you'll want something to let client machines dial the ISP; I use Mserver (<url url="http://cpwright.villagenet.com/mserver/">). Edit <file>etc/mserver.conf</file>; the only entries that you should modify are ``checkhost'', ``shadow'', and ``cname''. Then define your connection(s). Obviously, install one of the available clients on the client machines. --> ここまでくると、クライアントマシンから ISP に電話をかけさせる手が欲し くなるでしょう。筆者は Mserver (<url url="http://cpwright.villagenet.com/mserver/">) を使っています。<file>etc/mserver.conf</file> を編集してください。 修正する必要がある項目は ``checkhost'', ``shadow'', ``cname'' だけです。 次に接続(複数可)を定義します。もちろん、クライアントマシンには、 利用可能なクライアントのひとつをインストールします。 <!-- 原文のコメント --> <!-- Alternatively, you may use diald; please check out the Setting Up Diald for Linux Page <url url="http://home.pacific.net.sg/~harish/diald.config.html">. Alternatively, use <tt>eznet</tt> (Section <ref id="eznet" name="eznet">) ... --> <sect1> <!-- Restricting Network Access -->ネットワークアクセスの制限 <label id="Restricting"> <p> <!--O Let's suppose you connect to the Internet via PPP. Once you're connected, your machine may become vulnerable to attacks. Insert this in <file>/etc/hosts.allow</file>: --> PPP を使ってインターネットに接続できたものとします。いったん接続すると、 あなたのマシンは攻撃にさらされるかもしれません。そこで、以下の行を <file>/etc/hosts.allow</file> に追加してください: <tscreen><verb> # only allow access to localhost ALL: 127. </verb></tscreen> <!--O and this in <file>/etc/hosts.deny</file>: --> それから以下の行を <file>/etc/hosts.deny</file> に追加します: <tscreen><verb> # deny access to everyone ALL: ALL </verb></tscreen> <!--O If you belong to a network with direct Internet access, you had better disable finger, telnet, and possibly other services for security reasons; use <tt>ssh</tt> instead of telnet. The file to edit is <file>/etc/inet.conf</file>. Alternatively, you can restrict network access putting this in <file>/etc/hosts.allow</file>: --> インターネットに直接繋がっているネットワークに所属しているなら、 finger, telnet, それから他のサービスもセキュリティのために止めておく方 がよいでしょう。telnet の代わりには <tt>ssh</tt> を使いましょう。編集 すべきファイルは <file>/etc/inetd.conf</file> です。サービスを止める代 わりに、以下の行を <file>/etc/hosts.allow</file> に追加してネットワーク アクセスを制限する方法もあります: <!--O <tscreen><verb> in.telnetd: 192.168.1., .another.trusted.network in.ftpd: 192.168.1., .another.trusted.network </verb></tscreen> --> <tscreen><verb> in.telnetd: 192.168.1., .他の.信頼している.ネットワーク in.ftpd: 192.168.1., .他の.信頼している.ネットワーク </verb></tscreen> <!--O and this in <file>/etc/hosts.deny</file>: --> それから以下の行を <file>/etc/hosts.deny</file> に追加します: <tscreen><verb> in.telnetd: ALL in.ftpd: ALL </verb></tscreen> <sect1> <!-- NFS Exports -->NFS のエクスポート <p> <!--O It is common to export the home directories on the server; a problem arises if a user's UID and GID are not consistent across different machines. If user guido has UID/GID equal to 500 on <tt>server</tt> and UID/GID equal to 512 on <tt>client</tt>, a convenient configuration is this: --> サーバ上に置いているホームディレクトリのエクスポートは一般的に行われて います。ところが、あるユーザの UID や GID がマシン間で一致していないと 問題が起こります。ユーザ guido の UID/GID が <tt>server</tt> で 500 で あり、<tt>client</tt> で 512 の場合には、以下の設定が便利です: <!--O <tscreen><verb> # /etc/exports /tmp my.client.machine(rw) /home/guido my.client.machine(rw,map_static=/etc/nfs/client.map) </verb></tscreen> --> <tscreen><verb> # /etc/exports /tmp 自分の.クライアント.マシン(rw) /home/guido 自分の.クライアント.マシン(rw,map_static=/etc/nfs/client.map) </verb></tscreen> <!--O In <file>/etc/nfs/client.map</file> you'll put this: --> <file>/etc/nfs/client.map</file> は以下のように書きます: <tscreen><verb> # /etc/nfs/client.map # NFS mapping for client # remote local uid 512 500 gid 512 500 </verb></tscreen> <!-- 原文のコメント --> <!-- Remind!!! --> <sect1> <!-- Name Server -->ネームサーバ <p> <!--O Not written yet. --> まだ書けていません。 <sect><!-- Software Configuration-->ソフトウェアの設定 <label id="config"> <p> <!--O These are the the configuration files we are going to custimise: <file>/etc/profile</file> <file>/etc/bashrc</file> <tt/.bashrc/ --> これから以下のファイルについて設定ファイルのカスタマイズを説明します。 <file>/etc/profile</file> <file>/etc/bashrc</file> <tt/.bashrc/ <!-- trick to avoid the leading dot problem --> <!--O <tt>.bashrc .bash_profile .bash_logout .inputrc .less .lessrc .xinitrc </tt> <tt>.fvwmrc .fvwm2rc95 .Xmodmap .Xmodmap.num .Xdefaults .jedrc </tt> <tt>.abbrevs.sl .joerc .emacs </tt>. Don't add users until you have completed your system configuration; you'll put the dot files in <file>/etc/skel</file>. --> <tt>.bashrc .bash_profile .bash_logout .inputrc .less .lessrc .xinitrc </tt> <tt>.fvwmrc .fvwm2rc95 .Xmodmap .Xmodmap.num .Xdefaults .jedrc </tt> <tt>.abbrevs.sl .joerc .emacs </tt>。 システムの設定が終わるまではユーザの追加を行わないでください。これら のドットファイルは <file>/etc/skel</file> に入れます。 <sect1> bash(1) <p> <!--O Arguably, the most important piece of software after the kernel. To tailor the behaviour of <tt>bash</tt>, these are the main files to edit: --> おそらく、カーネルの次に重要なソフトウェアです。<tt>bash</tt> の動作を 設定するには以下のファイルを編集します: <itemize> <!--O <item> <file>/etc/bashrc</file> contains system wide aliases and functions; --> <item> <file>/etc/bashrc</file> にはシステム全体でのエイリアスと関数を 入れます。 <!--O <item> <file>/etc/profile</file> contains system wide environment stuff and startup programs; --> <item> <file>/etc/profile</file> にはシステム全体での環境設定と初期化 プログラムを入れます。 <!--O <item> <tt>$HOME/.bashrc</tt> contains user aliases and functions; --> <item> <tt>$HOME/.bashrc</tt> には、ユーザ定義のエイリアスと 関数を入れます。 <!--O <item> <tt>$HOME/.bash_profile</tt> contains user environment stuff and startup programs; --> <item> <tt>$HOME/.bash_profile</tt> には、ユーザの環境設定と 初期化プログラムを入れます。 <!--O <item> <tt>$HOME/.inputrc</tt> contains key bindings and other bits. --> <item> <tt>$HOME/.inputrc</tt> には、ユーザのキー定義などを入れます。 </itemize> <!--O Examples of these files are shown below. First, the most important: <file>/etc/profile</file>. It's used to configure a lot of features in your Linux box, as you will see in the following sections. Please look out for reverse quotes! --> これらのファイルの例を以下に示します。まずは最も重要な <file>/etc/profile</file> です。このファイルは、後の節で出てくる Linux マシンの特徴の多くを決めます。 後でまた参照してください。 <code> # /etc/profile # System wide environment and startup programs # Functions and aliases go in /etc/bashrc # This file sets up the following features and programs: # # o path # o prompts # o a few environment variables # o colour ls # o less # o rxvt # # Users can override these settings and/or add others in their # $HOME/.bash_profile # set a decent path PATH="$PATH:/usr/X11R6/bin:$HOME/bin:." # notify the user: login or non-login shell. If login, the prompt is # coloured in blue; otherwise in magenta. Root's prompt is red. # See the Colour-ls mini HOWTO for an explanation of the escape codes. USER=`whoami` if [ $LOGNAME = $USER ] ; then COLOUR=44 # blue else COLOUR=45 # magenta fi if [ $USER = 'root' ] ; then COLOUR=41 # red PATH="$PATH:/usr/local/bin" fi ESC="\033" PROMPT='\h' # hostname STYLE=';1m' # bold # PROMPT='\u' # username # STYLE='m' # plain PS1="\[$ESC[$COLOUR;37$STYLE\]$PROMPT:\[$ESC[37;40$STYLE\]\w\\$ " PS2="> " # no core dumps, please ulimit -c 0 # set umask if [ `id -gn` = `id -un` -a `id -u` -gt 14 ]; then umask 002 else umask 022 fi # a few variables USER=`id -un` LOGNAME=$USER MAIL="/var/spool/mail/$USER" # sendmail, postfix, smail # MAIL="$HOME/Mailbox" # qmail NNTPSERVER=news.myisp.it # put your own here VISUAL=jed EDITOR=jed HOSTNAME=`/bin/hostname` HISTSIZE=1000 HISTFILESIZE=1000 export PATH PS1 PS2 USER LOGNAME MAIL NNTPSERVER export VISUAL EDITOR HOSTNAME HISTSIZE HISTFILESIZE # enable colour ls eval `dircolors /etc/DIR_COLORS -b` export LS_OPTIONS='-s -F -T 0 --color=yes' # customize less LESS='-M-Q' LESSEDIT="%E ?lt+%lt. %f" LESSOPEN="| lesspipe.sh %s" LESSCHARDEF=8bcccbcc13b.4b95.33b. # show colours in ls -l | less # LESSCHARSET=latin1 PAGER=less export LESS LESSEDIT LESSOPEN VISUAL LESSCHARDEF # fix the backspace key in rxvt/xterm CTRL_H="\010" NULL_STRING=" $CTRL_H" # space + backspace if [ "$NULL_STRING" != "" ] ; then stty erase ^? else stty erase ^H fi # set xterm title: full path case $TERM in xterm*) PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"' ;; esac for i in /etc/profile.d/*.sh ; do if [ -x $i ]; then . $i # beware - variables and aliases might get overridden! fi done # call fortune, if available if [ -x /usr/games/fortune ] ; then echo ; /usr/games/fortune ; echo fi </code> <!--O This is a sample <file>/etc/bashrc</file>: --> 次は <file>/etc/bashrc</file> です: <code> # /etc/bashrc # System wide functions and aliases # Environment stuff goes in /etc/profile # Insert PS1 definitions here if you experience problems. export CDPATH="$CDPATH:~" # common aliases alias cp='cp -i' alias l=less alias ls="ls $LS_OPTIONS" alias mv='mv -i' alias rm='rm -i' alias rmbk='/bin/rm -f .*~ *~ *aux *bak *log *tmp 2> /dev/null' alias u='cd ..' alias which="type -path" alias x=startx # A few useful functions c () # cd to the new directory and list its contents { cd $1 ; ls } inst() # Install a .tar.gz archive in current directory { if [ $# != 0 ]; then tar zxvf $1; fi } cz() # List the contents of a .zip archive { if [ $# != 0 ]; then unzip -l $*; fi } ctgz() # List the contents of a .tar.gz archive { for file in $* ; do tar ztf ${file} done } tgz() # Create a .tgz archive a la zip. { if [ $# != 0 ]; then name=$1.tar; shift; tar -rvf ${name} $* ; gzip -9 ${name} fi } crpm() # list information on an .rpm file { if [ $# != 0 ]; then rpm -qil $1 | less; fi } </code> <!--O This is a sample <tt/.bashrc/: --> これは <tt/.bashrc/ の例です。 <code> # $HOME/.bashrc # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # this is needed to notify the user that they are in non-login shell if [ "$GET_PS1" = "" ] ; then COLOUR=45; ESC="\033"; STYLE=';1m'; # STYLE='m' USER=`whoami` export PS1="\[$ESC[$COLOUR;37$STYLE\]$USER:\[$ESC[37;40$STYLE\]\w\\$ " fi # personal aliases alias backup='tar -Mcvf /dev/fd0' alias dial='eznet up myisp' alias f='cd ~/fortran' alias hangup='eznet down' alias lyx='lyx -width 580 -height 450' alias restore='tar -M -xpvf /dev/fd0' # personal functions xj() # Launch xjed and a file in background { xjed $1 & } </code> <!--O This is a sample <tt/.bash_profile/: --> これは <tt/.bash_profile/ の例です。 <code> # $HOME/.bash_profile # User specific environment and startup programs # This file contains user-defined settings that override # those in /etc/profile # Get user aliases and functions if [ -f ~/.bashrc ]; then GET_PS1="NO" # don't change the prompt colour . ~/.bashrc fi # set a few `default' directories export CDPATH="$CDPATH:$HOME:$HOME/text:$HOME/text/geology" </code> <!--O This is a sample <tt/.inputrc/: --> これは <tt/.inputrc/ の例です。 <code> # $HOME/.inputrc # key bindings "\e[1~": beginning-of-line "\e[3~": delete-char "\e[4~": end-of-line # (F1 .. F5) are "\e[[A" ... "\e[[E" "\e[[A": "info \C-m" set bell-style visible # please don't beep set meta-flag On # allow 8-bit input (i.e, accented letters) set convert-meta Off # don't strip 8-bit characters set output-meta On # display 8-bit characters correctly set horizontal-scroll-mode On # scroll long command lines set show-all-if-ambiguous On # after TAB is pressed </code> <!--O To make the backspace and delete keys work correctly in <tt>xterm</tt> and other X11 applications, the following is also needed: --> <tt>xterm</tt> や 他の X11 アプリケーションで backspace と del キーを 正しく動作させるには以下のようにしてください: <itemize> <!--O <item> put this in your <tt>.xinitrc</tt>: --> <item> 以下の設定を <tt/.xinitrc/ に入れてください: <tscreen><verb> usermodmap=$HOME/.Xmodmap xmodmap $usermodmap </verb></tscreen> <!--O <item> then your <tt>.Xmodmap</tt> will contain: --> <item> 次に <tt/.Xmodmap/ に以下を入れてください: <tscreen><verb> keycode 22 = BackSpace keycode 107 = Delete </verb></tscreen> <!--O this fixes the console. To fix <tt>xterm</tt>: --> この設定でコンソールが直ります。<tt/xterm/ を直すには以下の作業を行い ます: <!--O <item> put this in your <tt>.Xdefaults</tt>: --> <item> 以下の行を <tt/.Xdefaults/ に入れてください: <tscreen><verb> xterm*VT100.Translations: #override <Key>BackSpace: string(0x7F)\n\ <Key>Delete: string(0x1b) string("[3~")\n\ <Key>Home: string(0x1b) string("[1~")\n\ <Key>End: string(0x1b) string("[4~")\n\ Ctrl<Key>Prior: string(0x1b) string("[40~")\n\ Ctrl<Key>Next: string(0x1b) string("[41~") nxterm*VT100.Translations: #override <Key>BackSpace: string(0x7F)\n\ <Key>Delete: string(0x1b) string("[3~")\n\ <Key>Home: string(0x1b) string("[1~")\n\ <Key>End: string(0x1b) string("[4~")\n\ Ctrl<Key>Prior: string(0x1b) string("[40~")\n\ Ctrl<Key>Next: string(0x1b) string("[41~") </verb></tscreen> </itemize> <!--O <tt>rxvt</tt> is a wee bit more complicated, as some compile-/-time options influence its behaviour. See the above <file>/etc/profile</file>. --> <tt>rxvt</tt> の場合には、コンパイル時のいくつかのオプションが動作に 影響するなど、ほんの少しだけ複雑です。詳しくは上記の <file>/etc/profile</file> を見てください。 <!--O More info in <tt>bash</tt>(1) and <tt>readline</tt>(3) man pages. --> さらに詳しい情報については man ページの <tt>bash</tt>(1) や <tt>readline</tt>(3) を見てください。 <!--O Don't expect every application to work correctly! If you run <tt>joe</tt> in <tt>xterm</tt>, for instance, some keys won't work; the same holds for some versions of <tt>rxvt</tt>. --> 全てのアプリケーションが正しく動くとは考えないでください! 例えば <tt>xterm</tt> 上で <tt>joe</tt> を実行すると、一部のキーは動作しませ ん。同じ問題が一部のバージョンの <tt>rxvt</tt> でも起こります。 <sect1> ls(1) <p> <!--O <tt>ls</tt> can display directory listings using colours to highlight different file types. To enable this feature, you just need a couple of lines in <file>/etc/profile</file> as seen above. However, this won't work with some versions of <tt>rxvt</tt>; use some flavour of <tt>xterm</tt> instead. It looks like some old <tt>rxvt</tt>s have a bug that prevents them from inheriting the environment correctly in some circumstances. --> <tt>ls</tt> はファイル形式ごとに違った色でファイル一覧を表示できます。 この機能を有効にするためには、<file>/etc/profile</file> に上で示した行 をいくつか追加する必要があります。しかし、<tt/rxvt/ のバージョンによっ てはきちんと動きません。代わりに <tt>xterm</tt> 系の端末エミュレータを 使ってください。古い <tt>rxvt</tt> の一部には、環境によっては環境変数 を引き継げなくなるというバグがあるようです。 <!--O Caldera's <tt>ls</tt> doesn't have colours, but there's an equivalent <tt>color-ls</tt>. Add this in <file>/etc/bashrc</file>: --> Caldera の <tt/ls/ では色が出ないようですが、これと同等の <tt>color-ls</tt> があります。以下の行を <file>/etc/bashrc</file> に追 加してください: <tscreen><verb> alias ls="color-ls $LS_OPTIONS" </verb></tscreen> <sect1> less(1) <p> <!--O With this excellent pager you can browse not only plain text files, but also gzip compressed, tar and zip archives, man pages, and what have you. Its configuration involves a few steps: --> この優れたページャを用いると、テキスト文書だけでなく、gzip で圧縮さ れたファイル、tar や zip のアーカイブ、 man ページなどを読むことができ ます。設定は以下のように行います: <itemize> <!--O <item> to use it with the movement keys, have this plain ASCII file <tt/.lesskey/ in your home directory: --> <item> 矢印キーなどを使うには、この ASCII ファイルを <tt/.lesskey/ と してホームディレクトリに保存してください: <tscreen><verb> ^[[A back-line ^[[B forw-line ^[[C right-scroll ^[[D left-scroll ^[OA back-line ^[OB forw-line ^[OC right-scroll ^[OD left-scroll ^[[6~ forw-scroll ^[[5~ back-scroll ^[[1~ goto-line ^[[4~ goto-end ^[[7~ goto-line ^[[8~ goto-end </verb></tscreen> <!--O then run the command <tt>lesskey</tt>. (These are escape sequences for vt100-like terminals.) This creates a binary file <tt>.less</tt> containing the key bindings. --> 次に <tt>lesskey</tt> を起動してください。(これらは vt100 互換ターミナル のエスケープシーケンスです。) これでキー定義の入ったバイナリファイル <tt>.less</tt> ができます。 <!-- 原文のコメント --> <!-- pointer to Keyboard and console HOWTO? --> <!--O <item> write the following file as <file>/usr/local/bin/lesspipe.sh</file>: --> <item> 以下のファイルを <file>/usr/local/bin/lesspipe.sh</file> として 保存してください: <code> #!/bin/sh # This is a preprocessor for 'less'. It is used when this environment # variable is set: LESSOPEN="|lesspipe.sh %s" lesspipe() { case "$1" in *.tar) tar tf $1 2>/dev/null ;; # View contents of .tar and .tgz files *.tgz|*.tar.gz|*.tar.Z|*.tar.z) tar ztf $1 2>/dev/null ;; *.Z|*.z|*.gz) gzip -dc $1 2>/dev/null ;; # View compressed files correctly *.zip) unzip -l $1 2>/dev/null ;; # View archives *.arj) unarj -l $1 2>/dev/null ;; *.rpm) rpm -qpil $1 2>/dev/null ;; *.cpio) cpio --list -F $1 2>/dev/null ;; *.1|*.2|*.3|*.4|*.5|*.6|*.7|*.8|*.9|*.n|*.l|*.man) FILE=`file -L $1` FILE=`echo $FILE | cut -d ' ' -f 2` if [ "$FILE" = "troff" ]; then groff -s -p -t -e -Tascii -mandoc $1 fi ;; *) file $1 | grep text > /dev/null ; if [ $? = 1 ] ; then # it's not some kind of text strings $1 fi ;; esac } lesspipe $1 </code> <!--O then make it executable with <tt>chmod 755 lesspipe.sh</tt>. --> 次に <tt>chmod 755 lesspipe.sh</tt> として実行可能にします。 <!--O <item> put the necessary variables in <file>/etc/profile</file> as seen above. --> <item> 必要な変数は上にあったように <file>/etc/profile</file> に入って います。 <!-- 原文のコメント --> <!-- CHIARIRE QUALI!!! --> </itemize> <sect1> emacs(1) <p> <!--O I rarely use <tt>emacs</tt>, so I have only a couple of tips for you. Some <tt>emacs</tt> distributions don't come preconfigured for colours and syntax highlighting. Put this in your <tt>.emacs</tt>: --> 私はたまにしか <tt>emacs</tt> を使いませんので、いくつかの tips しかお 教えできません。 いくつかの <tt>emacs</tt> ディストリビューションでは色付けや構文強調表 示が最初は設定されていません。以下の行を <tt>.emacs</tt> に追加してく ださい: <tscreen><verb> (global-font-lock-mode t) (setq font-lock-maximum-decoration t) </verb></tscreen> <!--O This only works in X11. Moreover, to enable accented characters you'll add this line: --> これは、X11 でだけ有効です。さらに アクセント付き文字を使えるようにする には、以下の行を追加してください。 <tscreen><verb> (standard-display-european 1) </verb></tscreen> <!--O I'll leave it to you to peruse all of <tt>emacs</tt>' documentation to find out how to tailor it to your needs-/-/-potentially, it can take months of hacking. The Dotfile generator (Section <ref id="Config sw" name="Configuration Software">) is a good helping hand. --> 自分の要望に合うように設定するために <tt>emacs</tt> のすべてのドキュ メントを熟読するのは、読者の皆さんにお任せします。もしかするとハッキン グには何ヵ月もかかるかもしれませんが。Dotfile generator (<ref id="Config sw" name = "設定プログラム"> をご覧ください)は良い手 助けとなるでしょう。 <sect1> joe(1) <p> <!--O Some versions of <tt>joe</tt> don't work with colours in console, and some special keys don't work either. A quick and dirty (and inelegant) solution to the former problem is this: --> <tt/joe</tt> のいくつかのバージョンは、コンソールで色が使えません。ま たいくつかの特殊キーが動作しません。前者の問題の手っ取り早い解決方法は (あまりきれいではありませんが)以下のとおりです: <tscreen><verb> ~$ export TERM=vt100 ~$ joe myfile (edit your file) ~$ export TERM=linux </verb></tscreen> <!--O To make the special keys work, all you have to do is edit <tt>.joerc</tt>, <tt>.jstarrc</tt> or your favourite emulation; you can start from the system-wide config files in <file>/usr/lib/joe</file>. Look for the fourth section (key bindings). This enables Home and End: --> 特殊キーを動作させるためにすることは、<tt>.joerc</tt>, <tt>.jstarrc</tt> あるいはお気に入りのエミュレーションのファイルの編集だけです。 まずは <file>/usr/lib/joe</file> にあるシステム全体の設定ファイルから 見るとよいでしょう。そして、4 番目のセクション(キー割り当て)を探してく ださい。Home キーと End キーを有効にする設定は以下のようになります: <tscreen><verb> bol ^[ [ 1 ~ Go to beginning of line eol ^[ [ 4 ~ Go to end of line </verb></tscreen> <!--O Find out the desired ESC sequences typing <tt>cat</tt> followed by the special keys. --> 使いたいエスケープシーケンスを調べるには、<tt>cat</tt> を実行してから その特殊キーを押します。 <sect1> jed(1) <p> <!--O This is my favourite editor: it does what I need, it's lighter and easier to configure than <tt>emacs</tt>, and emulates other editors quite well. Many users at my university use <tt>jed</tt> to emulate <tt>EDT</tt>, VMS' system editor. --> これは私のお気に入りのエディタです。動作が軽くて、<tt>emacs</tt> よ りも設定が簡単で、他のエディタを忠実にエミュレートしてくれるという、ま さに私の求めていたものです。 私の大学でも、VMS のシステムエディタ <tt/EDT/ をエミュレートするために、 多くのユーザが <tt/jed/ を使っています。 <!--O <tt>jed</tt>'s configuration files are <tt>.jedrc</tt> and <file>/usr/lib/jed/lib/*</file>; the former can be adapted from <tt>jed.rc</tt> in the latter directory. --> <tt>jed</tt> の設定ファイルは、<tt>.jedrc</tt> と <file>/usr/lib/jed/lib/*</file> で、前者は後者の <tt>jed.rc</tt> を利 用して作ることができます。 <itemize> <!--O <item> to make <tt>jed</tt> use the special keys correctly, write the file <file>/usr/lib/jed/lib/defaults.sl</file> whose only line reads: --> <item> <tt>jed</tt> で特別なキーを正しく扱うには、 <file>/usr/lib/jed/lib/defaults.sl</file> に次の 1 行を追加します: <tscreen><verb> () = evalfile("linux"); </verb></tscreen> <!--O <item> if <tt>xjed</tt> apparently doesn't recognise the DEL key, add these lines to your <tt>.jedrc</tt>: --> <item> <tt>xjed</tt> を使っていて DEL キーを認識しない場合には、 <tt>.jedrc</tt> に以下の行を追加してください: <tscreen><verb> #ifdef XWINDOWS x_set_keysym (0xFFFF, 0, "\e[3~"); setkey (``delete_char_cmd'', "\e[3~"); #endif </verb></tscreen> <!--O <item> edit <file>/usr/lib/jed/lib/linux.sl</file> to specify <tt>Info_Directory = "/usr/info";</tt> and <tt>/bin/mail</tt> after <tt>/UCB_Mailer = "/bin/mail";</tt>; --> <item> <file>/usr/lib/jed/lib/linux.sl</file> を編集して、 <tt>Info_Directory = "/usr/info";</tt> と <tt>UCB_Mailer = "/bin/mail";</tt> を指定します。 <!--O <item> to make <tt>jed</tt> emulate <tt>EDT</tt> (or other editors) all you have to do is edit a couple of lines in <tt>.jedrc</tt>. If you want the numeric keypad `<tt>+</tt>' to delete words instead of a single character, add this in <tt>.jedrc</tt>: --> <item> <tt/jed/ に <tt/EDT/ (や他のエディタ)をエミュレートさせるには、 <tt/.jedrc/ のいくつかの行を編集するだけです。テンキーの `<tt>+</tt>' で 1 文字を削除するのではなく 1 つの単語を削除できるようにするには、 <tt/.jedrc/ に次の行を追加します: <tscreen><verb> unsetkey("\eOl"); unsetkey("\eOP\eOl"); setkey("edt_wdel", "\eOl"); setkey("edt_uwdel", "\eOP\eOl"); </verb></tscreen> <!--O after the line that reads <tt>() = evalfile("edt")</tt> (or similar); --> 追加する場所は「<tt>() = evalfile("edt")</tt> 」の行(など)の後です。 <!--O <item> to make <tt>xjed</tt> use the numeric keypad for <tt>EDT</tt> emulation, insert the following in <tt>.Xmodmap</tt>: --> <item> <tt>xjed</tt> で <tt>EDT</tt> のようにテンキーボードを使いたい なら、<tt>.Xmodmap</tt> に次の行を追加してください: <tscreen><verb> keycode 77 = KP_F1 keycode 112 = KP_F2 keycode 63 = KP_F3 keycode 82 = KP_F4 keycode 86 = KP_Separator </verb></tscreen> <!--O <item> colour customization for <tt>xjed</tt> is done adding lines like these in <tt>.Xdefaults</tt>: --> <item> <tt>xjed</tt> を色付きで使いたいなら、次の行を <tt>.Xdefaults</tt> に追加してください: <!--O <tscreen><verb> xjed*Geometry: 80x32+150+50 xjed*font: 10x20 xjed*background: midnight blue # and so on... </verb></tscreen> --> <tscreen><verb> xjed*Geometry: 80x32+150+50 xjed*font: 10x20 xjed*background: midnight blue # などなど… </verb></tscreen> <!--O <item> the ``abbreviation'' feature is an invaluable timesaver. Write a file like the following as <tt>$HOME/.abbrevs.sl</tt> (you can change this name by inserting <tt>variable Abbrev_File = "/usr/lib/jed/abbrev.sl";</tt> in <tt>.jedrc</tt>): --> <item> 「略語機能」を使うと時間をとても節約できます。以下のようなファイルを <tt>$HOME/.abbrevs.sl</tt> として保存してください(このファイル 名は、<tt>.jedrc</tt> に <tt>variable Abbrev_File = "/usr/lib/jed/abbrev.sl";</tt> を追加すれば変更できます): <!--O <tscreen><verb> create_abbrev_table ("Global", "0-9A-Za-z"); define_abbrev ("Global", "GG", "Guido Gonzato"); create_abbrev_table ("TeX", "\\A-Za-z0-9"); define_abbrev ("TeX", "\\beq", "\\begin{equation}"); define_abbrev ("TeX", "\\eeq", "\\end{equation}"); % and so on... </verb></tscreen> --> <tscreen><verb> create_abbrev_table ("Global", "0-9A-Za-z"); define_abbrev ("Global", "GG", "Guido Gonzato"); create_abbrev_table ("TeX", "\\A-Za-z0-9"); define_abbrev ("TeX", "\\beq", "\\begin{equation}"); define_abbrev ("TeX", "\\eeq", "\\end{equation}"); % などなど… </verb></tscreen> <!--O and type <tt>ESC x abbrev_mode</tt> to enable it. To have the abbreviation enabled by default, add entries like these to your <tt>.jedrc</tt>: --> <tt>ESC x abbrev_mode</tt> と入力すると、略語モードが有効になります、 略語をデフォルトで使うには、以下のような行を <tt>.jedrc</tt> に追加し てください: <!--O <tscreen><verb> define text_mode_hook () { set_abbrev_mode (1); } % define fortran_hook () { set_abbrev_mode (1); use_abbrev_table ("Fortran"); } % and so on... </verb></tscreen> --> <tscreen><verb> define text_mode_hook () { set_abbrev_mode (1); } % define fortran_hook () { set_abbrev_mode (1); use_abbrev_table ("Fortran"); } % などなど… </verb></tscreen> </itemize> <sect1> pine(1) <p> <!--O Edit the global configuration in <file>/usr/lib/pine.conf</file>, taking care at least of the following fields: <tt>user-domain</tt>, <tt>smtp-server</tt>, and <tt>nntp-server</tt>. Note that <tt>inbox-path</tt> depends on your MTA: if you use <tt>sendmail</tt> or <tt>postfix</tt>, that'll be <tt>var/spool/mail/$USER</tt>; with Qmail, <file>/home/$USER/Mailbox</file> (but root will use <file>/var/qmail/alias/Mailbox</file>. --> <file>/usr/lib/pine.conf</file> にある全体の設定を編集してください。そ の際には、少なくとも以下のフィールドに注意してください: <tt>user-domain</tt>, <tt>smtp-server</tt>, <tt>nntp-server</tt>。 <tt>inbox-path</tt> はお使いの MTA によって異なる点に注意してください。 <tt>sendmail</tt> や <tt>postfix</tt> を使っている場合には、パスは <tt>var/spool/mail/$USER</tt> になるでしょう。Qmail の場合には <file>/home/$USER/Mailbox</file> となります(ただし root ユーザは <file>/var/qmail/alias/Mailbox</file> を使います)。 <sect1> minicom(1) <p> <!--O Users can't use <tt>minicom</tt> unless a global configuration has been made by root. Remember to make it. --> root が全体の設定ファイルを用意しない限り、ユーザは <tt>minicom</tt> を使えません。設定ファイルの作成を忘れないようにしましょう。 <sect1> efax(1) <p> <!--O This package is probably the most convenient for simple sending/receiving of faxes. You'll have to tailor the script <file>/usr/bin/fax</file>; easy job, but a couple of quirks caused me quite a headache: --> このパッケージは簡単なファックスのやりとりにはもっとも便利でしょう。 <file>/usr/bin/fax</file> スクリプトを少し変える必要があるかもしれません。 大した仕事ではありませんが、頭の痛い部分もあります: <itemize> <!--O <item> to find out whether your modem is class 1, 2, or 2.0, use minicom or similar program to issue the command <tt>at+fclass=?</tt>. The reply may be like <tt>0,1,2</tt>; 1 and 2 are the classes supported by your modem; --> <item> お使いのモデムがクラス 1, 2, 2.0 のどれかを調べるには、minicom かこれと同様のプログラムを使って <tt>at+fclass=?</tt> コマンドを実行し ます。応答は <tt>0,1,2</tt> といった形になります。この例では、モデムは クラス 1, 2 をサポートしています。 <!--O <item> DIALPREFIX: chances are that simply putting `<tt>T</tt>' or `<tt>P</tt>' won't work in some countries (in Italy, at least). Put `<tt>ATDT</tt>' or `<tt>ATDP</tt>' instead; --> <item> DIALPREFIX: 国によっては `<tt>T</tt>' や `<tt>P</tt>' は動作し ません(少なくともイタリアではダメでした)。代わりに `<tt>ATDT</tt>' や `<tt>ATDP</tt>' を使ってください。 <!--O <item> INIT and RESET: these strings contain the initialisers `<tt>-i</tt>' and `<tt>-k</tt>', needed by <tt>efax</tt>. If you want to add an AT command, add it to the appropriate string leaving out `<tt>AT</tt>' and preceding the rest with either `<tt>-i</tt>' or `<tt>-k</tt>'. Example: to add the `<tt>ATX3</tt>' command to INIT, you'll append `<tt>-iX3</tt>'. --> <item> INIT と RESET: これらの文字列は、<tt>efax</tt> で必要な初期化 オプション `<tt>-i</tt>' と `<tt>-k</tt>' を含んでいます。AT コマンド を加えるには、 `<tt>AT</tt>' を除いた残りを `<tt>-i</tt>' や `<tt>-k</tt>'に続けます。例えば、INIT に `<tt>ATX3</tt>' を加えるには `<tt>-iX3</tt>' とします。 </itemize> <!--O That done, there are a few permissions to fix to enable non-root users to send and receive faxes. The directories <file>/var/lock</file> and <file>/var/spool/fax</file> must be writable. To do so, create the group <tt>faxusers</tt>, add users to it, then type: --> これが終わったら、root 以外のユーザでもファックスの送受信をできるよう にするために、いくつかのパーミッションを変更します。ディレクトリ <file>/var/lock</file> と <file>/var/spool/fax</file> は書き込み可能で なければなりません。書き込み可能にするには、グループ <tt>faxusers</tt> を作成し、このグループにユーザを追加し、以下のコマンドを実行します: <tscreen><verb> ~# chown root.faxusers /var/lock ~# mkdir /var/spool/fax ~# chown root.faxusers /var/spool/fax; chmod g+w /var/spool/fax </verb></tscreen> <sect1> Ghostscript <p> <!--O This essential tool suffers from a small snag. Owing to to the well-known export regulations in the USA, the utility <tt>pdf2ps</tt> doesn't work on encrypted .pdf files. Never mind: turn your browser to <url url="http://www.ozemail.com.au/~geoffk/pdfencrypt">, download the file <tt>pdf_sec.ps</tt> and put it in place of the file with the same name that comes with the distribution of Ghostscript. --> この重要なツールは、ちょっとした障害の影響を受けます。アメリカ合衆国 の有名な輸出制限のため、<tt>pdf2ps</tt> は暗号化された .pdf ファイルに 対して動作しないのです。ですが心配することはありません: WWW ブラウザで <url url="http://www.ozemail.com.au/~geoffk/pdfencrypt"> に行き、 <tt>pdf_sec.ps</tt> をダウンロードし、これを Ghostscript の配布に含ま れている同名のファイルと差し替えてください。 <sect1> <!-- TeX and Friends -->TeX とその仲間たち <p> <!--O I'll assume you have the teTeX distribution. --> teTeX を持っていると仮定します。 <itemize> <!--O <item> download additional LaTeX packages from your nearest CTAN mirror site, e.g. <url url="ftp://ftp.dante.de/pub/tex">. Add the files under <file>/usr/share/texmf/tex/latex</file>, then run the command <tt>texhash</tt> so that teTeX recognises the new package; --> <item> 追加の LaTeX パッケージを近くの CTAN のミラーサイト (例えば <url url="ftp://ftp.dante.de/pub/tex">)からダウンロードします。 (訳注: 日本のミラーは <url url="ftp://ftp.u-aizu.ac.jp/pub/tex/CTAN/">, <url url="ftp://ftp.riken.go.jp/pub/tex-archive/">, <url url="ftp://ftp.center.osaka-u.ac.jp/CTAN/">, <url url="ftp://ftp.iij.ad.jp/pub/TeX/CTAN/">等です。お近くのサイトを ご利用ください) このファイルを <file>/usr/share/texmf/tex/latex</file> に置いてから <tt>texhash</tt> を実行し、新しいパッケージに teTeX に認識させます。 <!--O <item> to configure the hyphenation pattern for your language, edit the file <file>/usr/share/texmf/tex/generic/config/language.dat</file>, then do: --> <item> ハイフンのパターンをあなたの国の言葉に合わせて設定したいなら、 <file>/usr/share/texmf/tex/generic/config/language.dat</file> ファイルを編集した後、次のコマンドを実行します: <tscreen><verb> ~# texconfig init ; texconfig hyphen </verb></tscreen> <!--O <item> to tailor <tt>dvips</tt>, the file to edit is <file>/usr/share/texmf/dvips/config/config.ps</file>. Be aware that the fields regarding the default resolution also affect <tt>xdvi</tt>'s behaviour; if you experience annoying attempts to create fonts each time you run it, put the line --> <item> <tt/dvips/ を設定したいなら、 <file>/usr/share/texmf/dvips/config/config.ps</file> を編集します。 デフォルトの解像度を記述する欄は、同時に <tt/xdvi/ にも影響を与えます。 毎回フォント作成で苦労するなら、次の行を <tt/.Xdefault/ に入れると良いでしょう: <tscreen><verb> XDvi*mfmode: </verb></tscreen> <!--O in <tt>.Xdefault</tt>. This should help. --> <!--O <item> to include PostScript figures that reside in subdirectories, you can expand TeX's search path to include subdirectories. Put this command in your <file>.bash_profile</file>: --> <item> サブディレクトリにある PostScript の図を文書に貼るには、TeX の 検索パスを拡張してサブディレクトリも含めなければなりません。以下のコマ ンドを <file>.bash_profile</file> に入れてください: <tscreen><verb> export TEXINPUTS="$HOME/figures::./figures" </verb></tscreen> <!--O which makes TeX search in <tt>$HOME/figures</tt> before the default directories, and <tt>./figures</tt> after the default directories. --> これにより、TeX はデフォルトのディレクトリの前に <tt>$HOME/figures</tt> を検索し、デフォルトのディレクトリの後に <tt>./figures</tt> を検索します。 </itemize> <sect1><!-- Avoid PPProblems!-->PPPで問題を起こさないために <p> <!--O I'll take it for granted that your kernel has PPP + TCP/IP support compiled in, that loopback is enabled, and that you already have the <tt>pppd</tt> package correctly installed and, if you will, suid root. Obviously, your ISP must support PPP. --> あなたのカーネルに、PPP と TCP/IP がサポートされており、 ループバック デバイスが使えるようになっていて、<tt>pppd</tt> パッケージが正しくイン ストールされ、root に suid されているとします。 もちろん、お使いのプロバイダが PPP をサポートしていなければなりません。 <!--O There are now two ways to get PPP to work: a) manual configuration, and b) a configuration program that automagically sees to it. Whichever option you choose, have the following information on hand: --> PPP を動かすには2つの方法があります。a) 手で設定する方法と、 b) 魔法のように自動的に設定を行ってくれるプログラムを利用する方法です。 どちらにしても、以下の情報は必要です: <itemize> <!--O <item> your ISP's telephone number; --> <item>プロバイダの電話番号 <!--O <item> your ISP's name, mail and news server address; --> <item>プロバイダのネームサーバ、メールサーバ、ニュースサーバのアドレス <!--O <item> your ISP's domain; --> <item>プロバイダのドメイン名 <!--O <item> your username and password. --> <item>ユーザ名とパスワード </itemize> <!--O Manual configuration is a drudgery. It's about editing files and writing scripts; not too much work, but it's easy to make mistakes and newcomers are often intimidated. The PPP HOWTO is there for you. Alternatively, there are tools that ask for the information above and do all the work. --> 手動での設定は厄介な作業です。厄介なのはファイルの編集やスクリプトの記 述の部分です。これは大した作業ではないのですが、間違いを起こしやすく、 多くの場合、初心者にはとっつきにくい作業です。PPP-HOWTO は用意されてい ますが、これ以外にも上の情報を尋ねてきて、後は自動でやってくれるツー ルがあります。 <!--O Gnome and KDE include, respectively, <tt>gnome-ppp</tt> and <tt>kppp</tt> which are easy enough to set up. Alternatively, I suggest that you have a look at a couple of tty-/-based tools, <tt>wvdial</tt> and <tt>eznet</tt>. You feed them your ISP's phone number, your username, your password, and you're in business. Their home pages are at <url url="http://www.worldvisions.ca/wvdial"> and <url url="http://www.hwaci.com/sw/eznet">. Both are great, but I prefer the latter.p --> Gnome と KDE にはそれぞれ <tt>gnome-ppp</tt> と <tt>kppp</tt> というツー ルが付属しており、これを使って簡単に設定を行えます。これ以外にも、 2 つの tty ベースのツールをお勧めしておきます。 <tt>wvdial</tt> と <tt>eznet</tt> です。 これらのプログラムに ISP の電話番号、あなたの名前、パスワードを与えれ ば PPP が使えます。ホームページは <url url="http://www.worldvisions.ca/wvdial"> と <url url="http://www.hwaci.com/sw/eznet"> です。どちらも良いツールです が、筆者は後者のほうが好みです。 <sect2><!-- A Quick Start with eznet-->すぐ使える eznet <p> <!--O First of all, create an <file>/etc/resolv.conf</file> like this: --> まず最初に、以下のような <file>/etc/resolv.conf</file> を作成します: <tscreen><verb> nameserver w.x.y.z </verb></tscreen> <!--O where you'll insert the address of your ISP's nameserver. To create an account with <tt>eznet</tt>, issue the following command: --> ここには、あなたのプロバイダのネームサーバのアドレスを入力してください。 <tt>eznet</tt>を用いてアカウントを作成するには、以下のコマンドを実行し てください: <tscreen><verb> #~ eznet add service=YOUR_ISP user=NAME password=PASSWORD phone=PHONE </verb></tscreen> <!--O which creates the file <file>/var/eznet/eznet.conf</file>, owned by root.root with permissions 600; chmod it to 666 if you want it to be world readable. Now dial your ISP with <tt>eznet up YOUR_ISP</tt>. If the modem keeps waiting for the dial tone and won't connect, then try this command: --> これにより <file>/var/eznet/eznet.conf</file> が作成されます。所有者は root.root でパーミッションは 600 です。誰でも読めるようにしたければ、 666 に chmod してください。それから <tt>eznet up YOUR_ISP</tt> として ISP に電話をかけてください。電話がずっとダイアルトーンを待っていて接続 しないようであれば、以下のコマンドを試してください: <tscreen><verb> #~ eznet change YOUR_ISP init0=atx3 </verb></tscreen> <!--O To hang up, the command is <tt>eznet down</tt>. That's all! --> 電話を切るには <tt>eznet down</tt> コマンドを使います。たったこれだけ です! <sect2><!-- A Quick Start with wvdial -->すぐ使える wvdial <p> <!--O <tt>wvdial</tt>'s setup is even shorter. Type <tt>wvdialconf /etc/wvdial.conf</tt>, then edit the resulting file to include your username, password, and phone number. Try it out with <tt>wvdial</tt>, and keep your fingers crossed. To hang up, stop it with Ctrl-C. --> <tt>wvdial</tt>の設定はもっと早く終わります。 <tt>wvdialconf /etc/wvdial.conf</tt> を実行し、これが出力するファイル を編集してユーザ名、パスワード、電話番号を書き込みます。そして <tt>wvdial</tt> を試しに実行してから、十字を切って祈ります。電話を切る には、Ctrl-C でプログラムを止めます。 <sect1><!-- POP Client-->POP クライアント <p> <!--O To retrieve your mail from a POP3 server, you use a POP client like <tt>fetchpop</tt> or <tt>fetchmail</tt>; the latter is more advanced, but requires that you run <tt>sendmail</tt>. This is a bit of an overkill on low-spec machines. They're available on <url url="ftp://metalab.unc.edu/pub/Linux/system/mail/pop">. --> POP サーバからメールを取り込むには、<tt>fetchpop</tt> や <tt>fetchmail</tt> などの POP クライアントを使います。後者の方が機能は 優れていますが、<tt>sendmail</tt> が動作している必要があります。 <!-- fujiwara: そんなことはないです。mda オプションを使えば、procmail と組 み合わせて sendmail 抜きでも使えます。 --> これは性能の低いマシンでは、少し負担になります。どちらのソフトウェアも <url url="ftp://metalab.unc.edu/pub/Linux/system/mail/pop"> から入手できます。 <!--O To configure these clients: --> これらのクライアントは以下のように設定します: <itemize> <!--O <item><tt>fetchpop</tt>: the first time you run it, you'll be prompted for some information. Answer the questions and you're set. <tt>fetchpop</tt> must be used with the <tt>-r</tt> switch if your ISP's POP3 server doesn't implement the command LAST properly. --> <item><tt>fetchpop</tt>: 最初に立ち上げた時に、いくつかの情報を尋ね てきます。これに答えれば準備完了です。お使いの ISP の POP3 サーバが LAST コマンドを正しく実装していなければ、<tt>fetchpop</tt> には <tt>-r</tt> オプションを付けなければなりません。 <!--O <item><tt>fetchmail</tt>: adapt this sample <tt>.fetchmailrc</tt>: --> <item><tt>fetchmail</tt>: 以下に示す <tt>.fetchmailrc</tt> のサンプル を修正して使います: <tscreen><verb> # $HOME/.fetchmailrc poll mbox.myisp.com with protocol pop3; user john there with password _Loo%ny is john here </verb></tscreen> <!--O One user reported that adding ``smtphost localhost'' to the second line improved performance dramatically. --> 2行目に ``smtphost localhost'' と入れると、性能が劇的に良くなると報告 されています。 <!--O You must set the permissions to this file with the command <tt>chmod 600 .fetchmailrc</tt>, otherwise <tt>fetchmail</tt> will rightly refuse to start. This example is very basic; there are endless possibilities of configuration. Check out at <url url="http://www.ccil.org/~esr/fetchmail">. --> <tt/chmod 660 .fetchmailrc/ としてファイルパーミションを設定してください。 設定をしないと <tt>fetchmail</tt> は起動を拒否します。上記の例は非常に 基本的なものです。設定の方法はいくらでもあります。 <url url="http://www.ccil.org/~esr/fetchmail"> を見てください。 </itemize> <sect1><!-- X Window System (XFree86)-->X ウィンドウシステム(XFree86) <p> <sect2><!-- Setting Up the X Server-->X サーバの設定 <p> <!--O Come on, it's not difficult as it used to be... All major distributions include a tool for setting up X11 (e.g. <tt>XConfigurator</tt>, <tt>sax</tt>, <tt>XF86Setup</tt>, or at least <tt>xf86config</tt>). X configuration is virtually automatic these days, but a few video cards may refuse to work. Each time I experience problems setting up X on a system, I resort to a simple method that has always worked: --> さあ始めましょう。昔ほどは難しくありませんから…。 全てのメジャーなディストリビューションには X11を設定 するためのツール が入っています (例えば <tt/XConfigurator/, <tt/sax/, <tt/XF86Setup/。少なくとも <tt/xf86config/くらいは入っています)。 最近では X の設定は事実上自動ですが、うまく行かないビデオカードもいく つかあるようです。私の場合、X の設定で問題が出たときには、必ず動く 単純な方法を使っています: <itemize> <!--O <item> make sure that the plain VGA server is installed; --> <item> 標準の VGA サーバがインストールされていることを確認します。 <!--O <item> go to <url url="ftp://ftp.XFree86.org/pub/XFree86/current/binaries">, cd to the proper Linux subdirectory, and download the archives <tt>X_version_bin.tgz</tt>, <tt>X_version_set.tgz</tt>, and all the servers. Amongst other programs, the first archive contains the most up-to-date <tt>SuperProbe</tt>; --> <item> <url url="ftp://ftp.XFree86.org/pub/XFree86/current/binaries"> に行って、適当な Linux のサブディレクトリに入ります。そこから <tt>X_version_bin.tgz</tt>, <tt>X_version_set.tgz</tt> と全てのサーバ を持ってきます。他のプログラムと一緒に、最初のアーカイブには最新版の <tt>SuperProve</tt> が入っています。 <!--O <item> unpack <tt>X_version_bin.tgz</tt> to a temporary directory, cd to it, and run <tt>./SuperProbe</tt>. If your video card is recognised, chances are that you'll be able to set it up. Otherwise, hard luck; --> <item> <tt>X_version_bin.tgz</tt> を一時ディレクトリに解凍します。その ディレクトリに移動して、<tt>./SuperProbe</tt> を実行します。あなたのビ デオカードが認識されれば、設定できる可能性があります。 認識されなければあきらめてください。 <!--O <item> install the servers and <tt>X_version_set.tgz</tt> from <file>/usr/X11R6/</file>, then run <tt>XF86Setup</tt>. --> <item> サーバと <tt>X_version_set.tgz</tt> を <file>/usr/X11R6/</file> からインストールして、<tt>XF86Setup</tt> を実行します。 </itemize> <!--O This has always worked for me, but your mileage may vary. Please note that most times X11 won't start because the specs you choose for your monitor were too high! Start with conservative settings, i.e. 800x600 and 256 colours, then pump it up. <em>Warning</em>: these operations are dangerous and your monitor might be damaged! --> 私の場合にはこれで今までうまく行っていますが、あなたの場合にはそうでな いかもしれません。X11 が起動しないのは多くの場合、モニタに対して選んだ スペックが高すぎる(!)ことが理由なのを覚えておいてください。 最初は 800x600 ドット 256 色などの安全側に寄った設定から始め、そこから 設定を上げていきましょう。<em>警告</em>: これらの操作は危険であり、 モニタを壊してしまうかもしれません。 <sect2><!-- Keypad -->テンキー <p> <!--O We have seen above how to make a few special keys work. The sample file <tt>.Xmodmap</tt> works well if you want to use Xjed, but it makes the keypad unusable. You'll then need another config file, which we'll call <tt>.Xmodmap.num</tt>: --> これまで、いくつかの特殊キーを動作させるやり方をいくつか見てきました。 サンプルの <tt>.Xmodmap</tt> は Xjed ではちゃんと使えますが、テンキー は使えません。下に示す <tt>.Xmodmap.num</tt> というもう一つの設定ファ イルが必要です: <tscreen><verb> ! Definitions can be found in <X11/keysymdef.h> keycode 77 = Num_Lock keycode 112 = KP_Divide keycode 63 = KP_Multiply keycode 82 = KP_Subtract keycode 86 = KP_Add keycode 79 = KP_7 keycode 80 = KP_8 keycode 81 = KP_9 keycode 83 = KP_4 keycode 84 = KP_5 keycode 85 = KP_6 keycode 87 = KP_1 keycode 88 = KP_2 keycode 89 = KP_3 keycode 90 = KP_0 keycode 91 = KP_Decimal </verb></tscreen> <!--O Make sure that your <file>/etc/X11/XF86Config</file> does not contain these three lines: --> <file>/etc/X11/XF86Config</file>に以下の 3 行がないことを確認してください: <tscreen><verb> ServerNumLock Xleds XkbDisable </verb></tscreen> <!--O and in case, comment them out. To re-enable the keypad, you'll issue the command <tt>xmodmap .Xmodmap.num</tt>. --> もしあったら、コメントアウトしてください。テンキーを再び利用可能にする には、<tt>xmodmap .Xmodmap.num</tt> を実行してください。 <sect2><!-- Graphical Login with xdm-->xdm を使ったグラフィカルなログイン <p> <!--O To be greeted by a graphical login, edit the file <file>/etc/inittab</file>, which should include a line like this: --> グラフィカルログインを使いたいなら、<file>/etc/inittab</file> を編集してください。 以下のような行があるはずです: <tscreen><verb> x:5:respawn:/usr/bin/X11/xdm -nodaemon </verb></tscreen> <!--O where 5 is the runlevel corresponding to X11 (S.u.S.E. uses 4). Modify the line that defines the default runlevel (usually 2 or 3), changing it as above: --> ここで、5 は X11 に対応するランレベルです(S.u.S.E の場合は 4 です)。 デフォルトランレベルの定義(通常 2 か 3)をこのランレベルに修正します: <tscreen><verb> id:5:initdefault: </verb></tscreen> <!--O The number of colours is specified in <file>/etc/X11/xdm/Xserver</file>: --> 色数は <file>/etc/X11/xdm/Xserver</file> で指定されています: <tscreen><verb> :0 local /usr/X11R6/bin/X :0 -bpp 16 vt07 # first X server, 65k colours :1 local /usr/X11R6/bin/X :1 -bpp 32 vt08 # second X server, true colour </verb></tscreen> <!--O If you already have <tt>.xinitrc</tt>, copy it to <tt>.xsession</tt> and make the latter executable with <tt>chmod +x .xsession</tt>. Now issue the command <tt>telinit 5</tt> and you're in business. --> もし既に <tt>.xinitrc</tt> があるなら、<tt>.xsession</tt> にコピーし、 <tt>chmod +x .xsession</tt> として実行可能にしてください。 ここで、<tt>telinit 5</tt> を実行すれば、うまく動作するはずです。 <sect2><!-- Window Manager-->ウィンドウマネージャ <p> <!--O Once X works, there are endless possibilities of configuration; it depends on the window manager you use, there are tens to choose from. Mostly, it's all down to editing one or more ASCII files in your home directory; in other cases you don't have to edit a thing, and use an applet or even a menu. --> X が動くようになったら、その先の設定には無限の可能性があります。設定の 可能性は利用するウィンドウマネージャによります。選べるウィンドウマネー ジャは何十個もあります。多くの場合は、ホームディレクトリにある 1 つあ るいは複数の ASCII ファイルを編集することになります。場合によっては、 こういった編集の必要はなく、アプレットやメニューを使います。 <!--O Some examples: --> 例をいくつか挙げます: <itemize> <!--O <item> <bf>the fvwm family</bf>: copy <file>/etc/X11/fvwm/system.fvwmrc</file> (or similar) to your home using the appropriate name, browse it and start experimenting. You may waste a lot of time before you get the precise look and feel you like; --> <item> <bf>fvwm 系</bf>: <file>/etc/X11/fvwm/system.fvwmrc</file> (も しくは同等のもの)を適当な名前でホームディレクトリにコピーします。この ファイルを眺めて、いろいろ試してみましょう。好みの見た目や使い勝手にす るにはかなり時間がかかります。 <!--O <item> <bf>WindowMaker</bf>: it has several config files that live under <tt>$HOME/GNUstep</tt>, and a cool configuration applet; --> <item> <bf>WindowMaker</bf>: <tt>$HOME/GNUstep</tt> の下にいくつかの設 定ファイルがあります。また、カッコいい設定アプレットもあります。 <!--O <item> <bf>KDE</bf> and <bf>Gnome</bf>: nothing to edit manually here: everything can be done via the menu. --> <item> <bf>KDE</bf> と <bf>Gnome</bf>: 手動で編集するものはありません。 全てメニューから設定可能です。 </itemize> <!--O In short: if you don't mind editing config file, choose something like <tt>icewm</tt>, <tt>fvwm*</tt>, <tt>blackbox</tt> etc; if you do mind, the choice is currently restricted to KDE, Gnome, WindowMaker, and XFCE. --> まとめ: 設定ファイルの編集が苦でないなら <tt>icewm</tt>, <tt>fvwm*</tt>, <tt>blackbox</tt> など、そうでないなら今のところは KDE や Gnome, WindowMaker, XFCE がよいでしょう。 <!--O It's important to have a good <tt>.xinitrc</tt>. An example: --> 更に、<tt>.xinitrc</tt> が適切であることも重要です。以下に例を示します: <tscreen><verb> #!/bin/sh # $HOME/.xinitrc usermodmap=$HOME/.Xmodmap xmodmap $usermodmap xset s noblank # turn off the screen saver xset s 300 2 # screen saver start after 5 min xset m 10 5 # set mouse acceleration rxvt -cr green -ls -bg black -fg white -fn 7x14 \ -geometry 80x30+57+0 & if [ "$1" = "" ] ; then # default WINMGR=wmaker else WINMGR=$1 fi $WINMGR </verb></tscreen> <!--O Although it doesn't appear to be strictly required, make it executable with <tt>chmod +x .xinitrc</tt>. --> 絶対に必要なわけではありませんが、<tt>chmod +x .xinitrc</tt> として実行可能にしておきます。 <!--O This <tt>.xinitrc</tt> lets you choose the window manager: try --> この.xinitrc でウィンドウマネージャが選択されます: <tscreen><verb> $ startx startkde # or other w.m. </verb></tscreen> <!--O (it doesn't work with some S.u.S.E. versions, though). --> (ただし、一部のバージョンの S.u.S.E では動作しません。) <sect2><!-- Defaults for X11 Apps -->X11 アプリケーションのデフォルト値 <p> <!--O Find out where the <file>app-defaults</file> directory is (it should be <file>/usr/X11R6/lib/X11/app-defaults</file>). Several apps keep a configuration file there. --> <file>app-defaults</file> ディレクトリがある場所を見つけてください(こ れは <file>/usr/X11R6/lib/X11/app-defaults</file> のはずです)。ここに 設定ファイルがあるアプリケーションがいくつかあります。 <sect1><!-- Users' Configurations-->ユーザごとの設定 <p> <!--O When you're done editing the dot files, copy them to <file>/etc/skel</file> as seen in Section <ref id="config" name="Software Configuration">. --> <ref id="config" name="ソフトウェアの設定">の節でやったように、ドット ファイルの編集が終ったら <file>/etc/skel</file> にコピーしてください。 <sect1><!-- Making .rpms -->.rpm の作成 <p> <!--O <tt>rpm</tt> is such a wonderful method of keeping packages under control that I'm reluctant to install .tar.gz archives but in very few special cases (e.g., security). Whenever you install a tarball, consider turning it into an .rpm archive, then reinstall it; consult the RPM HOWTO. Also, if you use modern <tt>gcc</tt> versions like <tt>egcs</tt> or <tt>pgcc</tt>, it may be advisable to put this in your <tt>/etc/rpmrc</tt>: --> <tt>rpm</tt> は、.tar.gz アーカイブからのインストールは面倒だけど、 非常に特殊なケース(例えばセキュリティ)に含まれるパッケージを管理する 方法としてはとても優れています。tar アーカイブをインストールする場合は、 これを .rpm アーカイブに変換してからインストールすることを考慮しましょ う。その方法については RPM HOWTO をご覧ください。また、 <tt>egcs</tt> や <tt>pgcc</tt> といった最近のバージョンの <tt>gcc</tt> を使う場合は、以下の設定を <tt>/etc/rpmrc</tt> に入れておくとよいかも しれません: <tscreen><verb> optflags: i386 -O2 -mpentium </verb></tscreen> <sect1><!-- Upgrading-->アップグレード <p> <!--O If you upgrade your machine, do your backup as usual and remember to save a few additional files. Some could be <file>/etc/X11/XF86Config</file>, <file>/usr/bin/fax</file>, all the stuff in <file>/usr/local</file>, the kernel configuration, the whole <file>/etc</file>, and all the mail in <file>/var/spool/mail</file>. --> マシンのアップグレードをする時には、通常通りのバックアップに加えて、 いくつかのファイルを保存しておくようにしてください。 <file>/etc/X11/XF86Config</file>, <file>/usr/bin/fax</file>, <file>/usr/local</file> 内の全て、カーネルの設定ファイル、 <file>/etc</file> 全部、<file>/var/spool/mail</file> 内の全てのメール 等です。 <!--O Then it's time to upgrade (in rare cases, downgrade!) applications that your distribution ship with, and to add additional packages. Keep a list of these ones. --> それから、ディストリビューションの付属のアプリケーションのアップグレード (たまにダウングレードのことも!)やパッケージの追加を行います。 扱ったパッケージのリストは保存しましょう。 <sect> <!-- Configuration Software--> 設定用ソフトウェア <label id="Config sw"> <p> <!--O There are several programs that make Linux easy to setup and configure. Some are becoming sort of standard: Red Hat, Caldera and other distributions ship with apps like <tt>setup</tt>, <tt>printtool</tt>, <tt>netcfg</tt>, <tt>usertool</tt>, etc, while S.u.S.E. ships with a comprehensive configuration program called Yast. Other useful programs are: --> Linux を簡単に設定できるプログラムがいくつかあります。そのうちのいくつかは ある種の標準になりつつあります。 RedHat, Caldera やその他のディストリビューション では <tt>setup</tt>, <tt>printtools</tt>, <tt>netcfg</tt>, <tt>usertool</tt> などのアプリケーションを、S.u.S.E は YAST という統合 的な設定プログラムを自社のディストリビューションといっしょに出荷してい ます。その他の便利なプログラムを以下に示します: <itemize> <!--O <item> <bf>The Dotfile Generator</bf>: fine X app with modules to configure packages like <tt>emacs</tt>, <tt>bash</tt>, <tt>procmail</tt> and more. Its page is at <url url="http://www.imada.ou.dk/~blackie/dotfile">; --> <item> <bf>Dotfile Generator</bf>: X 上のアプリケーションで, <tt>emacs</tt>, <tt>bash</tt>, <tt>procmail</tt> や他のアプリケーション を設定します。 <url url="http://www.imada.ou.dk/~blackie/dotfile"> に WWW ページがあります。 <!--O <item> <bf>Linuxconf</bf>: the ultimate configuration tool. It can do everything, both in console and under X. Go to <url url="http://www.solucorp.qc.ca/linuxconf"> at once. --> <item> <bf>Linuxconf</bf>: 究極の設定ツール。どんな設定もできますし、X とコンソールの両方で動作します。何はともあれ <url url="http://www.solucorp.qc.ca/linuxconf"> をご覧ください。 </itemize> <sect><!-- The End -->最後に<label id="The End"> <p> <sect1><!-- Copyright-->著作権 <p> <!--O Unless otherwise stated, Linux HOWTO documents are copyrighted by their respective authors. Linux HOWTO documents may be reproduced and distributed in whole or in part, in any medium physical or electronic, as long as this copyright notice is retained on all copies. Commercial redistribution is allowed and encouraged; however, the author would like to be notified of any such distributions. --> 特に記述がなければ、Linux HOWTO 文書の著作権は著者にあります。 Linux HOWTO 文書は、全体でも一部分でも、どんな物理的/電子的メディアにも、 この著作権表示をつけることによってコピーしたり配布したりすることが できます。商用配布も許されており、推奨されていますが、著者はそのような 配布について告知を望むでしょう。 <!--O All translations, derivative works, or aggregate works incorporating any Linux HOWTO documents must be covered under this copyright notice. That is, you may not produce a derivative work from a HOWTO and impose additional restrictions on its distribution. Exceptions to these rules may be granted under certain conditions; please contact the Linux HOWTO coordinator at the address given below. --> Linux HOWTOドキュメントの翻訳や派生文書、編集も、この著作権告知文書によって 著作権が保護されます。つまりHOWTOからの派生文書の配布に追加的な制限を 加えてはなりません。この規則の例外が認められる場合もありますので、Linux HOWTO のまとめ役に下記のアドレスでコンタクトしてください。 <!--O In short, we wish to promote dissemination of this information through as many channels as possible. However, we do wish to retain copyright on the HOWTO documents, and would like to be notified of any plans to redistribute the HOWTOs. --> 簡単に言えば、我々はこの情報ができるだけ多くの方法で配布されることを望んで います。しかしながら、我々はHOWTOドキュメントの著作権が守られ、HOWTOsの 再配布に当たって告知されることを望んでいます。 <!--O If you have questions, please contact Tim Bynum, the Linux HOWTO coordinator, at <url url="mailto:linux-howto@metalab.unc.edu"> via email. --> もし疑問があったら、Linux HOWTO のまとめ役である Tim Bynum <url url="linux-howto@metalab.unc.edu"> に電子メールで連絡してください。 <sect1><!-- Feedback-->フィードバック <p> <!--O Perhaps even more than other HOWTOs, this one needs and welcomes your suggestions, criticisms, and contributions. Not only is feedback welcome: it's necessary. If you think something is missing or wrong, please email me. If you have a distribution other than Red Hat/Mandrake and your config files are different or placed in other directories, please tell me and I'll include your tips. My aim is making life with Linux as easy as possible. --> おそらく他の HOWTO よりもこの HOWTO はあなたからの提案、批判、貢献を必要と しています。フィードバックは単に歓迎されるのでなく、必須です。 足りない部分や間違っている部分があると思ったらどうぞ私にメールしてくだ さい。あなたのディストリビューションが Red Hat や Mandrake ではなく、 設定ファイルが異なっていたり、違うディレクトリに置かれている場合には、 どうぞ教えてください。それを加えていきます。私の目的は Linux のある 生活をできるだけ容易にすることにあります。 <!--O Linux has a huge number of packages, so it's impossible to include directions for all of them. Please keep your requests/suggestions pertinent to the ``most reasonable'' programs-/-/-I'll leave it to your common sense. --> Linux には数多くのパッケージがありますから、すべての操作法を含めるのは 不可能です。どうか要求や提案は「もっとも普通の」プログラムに関するものに 限ってください。それはあなたの常識に基づくものです。 <sect1><!-- Disclaimer-->免責事項 <p> <!--O ``Configuration HOWTO'' was written by Guido Gonzato, <url url="REMOVE_MEguido@ibogeo.df.unibo.it">. (Remove ``REMOVE_ME''.) Many thanks to all other HOWTO authors and man pages writers/maintainers, whose work I've shamelessly pilfered; and to all people who provided me with feedback. --> Configuration HOWTO は Guido Gonzato <url url="mailto:REMOVE_MEguido@ibogeo.df.unibo.it">(``REMOVE_ME'' の部分は消 してください)が執筆しました。筆者が厚かましくも内容をちょろまかしてきた 他の HOWTO や man ページの著者や管理者の皆さんに深く感謝します。 <!--O This document is provided ``as is''. I put great effort into writing it as accurately as I could, but you use the information contained in it at your own risk. In no event shall I be liable for any damages resulting from the use of this work. --> この文書は「あるがまま(as is)」の形で提供します。できるだけ正確である よう心がけましたが、この情報を用いるかどうかはあなた自身の責任です。 その結果として何が起きようと筆者は責任を負いません。 <!--O I hope you'll find this work useful, though. Whenever I install a new Linux box, I actually do... --> とは言え、この文章は役立つと感じてもらえると思います。筆者自身、新しく インストールする時に行っていることですから…。 <!--O Enjoy, --> それではお楽しみください。 Guido <tt/=8-)/ <sect>日本語訳について<p> この文書の日本語訳は Linux Japanese FAQ Project が行いました。 誤訳の指摘やご意見などは、 当プロジェクト <JF@linux.or.jp> 宛にお願いします。 改定履歴を以下に示します。 <descrip> <tag>v1.2.2j, 11 January 1999</tag> 翻訳: 遠藤 明 (<htmlurl url="mailto:akendo@t3.rim.or.jp" name="akendo@t3.rim.or.jp">) 校正: 長谷川 靖 (<htmlurl url="mailto:yaz-hase@qb3.so-net.ne.jp" name="yaz-hase@qb3.so-net.ne.jp">) <tag>v1.2.6j, 15 September 1999</tag> 更新: 中園 祐司 (<htmlurl url="mailto:nakazono@bh.mbn.or.jp" name="nakazono@bh.mbn.or.jp">) 校正: 藤原 輝嘉 (<htmlurl url="mailto:fujiwara@linux.or.jp" name="fujiwara@linux.or.jp">), 武井 伸光 (<htmlurl url="mailto:takei@cc.kochi-u.ac.jp" name="takei@cc.kochi-u.ac.jp">) <tag>v1.3.7j, 2 December 1999</tag> 更新: 藤原 輝嘉(<htmlurl url="mailto:fujiwara@linux.or.jp" name="fujiwara@linux.or.jp">) 校正: 武井 伸光 (<htmlurl url="mailto:takei@cc.kochi-u.ac.jp" name="takei@cc.kochi-u.ac.jp">) </descrip> </article>