User Tools

Site Tools


vps:vps4th_02

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

vps:vps4th_02 [2016/12/31 01:36]
hoge@hoge [ntp設定]
vps:vps4th_02 [2019/06/16 15:16]
Line 1: Line 1:
-====== jailer設定 ====== 
-===== FreeBSD 11.0-RELEASE amd64 導入 ===== 
-FreeBSD-11.0-RELEASE-amd64-bootonly.isoを入手し、[[https://​help.sakura.ad.jp/​app/​answers/​detail/​a_id/​2405|ISOイメージインストール]]に従い、導入を行う。 
  
-==== インストール前設定 ==== 
-^  項目 ​ ^^^^  設定値 ​ ^ 
-|Keymap Selection||||Continue with default keymap| 
-|Set Hostname||||ホスト名| 
-|Distribution Select||||[ ]base-dbg\\ [ ]doc\\ [ ]kernel-dbg\\ [ ]lib32-dbg\\ [*]lib32\\ [ ]ports\\ [*]src\\ [ ]tests| 
-|Network Configuration||||vtnet0| 
-| |em0|Would you like to configure IPv4 for this interface?​||Yes| 
-|:::​|:::​|Would you like to use DHCP to configure this interface?​||No| 
-|:::​|:::​|Static Network Interface Configuration|IP Address|さくらのVPSで割り当てられたIP| 
-|:::​|:::​|:::​|Subnet Mask|さくらのVPSで割り当てられた subnet mask| 
-|:::​|:::​|:::​|Default Router|さくらのVPS指定のデフォルトゲートウェイ| 
-|:::​|:::​|Would you like to configure IPv6 for this interface?​||No| 
-|Resolver Configuration|||Search|-| 
-|:::|||IPv4 DNS #​1|DNSサーバを指定| 
-|:::|||IPv4 DNS #​2|DNSサーバを指定| 
-|Mirror Selection||||近場を指定。| 
-|Partitioning||||Auto (UFS)| 
-|Partition||||Entire Disk| 
-|Partition Scheme||||BSD| 
-|Partition Editor||||提示された内容で Finish -> Commit| 
- 
-==== インストール後設定 ==== 
-^ 項目 ^ 設定値 ^ 
-|New Password|rootパスワードを設定| 
-|Time Zone Selector|Asia| 
-|Countries in Asia|Japan| 
-|Time & Date|日付を確認後 <Set Date>| 
-|:::​|時刻を確認後 <Set Time>| 
-|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| 
- 
-===== unbound.conf 設定 ===== 
-参照先DNSサーバが DNSSEC をサポートしていない場合((さくらは対応済み))、 /​var/​unbound/​unbound.conf 内の auto-trust-anchor-file 行をコメントアウトする。 
-<​code>​ 
-# auto-trust-anchor-file:​ /​var/​unbound/​root.key 
-</​code>​ 
- 
-編集後、service を再起動し、drillで確認する。 
-<​code>​ 
-# service local_unbound restart 
-Stopping local_unbound. 
-Waiting for PIDS: 1119. 
-Starting local_unbound. 
-Waiting for nameserver to start... good 
-# 
-# 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 
-<​以下略>​ 
-</​code>​ 
- 
-===== 最新化 ===== 
-freebsd-updateを行う。 
-<​code>​ 
-# freebsd-update fetch 
-# freebsd-update install 
-</​code>​ 
- 
-===== kernel編集 ===== 
-kernelを編集し、VIMAGE対応とする。\\ 
-/​usr/​src/​sys/​amd64/​conf/​GENERICをVPSとしてコピーして編集する。 
-<​code>​ 
-#​ident ​             GENERIC 
-ident               VPS 
- 
-options ​            ​VIMAGE 
- 
-#​device ​            fdc 
-</​code>​ 
-  * fdc\\ 目についたので無効化 
- 
-===== world構築 ===== 
-[[http://​www.freebsd.org/​doc/​en_US.ISO8859-1/​books/​handbook/​makeworld.html|ハンドブック]]に従い、worldとkernelの構築を行う。 
- 
- 
- 
- 
-===== ntp設定 ===== 
-  * /​etc/​rc.confでntpdが有効になっていることを確認する。<​code>​ 
-ntpd_enable="​YES"​ 
-</​code>​ 
-  * [[http://​support.sakura.ad.jp/​manual/​vps/​ossetup.html|さくらのVPS > OSセットアップ情報]]を参考に/​etc/​ntp.confを編集する。<​code>​ 
-restrict default limited kod nomodify notrap nopeer noquery 
-server ntp1.sakura.ad.jp 
-</​code>​ 
-  * 同期確認を行う。<​code>​ 
-#ntpq -c as 
-ind assID status ​ conf reach auth condition ​ last_event cnt 
-=========================================================== 
-  1 53548  9614   ​yes ​  ​yes ​ none  sys.peer ​  ​reachable ​ 1 
-</​code>​ 
-    * 結果が ntpq: read: Connection refused となった場合は一度 ntpdate <​server>​ で時刻合わせを行う。 
-===== ipfw設定 ===== 
-/​etc/​rc.confに追記。 
-<​code>​ 
-firewall_enable="​YES"​ 
-firewall_nat_enable="​YES"​ 
-firewall_type="​open"​ 
-</​code>​ 
vps/vps4th_02.txt · Last modified: 2019/06/16 15:16 (external edit)