<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
    <channel>
        <title>Memorandum</title>
        <link>http://www.pistolfly.jp/weblog/</link>
        <description>個人的な技術メモ。</description>
        <language>ja</language>
        <copyright>Copyright 2012</copyright>
        <lastBuildDate>Tue, 31 Jan 2012 16:28:51 +0900</lastBuildDate>
        <generator>http://www.sixapart.com/movabletype/</generator>
        <docs>http://www.rssboard.org/rss-specification</docs>
        
        <item>
            <title>[ruby on rails] Change PATH environment with Rails and Capistrano</title>
            <description><![CDATA[Capfileに
<pre class="prettyprint">
load 'deploy/assets'
</pre>
を追加すると、デプロイ時にassets:precompileを実行できるが、assets:precompile実行時に、
<pre class="command-line">
/usr/bin/env:
ruby
: そのようなファイルやディレクトリはありません
</pre>
というエラーになってしまった。
ssh経由でのshellの実行時にPATHが通っていないのが原因と思われる。

<h3>解決方法</h3>

<p>
CapistranoでPATH等の環境変数を設定するには、:default_environmentを使う。
</p>

<pre class="prettyprint">	
set :default_environment, {
  'PATH' => "/opt/ruby-enterprise-1.8.7-2011.03/bin:$PATH"
}
</pre>

<p>
<br />
<a href="http://www.pastbedti.me/2011/06/change-path-environment-with-rails-and-capistrano/" target="_blank">Change PATH environment with Rails and Capistrano - pastbedti.me</a><br />
<a href="http://stackoverflow.com/questions/1978797/how-do-i-configure-capistrano-to-use-my-rvm-version-of-ruby" target="_blank">How do I configure capistrano to use my rvm version of Ruby - Stack Overflow</a>
</p>


プリコンパイルする場合、config/environments/production.rbで、
<pre class="prettyprint">
config.assets.compile = false
</pre>
にするが、assetsにapplication.js, application.css以外のjs、cssを使う場合は、以下のようにconfig.assets.precompileに追加する必要がある。追加しないと、smart_phone.css isn't precompiled のようなエラーになる。

<p>

</p>

config/environments/production.rb
<pre class="prettyprint">
config.assets.compile = false
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
config.assets.precompile += %w( smart_phone.css web_app_theme.css )
</pre>
]]></description>
            <link>http://www.pistolfly.jp/weblog/2012/01/change-path-environment-with-r.html</link>
            <guid>http://www.pistolfly.jp/weblog/2012/01/change-path-environment-with-r.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">ruby on rails</category>
            
            
            <pubDate>Tue, 31 Jan 2012 16:28:51 +0900</pubDate>
        </item>
        
        <item>
            <title>[ruby on rails] Rack Middleware</title>
            <description><![CDATA[<p>
<a href="http://railscasts.com/episodes/151-rack-middleware?view=asciicast" target="_blank">#151 Rack Middleware - RailsCasts</a>
</p>]]></description>
            <link>http://www.pistolfly.jp/weblog/2012/01/rack-middleware.html</link>
            <guid>http://www.pistolfly.jp/weblog/2012/01/rack-middleware.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">ruby on rails</category>
            
            
            <pubDate>Tue, 24 Jan 2012 14:00:52 +0900</pubDate>
        </item>
        
        <item>
            <title>[apache] mod_proxyでバックエンドのサーバがダウンすると復旧しても 503 Service Temporarily Unavailable</title>
            <description><![CDATA[<p>
mod_proxyでバックエンドのサーバがいったんダウンすると、復旧しても一定時間（デフォルトでは60秒）は 503 Service Temporarily Unavailable になってしまう。
</p>

<p>
リトライするまでの時間は、ProxyPassディレクティブ の retry パラメータで指定することができる。<br />
（ProxyPass ディレクティブのスキームが balancer:// で始まる場合は、対応する &lt;Proxy&gt; セクション中の BalancerMember ディレクティブに retry パラメータを指定できる。）
</p>

<pre class="prettyprint">
ProxyPass / http://localhost:3000/ retry=5
ProxyPassReverse / http://localhost:3000/
</pre>

<pre class="prettyprint">ProxyPass / balancer://mycluster/
ProxyPassReverse / balancer://mycluster/
&lt;Proxy balancer://mycluster/&gt;
  BalancerMember http://localhost:9001 loadfactor=10 retry=5
  BalancerMember http://localhost:9002 loadfactor=10 retry=5
  BalancerMember http://localhost:9003 loadfactor=10 retry=5
&lt;/Proxy&gt;</pre>

<p>
<a href="http://httpd.apache.org/docs/2.1/ja/mod/mod_proxy.html" target="_blank">mod_proxy - Apache HTTP サーバ</a><br />
<a href="http://d.hatena.ne.jp/dayflower/20080215/1202974375" target="_blank">ProxyPass には retry=?? を指定しておく - daily dayflower</a><br />
<a href="http://d.hatena.ne.jp/yotena/20080216/1203130259" target="_blank">BalancerMemberにはretry=??を指定しておく - cys b</a><br />

</p>]]></description>
            <link>http://www.pistolfly.jp/weblog/2012/01/mod-proxyservice-temporarily-u.html</link>
            <guid>http://www.pistolfly.jp/weblog/2012/01/mod-proxyservice-temporarily-u.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">apache</category>
            
            
            <pubDate>Wed, 18 Jan 2012 15:58:31 +0900</pubDate>
        </item>
        
        <item>
            <title>[ruby on rails] Phusion Passenger &amp; running multiple Ruby versions</title>
            <description><![CDATA[<p>
<a href="http://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-ruby-versions/" target="_blank">Phusion Passenger & running multiple Ruby versions - Phusion Corporate Blog</a>
</p>]]></description>
            <link>http://www.pistolfly.jp/weblog/2012/01/phusion-passenger-running-mult.html</link>
            <guid>http://www.pistolfly.jp/weblog/2012/01/phusion-passenger-running-mult.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">ruby on rails</category>
            
            
            <pubDate>Sat, 14 Jan 2012 15:08:51 +0900</pubDate>
        </item>
        
        <item>
            <title>[ruby] CentOSにRVMをマルチユーザ用にインストール</title>
            <description><![CDATA[<h3>マルチユーザ用にRVMをインストール</h3>

<p>
マルチユーザ用にRVMをインストールするには、sudo でインストールする。
</p>

<p>
<a href="https://rvm.beginrescueend.com/rvm/install/" target="_blank">RVM: Ruby Version Manager - Installing RVM</a>
</p>

<pre class="command-line">
$ sudo bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
Downloading RVM from wayneeseguin branch stable

curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). The default
 bundle is named curl-ca-bundle.crt; you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

Could not download 'https://github.com/wayneeseguin/rvm/tarball/stable'.
  Make sure your certificates are up to date as described above.
  To continue in insecure mode run 'echo insecure >> ~/.curlrc'.
</pre>

<p>
curlのSSL証明書の検証でエラーになった。<br />
CA証明書が古いらしい。<br />
新しいCA証明書を取得する。
</p>

<h3>CA証明書のアップデート</h3>

<pre class="command-line">
$ sudo mv /etc/pki/tls/certs/ca-bundle.crt /etc/pki/tls/certs/ca-bundle.crt.bak # バックアップ
$ sudo curl http://curl.haxx.se/ca/cacert.pem -o /etc/pki/tls/certs/ca-bundle.crt
</pre>

<p>
<a href="http://d.hatena.ne.jp/kanonji/20111208/1323323155" target="_blank">curlでまたSSLのエラーが出たので対処 - kanonjiの日記</a><br />
<a href="http://curl.haxx.se/docs/sslcerts.html" target="_blank">cURL - Details on Server SSL Certificates</a><br />
<a href="http://curl.haxx.se/docs/caextract.html" target="_blank">cURL - Extract CA Certs from Mozilla</a>
</p>

<p>
再度sudoでRVMをインストール。
</p>

<pre class="command-line">
$ sudo bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
Downloading RVM from wayneeseguin branch stable
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  796k  100  796k    0     0   170k      0  0:00:04  0:00:04 --:--:--  340k

Installing RVM to /usr/local/rvm/
installing - /usr/local/rvm/man/man1/rvm.1 -
installing - /usr/local/rvm/man/man1/rvm.1.gz -
    Creating RVM system user group 'rvm'

# RVM:  Shell scripts enabling management of multiple ruby environments.
# RTFM: https://rvm.beginrescueend.com/
# HELP: http://webchat.freenode.net/?channels=rvm (#rvm on irc.freenode.net)
# Screencast: http://screencasts.org/episodes/how-to-use-rvm

# In case of any issues read output of 'rvm requirements' and/or 'rvm notes'

Installation of RVM in /usr/local/rvm/ is complete.

# XXXXXXXXX,
#
#   Thank you for using RVM!
#   I sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne
</pre>

<p>
sudoでマルチユーザ用にインストールすると、RVMは /usr/local/rvm にインストールされる。
</p>

<h3>sudoを使うのは、RVM自体のインストール時のみ。</h3>

<p>
以降の操作は、sudoを使わない。rvm installやgem install など、/usr/local/rvm 下に書き込む操作は、rvmグループに所属しているユーザで行う。（/usr/local/rvmのグループがrvmになっている。）
</p>

<p>
<a href="https://rvm.beginrescueend.com/support/troubleshooting/#sudo" target="_blank">RVM: Ruby Version Manager - Troubleshooting RVM</a><br />
<a href="http://dragonstar.asablo.jp/blog/2011/10/05/6133307" target="_blank">RVM をマルチユーザー用にセットアップする: ひ日記</a>
</p>

<p>
ユーザのグループにrvmを追加。
</p>

<pre class="command-line"># usermod -a -G rvm &lt;ユーザ名&gt;</pre>

<p>
ユーザをrvmグループに追加したら、いったんログアウトしてから、rubyやgemをインストール。<br />
sudo しない。
</p>

<pre class="command-line">
$ rvm install 1.9.3
$ rvm use 1.9.3
$ gem install rails
</pre>

<p>
RVMのアップデートも、sudoを使わず、rvmsudoを使う。
</p>

<pre class="command-line">
$ rvmsudo rvm get latest
</pre>
]]></description>
            <link>http://www.pistolfly.jp/weblog/2012/01/centosrvm.html</link>
            <guid>http://www.pistolfly.jp/weblog/2012/01/centosrvm.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">ruby</category>
            
            
            <pubDate>Sat, 14 Jan 2012 12:27:00 +0900</pubDate>
        </item>
        
        <item>
            <title>[subversion] Subversion1.5以降でのブランチとマージ</title>
            <description><![CDATA[<p>
Subversion 1.5 以降では、Merge Tracking 機能により、マージが楽になった。<br />
フィーチャーブランチの典型的なマージ手順をメモしておく。
</p>

<p>
※以下の例で使用している、作業コピーのリポジトリーのルートディレクトリーのURLを表すキャレット (^) 記法は、Subversion 1.6 以降で可能です。
</p>

<h3>ブランチ作成</h3>

<pre class="command-line">$ cd &lt;いずれかの作業コピーのパス&gt; # キャレット記法を使うために作業コピーに移動。フルでURL指定するなら不要。
$ svn cp ^/trunk ^/branches/br1</pre>

<h3>ブランチとtrunkの差分表示</h3>

<pre class="command-line">$ cd &lt;いずれかの作業コピーのパス&gt; # キャレット記法を使うために作業コピーに移動。フルでURL指定するなら不要。
$ svn diff ^/trunk ^/branches/br1</pre>

<h3>trunkの最新をブランチにマージ</h3>

<p>
branchでの作業期間中、これを定期的に行う。
</p>

<pre class="command-line">$ cd &lt;ブランチの作業コピーのパス&gt;
$ svn up # 作業コピーを最新にしておく
$ svn st # 作業コピーがクリーンであることを確認しておく
$ svn merge ^/trunk # ブランチの作業コピーにtrunkの最新をマージ
$ svn commit</pre>

<h3>ブランチをtrunkにマージ</h3>

<p>
branchでの修正が完了したら、最後にbranchをtrunkにマージする。<br />
<strong>--reintegrate オプションが必要。</strong>
</p>

<pre class="command-line">$ cd &lt;trunkの作業コピーのパス&gt;
$ svn up # 作業コピーを最新にしておく
$ svn merge --reintegrate ^/branches/br1
$ svn commit</pre>

<p>
<strong>いったん --reintegrate でマージされたブランチはもう使えない。</strong>
</p>

いったん削除する必要がある。
<pre class="command-line">$ svn delete ^/branches/br1</pre>

ブランチでの作業を再開したい場合は、一度削除してから、ブランチを再作成する。
<pre class="command-line">$ svn cp ^/trunk ^/branches/br1</pre>


<h3>削除したブランチのログを見たい</h3>

<p>
ブランチを削除しても、全てのリビジョンは残っているので、レポジトリのルートURLやブランチのルートURLなどに対して svn log すればよい。
</p>

<pre class="command-line">$ cd &lt;いずれかの作業コピーのパス&gt; # キャレット記法を使うために作業コピーに移動。フルでURL指定するなら不要。
$ svn log ^/
$ svn log ^/branches</pre>

<p>
<br />
<a href="http://svnbook.red-bean.com/en/1.6/svn.branchmerge.basicmerging.html" target="_blank">Basic Merging</a><br />

</p>]]></description>
            <link>http://www.pistolfly.jp/weblog/2012/01/subversion15.html</link>
            <guid>http://www.pistolfly.jp/weblog/2012/01/subversion15.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">subversion</category>
            
            
            <pubDate>Mon, 02 Jan 2012 15:05:32 +0900</pubDate>
        </item>
        
        <item>
            <title>[mysql] スロークエリログを取得する</title>
            <description><![CDATA[my.cnf
<pre class="prettyprint">
[mysqld]
# ログの出力先
log_slow_queries = /var/log/mysql-slow.log
# これより実行に時間がかかる SQL ステートメントをロギング(秒)
long_query_time = 2
</pre>

<p>
空のログファイルを作成し、パーミッションを設定後、mysqldを再起動する。
</p>

<pre class="command-line">
# touch /var/log/mysql-slow.log
# chown mysql:mysql /var/log/mysql-slow.log
# /etc/init.d/mysqld restart
</pre>

<p>
ログをクリアする場合は、
</p>

<pre class="command-line">
# :> /var/log/mysql-slow.log
</pre>
]]></description>
            <link>http://www.pistolfly.jp/weblog/2012/01/post-139.html</link>
            <guid>http://www.pistolfly.jp/weblog/2012/01/post-139.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">mysql</category>
            
            
            <pubDate>Mon, 02 Jan 2012 00:03:27 +0900</pubDate>
        </item>
        
        <item>
            <title>[mysql] クエリキャッシュ</title>
            <description><![CDATA[<h3>クエリキャッシュの設定</h3>

my.cnf
<pre class="prettyprint">
[mysqld]
query_cache_size=64M
query_cache_type=2
</pre>

<p>
query_cache_type には、以下のいずれかを指定できる。<br />
0: (OFF) キャッシュを行わない、または キャッシュした結果の読み出しを行わない。<br />
1: (ON) SELECT SQL_NO_CACHE で始まるステートメント以外のキャッシュ。<br />
2: (DEMAND) SELECT SQL_CACHE で始まるステートメントだけのキャッシュ。
</p>

<h3>クエリキャッシュのステータスを確認</h3>
<pre class="command-line">
mysql> show status like 'Qcache%';
+-------------------------+----------+
| Variable_name           | Value    |
+-------------------------+----------+
| Qcache_free_blocks      | 1        | 
| Qcache_free_memory      | 66674696 | 
| Qcache_hits             | 8        | 
| Qcache_inserts          | 41       | 
| Qcache_lowmem_prunes    | 0        | 
| Qcache_not_cached       | 1145     | 
| Qcache_queries_in_cache | 41       | 
| Qcache_total_blocks     | 88       | 
+-------------------------+----------+
8 rows in set (0.00 sec)
</pre>

<h3>クエリキャッシュのデフラグメント</h3>
<pre class="command-line">
mysql> FLUSH QUERY CACHE;
</pre>

<h3>クエリキャッシュからクエリ結果を削除</h3>
<pre class="command-line">
mysql> RESET QUERY CACHE;
</pre>

<p>
<br />
<a href="http://dev.mysql.com/doc/refman/5.1/ja/query-cache.html" target="_blank">MySQL :: MySQL 5.1 リファレンスマニュアル :: 4.13 MySQL クエリ キャッシュ</a><br />

</p>]]></description>
            <link>http://www.pistolfly.jp/weblog/2011/12/mysql-query-cache.html</link>
            <guid>http://www.pistolfly.jp/weblog/2011/12/mysql-query-cache.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">mysql</category>
            
            
            <pubDate>Sat, 31 Dec 2011 06:35:15 +0900</pubDate>
        </item>
        
        <item>
            <title>[ruby on rails] Rails3のActionMailerでOpenSSL::SSL::SSLError (hostname was not match with the server certificate)</title>
            <description><![CDATA[<p>
Rails3でメールを送信したところ、送信できなかった。
</p>

<p>
ActionMailerの設定は、
</p>

config/initializers/02_action_mailer.rb
<pre class="prettyprint">
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
  :address        => "mail.example.com",
  :port           => "587",
  :domain         => "example.com",
  :user_name      => "username",
  :password       => "password",
  :authentication => :cram_md5
}
</pre>

<p>
のようにしている。<br />
同じ設定で、Rails2では送信できている。
</p>

<h3>原因</h3>

<pre class="prettyprint">
ActionMailer::Base.raise_delivery_errors = true
</pre>

<p>
を追加して実行したところ、
</p>

<pre class="command-line">
OpenSSL::SSL::SSLError (hostname was not match with the server certificate)
</pre>

<p>
となり、SSL証明書の検証で例外が発生しているらしいことが分かった。
</p>

また、メールサーバのログでも、
<pre class="command-line">
connect from xxxxx
setting up TLS connection from xxxxx
TLS connection established from xxxxx
lost connection after STARTTLS from xxxxx
disconnect from xxxxx
</pre>
という状態だった。

<p>
このメールサーバはテスト用のpostfixで、<br />
smtpd_tls_security_level = may<br />
にしており、<br />
smtpd_tls_cert_file、smtpd_tls_key_file には、自己証明書を設定していた。
</p>

<p>
Rails3では、STARTTLSがデフォルトで有効になっているためTLSで接続しようとするが、このメールサーバの証明書がテスト用の自己証明書だったので検証に失敗していたのが原因らしい。
</p>

<h3>解決方法</h3>

<p>
証明書を正当なものにすればよいと思われるが、テスト環境なのでとりあえず今は自己証明書を使いたい。<br />
そのためには、ActionMailer::Base.smtp_settingsの設定で、STARTTLSを無効にするか証明書の検証を無効にする。
</p>

<pre class="prettyprint">
ActionMailer::Base.smtp_settings = {
  :address        => "mail.example.com",
  :port           => "587",
  :domain         => "example.com",
  :user_name      => "username",
  :password       => "password",
  :authentication => :cram_md5,
  :enable_starttls_auto => true,  # STARTTLSを無効にする場合はfalseにする
  :openssl_verify_mode => 'none'  # STARTTLSを有効にしつつ、不正な証明書もOKにしたい場合は、証明書の検証を無効にする
}
</pre>

<p>
証明書の検証を無効にするのは本当はよくないけど、テスト環境等で自己証明書でもOKにしたい場合は、とりあえず上記のようにすれば、TLSでメールが送信できます。
</p>

<p>
<br />
<a href="http://davidroetzel.wordpress.com/2011/01/14/rails-3-actionmailer-tls-certificate-verification/" target="_blank">OpenWebOps</a>
</p>

<p>
<a href="http://stackoverflow.com/questions/5062615/postfix-rails-3-0-actionmailer-lost-connection-after-starttls" target="_blank">email - Postfix & Rails 3.0 ActionMailer: lost connection after STARTTLS - Stack Overflow</a><br />

</p>]]></description>
            <link>http://www.pistolfly.jp/weblog/2011/12/rails3actionmailer.html</link>
            <guid>http://www.pistolfly.jp/weblog/2011/12/rails3actionmailer.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">mail</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">ruby on rails</category>
            
            
            <pubDate>Thu, 29 Dec 2011 18:09:38 +0900</pubDate>
        </item>
        
        <item>
            <title>[mac] MacのターミナルでのEmacsのメタキー</title>
            <description><![CDATA[<p>
MacのターミナルでEmacsを使う場合に、デフォルトだとメタキーとしてエスケープキーしか使えないので不便だったが、ターミナルの環境設定→キーボードで、「メタキーとして option キーを使用」にチェックを入れると、optionキーをメタキーとして使用できた。
</p>

<p>
<a href="http://d.hatena.ne.jp/goinger/20090104/1231048095" target="_blank">[mac][emacs] Terminal上でemacsのメタキーを使う方法 - goinger的日記</a><br />

</p>]]></description>
            <link>http://www.pistolfly.jp/weblog/2011/12/macterminalemacs.html</link>
            <guid>http://www.pistolfly.jp/weblog/2011/12/macterminalemacs.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">emacs</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">mac</category>
            
            
            <pubDate>Sun, 25 Dec 2011 10:16:15 +0900</pubDate>
        </item>
        
        <item>
            <title>[その他] EXIFの仕様</title>
            <description><![CDATA[<p>
<a href="http://www.exif.org/specifications.html" target="_blank">EXIF.org - EXIF and related resources - Specificications</a>
</p>]]></description>
            <link>http://www.pistolfly.jp/weblog/2011/12/exif.html</link>
            <guid>http://www.pistolfly.jp/weblog/2011/12/exif.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">その他</category>
            
            
            <pubDate>Sat, 24 Dec 2011 15:09:54 +0900</pubDate>
        </item>
        
        <item>
            <title>[mail] SPFレコードチェックツール</title>
            <description><![CDATA[<p>
<a href="http://salt.iajapan.org/wpmu/anti_spam/admin/operation/information/spf_i01/#30" target="_blank">間違いから学ぶSPFレコードの正しい書き方 : 迷惑メール対策委員会</a>
</p>]]></description>
            <link>http://www.pistolfly.jp/weblog/2011/12/spf.html</link>
            <guid>http://www.pistolfly.jp/weblog/2011/12/spf.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">mail</category>
            
            
            <pubDate>Thu, 22 Dec 2011 18:10:07 +0900</pubDate>
        </item>
        
        <item>
            <title>[network] サブドメインのmxレコード</title>
            <description><![CDATA[<p>
<a href="http://perl.no-tubo.net/2011/01/31/dns%E3%81%AEmx%E3%83%AC%E3%82%B3%E3%83%BC%E3%83%89%E3%81%A7%E3%83%8F%E3%83%9E%E3%82%8B%E3%80%82valuedomain%E7%B7%A8/" target="_blank">DNSのmxレコードでハマる。ValueDomain編 | clicktx::Tech::Memo</a>
</p>]]></description>
            <link>http://www.pistolfly.jp/weblog/2011/12/mx.html</link>
            <guid>http://www.pistolfly.jp/weblog/2011/12/mx.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">network</category>
            
            
            <pubDate>Wed, 21 Dec 2011 18:19:08 +0900</pubDate>
        </item>
        
        <item>
            <title>[mac] SmartGit での日本語の文字化け対処</title>
            <description><![CDATA[<p>
<a href="http://d.hatena.ne.jp/matsuoshi/20110914/1315975336" target="_blank">SmartGit での日本語の文字化け対処 - monaurallab (モノラルラボ)</a>
</p>]]></description>
            <link>http://www.pistolfly.jp/weblog/2011/12/smartgit.html</link>
            <guid>http://www.pistolfly.jp/weblog/2011/12/smartgit.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">git</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">mac</category>
            
            
            <pubDate>Fri, 16 Dec 2011 17:07:06 +0900</pubDate>
        </item>
        
        <item>
            <title>[linux] /etc/fstabの記述ミスで起動できなくなった場合</title>
            <description><![CDATA[<p>
fdiskでパーティションを削除した後、/etc/fstab に削除したパーティションのエントリを残したままサーバを再起動したところ、起動時のファイルシステムチェックでエラーになり、起動しなくなってしまった。
</p>

<p>
その対処方法。
</p>

<ol class="list">
<li>エラー画面でrootパスワードを入力してメンテナンスモードに入る。</li>
<li>
/ が読み取り専用モードでマウントされているため、書き込み可能なようにマウントし直す。これをしないと、fstabを編集できない。
<pre class="command-line">
# mount -o remount,rw /
</pre>
</li>
<li>
fstabの不要エントリ(実際には削除されているが、エントリに残っているディスクパーティション)を削除。
<pre class="command-line">
# nano /etc/fstab
</pre>
</li>
<li>システムを再起動。
<pre class="command-line">
# shutdown -r now
</pre>
</li>
</ol>

<p>
<br />
<a href="http://d.hatena.ne.jp/shibainu55/20090105/1231903678" target="_blank">/etc/fstabの記述ミスでOSブート不能 - shibainu55日記</a>
</p>]]></description>
            <link>http://www.pistolfly.jp/weblog/2011/12/etcfstabos.html</link>
            <guid>http://www.pistolfly.jp/weblog/2011/12/etcfstabos.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">linux</category>
            
            
            <pubDate>Thu, 08 Dec 2011 21:05:29 +0900</pubDate>
        </item>
        
    </channel>
</rss>

