*インストール [#m42f613d]
#contents
**装置構成 [#o888dabf]
今回は以下の構成の PC に FreeBSD/i386 6.1 RELEASE を CD からインストールすることにします。
|Mother Board|[[COMELL:http://www.commell.com.tw/]] [[LV-671:http://www.commell.com.tw/Product/SBC/LV-671.HTM]]|
|CPU|[[Intel®:http://www.intel.co.jp/]] [[Pentium®M 725:http://www.intel.co.jp/jp/products/processor/pentiumm/index.htm]]|
|Memory|[[Crucial:http://www.crucial.com/]] DDR PC3200 UNBUFFERED NON-ECC 512 MB|
|Hard Disk Drive|[[Seagate:http://www.seagate.com/]] [[Bararcuda 7200.8 ST3300831A:http://www.seagate.com/cda/products/discsales/marketing/detail/0,1081,627,00.html]] 300GB|
|DVD Drive|MATSHITA DVD-RAM UJ-846S|
DVD Drive を接続していますが、インストール後に取り外しています。((サーバーとして 24 時間稼働させるので、不必要なものはできるだけ外しています))
**ヘッドレスインストールの準備 [#ldf374ea]
シリアルコンソールからのヘッドレスインストールを今回行います。LV671 のCOM1(下段のポート) とホスト PC のシリアルポートをシリアルリバースケーブルで接続します。&br;
今回ホスト PC には Windows XP Professional を、ターミナルエミュレーターには [[UTF-8 TeraTerm Pro with TTSSH2:http://sourceforge.jp/projects/ttssh2/]]を使用しました。&br;
最近の FreeBSD はキーボード無し、VGA 無しの状態でブートするとシリアルコンソールに出力するようになっています。(([[FreeBSD/i386 6.1-RELEASE Installation Instructions:http://www.freebsd.org/releases/6.1R/installation-i386.html]] 参照))
&br;
の、はずですが当初はうまくいきませんでした。いろいろと試した結果 BIOS で内蔵 VGA を無効にすることできちんとシリアルコンソールに出力されました。
**ターミナルタイプの選択 [#s3e4fd91]
CD からブートし、しばらく待つとシリアルコンソールに以下のように出力されます。
Copyright (c) 1992-2006 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD 6.1-RELEASE #0: Sun May 7 04:32:43 UTC 2006
root@opus.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC
ACPI APIC Table: <IntelR AWRDACPI>
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Pentium(R) M processor 1.60GHz (1594.83-MHz 686-class CPU)
Origin = "GenuineIntel" Id = 0x6d6 Stepping = 6
Features=0xafe9fbbf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,TM,PBE>
Features2=0x180<EST,TM2>
real memory = 536805376 (511 MB)
avail memory = 511856640 (488 MB)
ioapic0 <Version 2.0> irqs 0-23 on motherboard
kbd1 at kbdmux0
acpi0: <IntelR AWRDACPI> on motherboard
acpi0: Power Button (fixed)
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0
cpu0: <ACPI CPU> on acpi0
acpi_throttle0: <ACPI CPU Throttling> on cpu0
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pci0: <base peripheral> at device 0.1 (no driver attached)
pci0: <base peripheral> at device 0.3 (no driver attached)
pci0: <display> at device 2.0 (no driver attached)
uhci0: <Intel 82801DB (ICH4) USB controller USB-A> port 0xc000-0xc01f irq 16 at device 29.0 on pci0
uhci0: [GIANT-LOCKED]
usb0: <Intel 82801DB (ICH4) USB controller USB-A> on uhci0
usb0: USB revision 1.0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1: <Intel 82801DB (ICH4) USB controller USB-B> port 0xc400-0xc41f irq 19 at device 29.1 on pci0
uhci1: [GIANT-LOCKED]
usb1: <Intel 82801DB (ICH4) USB controller USB-B> on uhci1
usb1: USB revision 1.0
uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2: <Intel 82801DB (ICH4) USB controller USB-C> port 0xc800-0xc81f irq 18 at device 29.2 on pci0
uhci2: [GIANT-LOCKED]
usb2: <Intel 82801DB (ICH4) USB controller USB-C> on uhci2
usb2: USB revision 1.0
uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
ehci0: <Intel 82801DB/L/M (ICH4) USB 2.0 controller> mem 0xe8180000-0xe81803ff irq 23 at device 29.7 on pci0
ehci0: [GIANT-LOCKED]
usb3: EHCI version 1.0
usb3: companion controllers, 2 ports each: usb0 usb1 usb2
usb3: <Intel 82801DB/L/M (ICH4) USB 2.0 controller> on ehci0
usb3: USB revision 2.0
uhub3: Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub3: 6 ports with 6 removable, self powered
pcib1: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci1: <ACPI PCI bus> on pcib1
cbb0: <RF5C475 PCI-CardBus Bridge> mem 0xe8024000-0xe8024fff irq 20 at device 11.0 on pci1
cardbus0: <CardBus bus> on cbb0
pccard0: <16-bit PCCard bus> on cbb0
em0: <Intel(R) PRO/1000 Network Connection Version - 3.2.18> port 0xb000-0xb03f mem 0xe8000000-0xe801ffff irq 19 at device 13.0 on pci1
em0: Ethernet address: 00:03:1d:01:10:a7
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH4 UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xf000-0xf00f at device 31.1 on pci0
ata0: <ATA channel 0> on atapci0
ata1: <ATA channel 1> on atapci0
pci0: <serial bus, SMBus> at device 31.3 (no driver attached)
acpi_tz0: <Thermal Zone> on acpi0
sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
sio0: type 16550A, console
pmtimer0 on isa0
orm0: <ISA Option ROM> at iomem 0xc8000-0xc8fff on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
ppc0: parallel port not found.
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
Timecounter "TSC" frmd0: Preloaded imageequency 1594831311 Hz quality 800
Timecounters tick every 1.000 msec
</boot/mfsroot> 4423680 bytes at 0xc0a91928
ad0: 286168MB <Seagate ST3300831A 3.06> at ata0-master UDMA100
acd0: DMA limited to UDMA33, controller found non-ATA66 cable
acd0: DVDR <MATSHITADVD-RAM UJ-846S/FYX4> at ata1-master UDMA33
Trying to mount root from ufs:/dev/md0
/stand/sysinstall running as init on serial console
These are the predefined terminal types available to
sysinstall when running stand-alone. Please choose the
closest match for your particular terminal.
1 ...................... Standard ANSI terminal.
2 ...................... VT100 or compatible terminal.
3 ...................... FreeBSD system console (color).
4 ...................... FreeBSD system console (monochrome).
5 ...................... xterm terminal emulator.
Your choice: (1-5) 2
最後にターミナルの種類を選択します。今回は 2 の VT100 or compatible terminal を選びます。
**国・地域の選択 [#dd6049f3]
まずはじめに、使用する国・地域を選びます((240 の国と地域があります))。もちろん 108 Japan を選択しています。
┌------------------ Country Selection ------------------┐
| Please choose a country, region, or group. |
| Select an item using [SPACE] or [ENTER]. |
|┌-^(-)----------------------------------------------┐|
|| 95 Heard and McDonald Islands ||
|| 96 Honduras ||
|| 97 Hong Kong ||
|| 98 Hungary ||
|| 99 Iceland ||
|| 100 India ||
|| 101 Indonesia ||
|| 102 Iran ||
|| 103 Iraq ||
|| 104 Ireland ||
|| 105 Israel ||
|| 106 Italy ||
|| 107 Jamaica ||
|| 108 Japan ||
|└-v(+)----------------------------------------------┘|
├-------------------------------------------------------┤
| [ OK ] Cancel |
└-------------------------------------------------------┘
**キーボードマッピングの選択 [#sce4eba2]
使用するキーボードのキーマップを選択します。とりあえず "Japanese 106 keymap" を選んでいます。((といってもまず使うつもりはないのですが(^^ゞ))
┌------------------------- System Console Keymap -------------------------┐
| The default system console driver for FreeBSD (syscons) defaults |
| to a standard "American" keyboard map. Users in other countries |
| (or with different keyboard preferences) may wish to choose one of |
| the other keymaps below. |
| Note that sysinstall itself only uses the part of the keyboard map |
| which is required to generate the ANSI character subset, but your |
| choice of keymap will also be saved for later (fuller) use. |
|┌-^(-)----------------------------------------------------------------┐|
|| Japanese 106 Japanese 106 keymap ||
|| Latin American (accent) Latin American ISO keymap (accent keys) ||
|| Latin American Latin American ISO keymap ||
|| Norway ISO Norwegian ISO keymap ||
|| Polish ISO Polish ISO keymap ||
|| Portuguese (accent) Portuguese ISO keymap (accent keys) ||
|| Portuguese Portuguese ISO keymap ||
|| Russia KOI8-R Russian KOI8-R keymap ||
|| Slovak Slovak ISO keymap ||
|└-v(+)----------------------------------------------------------------┘|
├-------------------------------------------------------------------------┤
| [ OK ] Cancel |
└------------------------[ Choose a keyboard map ]------------------------┘
**インストール方法の選択 [#nf5479ff]
インストール方法を選びます。今回は "Standard" を選びます。
┌------------------------ sysinstall Main Menu -------------------------┐
│ Welcome to the FreeBSD installation and configuration tool. Please │
│ select one of the options below by using the arrow keys or typing the │
│ first character of the option name you're interested in. Invoke an │
│ option with [SPACE] or [ENTER]. To exit, use [TAB] to move to Exit. │
│┌-------------------------------------------------------------------┐│
││ Usage Quick start - How to use this menu system ││
││ Standard Begin a standard installation (recommended) ││
││ Express Begin a quick installation (for experts) ││
││ Custom Begin a custom installation (for experts) ││
││ Configure Do post-install configuration of FreeBSD ││
││ Doc Installation instructions, README, etc. ││
││ Keymap Select keyboard type ││
││ Options View/Set various installation options ││
││ Fixit Repair mode with CDROM/DVD/floppy or start shell ││
││ Upgrade Upgrade an existing system ││
││ Load Config Load default install configuration ││
││ Index Glossary of functions ││
│└-------------------------------------------------------------------┘│
├-----------------------------------------------------------------------┤
│ [ Select ] X Exit Install │
└------------------[ Press F1 for Installation Guide ]------------------┘
**ハードディスクスライスの設定 [#eae10826]
FreeBSD 用にスライスを用意します。まず以下のようなメッセージが出ますので、一通り読んだ後に Enter もしくは Space を押します。
┌---------------------------------- Message -----------------------------------┐
│In the next menu, you will need to set up a DOS-style ("fdisk") partitioning │
│scheme for your hard disk. If you simply wish to devote all disk space │
│to FreeBSD (overwriting anything else that might be on the disk(s) selected) │
│then use the (A)ll command to select the default partitioning scheme followed │
│by a (Q)uit. If you wish to allocate only free space to FreeBSD, move to a │
│partition marked "unused" and use the (C)reate command. │
├----------------------------------------------------------------------(100%)--┤
│ [ OK ] │
└---------------------------[ Press enter or space ]---------------------------┘
以下のような注意が表示されることがありますが、気にせず Enter もしくは Space を押します。
┌----------------------------- Message -----------------------------┐
│WARNING: A geometry of 581421/16/63 for ad0 is incorrect. Using │
│a more likely geometry. If this geometry is incorrect or you │
│are unsure as to whether or not it's correct, please consult │
│the Hardware Guide in the Documentation submenu or use the │
│(G)eometry command to change it now. │
│ │
│Remember: you need to enter whatever your BIOS thinks the │
│geometry is! For IDE, it's what you were told in the BIOS │
│setup. For SCSI, it's the translation mode your controller is │
│using. Do NOT use a ``physical geometry''. │
├-----------------------------------------------------------(100%)--┤
│ [ OK ] │
└---------------------[ Press enter or space ]----------------------┘
今回は FreeBSD のみをインストールするので、先ほどのメッセージの通り (A) を押してすべてを FreeBSD ように割り振った後、(Q) を押して FDISK を終了します。
Disk name: ad0 FDISK Partition Editor
DISK Geometry: 36481 cyls/255 heads/63 sectors = 586067265 sectors (286165MB)
Offset Size(ST) End Name PType Desc Subtype Flags
0 63 62 - 12 unused 0
63 586067202 586067264 ad0s1 8 freebsd 165
586067265 5103 586072367 - 12 unused 0
The following commands are supported (in upper or lower case):
A = Use Entire Disk G = set Drive Geometry C = Create Slice F = `DD' mode
D = Delete Slice Z = Toggle Size Units S = Set Bootable | = Wizard m.
T = Change Type U = Undo All Changes Q = Finish
Use F1 or ? to get more help, arrow keys to select.
**ブートマネージャーの選択 [#wc0f5576]
ブートマネージャーをインストールするかどうか選択します。FreeBSD のみをインストールしているので二番目の "Standard" を選択します。
┌----------------- Install Boot Manager for drive ad0? ------------------┐
│ FreeBSD comes with a boot selector that allows you to easily │
│ select between FreeBSD and any other operating systems on your machine │
│ at boot time. If you have more than one drive and want to boot │
│ from the second one, the boot selector will also make it possible │
│ to do so (limitations in the PC BIOS usually prevent this otherwise). │
│ If you do not want a boot selector, or wish to replace an existing │
│ one, select "standard". If you would prefer your Master Boot │
│ Record to remain untouched then select "None". │
│ │
│ NOTE: PC-DOS users will almost certainly require "None"! │
│┌--------------------------------------------------------------------┐│
││ BootMgr Install the FreeBSD Boot Manager ││
││ Standard Install a standard MBR (no boot manager) ││
││ None Leave the Master Boot Record untouched ││
│└--------------------------------------------------------------------┘│
├------------------------------------------------------------------------┤
│ [ OK ] Cancel │
└-----------------[ Press F1 to read about drive setup ]-----------------┘
**パーティションの設定 [#q6b0c9c1]
パーティションの設定に移る前に、以下のようなメッセージが出ます。一通り読んでから Enter もしくは Space を押します。
┌---------------------------------- Message -----------------------------------┐
│Now you need to create BSD partitions inside of the fdisk partition(s) │
│just created. If you have a reasonable amount of disk space (1GB or more) │
│and don't have any special requirements, simply use the (A)uto command to │
│allocate space automatically. If you have more specific needs or just don't │
│care for the layout chosen by (A)uto, press F1 for more information on │
│manual layout. │
├----------------------------------------------------------------------(100%)--┤
│ [ OK ] │
└---------------------------[ Press enter or space ]---------------------------┘
十分な容量があるので、先ほどのメッセージ通り (A) を押してパーティションを確保します。(Q) を押して Disklabel Editor を終了します。
FreeBSD Disklabel Editor
Disk: ad0 Partition name: ad0s1 Free: 0 blocks (0MB)
Part Mount Size Newfs Part Mount Size Newfs
---- ----- ---- ----- ---- ----- ---- -----
ad0s1a / 512MB UFS2 Y
ad0s1b swap 998MB SWAP
ad0s1d /var 1523MB UFS2+S Y
ad0s1e /tmp 512MB UFS2+S Y
ad0s1f /usr 275GB UFS2+S Y
The following commands are valid here (upper or lower case):
C = Create D = Delete M = Mount pt.
N = Newfs Opts Q = Finish S = Toggle SoftUpdates Z = Custom Newfs
T = Toggle Newfs U = Undo A = Auto Defaults R = Delete+Merge
Use F1 or ? to get more help, arrow keys to select.
**配布ファイルの選択 [#pd0203fc]
インストールするファイルセットを選びます。今後カーネルの最適化やセキュリティアップグレードの適用を行うこと、サーバーとして運用することを考えて、"4 Developer" を選択します。
┌---------------------------- Choose Distributions ----------------------------┐
│ As a convenience, we provide several "canned" distribution sets. │
│ These select what we consider to be the most reasonable defaults for the │
│ type of system in question. If you would prefer to pick and choose the │
│ list of distributions yourself, simply select "Custom". You can also │
│ pick a canned distribution set and then fine-tune it with the Custom item. │
│ │
│ Choose an item by pressing [SPACE] or [ENTER]. When finished, choose the │
│ Exit item or move to the OK button with [TAB]. │
│┌--------------------------------------------------------------------------┐│
││ <<< X Exit Exit this menu (returning to previous) ││
││ All All system sources, binaries and X Window System ││
││ Reset Reset selected distribution list to nothing ││
││ [ ] 4 Developer Full sources, binaries and doc but no games ││
││ [ ] 5 X-Developer Same as above + X Window System ││
││ [ ] 6 Kern-Developer Full binaries and doc, kernel sources only ││
││ [ ] 7 X-Kern-Developer Same as above + X Window System ││
││ [ ] 8 User Average user - binaries and doc only ││
│└-----v(+)-----------------------------------------------------------------┘│
├------------------------------------------------------------------------------┤
│ [ OK ] Cancel │
└-------------[ Press F1 for more information on these options. ]--------------┘
ports collection のインストールについて聞かれますが、ports collection 日々は更新されているので、インストール後に改めて最新版をインストールすることとします。ですので、ここは "No" を選択します。
┌------------------------ User Confirmation Requested -------------------------┐
│ Would you like to install the FreeBSD ports collection? │
│ │
│ This will give you ready access to over 13,300 ported software packages, │
│ at a cost of around 440MB of disk space when "clean" and possibly │
│ much more than that when a lot of the distribution tarballs are loaded │
│ (unless you have the extra discs available from a FreeBSD CD/DVD distribution│
│ and can mount them on /cdrom, in which case this is far less of a problem). │
│ │
│ The ports collection is a very valuable resource and well worth having │
│ on your /usr partition, so it is advisable to say Yes to this option. │
│ │
│ For more information on the ports collection & the latest ports, visit: │
│ http://www.freebsd.org/ports │
│ │
├------------------------------------------------------------------------------┤
│ Yes [ No ] │
└------------------------------------------------------------------------------┘
再び配布ファイルセットの選択画面が表示されます。先ほど選んだ "4 Developer" にチェックがついていることを確認した後、一番上の "X Exit" を選択します。
┌---------------------------- Choose Distributions ----------------------------┐
│ As a convenience, we provide several "canned" distribution sets. │
│ These select what we consider to be the most reasonable defaults for the │
│ type of system in question. If you would prefer to pick and choose the │
│ list of distributions yourself, simply select "Custom". You can also │
│ pick a canned distribution set and then fine-tune it with the Custom item. │
│ │
│ Choose an item by pressing [SPACE] or [ENTER]. When finished, choose the │
│ Exit item or move to the OK button with [TAB]. │
│┌--------------------------------------------------------------------------┐│
││ <<< X Exit Exit this menu (returning to previous) ││
││ All All system sources, binaries and X Window System ││
││ Reset Reset selected distribution list to nothing ││
││ [X] 4 Developer Full sources, binaries and doc but no games ││
││ [ ] 5 X-Developer Same as above + X Window System ││
││ [ ] 6 Kern-Developer Full binaries and doc, kernel sources only ││
││ [ ] 7 X-Kern-Developer Same as above + X Window System ││
││ [ ] 8 User Average user - binaries and doc only ││
│└-----v(+)-----------------------------------------------------------------┘│
├------------------------------------------------------------------------------┤
│ [ OK ] Cancel │
└-------------[ Press F1 for more information on these options. ]--------------┘
**インストールメディアの選択 [#b0172ad5]
インストールに使用するメディアを選択します。今回は "1 CD/DVD" を使用します。
┌----------------------- Choose Installation Media -----------------------┐
│ FreeBSD can be installed from a variety of different installation │
│ media, ranging from floppies to an Internet FTP server. If you're │
│ installing FreeBSD from a supported CD/DVD drive then this is generally │
│ the best media to use if you have no overriding reason for using other │
│ media. │
│┌---------------------------------------------------------------------┐│
││ 1 CD/DVD Install from a FreeBSD CD/DVD ││
││ 2 FTP Install from an FTP server ││
││ 3 FTP Passive Install from an FTP server through a firewall ││
││ 4 HTTP Install from an FTP server through a http proxy ││
││ 5 DOS Install from a DOS partition ││
││ 6 NFS Install over NFS ││
││ 7 File System Install from an existing filesystem ││
││ 8 Floppy Install from a floppy disk set ││
││ 9 Tape Install from SCSI or QIC tape ││
││ X Options Go to the Options screen ││
│└---------------------------------------------------------------------┘│
├-------------------------------------------------------------------------┤
│ [ OK ] Cancel │
└------[ Press F1 for more information on the various media types ]-------┘
**最終確認 [#p16ae025]
インストール前の最終確認画面が以下のように表示されます。"Yes" を選択するとインストールが始まります。
┌----------------- User Confirmation Requested ------------------┐
│ Last Chance! Are you SURE you want continue the installation? │
│ │
│ If you're running this on a disk with data you wish to save │
│ then WE STRONGLY ENCOURAGE YOU TO MAKE PROPER BACKUPS before │
│ proceeding! │
│ │
│ We can take no responsibility for lost disk contents! │
├----------------------------------------------------------------┤
│ [ Yes ] No │
└----------------------------------------------------------------┘
**インストール [#c20129a3]
インストール中は以下のような画面が表示されます。
┌-------------------[ Progress ]-----------------┐
| Extracting proflibs into / directory... |
|┌--------------------------------------------┐|
|| ||
|└--------------------------------------------┘|
└---------------------- 33%----------------------┘
1024 bytes read from proflibs dist, chunk 1 of 3 @ 1.0 KBytes/sec.
インストールが終了すると以下の画面が表示されます。
┌----------------------------- Message ----------------------------┐
│Congratulations! You now have FreeBSD installed on your system. │
│ │
│We will now move on to the final configuration questions. │
│For any option you do not wish to configure, simply select │
│No. │
│ │
│If you wish to re-enter this utility after the system is up, you │
│may do so by typing: /usr/sbin/sysinstall. │
├----------------------------------------------------------(100%)--┤
│ [ OK ] │
└--------------------[ Press enter or space ]----------------------┘
**ネットワークインターフェイスの設定 [#j2e96ae9]
ネットワークインターフェイスの設定を行います。今回内蔵の NIC(Intel 82540EM) が em0 として認識されているので、
IPv6 は使用しないので、"No" を選びます。
┌-------------- User Confirmation Requested --------------┐
│ Do you want to try IPv6 configuration of the interface? │
├---------------------------------------------------------┤
│ Yes [ No ] │
└---------------------------------------------------------┘
固定 IP で運用するので、"No" を選びます。
┌-------------- User Confirmation Requested --------------┐
│ Do you want to try DHCP configuration of the interface? │
├---------------------------------------------------------┤
│ Yes [ No ] │
└---------------------------------------------------------┘
ホスト名やゲートウェイアドレス、DNS サーバーのアドレス、固定 IP アドレスを設定します。
┌--------------------------- Network Configuration ------------┐
│ Host: Domain: │
│┌-----------------------┐ ┌------------------┐ │
││hoge.example.jp │ │example.jp │ │
│└-----------------------┘ └------------------┘ │
│ IPv4 Gateway: Name server: │
│┌----------------┐ ┌----------------┐ │
││192.168.1.1 │ │192.168.1.1 │ │
│└----------------┘ └----------------┘ │
│ ┌----- Configuration for Interface em0 -------┐ │
│ │ IPv4 Address: Netmask: │ │
│ │┌----------------┐ ┌----------------┐│ │
│ ││192.168.1.2 │ │255.255.255.0 ││ │
│ │└----------------┘ └----------------┘│ │
│ │ Extra options to ifconfig (usually empty): │ │
│ │┌-----------------------------------┐ │ │
│ ││ │ │ │
│ └└-----------------------------------┘------┘ │
│ │
│ ┌------┐ ┌----------┐ │
│ │ OK │ │ CANCEL │ │
└-------------└------┘----------└----------┘---------------┘
[ Your fully-qualified hostname, e.g. foo.bar.com ]
上記の設定を em0 に適用するために "Yes" を選択します。
┌-------------- User Confirmation Requested --------------┐
│ Would you like to bring the em0 interface up right now? │
├---------------------------------------------------------┤
│ [ Yes ] No │
└---------------------------------------------------------┘
**ネットワークサービスの設定 [#c7071122]
ゲートウェイにはしないので、"No" を選びます。
┌--------------- User Confirmation Requested ----------------┐
│ Do you want this machine to function as a network gateway? │
├------------------------------------------------------------┤
│ Yes [ No ] │
└------------------------------------------------------------┘
ネットワークサービスは後でいろいろと設定するので、ここでは "No" を選びます。
┌----------------------- User Confirmation Requested -----------------------┐
│ Do you want to configure inetd and the network services that it provides? │
├---------------------------------------------------------------------------┤
│ Yes [ No ] │
└---------------------------------------------------------------------------┘
SSH だけははじめから使用するように設定します。
┌---- User Confirmation Requested ----┐
│ Would you like to enable SSH login? │
├-------------------------------------┤
│ [ Yes ] No │
└-------------------------------------┘
FTP アクセスは許可しないので、"No" を選択します。
┌--------------- User Confirmation Requested ---------------┐
│ Do you want to have anonymous FTP access to this machine? │
├-----------------------------------------------------------┤
│ Yes [ No ] │
└-----------------------------------------------------------┘
NFS サーバーにはしないので、"No" を選択します。
┌-------------- User Confirmation Requested --------------┐
│ Do you want to configure this machine as an NFS server? │
├---------------------------------------------------------┤
│ Yes [ No ] │
└---------------------------------------------------------┘
NFS クライアントにもしないので、"No" を選択します。
┌-------------- User Confirmation Requested --------------┐
│ Do you want to configure this machine as an NFS client? │
├---------------------------------------------------------┤
│ Yes [ No ] │
└---------------------------------------------------------┘
**コンソールの設定 [#hd81502f]
使用するコンソールの設定を行います。シリアルコンソールもしくはネットワーク経由での接続しか行わない今回は、"No" を選んでスキップします。
┌--------------- User Confirmation Requested ---------------┐
│ Would you like to customize your system console settings? │
├-----------------------------------------------------------┤
│ Yes [ No ] │
└-----------------------------------------------------------┘
**標準時の設定 [#f727247f]
サーバーがおいてある地域の標準時を設定するので、"Yes" を選びます。
┌------------ User Confirmation Requested ------------┐
│ Would you like to set this machine's time zone now? │
├-----------------------------------------------------┤
│ [ Yes ] No │
└-----------------------------------------------------┘
CMOS の時間を UTC としないので、"No" を選びます。
┌---------- Select local or UTC (Greenwich Mean Time) clock -----------┐
│ Is this machine's CMOS clock set to UTC? If it is set to local time,│
│ or you don't know, please choose NO here! │
│ │
├----------------------------------------------------------------------┤
│ Yes [ No ] │
└----------------------------------------------------------------------┘
時間帯のある地域(今回は "5 Asia")を選択します。
┌------- Time Zone Selector --------┐
│ Select a region │
│┌-------------------------------┐│
││ 1 Africa ││
││ 2 America -- North and South ││
││ 3 Antarctica ││
││ 4 Arctic Ocean ││
││ 5 Asia ││
││ 6 Atlantic Ocean ││
││ 7 Australia ││
││ 8 Europe ││
││ 9 Indian Ocean ││
││ 0 Pacific Ocean ││
│└-------------------------------┘│
├-----------------------------------┤
│ [ OK ] Cancel │
└-----------------------------------┘
"18 Japan" を選択します。
┌--------------- Countries in Asia ---------------┐
│ Select a country or region │
│┌-^(-)----------------------------------------┐│
││ 3 Azerbaijan ││
││ 4 Bahrain ││
││ 5 Bangladesh ││
││ 6 Bhutan ││
││ 7 Brunei Darussalam ││
││ 8 Cambodia ││
││ 9 China ││
││ 10 Cyprus ││
││ 11 Georgia ││
││ 12 Hong Kong ││
││ 13 India ││
││ 14 Indonesia ││
││ 15 Iran ││
││ 16 Iraq ││
││ 17 Israel ││
││ 18 Japan ││
│└-v(+)----------------------------------------┘│
├-------------------------------------------------┤
│ [ OK ] Cancel │
└-------------------------------------------------┘
"JST" という省略形でよいかと聞かれるので、"Yes" と答えます。
┌---------------------------- Confirmation ----------------------------┐
│ Does the abbreviation `JST' look reasonable? │
├----------------------------------------------------------------------┤
│ [ Yes ] No │
└----------------------------------------------------------------------┘
**Linux 互換バイナリーのセットアップ [#ve04fca7]
Linux 互換バイナリーは必要に応じて((サーバーとして使う分にはまず必要ありません))後からインストールできるので、ここでは "No" と答えます。
┌------------ User Confirmation Requested -------------┐
│ Would you like to enable Linux binary compatibility? │
├------------------------------------------------------┤
│ Yes [ No ] │
└------------------------------------------------------┘
**マウスの設定 [#ad057d09]
使用するマウスの設定及び確認を行います。今回マウスは使用しないので、"No" を選びます。
┌------------ User Confirmation Requested ------------┐
│ Does this system have a PS/2, serial, or bus mouse? │
├-----------------------------------------------------┤
│ Yes [ No ] │
└-----------------------------------------------------┘
**パッケージ一覧の閲覧 [#y63f4e82]
すぐに使えるパッケージの一覧を閲覧するかどうか聞かれますが、後からいくらでも確認できるので "No" と答えます。
┌------------------------ User Confirmation Requested -------------------------┐
│ The FreeBSD package collection is a collection of thousands of ready-to-run │
│ applications, from text editors to games to WEB servers and more. Would you │
│ like to browse the collection now? │
├------------------------------------------------------------------------------┤
│ Yes [ No ] │
└------------------------------------------------------------------------------┘
**ユーザー登録 [#ne4463f4]
初期ユーザーの登録を行います。"Yes" を選びます。
┌-------------------- User Confirmation Requested --------------------┐
│ Would you like to add any initial user accounts to the system? │
│ Adding at least one account for yourself at this stage is suggested │
│ since working as the "root" user is dangerous (it is easy to do │
│ things which adversely affect the entire system). │
├---------------------------------------------------------------------┤
│ [ Yes ] No │
└---------------------------------------------------------------------┘
二番目の "User" を選びます。
┌-------------- User and group management --------------┐
│ The submenus here allow to manipulate user groups and │
│ login accounts. │
│ │
│┌---------------------------------------------------┐│
││ X Exit Exit this menu (returning to previous) ││
││ User Add a new user to the system. ││
││ Group Add a new user group to the system. ││
│└---------------------------------------------------┘│
├-------------------------------------------------------┤
│ [ OK ] Cancel │
└-------[ Configure your user groups and users ]--------┘
Login ID(必須)、UID(任意)、Group(任意、省略可)、Password(必須)、Full name(任意)、Member groups(任意、省略可)、Home directory(任意)、Login shell(任意)を設定します。Member groups に wheel を指定すると su によりスーパーユーザーに切り替わることが、operator を指定すると shutdown によりシステムの停止や再起動が行えます。
┌------------------------- User and Group Management ----------┐
│ ┌------------------ Add a new user ----------------------┐ │
│ │ │ │
│ │ Login ID: UID: Group: Password: │ │
│ │┌--------------┐┌------┐┌------┐┌-------------┐ │ │
│ ││foo ││1001 ││ ││****** │ │ │
│ │└--------------┘└------┘└------┘└-------------┘ │ │
│ │ │ │
│ │ Full name: Member groups: │ │
│ │┌-------------------------------┐ ┌-------------┐ │ │
│ ││User & │ │heel,operator│ │ │
│ │└-------------------------------┘ └-------------┘ │ │
│ │ │ │
│ │ Home directory: Login shell: │ │
│ │┌------------------┐ ┌---------------------------┐ │ │
│ ││/home/foo │ │/bin/tcsh │ │ │
│ └└------------------┘--└---------------------------┘-┘ │
│ │
│ ┌------┐ ┌----------┐ │
│ │ OK │ │ CANCEL │ │
│ └------┘ └----------┘ │
└--------------------------------------------------------------┘
[ The login name of the new user (mandatory) ]
必要人数分の設定が終わったら、"X Exit" を選択します。
┌-------------- User and group management --------------┐
│ The submenus here allow to manipulate user groups and │
│ login accounts. │
│ │
│┌---------------------------------------------------┐│
││ X Exit Exit this menu (returning to previous) ││
││ User Add a new user to the system. ││
││ Group Add a new user group to the system. ││
│└---------------------------------------------------┘│
├-------------------------------------------------------┤
│ [ OK ] Cancel │
└-------[ Configure your user groups and users ]--------┘
**スーパーユーザーのパスワード設定 [#ea4cec01]
スーパーユーザー(root)のパスワードの設定を行います。
┌---------------------- Message -----------------------┐
│Now you must set the system manager's password. │
│This is the password you'll use to log in as "root". │
├----------------------------------------------(100%)--┤
│ [ OK ] │
└---------------[ Press enter or space ]---------------┘
同じパスワードを二回タイプします。タイプした文字は文字数を含め一切表示されません。
New Password:
Retype New Password:
**その他の設定 [#j82cc818]
ここまでで行っていない設定を行うので、"Yes" と答えます。
┌-------------- User Confirmation Requested ---------------┐
│ Visit the general configuration menu for a chance to set │
│ any last options? │
├----------------------------------------------------------┤
│ [ Yes ] No │
└----------------------------------------------------------┘
ヘッドレスでサーバーの運用を行うので、いざというときにシリアルコンソールからログインできるように設定を行います。"TTYs" を選択します。
┌---------------------- FreeBSD Configuration Menu -----------------------┐
│ If you've already installed FreeBSD, you may use this menu to customize │
│ it somewhat to suit your particular configuration. Most importantly, │
│ you can use the Packages utility to load extra "3rd party" │
│ software not provided in the base distributions. │
│┌-^(-)----------------------------------------------------------------┐│
││ Root Password Set the system manager's password ││
││ Fdisk The disk Slice (PC-style partition) Editor ││
││ Label The disk Label editor ││
││ User Management Add user and group information ││
││ Console Customize system console behavior ││
││ Time Zone Set which time zone you're in ││
││ Media Change the installation media type ││
││ Mouse Configure your mouse ││
││ Networking Configure additional network services ││
││ Security Configure system security options ││
││ Startup Configure system startup options ││
││ TTYs Configure system ttys. ││
│└-v(+)----------------------------------------------------------------┘│
├-------------------------------------------------------------------------┤
│ [ OK ] Cancel │
└-----------[ Press F1 for more information on these options ]------------┘
/etc/ttys ファイルの編集を行うかどうか聞かれるので、"Yes" と答えます。
┌------------------- User Confirmation Requested -------------------┐
│ Configuration of system TTYs requires editing the /etc/ttys file. │
│ Typical configuration activities might include enabling getty(8) │
│ on the first serial port to allow login via serial console after │
│ reboot, or to enable xdm. The default ttys file enables normal │
│ virtual consoles, and most sites will not need to perform manual │
│ configuration. │
│ │
│ To load /etc/ttys in the editor, select [Yes], otherwise, [No]. │
├-------------------------------------------------------------------┤
│ [ Yes ] No │
└-------------------------------------------------------------------┘
/etc/ttys 内にある ttyd0((COM1 を使用するので、ttyd0 を選んでいます。COM2 を使用する場合は ttyd1 を選びます。)) から始まる行内の off を on に、dialup を vt100 へ変更します。これでシリアルコンソールに Login プロンプトが現れます。また仮想コンソールは使用しないので、ttyv1 〜 ttyv7 行内の on を off に変更します。変更後の該当箇所は以下のようになります。
# Virtual terminals
ttyv1 "/usr/libexec/getty Pc" cons25 off secure
ttyv2 "/usr/libexec/getty Pc" cons25 off secure
ttyv3 "/usr/libexec/getty Pc" cons25 off secure
ttyv4 "/usr/libexec/getty Pc" cons25 off secure
ttyv5 "/usr/libexec/getty Pc" cons25 off secure
ttyv6 "/usr/libexec/getty Pc" cons25 off secure
ttyv7 "/usr/libexec/getty Pc" cons25 off secure
ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm off secure
# Serial terminals
# The 'dialup' keyword identifies dialin lines to login, fingerd etc.
ttyd0 "/usr/libexec/getty std.9600" vt100 on secure
ttyd1 "/usr/libexec/getty std.9600" dialup off secure
ttyd2 "/usr/libexec/getty std.9600" dialup off secure
ttyd3 "/usr/libexec/getty std.9600" dialup off secure
ファイルの編集が終わったら、"X Exit" を選んで設定メニューから抜けます。
┌---------------------- FreeBSD Configuration Menu -----------------------┐
│ If you've already installed FreeBSD, you may use this menu to customize │
│ it somewhat to suit your particular configuration. Most importantly, │
│ you can use the Packages utility to load extra "3rd party" │
│ software not provided in the base distributions. │
│┌---------------------------------------------------------------------┐│
││ X Exit Exit this menu (returning to previous) ││
││ Distributions Install additional distribution sets ││
││ Packages Install pre-packaged software for FreeBSD ││
││ Root Password Set the system manager's password ││
││ Fdisk The disk Slice (PC-style partition) Editor ││
││ Label The disk Label editor ││
││ User Management Add user and group information ││
││ Console Customize system console behavior ││
││ Time Zone Set which time zone you're in ││
││ Media Change the installation media type ││
││ Mouse Configure your mouse ││
││ Networking Configure additional network services ││
│└-v(+)----------------------------------------------------------------┘│
├-------------------------------------------------------------------------┤
│ [ OK ] Cancel │
└-----------[ Press F1 for more information on these options ]------------┘
**インストールの終了とリブート [#yedebd2e]
以上でインストールは終了なので、"X Exit Install" を選んでインストールを終了させます。
┌------------------------ sysinstall Main Menu -------------------------┐
│ Welcome to the FreeBSD installation and configuration tool. Please │
│ select one of the options below by using the arrow keys or typing the │
│ first character of the option name you're interested in. Invoke an │
│ option with [SPACE] or [ENTER]. To exit, use [TAB] to move to Exit. │
│┌-------------------------------------------------------------------┐│
││ Usage Quick start - How to use this menu system ││
││ Standard Begin a standard installation (recommended) ││
││ Express Begin a quick installation (for experts) ││
││ Custom Begin a custom installation (for experts) ││
││ Configure Do post-install configuration of FreeBSD ││
││ Doc Installation instructions, README, etc. ││
││ Keymap Select keyboard type ││
││ Options View/Set various installation options ││
││ Fixit Repair mode with CDROM/DVD/floppy or start shell ││
││ Upgrade Upgrade an existing system ││
││ Load Config Load default install configuration ││
││ Index Glossary of functions ││
│└-------------------------------------------------------------------┘│
├-----------------------------------------------------------------------┤
│ Select [X Exit Install] │
└------------------[ Press F1 for Installation Guide ]------------------┘
ドライブから CD を取り出して、"Yes" と答えるとシステムが再起動します。
┌--------------- User Confirmation Requested ----------------┐
│ Are you sure you wish to exit? The system will reboot │
│ (be sure to remove any floppies/CDs/DVDs from the drives). │
├------------------------------------------------------------┤
│ [ Yes ] No │
└------------------------------------------------------------┘
しばらく待って以下のようなブート画面((¥が表示されていますが、本当は \ で表示されます。))が出てくればインストールは成功です。
――――――――――――――――――――
______
| ____| __ ___ ___
Welcome to FreeBSD! | |__ | '__/ _ \/ _ \
| __|| | | __/ __/
| | | | | | |
1. Boot FreeBSD [default] |_| |_| \___|\___|
2. Boot FreeBSD with ACPI disabled ____ _____ _____
3. Boot FreeBSD in Safe Mode | _ \ / ____| __ \
4. Boot FreeBSD in single user mode | |_) | (___ | | | |
5. Boot FreeBSD with verbose logging | _ < \___ \| | | |
6. Escape to loader prompt | |_) |____) | |__| |
7. Reboot | | | |
|____/|_____/|_____/
Select option, [Enter] for default
or [Space] to pause timer 0
――――――――――――――――――――
このままシリアルコンソール経由、もしくはSSH を使ってネットワーク経由でロインします。