This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
vps:vps4th_02 [2016/10/22 17:34] hoge@hoge [インストール前設定] |
vps:vps4th_02 [2019/06/16 15:16] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== jailer設定 ====== | ====== jailer設定 ====== | ||
| ===== FreeBSD 11.0-RELEASE amd64 導入 ===== | ===== FreeBSD 11.0-RELEASE amd64 導入 ===== | ||
| - | FreeBSD-11.0-RELEASE-amd64-bootonly.isoを入手し、[[https://help.sakura.ad.jp/app/answers/detail/a_id/2405|ISOイメージインストール]]に従い、導入を行う。 | + | FreeBSD-11.0-RELEASE amd64 を[[https://help.sakura.ad.jp/hc/ja/articles/206207961-OS%E5%86%8D%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB|カスタムOSインストール機能を使う]]に従い、導入を行う。 |
| ==== インストール前設定 ==== | ==== インストール前設定 ==== | ||
| Line 8: | Line 8: | ||
| |Set Hostname||||ホスト名| | |Set Hostname||||ホスト名| | ||
| |Distribution Select||||[ ]base-dbg\\ [ ]doc\\ [ ]kernel-dbg\\ [ ]lib32-dbg\\ [*]lib32\\ [ ]ports\\ [*]src\\ [ ]tests| | |Distribution Select||||[ ]base-dbg\\ [ ]doc\\ [ ]kernel-dbg\\ [ ]lib32-dbg\\ [*]lib32\\ [ ]ports\\ [*]src\\ [ ]tests| | ||
| - | |Network Configuration||||em0| | + | |Network Configuration||||vtnet0| |
| - | | |em0||Would you like to configure IPv4 for this interface?|Yes| | + | | |em0|Would you like to configure IPv4 for this interface?||Yes| |
| - | |:::|:::||Would you like to use DHCP to configure this interface?|No| | + | |:::|:::|Would you like to use DHCP to configure this interface?||No| |
| |:::|:::|Static Network Interface Configuration|IP Address|さくらのVPSで割り当てられたIP| | |:::|:::|Static Network Interface Configuration|IP Address|さくらのVPSで割り当てられたIP| | ||
| |:::|:::|:::|Subnet Mask|さくらのVPSで割り当てられた subnet mask| | |:::|:::|:::|Subnet Mask|さくらのVPSで割り当てられた subnet mask| | ||
| |:::|:::|:::|Default Router|さくらのVPS指定のデフォルトゲートウェイ| | |:::|:::|:::|Default Router|さくらのVPS指定のデフォルトゲートウェイ| | ||
| - | |:::|:::||Would you like to configure IPv6 for this interface?|No| | + | |:::|:::|Would you like to configure IPv6 for this interface?||No| |
| |Resolver Configuration|||Search|-| | |Resolver Configuration|||Search|-| | ||
| - | | |IPv4 DNS #1|||DNSサーバを指定| | + | |:::|||IPv4 DNS #1|DNSサーバを指定| |
| - | |:::|IPv4 DNS #2|||DNSサーバを指定| | + | |:::|||IPv4 DNS #2|DNSサーバを指定| |
| - | |Mirror Selection||||ISO が bootonly の為、インストールを続行するには FTPサーバを指定する必要がある。\\ 近場を指定。| | + | |Mirror Selection||||近場を指定。| |
| |Partitioning||||Auto (UFS)| | |Partitioning||||Auto (UFS)| | ||
| |Partition||||Entire Disk| | |Partition||||Entire Disk| | ||
| Line 25: | Line 25: | ||
| ==== インストール後設定 ==== | ==== インストール後設定 ==== | ||
| + | ^ 項目 ^ 設定値 ^ | ||
| |New Password|rootパスワードを設定| | |New Password|rootパスワードを設定| | ||
| - | |Select local or UTC (Greenwich Mean Time) clock|Yes| | ||
| |Time Zone Selector|Asia| | |Time Zone Selector|Asia| | ||
| |Countries in Asia|Japan| | |Countries in Asia|Japan| | ||
| + | |Time & Date|日付を確認後 <Set Date>| | ||
| + | |:::|時刻を確認後 <Set Time>| | ||
| |System Configuration|[*]local_unbound\\ [ ]sshd\\ [ ]moused\\ [*]ntpd\\ [ ]powered\\ [ ]dumpdev| | |System Configuration|[*]local_unbound\\ [ ]sshd\\ [ ]moused\\ [*]ntpd\\ [ ]powered\\ [ ]dumpdev| | ||
| + | |System Hardening|[ ]Hide processes running as other users\\ [ ]Hide processes running as other groups\\ [ ]Disable reading kernel message buffer for unprivileged users\\ [ ]Disable process debugging facilities for unprivileged users\\ [ ]Randomize the PID of newly created processes\\ [ ]Insert stack guard page ahead of the growable segments\\ [*]Clean the /tmp filesystem on system startup\\ [*]Disable opening Syslogd network socket (disables remote logging)\\ [ ]Disable Sendmail service| | ||
| |Add User Accounts|No| | |Add User Accounts|No| | ||
| ===== unbound.conf 設定 ===== | ===== unbound.conf 設定 ===== | ||
| - | 参照先DNSサーバが DNSSEC をサポートしていない場合、 /var/unbound/unbound.conf 内の auto-trust-anchor-file 行をコメントアウトする。 | + | 参照先DNSサーバが DNSSEC をサポートしていない場合((さくらは対応済み))、 /var/unbound/unbound.conf 内の auto-trust-anchor-file 行をコメントアウトする。 |
| <code> | <code> | ||
| # auto-trust-anchor-file: /var/unbound/root.key | # auto-trust-anchor-file: /var/unbound/root.key | ||
| Line 44: | Line 47: | ||
| Waiting for PIDS: 1119. | Waiting for PIDS: 1119. | ||
| Starting local_unbound. | Starting local_unbound. | ||
| + | Waiting for nameserver to start... good | ||
| # | # | ||
| # drill www.hoge.org | # drill www.hoge.org | ||
| Line 79: | Line 83: | ||
| [[http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html|ハンドブック]]に従い、worldとkernelの構築を行う。 | [[http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html|ハンドブック]]に従い、worldとkernelの構築を行う。 | ||
| - | ===== pkg設定 ===== | ||
| - | dokuwikiのpkgが無かったため、試行のみで利用しない。 | ||
| - | ==== 初回起動 ==== | ||
| - | [[http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/pkgng-intro.html|ハンドブック]]に従い、pkgの初回起動を行う。 | ||
| - | ==== /usr/local/etc/pkg.conf ==== | ||
| - | /usr/local/etc/pkg.conf内のPACKAGESITE, MIRROR_TYPE, PUBKEYを削除する。\\ 結果、ファイルが空になったらファイルごと削除でも可。 | ||
| - | |||
| - | ==== /etc/make.conf ==== | ||
| - | /etc/make.confを編集する。 | ||
| - | <code> | ||
| - | WITH_PKGNG=yes | ||
| - | </code> | ||
| - | |||
| - | ==== /usr/local/etc/pkg/repos/FreeBSD.conf ==== | ||
| - | [[https://lists.freebsd.org/pipermail/freebsd-pkg/2013-October/000107.html|Official FreeBSD Binary Packages now available for pkgng]]に従い/usr/local/etc/pkg/repos/FreeBSD.confを設定する。\\ 変更があった様なので、記述は以下の通りとする。 | ||
| - | <code> | ||
| - | FreeBSD: { | ||
| - | url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest", | ||
| - | mirror_type: "srv", | ||
| - | enabled: true | ||
| - | } | ||
| - | </code> | ||
| ===== ntp設定 ===== | ===== ntp設定 ===== | ||
| Line 109: | Line 91: | ||
| </code> | </code> | ||
| * [[http://support.sakura.ad.jp/manual/vps/ossetup.html|さくらのVPS > OSセットアップ情報]]を参考に/etc/ntp.confを編集する。<code> | * [[http://support.sakura.ad.jp/manual/vps/ossetup.html|さくらのVPS > OSセットアップ情報]]を参考に/etc/ntp.confを編集する。<code> | ||
| - | restrict ntp1.sakura.ad.jp kod nomodify notrap nopeer noquery | + | restrict default limited kod nomodify notrap nopeer noquery |
| server ntp1.sakura.ad.jp | server ntp1.sakura.ad.jp | ||
| </code> | </code> | ||
| Line 118: | Line 100: | ||
| 1 53548 9614 yes yes none sys.peer reachable 1 | 1 53548 9614 yes yes none sys.peer reachable 1 | ||
| </code> | </code> | ||
| + | * 結果が ntpq: read: Connection refused となった場合は一度 ntpdate <server> で時刻合わせを行う。 | ||
| ===== ipfw設定 ===== | ===== ipfw設定 ===== | ||
| /etc/rc.confに追記。 | /etc/rc.confに追記。 | ||