This is an old revision of the document!
FreeBSD-11.0-RELEASE-amd64-bootonly.isoを入手し、ISOイメージインストールに従い、導入を行う。
項目 | 設定値 |
---|---|
Keymap Selection | Continue with default keymap |
Set Hostname | ホスト名 |
Distribution Select | [ ]doc [ ]games [*]lib32 [ ]ports [*]src |
Network Configuration | em0 |
(em0) Would you like to configure IPv4 for this interface? | Yes |
(em0) Would you like to use DHCP to configure this interface? | No |
(em0) Static Network Interface Configuration\\IP Address | さくらのVPSで割り当てられたIP |
(em0) Static Network Interface Configuration\\Subnet Mask | さくらのVPSで割り当てられた subnet mask |
(em0) Static Network Interface Configuration\\Default Router | さくらのVPS指定のデフォルトゲートウェイ |
(em0) Would you like to configure IPv6 for this interface? | No |
(em0) Would you like to try stateless address autoconfiguration (SLAAC)? | No |
Resolver Configuration\\Search | - |
IPv4 DNS #1 | DNSサーバを指定 |
IPv4 DNS #2 | DNSサーバを指定 |
Mirror Selection | ISO が bootonly の為、インストールを続行するには FTPサーバを指定する必要がある。 近場を指定。 |
Partitioning | Auto |
Partition | Entire Disk |
Partition Scheme | BSD |
Partition Editor | 提示された内容で Finish → Commit |
New Password | rootパスワードを設定 |
Select local or UTC (Greenwich Mean Time) clock | Yes |
Time Zone Selector | Asia |
Countries in Asia | Japan |
System Configuration | [*]local_unbound [ ]sshd [ ]moused [*]ntpd [ ]powered [ ]dumpdev |
Add User Accounts | No |
参照先DNSサーバが DNSSEC をサポートしていない場合、 /var/unbound/unbound.conf 内の auto-trust-anchor-file 行をコメントアウトする。
# auto-trust-anchor-file: /var/unbound/root.key
編集後、service を再起動し、drillで確認する。
# service local_unbound restart Stopping local_unbound. Waiting for PIDS: 1119. Starting local_unbound. # # drill www.hoge.org ;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 13790 ;; flags: gr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2 ;; QUESTION SECTION: ;; www.hoge.org. IN A ;; ANSWER SECTION: www.hoge.org. 1643 IN A xxx.xxx.xxx.xxx <以下略>
freebsd-updateを行う。
# freebsd-update fetch # freebsd-update install
kernelを編集し、VIMAGE対応とする。
/usr/src/sys/amd64/conf/GENERICをVPSとしてコピーして編集する。
#ident GENERIC ident VPS options VIMAGE #device fdc
ハンドブックに従い、worldとkernelの構築を行う。
dokuwikiのpkgが無かったため、試行のみで利用しない。
ハンドブックに従い、pkgの初回起動を行う。
/usr/local/etc/pkg.conf内のPACKAGESITE, MIRROR_TYPE, PUBKEYを削除する。
結果、ファイルが空になったらファイルごと削除でも可。
/etc/make.confを編集する。
WITH_PKGNG=yes
Official FreeBSD Binary Packages now available for pkgngに従い/usr/local/etc/pkg/repos/FreeBSD.confを設定する。
変更があった様なので、記述は以下の通りとする。
FreeBSD: { url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest", mirror_type: "srv", enabled: true }
ntpd_enable="YES"
restrict ntp1.sakura.ad.jp kod nomodify notrap nopeer noquery server ntp1.sakura.ad.jp
#ntpq -c as ind assID status conf reach auth condition last_event cnt =========================================================== 1 53548 9614 yes yes none sys.peer reachable 1
/etc/rc.confに追記。
firewall_enable="YES" firewall_nat_enable="YES" firewall_type="open"