<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>2011/04/21 on Yano&#39;s digital garage</title>
    <link>https://www.bravotouring.com/~yano/archives/2011/04/21/</link>
    <description>Recent content in 2011/04/21 on Yano&#39;s digital garage</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 21 Apr 2011 23:37:30 +0900</lastBuildDate>
    <atom:link href="https://www.bravotouring.com/~yano/archives/2011/04/21/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>さくらのVPS 初日</title>
      <link>https://www.bravotouring.com/~yano/diary/it/20110421vps.htm</link>
      <pubDate>Thu, 21 Apr 2011 23:37:30 +0900</pubDate>
      <guid>https://www.bravotouring.com/~yano/diary/it/20110421vps.htm</guid>
      <description>&lt;p&gt;まずはお約束の設定変更。&#xA;&lt;blockquote class=&#34;Log&#34;&gt;$ sudo /usr/sbin/groupmod -n owner yano&lt;br/&gt;&#xA;$ sudo update-alternatives --config editor&lt;/blockquote&gt;&#xA;で、グループ名とデフォルトエディタを変更。&#xA;&lt;blockquote class=&#34;Log&#34;&gt;$ sudo visudo&lt;/blockquote&gt;&#xA;sudoでいちいちパスワードを打たなくていいようvisudoで&lt;span class=&#34;Strong&#34;&gt;NOPASSWD&lt;/span&gt;オプションを付与しておく。&#xA;&lt;blockquote class=&#34;Log&#34;&gt;%admin ALL=(ALL) NOPASSWD: ALL&lt;/blockquote&gt;&#xA;&lt;blockquote class=&#34;Log&#34;&gt;$ sudo vi /etc/ssh/sshd_config&lt;br/&gt;&#xA;$ sudo /etc/init.d/ssh restart&lt;/blockquote&gt;&#xA;で、&lt;span class=&#34;Software&#34;&gt;ssh&lt;/span&gt;のポート番号を変更し、パスワード認証とrootログインを禁止。&lt;/p&gt;&#xA;&lt;p&gt;続いて&lt;span class=&#34;Software&#34;&gt;apt&lt;/span&gt;をアップデートし、&lt;span class=&#34;Software&#34;&gt;ntp&lt;/span&gt;や&lt;span class=&#34;Software&#34;&gt;build-essential&lt;/span&gt;を導入し、ntpサーバをntp.jst.mfeed.ad.jpに変更。&#xA;&lt;blockquote class=&#34;Log&#34;&gt;$ sudo apt-get update&lt;br/&gt;$ sudo apt-get install ntp build-essential&lt;br/&gt;$ sudo vi /etc/ntp.conf&lt;br/&gt;$ sudo /etc/init.d/ntp restart&lt;/blockquote&gt;&lt;/p&gt;&#xA;&lt;p&gt;それから&lt;span class=&#34;Software&#34;&gt;nsd&lt;/span&gt;を導入。パッケージとしては&lt;span class=&#34;Software&#34;&gt;nsd3&lt;/span&gt;と&lt;span class=&#34;Software&#34;&gt;nsd&lt;/span&gt;があるが、積極的に旧版をチョイスするだけの根拠は持ち合わせて無いので、素直に&lt;span class=&#34;Software&#34;&gt;nsd3&lt;/span&gt;を導入。&#xA;&lt;blockquote class=&#34;Log&#34;&gt;&#xA;$ sudo apt-get install nsd3&lt;br/&gt;&#xA;Reading package lists... Done&lt;br/&gt;&#xA;Building dependency tree&lt;br/&gt;&#xA;Reading state information... Done&lt;br/&gt;&#xA;The following NEW packages will be installed:&lt;br/&gt;&#xA;  nsd3&lt;br/&gt;&#xA;0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.&lt;br/&gt;&#xA;Need to get 842kB of archives.&lt;br/&gt;&#xA;After this operation, 1,622kB of additional disk space will be used.&lt;br/&gt;&#xA;Get:1 http://jp.archive.ubuntu.com/ubuntu/ lucid/universe nsd3 3.2.4-1 [842kB]&lt;br/&gt;&#xA;Fetched 842kB in 0s (1,037kB/s)&lt;br/&gt;&#xA;Selecting previously deselected package nsd3.&lt;br/&gt;&#xA;(Reading database ... 42388 files and directories currently installed.)&lt;br/&gt;&#xA;Unpacking nsd3 (from .../archives/nsd3_3.2.4-1_i386.deb) ...&lt;br/&gt;&#xA;Processing triggers for man-db ...&lt;br/&gt;&#xA;Processing triggers for ureadahead ...&lt;br/&gt;&#xA;ureadahead will be reprofiled on next reboot&lt;br/&gt;&#xA;Setting up nsd3 (3.2.4-1) ...&lt;br/&gt;&#xA;dpkg-statoverrides: warning: --update given but /etc/nsd3/nsd.conf does not exist&lt;br/&gt;&#xA;&lt;span class=&#34;Warning&#34;&gt;Could not open /etc/nsd3/nsd.conf: No such file or directory&lt;/span&gt;&lt;br/&gt;&#xA;Could not open /etc/nsd3/nsd.conf: No such file or directory&lt;br/&gt;&#xA; * Building nsd3 zones...&lt;br/&gt;&#xA;Could not open /etc/nsd3/nsd.conf: No such file or directory&lt;br/&gt;&#xA;&lt;span class=&#34;Warning&#34;&gt;invoke-rc.d: initscript nsd3, action &#34;start&#34; failed.&lt;/span&gt;&lt;br/&gt;&#xA;dpkg: error processing nsd3 (--configure):&lt;br/&gt;&#xA; subprocess installed post-installation script returned error exit status 1&lt;br/&gt;&#xA;Errors were encountered while processing:&lt;br/&gt;&#xA; nsd3&lt;br/&gt;&#xA;E: Sub-process /usr/bin/dpkg returned an error code (1)&lt;br/&gt;&#xA;$ sudo ls -la /etc/nsd3/&lt;br/&gt;&#xA;total 16&lt;br/&gt;&#xA;drwxr-x---  2 nsd  nsd  4096 2011-04-21 15:44 .&lt;br/&gt;&#xA;drwxr-xr-x 77 root root 4096 2011-04-21 15:44 ..&lt;br/&gt;&#xA;-rw-r--r--  1 root root 4406 2010-02-09 00:35 nsd.conf.sample&lt;/blockquote&gt;&#xA;と、ひと通りのインストールは出来ているみたいだが&lt;span class=&#34;Path&#34;&gt;~/etc/nsd3/nsd.conf&lt;/span&gt;が無いという事で&lt;span class=&#34;Warning&#34;&gt;起動エラー&lt;/span&gt;が出る。ていうか、何も設定してないのに起動しちゃダメでしょう、というわけで&lt;span class=&#34;Path&#34;&gt;/var/lib/dpkg/info/nsd3.postinst&lt;/span&gt;のサービス起動処理をコメントアウト&#xA;&lt;blockquote class=&#34;Log&#34;&gt;&#xA;#!/bin/sh -e&lt;br/&gt;&lt;br/&gt;&#xA;set_perms() {&lt;br/&gt;&#xA;    if ! dpkg-statoverride --list &#34;$4&#34; &gt;/dev/null; then&lt;br/&gt;&#xA;        dpkg-statoverride --update --add &#34;$@&#34;&lt;br/&gt;&#xA;    fi&lt;br/&gt;&#xA;}&lt;br/&gt;&lt;br/&gt;&#xA;if test &#34;$1&#34; = &#34;configure&#34;; then&lt;br/&gt;&#xA;    if ! getent passwd nsd &gt; /dev/null; then&lt;br/&gt;&#xA;        adduser --quiet --system --group --no-create-home nsd&lt;br/&gt;&#xA;    fi&lt;br/&gt;&lt;br/&gt;&#xA;    set_perms nsd nsd 0755 /var/lib/nsd3&lt;br/&gt;&#xA;    set_perms nsd nsd 0640 /etc/nsd3/nsd.conf&lt;br/&gt;&#xA;    set_perms nsd nsd 0750 /etc/nsd3&lt;br/&gt;fi&lt;br/&gt;&lt;br/&gt;&#xA;# Automatically added by dh_installinit&lt;br/&gt;&#xA;if [ -x &#34;/etc/init.d/nsd3&#34; ]; then&lt;br/&gt;&#xA;       update-rc.d nsd3 defaults &gt;/dev/null&lt;br/&gt;&#xA;&lt;span class=&#34;Comment&#34;&gt;#       if [ -x &#34;`which invoke-rc.d 2&gt;/dev/null`&#34; ]; then&lt;br/&gt;&#xA;#               invoke-rc.d nsd3 start || exit $?&lt;br/&gt;&#xA;#       else&lt;br/&gt;&#xA;#                /etc/init.d/nsd3 start || exit $?&lt;br/&gt;&#xA;#       fi&lt;br/&gt;&lt;/span&gt;&#xA;fi&lt;br/&gt;# End automatically added section&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;exit 0&lt;/blockquote&gt;して&lt;blockquote class=&#34;Log&#34;&gt;$ sudo dpkg --configure -a&lt;/blockquote&gt;で再適用しておくとOKだ。&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
